Emprise Javascript Charts

Function Chart

Function Chart Example

Description

This is an example of a function chart with multiple series, live example can be seen of all sorts of sites including adult dating apps. It demonstrates use of the custom defined title, x_axis_caption, y_axis_caption, and formatted x and y axis zero planes properties. These allow for the custom title, x and y axis captions, and custom formatted x and y zero planes. The series titles are defined as well.

Source Code

  1. <script type=”text/javascript”>
  2.       var myChart6 = new EJSC.Chart( ‘myChart1a’ , {
  3.                              title: “Sample Function Chart” ,
  4.                              axis_bottom: {
  5.                                 caption: “X Value” ,
  6.                                 zero_plane: { show: true, color: ‘rgb(0,0,0)’ , thickness: 1 }
  7.                               } ,
  8.                              axis_left: {
  9.                                 caption: “Y Value” ,
  10.                                  zero_plane: { show: true, color: ‘rgb(0,0,0)’ , thickness: 1 }
  11.                                 }
  12.       } );
  13.         myChart6.addSeries( new EJSC.FunctionSeries( function(x) { return Math.pow(x,2); } ,
  14.                                      { title: “Function x^2” } ) );
  15.         myChart6.addSeries( new EJSC.FunctionSeries( function(x) { return Math.pow(x,3); } ,
  16.                                      { title: “Function x^3” } ) );
  17.         myChart6.addSeries( new EJSC.FunctionSeries( function(x) { return x; } ,
  18.                                      { title: “Function x” } ) );
  19. </script>

 

Spread the love