Description
This is an example of a simple line chart. It demonstrates use of the custom defined title, x_axis_caption, y_axis_caption, auto_zoom, auto_find_point_by_x, and show_crosshairs properties. These allow for the custom title, x axis caption, and y axis caption, an auto defined zoom range, the auto selection of points by position of cursor on the x axis, and the display of the x axis crosshairs. The series title was defined as well.
Source Code
- <script type=”text/javascript”>
- var myChart1 = new EJSC.Chart( ‘myChart1a’ , {
- title: “Sample Line Chart” ,
- axis_bottom: { caption: “Frequency (Hz)” , crosshair: { show: true } } ,
- axis_left: { caption: “Velocity (in/s)” , crosshair: { show: false } } ,
- auto_zoom: ‘y’ ,
- auto_find_point_by_x: true
- }
- );
- myChart1.addSeries( new EJSC.LineSeries( new EJSC.XMLDataHandler(“vibration2.xml”) , {
- title: “Line 1”,
- __padding: { x_min: 0, y_min: 1, x_max: 0, y_max: 5 }
- }
- )
- );
- </script>