Emprise Javascript Charts

Stacked Chart Example

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

  1. <script type=”text/javascript”>
  2.       var myChart4 = new EJSC.Chart( ‘myChart1a’ , {
  3.                            title: “Sample Stacked Chart” ,
  4.                            axis_bottom: { caption: “Frequency (Hz)” } ,
  5.                            axis_left: { caption: “Velocity (in/s)” } } );
  6.         myChart4.addSeries( new EJSC.PieSeries( new EJSC.XMLDataHandler(“pie.xml”) ,
  7.                              {title: “Pie 1” } ) );
  8.         myChart4.addSeries( new EJSC.ScatterSeries( new EJSC.XMLDataHandler(“scatter-mix.xml”) ,
  9.                                { title: “Scatter 1” } ) );
  10.         myChart4.addSeries( new EJSC.LineSeries( new EJSC.XMLDataHandler(“line-mix.xml”) ,
  11.                              { title: “Line 1” } ) );
  12. </script>
Spread the love