| 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 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 18 |
<title>Chart 2D</title> |
| 19 |
<style type="text/css"> |
| 20 |
@import "../../../dojo/resources/dojo.css"; |
| 21 |
@import "../../../dijit/tests/css/dijitTests.css"; |
| 22 |
</style> |
| 23 |
|
| 24 |
<link rel="stylesheet" href="../../../dijit/themes/tundra/tundra.css"> |
| 25 |
<style> |
| 26 |
.dojoxLegendNode {border: 1px solid #ccc; margin: 5px 10px 5px 10px; padding: 3px} |
| 27 |
.dojoxLegendText {vertical-align: text-top; padding-right: 10px} |
| 28 |
</style> |
| 29 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true"></script> |
| 30 |
|
| 31 |
<script type="text/javascript"> |
| 32 |
dojo.require("dijit.dijit"); |
| 33 |
dojo.require("dojox.charting.widget.Chart2D"); |
| 34 |
dojo.require("dojox.charting.widget.Legend"); |
| 35 |
dojo.require("dojox.charting.themes.PlotKit.orange"); |
| 36 |
dojo.require("dojox.charting.themes.PlotKit.blue"); |
| 37 |
dojo.require("dojox.charting.themes.PlotKit.green"); |
| 38 |
dojo.require("dojox.data.HtmlStore"); |
| 39 |
|
| 40 |
seriesB = [2.6, 1.8, 2, 1, 1.4, 0.7, 2]; |
| 41 |
|
| 42 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them |
| 43 |
</script> |
| 44 |
|
| 45 |
</head> |
| 46 |
<body class="tundra"> |
| 47 |
<h1>Chart 2D</h1> |
| 48 |
<p>Examples of charts using widgets.</p> |
| 49 |
<div dojoType="dojox.data.HtmlStore" dataId="tableExample" data-dojo-id="tableStore"></div> |
| 50 |
<table id="tableExample" style="display: none;"> |
| 51 |
<thead> |
| 52 |
<tr><th>value</th></tr> |
| 53 |
</thead> |
| 54 |
<tbody> |
| 55 |
<tr><td>6.3</td></tr> |
| 56 |
<tr><td>1.8</td></tr> |
| 57 |
<tr><td>3 </td></tr> |
| 58 |
<tr><td>0.5</td></tr> |
| 59 |
<tr><td>4.4</td></tr> |
| 60 |
<tr><td>2.7</td></tr> |
| 61 |
<tr><td>2 </td></tr> |
| 62 |
</tbody> |
| 63 |
</table> |
| 64 |
<table border="0" cellspacing="30"> |
| 65 |
<tr> |
| 66 |
<td> |
| 67 |
<div dojoType="dojox.charting.widget.Chart2D" id="chart1" style="width: 300px; height: 300px;"> |
| 68 |
<div class="axis" name="x" font="italic normal normal 8pt Tahoma"></div> |
| 69 |
<div class="axis" name="y" vertical="true" fixUpper="major" includeZero="true" |
| 70 |
font="italic normal normal 8pt Tahoma"></div> |
| 71 |
<div class="plot" name="default" type="Areas"></div> |
| 72 |
<div class="plot" name="grid" type="Grid"></div> |
| 73 |
<div class="series" name="Run A" data="1, 2, 0.5, 1.5, 1, 2.8, 0.4"></div> |
| 74 |
<div class="series" name="Run B" array="seriesB" legend="<em>Custom</em> legend"></div> |
| 75 |
<div class="series" name="Run C" store="tableStore" valueFn="Number(x)"></div> |
| 76 |
</div> |
| 77 |
<div dojoType="dojox.charting.widget.Legend" chartRef="chart1"></div> |
| 78 |
</td> |
| 79 |
<td> |
| 80 |
<div dojoType="dojox.charting.widget.Chart2D" id="chart2" theme="dojox.charting.themes.PlotKit.orange" |
| 81 |
fill="'lightgrey'" style="width: 300px; height: 300px;"> |
| 82 |
<div class="axis" name="x" font="italic normal bold 10pt Tahoma"></div> |
| 83 |
<div class="axis" name="y" vertical="true" fixUpper="major" includeZero="true" |
| 84 |
font="italic normal bold 10pt Tahoma"></div> |
| 85 |
<div class="plot" name="default" type="Areas"></div> |
| 86 |
<div class="plot" name="grid" type="Grid"></div> |
| 87 |
<div class="series" name="Series A" data="1, 2, 0.5, 1.5, 1, 2.8, 0.4"></div> |
| 88 |
<div class="series" name="Series B" array="seriesB"></div> |
| 89 |
<div class="series" name="Series C" store="tableStore" valueFn="Number(x)" stroke="'#666666'" fill="'#b3b3b3'"></div> |
| 90 |
</div> |
| 91 |
<div dojoType="dojox.charting.widget.Legend" chartRef="chart2"></div> |
| 92 |
</td> |
| 93 |
</tr> |
| 94 |
<tr> |
| 95 |
<td> |
| 96 |
<div dojoType="dojox.charting.widget.Chart2D" id="chart3" theme="dojox.charting.themes.PlotKit.blue" |
| 97 |
style="width: 300px; height: 300px;"> |
| 98 |
<div class="plot" name="default" type="Pie" radius="100" fontColor="white"></div> |
| 99 |
<div class="series" name="Series B" array="seriesB"></div> |
| 100 |
<div class="action" type="Tooltip"></div> |
| 101 |
</div> |
| 102 |
</td> |
| 103 |
<td> |
| 104 |
<div dojoType="dojox.charting.widget.Chart2D" id="chart4" theme="dojox.charting.themes.PlotKit.green" |
| 105 |
style="width: 300px; height: 300px;"> |
| 106 |
<div class="plot" name="default" type="Pie" radius="100" fontColor="black" labelOffset="-20"></div> |
| 107 |
<div class="series" name="Series C" store="tableStore" valueFn="Number(x)"></div> |
| 108 |
<div class="action" type="Tooltip"></div> |
| 109 |
<div class="action" type="MoveSlice" shift="2"></div> |
| 110 |
</div> |
| 111 |
</td> |
| 112 |
</tr> |
| 113 |
</table> |
| 114 |
<p>That's all Folks!</p> |
| 115 |
</body> |
| 116 |
</html> |