| 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 nulls</title> |
| 18 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 19 |
<style> |
| 20 |
@import "../../../../dojo/resources/dojo.css"; |
| 21 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 22 |
</style> |
| 23 |
<script src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, has:{'dojo-bidi': true}"></script> |
| 24 |
<script> |
| 25 |
|
| 26 |
dojo.require("dojox.charting.Chart"); |
| 27 |
dojo.require("dojox.charting.axis2d.Default"); |
| 28 |
dojo.require("dojox.charting.plot2d.Lines"); |
| 29 |
dojo.require("dojox.charting.plot2d.Areas"); |
| 30 |
dojo.require("dojox.charting.plot2d.Markers"); |
| 31 |
dojo.require("dojox.charting.plot2d.StackedLines"); |
| 32 |
dojo.require("dojox.charting.plot2d.StackedAreas"); |
| 33 |
dojo.require("dojox.charting.plot2d.Bars"); |
| 34 |
dojo.require("dojox.charting.plot2d.ClusteredBars"); |
| 35 |
dojo.require("dojox.charting.plot2d.StackedBars"); |
| 36 |
dojo.require("dojox.charting.plot2d.ClusteredColumns"); |
| 37 |
dojo.require("dojox.charting.plot2d.StackedColumns"); |
| 38 |
dojo.require("dojox.charting.plot2d.Bubble"); |
| 39 |
dojo.require("dojox.charting.plot2d.Candlesticks"); |
| 40 |
dojo.require("dojox.charting.plot2d.Pie"); |
| 41 |
|
| 42 |
makeObjects = function(){ |
| 43 |
|
| 44 |
var types = [ "Areas", "Bars", "ClusteredBars", "ClusteredColumns", "Lines", "Markers", "StackedAreas", "StackedBars", "StackedColumns", "StackedLines" ]; |
| 45 |
|
| 46 |
dojo.forEach(types, function(type, i){ |
| 47 |
new dojox.charting.Chart("test" + (i + 1)) |
| 48 |
.addAxis("x", { vertical: false, min: 0, max: 15 }) |
| 49 |
.addAxis("y", { vertical: true, min: 0, max: 15 }) |
| 50 |
.addPlot("default", { type: type }) |
| 51 |
.addSeries("Series A", [3, 5, null, 4, 0, 4, null, 1, 6, 5], { stroke: {color: "blue"}, fill: "lightblue" }) |
| 52 |
.addSeries("Series B", [6, 9, null, 5, 10, 7, 6, 3, 8, 6], { stroke: {color: "red"}, fill: "lightpink" }) |
| 53 |
.setDir("rtl").render(); |
| 54 |
}); |
| 55 |
|
| 56 |
new dojox.charting.Chart("test10") |
| 57 |
.addAxis("x", { vertical: false, min: 0, max: 15 }) |
| 58 |
.addAxis("y", { vertical: true, min: 0, max: 15 }) |
| 59 |
.addPlot("default", { type: "Candlesticks" }) |
| 60 |
.addSeries("Series A", [ |
| 61 |
{ low: 2, open: 3, close: 4, high: 9 }, |
| 62 |
{ low: 2, open: 5, close: 7, high: 8 }, |
| 63 |
null, |
| 64 |
{ low: 2, open: 4, close: 2, high: 5 }, |
| 65 |
{ low: 0, open: 0, close: 3, high: 3 }, |
| 66 |
{ low: 3, open: 4, close: 6, high: 7 }, |
| 67 |
null, |
| 68 |
{ low: 1, open: 1, close: 1, high: 1 }, |
| 69 |
{ low: 2, open: 6, close: 3, high: 8 }, |
| 70 |
{ low: 3, open: 5, close: 9, high: 10 } |
| 71 |
], { stroke: {color: "blue"}, fill: "lightblue" }) |
| 72 |
.setDir("rtl").render(); |
| 73 |
|
| 74 |
new dojox.charting.Chart("test11") |
| 75 |
.addPlot("default", { type: "Pie" }) |
| 76 |
.addSeries("Series A", [3, 5, null, 4, 0, 4, null, 1, 6, 5]) |
| 77 |
.setDir("rtl").render(); |
| 78 |
|
| 79 |
new dojox.charting.Chart("test12") |
| 80 |
.addAxis("x", { vertical: false, min: 0, max: 15 }) |
| 81 |
.addAxis("y", { vertical: true, min: 0, max: 15 }) |
| 82 |
.addPlot("default", { type: "Bubble" }) |
| 83 |
.addSeries("Series A", [ |
| 84 |
{ x: 2, y: 5, size: 2 }, |
| 85 |
null, |
| 86 |
{ x: 8, y: 6, size: 5 }, |
| 87 |
{ x: 5, y: 9, size: 4 }, |
| 88 |
null, |
| 89 |
{ x: 5, y: 1, size: 1 } |
| 90 |
]) |
| 91 |
.setDir("rtl").render(); |
| 92 |
|
| 93 |
}; |
| 94 |
|
| 95 |
dojo.addOnLoad(makeObjects); |
| 96 |
|
| 97 |
</script> |
| 98 |
</head> |
| 99 |
<body> |
| 100 |
<h1>Chart 2D nulls in series</h1> |
| 101 |
<div id="test1" style="width: 200px; height: 200px;"></div> |
| 102 |
<div id="test2" style="width: 200px; height: 200px;"></div> |
| 103 |
<div id="test3" style="width: 200px; height: 200px;"></div> |
| 104 |
<div id="test4" style="width: 200px; height: 200px;"></div> |
| 105 |
<div id="test5" style="width: 200px; height: 200px;"></div> |
| 106 |
<div id="test6" style="width: 200px; height: 200px;"></div> |
| 107 |
<div id="test7" style="width: 200px; height: 200px;"></div> |
| 108 |
<div id="test8" style="width: 200px; height: 200px;"></div> |
| 109 |
<div id="test9" style="width: 200px; height: 200px;"></div> |
| 110 |
<div id="test10" style="width: 200px; height: 200px;"></div> |
| 111 |
<div id="test11" style="width: 200px; height: 200px;"></div> |
| 112 |
<div id="test12" style="width: 200px; height: 200px;"></div> |
| 113 |
<p>That's all Folks!</p> |
| 114 |
</body> |
| 115 |
</html> |