Fork me on GitHub
jsGraph

Basic example

Setting up a chart takes only a couple lines. Call new Graph( domElement ); to start a graph. Render it with graph.redraw();

To add a serie, call graph.newSerie( "serieName" ). To set data, call serie.setData() method.

Source code

var graphinstance = new Graph( domGraph, {}, {} );
graphinstance.redraw();

graphinstance.on( "newSerie", function( serie ) {
  console.log( serie );
} )

graphinstance.newSerie( "temp_nh", {
  useSlots: true
} )
  .autoAxis()
  .setData( series[ 0 ] );

graphinstance.redraw();
graphinstance.drawSeries();

//graphinstance.drawSeries();

/*
      var serie2 = [ 1850, 100, 1900 , 0, 1950, -100 ];
      graphinstance.newSerie("222")
        .autoAxis()
        .setData( serie2 )
        .setMarkers();
  */