Description
This is an example of a stacked chart. It demonstrates the ability to easily display multiple series of various types on a single chart. In this example a pie, scatter, and line chart are displayed simultaneously. Each series type can be displayed or hidden using the chart legend. In addition the chart exhibits use of the customer title, x axis caption, and y axis caption properties. Each series defines its own custom title as well.
Source Code
- <script type=”text/javascript”>
- var myChart4 = new EJSC.Chart( ‘myChart1a’ , {
- title: “Sample Stacked Chart” ,
- axis_bottom: { caption: “Frequency (Hz)” } ,
- axis_left: { caption: “Velocity (in/s)” } } );
- myChart4.addSeries( new EJSC.PieSeries( new EJSC.XMLDataHandler(“pie.xml”) ,
- {title: “Pie 1” } ) );
- myChart4.addSeries( new EJSC.ScatterSeries( new EJSC.XMLDataHandler(“scatter-mix.xml”) ,
- { title: “Scatter 1” } ) );
- myChart4.addSeries( new EJSC.LineSeries( new EJSC.XMLDataHandler(“line-mix.xml”) ,
- { title: “Line 1” } ) );
- </script>