| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
<![if gte IE 9]> |
| 13 |
<!DOCTYPE HTML> |
| 14 |
<html lang="en"> |
| 15 |
<head> |
| 16 |
<![endif]> |
| 17 |
<title>Chart 2D</title> |
| 18 |
<style type="text/css"> |
| 19 |
@import "../../../../dojo/resources/dojo.css"; |
| 20 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 21 |
</style> |
| 22 |
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, async: true, has:{'dojo-bidi': true}"></script> |
| 23 |
<script type="text/javascript"> |
| 24 |
require([ |
| 25 |
"dojo/ready", |
| 26 |
"dojo/dom", |
| 27 |
"dojox/charting/Chart", |
| 28 |
"dojox/charting/axis2d/Default", |
| 29 |
"dojox/charting/plot2d/Lines", |
| 30 |
"dojox/charting/plot2d/Grid"], |
| 31 |
function(ready, dom, Chart, Axis, Lines, Grid){ |
| 32 |
ready(function(){ |
| 33 |
var chart = new Chart(dom.byId("chart")). |
| 34 |
addAxis("x", { fixLower: "minor", fixUpper: "minor", natural: true }). |
| 35 |
addAxis("y", { vertical: true, fixLower: "major", fixUpper: "major", includeZero: true }). |
| 36 |
addPlot("default", { type: Lines }). |
| 37 |
addPlot("grid", { type: Grid, renderOnAxis: false, majorVLine: { color: "green", width: 3 }, majorHLine: { color: "red", width: 3 } }). |
| 38 |
addSeries("Series A", [ 2, 1, 0.5, -1, -2 ] ).setDir("rtl"). |
| 39 |
render(); |
| 40 |
}); |
| 41 |
}); |
| 42 |
</script> |
| 43 |
</head> |
| 44 |
<body> |
| 45 |
<h1>Grid</h1> |
| 46 |
<div id="chart" style="width:400px; height:300px"></div> |
| 47 |
</body> |
| 48 |
</html> |