Sgvizler has moved to github. This site and its repository will no longer be maintained.
wiki:Sgvizler/Chart/SgvizlerVisualizationDefList

This chart and its examples are implemented using Sgvizler 0.6, for version 0.5 see Sgvizler/0.5/DesigningQueries.

source:misc/image/screenshot/sDefList.png

Sgvizler Definition List

Creates an (ordinary) HTML definition list.

Chart ID
sgvizler/google.visualization.DefList
Source
 src/visualization/DefList.js

Query result set format

Any number of columns on any format. All values are treated as strings.

Chart options

Name Default Description
termPrefix (empty string) String (can be HTML) to prefix each term with
termPostfix : (colon) String (can be HTML) to postfix each term with
definitionPrefix (empty string) String (can be HTML) to prefix each definition with
definitionPostfix (empty string) String (can be HTML) to postfix each definition with
cellSep (single space) string (can be html) to separate cells in definition columns

See Sgvizler/Using, or the example(s) below, for how to set options.

Live Example

Query: List the muncipalities of Rogaland, Norway with their location and description.

Note that special characters like <, > and " in the SPARQL query must be encoded.

HTML

<div id="ex"
     data-sgvizler-endpoint="http://dbpedia.org/sparql"
     data-sgvizler-endpoint_output_format="json"
     data-sgvizler-query="
        SELECT ?name ?lat ?long ?text
        { ?url a dbpo:AdministrativeRegion ;
               dct:subject &lt;http://dbpedia.org/resource/Category:Municipalities_of_Rogaland> ;
               rdfs:label ?name ;
               geo:lat ?lat ;
               geo:long ?long ;
               rdfs:comment ?text .
               FILTER(lang(?text)=&#34;en&#34;)
               FILTER(lang(?name)=&#34;en&#34;) }"
      data-sgvizler-chart="sgvizler.visualization.DefList"
      data-sgvizler-chart-options="cellSep= - |definitionPrefix=Location: "
   style="width:400px; height:265px; border:1px solid black; display: inline-block; overflow: scroll;"></div>

The CSS style specification overflow: scroll; is set to shorten the height of the output.

Result

The result of the HTML above (left), and a google.visualization.Table rendering of the same query (right).


Notes

See Sgvizler/Setup for how Sgvizler is setup on this site.

Note that the query and visualization is ment to show the use of Sgvizler, and may not be the most appropriate way of conveying the information in this result set.

User Examples and Comments

Users, please insert (links to) other examples of usage of this Sgvizler chart, or relevant comments here.