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

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

source:misc/image/screenshot/gOrgChart.png

Google Org Chart

Draws a hierarchical chart.

Chart ID
google.visualization.OrgChart
External reference
 https://developers.google.com/chart/interactive/docs/gallery/orgchart
Other similiar charts
Sgvizler/Chart/GoogleVisualizationTreeMap

Query result set format

2--3 columns:

  1. Identifier for node
    Datatype: String
  2. Identifier for parent node. A root node has no parent
    Datatype: String
  3. Description of node representative for popup.
    Datatype: String

Column 3 is optional.

See  Google's page on this chart for more details.

Chart options

See  Google's page on this chart for all available options.

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

Live Example

Query: Fields on the Norwegian Contiental Shelf grouped after company.

There are three levels in the query: the root, the companies and the fields, each are contained in their own block. We use the string "ALL" to represent the root node.

HTML

<div id="ex"
   data-sgvizler-endpoint="http://sws.ifi.uio.no/sparql/npd"
   data-sgvizler-query="
        SELECT DISTINCT ?node ?parent
        { 
          # ROOT
          { LET (?node := &quot;ALL&quot;) }
          UNION
          # COMPANIES
          { ?s a npdv:Company ;
               npdv:name ?node .
            [] a npdv:Field ;
               npdv:hasCompany ?s .
            LET(?parent := &quot;ALL&quot;) }
          UNION
          # FIELDS
          { ?s a npdv:Field ;
               npdv:name ?node ;
               npdv:hasCompany [ npdv:name ?parent ] .
           }
        }"
   data-sgvizler-chart="google.visualization.OrgChart"
   style="width:400px; height:265px; border:1px solid black; display:
   inline-block; overflow: scroll;"></div>

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 illustrating this result set.

Feedback

Tickets

No results

User Examples and Comments

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