Emprise Javascript Charts

Bar Chart Example

Description

This is an example of a simple bar chart. It demonstrates use of the custom defined title, x_axis_caption, y_axis_caption, show_crosshairs, and formatted x and y axis zero planes properties. These allow for the custom title, x and y axis captions, x and y axis crosshairs, and custom formatted x and y zero planes. The series title and color was defined as well.

Source Code

  1. <script type=”text/javascript”>
  2.     var myChart5 = new EJSC.Chart( ‘myChart1a’ , {
  3.                             title: “Sample Bar Chart” ,
  4.                             axis_bottom: {
  5.                               caption: “Ship”,
  6.                               crosshair: { show: true }
  7.                             } ,
  8.                              axis_left: {
  9.                               crosshair: { show: true },
  10.                               caption: “Velocity (in/s)”,
  11.                               zero_plane: { show: true, color: ‘rgb(0,0,0)’ , thickness: 1 }
  12.                             }
  13.                            }
  14.                    );
  15.         var myChart5Series = myChart5.addSeries( new EJSC.BarSeries( new EJSC.XMLDataHandler(“bar3.xml”) , {
  16.                                                         title: “Bar 1”,
  17.                                                         color: ‘rgb(255,48,48)’
  18.                                                           }
  19.                                       )
  20.                             )
  21. </script>
Spread the love