EJSC.Chart Property Examples (Page 2)
Properties Demonstrated
- Standard EJSC.Chart Properties
Desired Result
Default Chart Settings
Source Code
- <script type="text/javascript">
- var chart = new EJSC.Chart("myChart1a", {
- });
- chart.addSeries(new EJSC.AreaSeries(
- new EJSC.ArrayDataHandler([
- [.5,4.7],[2.1,3],[3.5,4.2],[4,2.3]
- ])
- ));
- </script>
Properties Demonstrated
- building_message
- drawing_message
- max_zoom_message
Desired Result
This chart will have custom building, drawing, and max zoom messages.
Source Code
- <script type="text/javascript">
- var chart = new EJSC.Chart("myChart1b", {
- building_message: 'Currently Building...',
- drawing_message: 'Currently Drawing...',
- max_zoom_message: 'No More Zooming'
- });
- chart.addSeries(new EJSC.AreaSeries(
- new EJSC.ArrayDataHandler([
- [.5,4.7],[2.1,3],[3.5,4.2],[4,2.3]
- ])
- ));
- </script>
Properties Demonstrated
- allow_mouse_wheel_zoom
- allow_move
- legend_title
Desired Result
This chart will not allow zooming by using the mouse-wheel, and will not allow the chart to be dragged around once zoomed in.
Source Code
- <script type="text/javascript">
- var chart = new EJSC.Chart("myChart2a", {
- allow_mouse_wheel_zoom: false,
- allow_move: false,
- legend_title: 'My Legend Title'
- });
- chart.addSeries(new EJSC.LineSeries(
- new EJSC.ArrayDataHandler([
- [1,1],[2,2.5],[3,3.75],[4,2],[5,3]
- ])
- ));
- </script>
Properties Demonstrated
- axis_bottom
- axis_left
- axis_right
- axis_top
Desired Result
This chart will show all four axis, even though they are not all being used.
Source Code
- <script type="text/javascript">
- var chart = new EJSC.Chart("myChart2b", {
- axis_bottom: { show: true },
- axis_left: { show: true },
- axis_right: { show: true },
- axis_top: { show: true }
- });
- chart.addSeries(new EJSC.LineSeries(
- new EJSC.ArrayDataHandler([
- [1,1],[2,2.5],[3,3.75],[4,2],[5,3]
- ])
- ));
- </script>
Properties Demonstrated
- text_value_array
Desired Result
Default Chart Settings
Source Code
- <script type="text/javascript">
- var chart = new EJSC.Chart("myChart3a", {
- text_value_array: [
- 'First',
- 'Second',
- 'Third',
- 'Fourth'
- ]
- });
- chart.addSeries(new EJSC.LineSeries(
- new EJSC.ArrayDataHandler([
- [1,.7],[2,4],[3,5],[4,6]
- ])
- ));
- </script>