2150 |
mathias |
1 |
<html>
|
|
|
2 |
<head>
|
|
|
3 |
<title>Chart 2D</title>
|
|
|
4 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
5 |
<style type="text/css">
|
|
|
6 |
@import "../../../dojo/resources/dojo.css";
|
|
|
7 |
@import "../../../dijit/tests/css/dijitTests.css";
|
|
|
8 |
</style>
|
|
|
9 |
<!--
|
|
|
10 |
The next line should include Microsoft's Silverligth.js, if you plan to use the silverlight backend
|
|
|
11 |
<script type="text/javascript" src="Silverlight.js"></script>
|
|
|
12 |
-->
|
|
|
13 |
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
|
|
|
14 |
<script type="text/javascript" src="../../lang/functional.js"></script>
|
|
|
15 |
<script type="text/javascript" src="../Theme.js"></script>
|
|
|
16 |
<script type="text/javascript" src="../scaler.js"></script>
|
|
|
17 |
<script type="text/javascript" src="../Chart2D.js"></script>
|
|
|
18 |
<script type="text/javascript" src="../widget/Chart2D.js"></script>
|
|
|
19 |
|
|
|
20 |
<script type="text/javascript">
|
|
|
21 |
dojo.require("dojox.charting.widget.Chart2D");
|
|
|
22 |
dojo.require("dojox.charting.themes.PlotKit.orange");
|
|
|
23 |
dojo.require("dojox.charting.themes.PlotKit.blue");
|
|
|
24 |
dojo.require("dojox.charting.themes.PlotKit.green");
|
|
|
25 |
dojo.require("dojox.data.HtmlTableStore");
|
|
|
26 |
|
|
|
27 |
seriesB = [2.6, 1.8, 2, 1, 1.4, 0.7, 2];
|
|
|
28 |
|
|
|
29 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
|
|
|
30 |
</script>
|
|
|
31 |
|
|
|
32 |
</head>
|
|
|
33 |
<body>
|
|
|
34 |
<h1>Chart 2D</h1>
|
|
|
35 |
<p>Examples of charts using widgets.</p>
|
|
|
36 |
<div dojoType="dojox.data.HtmlTableStore" tableId="tableExample" jsId="tableStore"></div>
|
|
|
37 |
<table id="tableExample" style="display: none;">
|
|
|
38 |
<thead>
|
|
|
39 |
<tr><th>value</th></tr>
|
|
|
40 |
</thead>
|
|
|
41 |
<tbody>
|
|
|
42 |
<tr><td>6.3</td></tr>
|
|
|
43 |
<tr><td>1.8</td></tr>
|
|
|
44 |
<tr><td>3 </td></tr>
|
|
|
45 |
<tr><td>0.5</td></tr>
|
|
|
46 |
<tr><td>4.4</td></tr>
|
|
|
47 |
<tr><td>2.7</td></tr>
|
|
|
48 |
<tr><td>2 </td></tr>
|
|
|
49 |
</tbody>
|
|
|
50 |
</table>
|
|
|
51 |
<table border="1">
|
|
|
52 |
<tr>
|
|
|
53 |
<td>
|
|
|
54 |
<div dojoType="dojox.charting.widget.Chart2D" style="width: 300px; height: 300px;">
|
|
|
55 |
<div class="axis" name="x" font="italic normal normal 8pt Tahoma"></div>
|
|
|
56 |
<div class="axis" name="y" vertical="true" fixUpper="major" includeZero="true"
|
|
|
57 |
font="italic normal normal 8pt Tahoma"></div>
|
|
|
58 |
<div class="plot" name="default" type="Areas"></div>
|
|
|
59 |
<div class="plot" name="grid" type="Grid"></div>
|
|
|
60 |
<div class="series" name="Series A" data="1, 2, 0.5, 1.5, 1, 2.8, 0.4"></div>
|
|
|
61 |
<div class="series" name="Series B" array="seriesB"></div>
|
|
|
62 |
<div class="series" name="Series C" store="tableStore" valueFn="Number(x)"></div>
|
|
|
63 |
</div>
|
|
|
64 |
</td>
|
|
|
65 |
<td>
|
|
|
66 |
<div dojoType="dojox.charting.widget.Chart2D" theme="dojox.charting.themes.PlotKit.orange"
|
|
|
67 |
fill="'lightgrey'" style="width: 300px; height: 300px;">
|
|
|
68 |
<div class="axis" name="x" font="italic normal bold 10pt Tahoma"></div>
|
|
|
69 |
<div class="axis" name="y" vertical="true" fixUpper="major" includeZero="true"
|
|
|
70 |
font="italic normal bold 10pt 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="Series A" data="1, 2, 0.5, 1.5, 1, 2.8, 0.4"></div>
|
|
|
74 |
<div class="series" name="Series B" array="seriesB"></div>
|
|
|
75 |
<div class="series" name="Series C" store="tableStore" valueFn="Number(x)" stroke="'blue'" fill="'green'"></div>
|
|
|
76 |
</div>
|
|
|
77 |
</td>
|
|
|
78 |
</tr>
|
|
|
79 |
<tr>
|
|
|
80 |
<td>
|
|
|
81 |
<div dojoType="dojox.charting.widget.Chart2D" theme="dojox.charting.themes.PlotKit.blue"
|
|
|
82 |
style="width: 300px; height: 300px;">
|
|
|
83 |
<div class="plot" name="default" type="Pie" radius="100" fontColor="white"></div>
|
|
|
84 |
<div class="series" name="Series B" array="seriesB"></div>
|
|
|
85 |
</div>
|
|
|
86 |
</td>
|
|
|
87 |
<td>
|
|
|
88 |
<div dojoType="dojox.charting.widget.Chart2D" theme="dojox.charting.themes.PlotKit.green"
|
|
|
89 |
style="width: 300px; height: 300px;">
|
|
|
90 |
<div class="plot" name="default" type="Pie" radius="100" fontColor="black" labelOffset="-20"></div>
|
|
|
91 |
<div class="series" name="Series C" store="tableStore" valueFn="Number(x)"></div>
|
|
|
92 |
</div>
|
|
|
93 |
</td>
|
|
|
94 |
</tr>
|
|
|
95 |
</table>
|
|
|
96 |
<p>That's all Folks!</p>
|
|
|
97 |
</body>
|
|
|
98 |
</html>
|