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

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

source:misc/image/screenshot/gPieChart.png

Google Pie Chart

Draws a pie chart with some hovering features. Many customizations available as options to the google function.

Chart ID
google.visualization.PieChart
External reference
 https://developers.google.com/chart/interactive/docs/gallery/piechart

Query result set format

2 columns:

  1. Pie slice label/identifier
    Datatype: any
  2. Pie slice value
    Datatype: Number

Chart options

See google page (link above) for available chart options.

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

Live Example

The countries in South America "sliced" according to population size.

We use the country name as the slice identifier (column 1: ?Country) and the country's population as the size of the slice (column 2: ?Population).

HTML

<div id="exPieChart" 
   data-sgvizler-endpoint="http://sws.ifi.uio.no/sparql/world" 
   data-sgvizler-query="
       SELECT ?Country ?Population 
       { [] w:hasName ?Country ; 
            w:hasCountryPopulation ?Population; 
            w:isCountryInContinent [ rdfs:label &quot;South America&quot; ] ; 
       } ORDER BY DESC(?Population)" 
   data-sgvizler-chart="google.visualization.PieChart"
   data-sgvizler-chart-options="pieHole=0.4|pieStartAngle=100"
   style="width:400px; height:265px; border:1px solid black;"></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.