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
- <script type=”text/javascript”>
- var myChart6 = new EJSC.Chart( ‘myChart1a’ , {
- title: “Sample Function Chart” ,
- axis_bottom: {
- caption: “X Value” ,
- zero_plane: { show: true, color: ‘rgb(0,0,0)’ , thickness: 1 }
- } ,
- axis_left: {
- caption: “Y Value” ,
- zero_plane: { show: true, color: ‘rgb(0,0,0)’ , thickness: 1 }
- }
- } );
- myChart6.addSeries( new EJSC.FunctionSeries( function(x) { return Math.pow(x,2); } ,
- { title: “Function x^2” } ) );
- myChart6.addSeries( new EJSC.FunctionSeries( function(x) { return Math.pow(x,3); } ,
- { title: “Function x^3” } ) );
- myChart6.addSeries( new EJSC.FunctionSeries( function(x) { return x; } ,
- { title: “Function x” } ) );
- </script>