Fork me on GitHub
jsGraph

Min/Max serie

To display zone series, use the zone keyword in the graph.newSerie( serieName, serieOptions, serieType ).

Setting the data is slightly different that the usual line serie, as you need three data per point (x,min,max). You can however still use a linear array to set your data just as you would for a line serie

As of today every point needs to be defined. There is no way to define a point for the lower bound and not the upper bound.

Source code

var graphinstance = new Graph( domGraph );
var serie = graphinstance.newSerie( "serieTest", {}, 'zone' )
  .setLabel( "My serie" )
  .autoAxis()
  .setData( data3 )
  .setFillColor( 'rgba(100, 100, 300, 0.2)' )
  .setLineColor( 'transparent' );

var serie = graphinstance.newSerie( "serieTest2", {}, 'zone' )
  .setLabel( "My serie" )
  .autoAxis()
  .setData( data2 )
  .setFillColor( 'rgba(200, 100, 100, 0.6)' )
  .setLineColor( 'rgba(200, 100, 100, 0.9)' );

var serie = graphinstance.newSerie( "serieTest3", {}, 'line' )
  .setLabel( "My serie" )
  .autoAxis()
  .setData( data )
  .setLineColor( 'rgba(150, 70, 50, 1)' )

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