Scales
Automatic vertical scale | Custom vertical scale |
10 20 30 40 50 60 70 80 '02 '03 '04 '05 '06 '07 '08 '09 '10 '11 |
Sales, million 0 10 20 30 40 50 60 70 80 90 100 '02 '03 '04 '05 '06 '07 '08 '09 '10 '11 Years |
Automatic vertical scale | Custom vertical scale |
10 20 30 40 50 60 70 80 '02 '03 '04 '05 '06 '07 '08 '09 '10 '11 |
Sales, million 0 10 20 30 40 50 60 70 80 90 100 '02 '03 '04 '05 '06 '07 '08 '09 '10 '11 Years |
<script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script> <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css"> <script src="../common/testdata.js"></script> <script></script> <table> <tr> <td>Automatic vertical scale</td> <td>Custom vertical scale</td> </tr> <tr> <td><div id="chart1" style="width:400px;height:250px;border:1px solid #A4BED4;"></div></td> <td><div id="chart2" style="width:400px;height:250px;border:1px solid #A4BED4;"></div></td> </tr> </table>window.onload = function() { var chart1 = new dhtmlXChart({ view: "line", container: "chart1", value: "#sales#", tooltip: { template: "#sales#"; }, preset: "plot", yAxis: {}, xAxis: { template: "'#year#"; } }); chart1.parse(dataset, "json"); var chart2 = new dhtmlXChart({ view: "line", container: "chart2", value: "#sales#", tooltip: { template: "#sales#"; }, preset: "plot", xAxis: { title: "Years", template: "'#year#"; }, yAxis: { start: 0, end: 100, step: 10, title: "Sales, million"; } }); chart2.parse(dataset, "json"); }