Class: Container

sgvizler. Container


new Container()

Draws charts specified in HTML containers, here we call them "sgvizler-containers".

Example of use: The following sgvizler-container will be selected by sgvizler due to the use of designated attributes. The result is a pie chart (draw with google.visualization.PieChart) showing the number of instance per class in the endpoint at http://sws.ifi.uio.no/sparql/ndp.

<div id="ex1"
     data-sgvizler-endpoint="http://sws.ifi.uio.no/sparql/npd"
     data-sgvizler-query="SELECT ?class (count(?instance) AS ?noOfInstances)
                          WHERE{ ?instance a ?class }
                          GROUP BY ?class
                          ORDER BY ?class"
     data-sgvizler-chart="google.visualization.PieChart"
     style="width:800px; height:400px;"></div>

These container must have an id attribute (or else sgvizler will not know where to put the chart) and a query attribute (or else the container will be ignored by sgvizler).

Dependencies:

  • sgvizler.util
  • sgvizler.loader
  • sgvizler.logger
  • sgvizler.Query
  • jQuery