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

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

source:misc/image/screenshot/gTimeline.png

Google Timeline

Draws a timeline, similar to a more interactive line chart where the X-axis are dates.

Chart ID
google.visualization.AnnotatedTimeLine
External reference
 https://developers.google.com/chart/interactive/docs/gallery/annotatedtimeline
Other similiar charts
Sgvizler/Chart/GoogleVisualizationAnnotatedTimeLine
Sgvizler/Chart/GoogleVisualizationAreaChart
Sgvizler/Chart/GoogleVisualizationBarChart
Sgvizler/Chart/GoogleVisualizationBubbleChart
Sgvizler/Chart/GoogleVisualizationColumnChart
Sgvizler/Chart/GoogleVisualizationImageSparkLine
Sgvizler/Chart/GoogleVisualizationLineChart
Sgvizler/Chart/GoogleVisualizationMotionChart
Sgvizler/Chart/GoogleVisualizationScatterChart
Sgvizler/Chart/GoogleVisualizationSteppedAreaChart

Query result set format

2--n columns:

  1. Date, X-axis value
    Datatype: Date
  2. Y-axis value
    Datatype: Number
  3. Y-axis value title
    Datatype: String
  4. Y-axis value description
    Datatype: String
  5. ... Repreating columns 2--4.

Columns 3 and 4 are optional. To add more series, repeat columns 2--4, adding more columns to the result set.

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: The production of oil per year per field.

Note that we cast and format the year to a date typed value.

HTML

<div id="ex"
   data-sgvizler-endpoint="http://sws.ifi.uio.no/sparql/npd"
   data-sgvizler-query="
        SELECT xsd:date(fn:concat(?year, &quot;-01-01&quot;)) ?Oil_millSm3 ?Gas_billSm3 ?NGL_millSm3 ?Condensate_millSm3 ?Water_millSm3 
        { ?period a npdv:FieldProductionPeriod ; 
              npdv:hasField &lt;http://sws.ifi.uio.no/npd/field/Ekofisk&gt; ; 
              npdv:hasField [ npdv:name ?field ] ; 
              npdv:year ?year ; 
              npdv:producedNetOilMillSm3 ?Oil_millSm3 ; 
              npdv:producedNetGasBillSm3 ?Gas_billSm3 ; 
              npdv:producedNetNGLMillSm3 ?NGL_millSm3 ; 
              npdv:producedNetCondensateMillSm3 ?Condensate_millSm3 ; 
              npdv:producedWaterMillSm3 ?Water_millSm3 ;
              OPTIONAL{ ?period npdv:month ?month } . 
              FILTER (!bound(?month)) 
         } ORDER BY ?year" 
   data-sgvizler-chart="google.visualization.AnnotatedTimeLine"
   style="width:400px; height:265px; border:1px solid black; display: inline-block;"></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.