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"></script>
|
|
|
14 |
<script type="text/javascript" src="../../lang/functional.js"></script>
|
|
|
15 |
<script type="text/javascript" src="../../lang/utils.js"></script>
|
|
|
16 |
<script type="text/javascript" src="../Theme.js"></script>
|
|
|
17 |
<script type="text/javascript" src="../scaler.js"></script>
|
|
|
18 |
<script type="text/javascript" src="../Element.js"></script>
|
|
|
19 |
<script type="text/javascript" src="../axis2d/common.js"></script>
|
|
|
20 |
<script type="text/javascript" src="../axis2d/Base.js"></script>
|
|
|
21 |
<script type="text/javascript" src="../axis2d/Default.js"></script>
|
|
|
22 |
<script type="text/javascript" src="../plot2d/common.js"></script>
|
|
|
23 |
<script type="text/javascript" src="../plot2d/Base.js"></script>
|
|
|
24 |
<script type="text/javascript" src="../plot2d/Default.js"></script>
|
|
|
25 |
<script type="text/javascript" src="../plot2d/Lines.js"></script>
|
|
|
26 |
<script type="text/javascript" src="../plot2d/Areas.js"></script>
|
|
|
27 |
<script type="text/javascript" src="../plot2d/Markers.js"></script>
|
|
|
28 |
<script type="text/javascript" src="../plot2d/MarkersOnly.js"></script>
|
|
|
29 |
<script type="text/javascript" src="../plot2d/Scatter.js"></script>
|
|
|
30 |
<script type="text/javascript" src="../plot2d/Stacked.js"></script>
|
|
|
31 |
<script type="text/javascript" src="../plot2d/StackedLines.js"></script>
|
|
|
32 |
<script type="text/javascript" src="../plot2d/StackedAreas.js"></script>
|
|
|
33 |
<script type="text/javascript" src="../plot2d/Columns.js"></script>
|
|
|
34 |
<script type="text/javascript" src="../plot2d/StackedColumns.js"></script>
|
|
|
35 |
<script type="text/javascript" src="../plot2d/ClusteredColumns.js"></script>
|
|
|
36 |
<script type="text/javascript" src="../plot2d/Bars.js"></script>
|
|
|
37 |
<script type="text/javascript" src="../plot2d/StackedBars.js"></script>
|
|
|
38 |
<script type="text/javascript" src="../plot2d/ClusteredBars.js"></script>
|
|
|
39 |
<script type="text/javascript" src="../plot2d/Grid.js"></script>
|
|
|
40 |
<script type="text/javascript" src="../plot2d/Pie.js"></script>
|
|
|
41 |
<script type="text/javascript" src="../Chart2D.js"></script>
|
|
|
42 |
<script type="text/javascript">
|
|
|
43 |
|
|
|
44 |
dojo.require("dojox.charting.Chart2D");
|
|
|
45 |
dojo.require("dojox.charting.themes.PlotKit.blue");
|
|
|
46 |
dojo.require("dojox.charting.themes.PlotKit.cyan");
|
|
|
47 |
dojo.require("dojox.charting.themes.PlotKit.green");
|
|
|
48 |
dojo.require("dojox.charting.themes.PlotKit.orange");
|
|
|
49 |
dojo.require("dojox.charting.themes.PlotKit.purple");
|
|
|
50 |
dojo.require("dojox.charting.themes.PlotKit.red");
|
|
|
51 |
|
|
|
52 |
makeObjects = function(){
|
|
|
53 |
var chart1 = new dojox.charting.Chart2D("test1");
|
|
|
54 |
chart1.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1]);
|
|
|
55 |
chart1.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2]);
|
|
|
56 |
chart1.render();
|
|
|
57 |
|
|
|
58 |
var chart2 = new dojox.charting.Chart2D("test2");
|
|
|
59 |
chart2.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1], {stroke: "red"});
|
|
|
60 |
chart2.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2], {stroke: "blue"});
|
|
|
61 |
chart2.render();
|
|
|
62 |
|
|
|
63 |
var chart3 = new dojox.charting.Chart2D("test3");
|
|
|
64 |
chart3.addPlot("default", {type: "Areas"});
|
|
|
65 |
chart3.setTheme(dojox.charting.themes.PlotKit.orange);
|
|
|
66 |
chart3.addSeries("Series A", [1, 2, 0.5, 1.5, 1, 2.8, 0.4]);
|
|
|
67 |
chart3.addSeries("Series B", [2.6, 1.8, 2, 1, 1.4, 0.7, 2]);
|
|
|
68 |
chart3.addSeries("Series C", [6.3, 1.8, 3, 0.5, 4.4, 2.7, 2]);
|
|
|
69 |
chart3.render();
|
|
|
70 |
|
|
|
71 |
var chart4 = new dojox.charting.Chart2D("test4");
|
|
|
72 |
chart4.addPlot("default", {type: "Areas"});
|
|
|
73 |
chart4.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1], {stroke: {color: "red", width: 2}, fill: "lightpink"});
|
|
|
74 |
chart4.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2], {stroke: {color: "blue", width: 2}, fill: "lightblue"});
|
|
|
75 |
chart4.render();
|
|
|
76 |
|
|
|
77 |
var chart5 = new dojox.charting.Chart2D("test5");
|
|
|
78 |
chart5.setTheme(dojox.charting.themes.PlotKit.blue);
|
|
|
79 |
chart5.addAxis("x");
|
|
|
80 |
chart5.addAxis("y", {vertical: true});
|
|
|
81 |
chart5.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1]);
|
|
|
82 |
chart5.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2]);
|
|
|
83 |
chart5.render();
|
|
|
84 |
|
|
|
85 |
var chart6 = new dojox.charting.Chart2D("test6");
|
|
|
86 |
chart6.setTheme(dojox.charting.themes.PlotKit.cyan);
|
|
|
87 |
chart6.addAxis("x", {fixLower: "minor", fixUpper: "minor"});
|
|
|
88 |
chart6.addAxis("y", {vertical: true, fixLower: "minor", fixUpper: "minor"});
|
|
|
89 |
chart6.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1]);
|
|
|
90 |
chart6.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2]);
|
|
|
91 |
chart6.render();
|
|
|
92 |
|
|
|
93 |
var chart7 = new dojox.charting.Chart2D("test7");
|
|
|
94 |
chart7.setTheme(dojox.charting.themes.PlotKit.green);
|
|
|
95 |
chart7.addAxis("x", {fixLower: "major", fixUpper: "major"});
|
|
|
96 |
chart7.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major"});
|
|
|
97 |
chart7.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1]);
|
|
|
98 |
chart7.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2]);
|
|
|
99 |
chart7.render();
|
|
|
100 |
|
|
|
101 |
var chart8 = new dojox.charting.Chart2D("test8");
|
|
|
102 |
chart8.setTheme(dojox.charting.themes.PlotKit.purple);
|
|
|
103 |
chart8.addPlot("default", {type: "Markers"});
|
|
|
104 |
chart8.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1], {min: 0, max: 3});
|
|
|
105 |
chart8.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2]);
|
|
|
106 |
chart8.render();
|
|
|
107 |
|
|
|
108 |
var chart9 = new dojox.charting.Chart2D("test9");
|
|
|
109 |
chart9.addPlot("default", {type: "MarkersOnly"});
|
|
|
110 |
chart9.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1], {min: 0, max: 3, stroke: {color: "red", width: 2}, marker: "m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0"});
|
|
|
111 |
chart9.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2], {stroke: {color: "blue", width: 2}, marker: "m-3,-3 l0,6 6,0 0,-6 z"});
|
|
|
112 |
chart9.render();
|
|
|
113 |
|
|
|
114 |
var chart10 = new dojox.charting.Chart2D("test10");
|
|
|
115 |
chart10.addPlot("default", {type: "Markers", shadows: {dx: 2, dy: 2, dw: 2}});
|
|
|
116 |
chart10.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1], {min: 0, max: 3, stroke: {color: "red", width: 2, join: "round"}, marker: "m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0"});
|
|
|
117 |
chart10.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2], {stroke: {color: "blue", width: 2, join: "round"}, marker: "m-3,-3 l0,6 6,0 0,-6 z"});
|
|
|
118 |
chart10.render();
|
|
|
119 |
|
|
|
120 |
var chart11 = new dojox.charting.Chart2D("test11");
|
|
|
121 |
chart11.addPlot("default", {type: "StackedLines", markers: true, shadows: {dx: 2, dy: 2, dw: 2}});
|
|
|
122 |
chart11.addSeries("Series A", [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6], {stroke: {color: "red", width: 2}, fill: "lightpink", marker: "m-3,-3 l0,6 6,0 0,-6 z"});
|
|
|
123 |
chart11.addSeries("Series B", [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6], {stroke: {color: "blue", width: 2}, fill: "lightblue", marker: "m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0"});
|
|
|
124 |
chart11.addSeries("Series C", [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6], {stroke: {color: "green", width: 2}, fill: "lightgreen", marker: "m0,-3 l3,3 -3,3 -3,-3 z"});
|
|
|
125 |
chart11.render();
|
|
|
126 |
|
|
|
127 |
var chart12 = new dojox.charting.Chart2D("test12");
|
|
|
128 |
chart12.addAxis("x", {fixLower: "major", fixUpper: "major"});
|
|
|
129 |
chart12.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major"});
|
|
|
130 |
chart12.addPlot("default", {type: "StackedAreas"});
|
|
|
131 |
chart12.addSeries("Series A", [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6], {stroke: {color: "red", width: 2}, fill: "lightpink"});
|
|
|
132 |
chart12.addSeries("Series B", [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6], {stroke: {color: "blue", width: 2}, fill: "lightblue"});
|
|
|
133 |
chart12.addSeries("Series C", [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6], {stroke: {color: "green", width: 2}, fill: "lightgreen"});
|
|
|
134 |
chart12.render();
|
|
|
135 |
|
|
|
136 |
var chart13 = new dojox.charting.Chart2D("test13");
|
|
|
137 |
chart13.addPlot("default", {type: "Columns"});
|
|
|
138 |
chart13.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
139 |
chart13.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
140 |
chart13.render();
|
|
|
141 |
|
|
|
142 |
var chart14 = new dojox.charting.Chart2D("test14");
|
|
|
143 |
chart14.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major"});
|
|
|
144 |
chart14.addPlot("default", {type: "Columns", gap: 2});
|
|
|
145 |
chart14.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
146 |
chart14.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
147 |
chart14.render();
|
|
|
148 |
|
|
|
149 |
var chart15 = new dojox.charting.Chart2D("test15");
|
|
|
150 |
chart15.addPlot("default", {type: "StackedColumns"});
|
|
|
151 |
chart15.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
152 |
chart15.addSeries("Series B", [2, 1, 2, 1, 2], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
153 |
chart15.render();
|
|
|
154 |
|
|
|
155 |
var chart16 = new dojox.charting.Chart2D("test16");
|
|
|
156 |
chart16.addAxis("x", {fixLower: "major", fixUpper: "major", includeZero: true});
|
|
|
157 |
chart16.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", natural: true});
|
|
|
158 |
chart16.addPlot("default", {type: "Bars"});
|
|
|
159 |
chart16.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
160 |
chart16.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
161 |
chart16.render();
|
|
|
162 |
|
|
|
163 |
var chart17 = new dojox.charting.Chart2D("test17");
|
|
|
164 |
chart17.addPlot("default", {type: "StackedBars"});
|
|
|
165 |
chart17.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
166 |
chart17.addSeries("Series B", [2, 1, 2, 1, 2], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
167 |
chart17.render();
|
|
|
168 |
|
|
|
169 |
var chart18 = new dojox.charting.Chart2D("test18");
|
|
|
170 |
chart18.addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true});
|
|
|
171 |
chart18.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", includeZero: true});
|
|
|
172 |
chart18.addPlot("default", {type: "ClusteredColumns", gap: 2});
|
|
|
173 |
chart18.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
174 |
chart18.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
175 |
chart18.render();
|
|
|
176 |
|
|
|
177 |
var chart19 = new dojox.charting.Chart2D("test19");
|
|
|
178 |
chart19.addAxis("x", {fixLower: "major", fixUpper: "major", includeZero: true});
|
|
|
179 |
chart19.addAxis("y", {vertical: true, fixLower: "minor", fixUpper: "minor", natural: true});
|
|
|
180 |
chart19.addPlot("default", {type: "ClusteredBars", gap: 2});
|
|
|
181 |
chart19.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
182 |
chart19.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
183 |
chart19.render();
|
|
|
184 |
|
|
|
185 |
var chart20 = new dojox.charting.Chart2D("test20");
|
|
|
186 |
chart20.addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true});
|
|
|
187 |
chart20.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", minorTicks: false, includeZero: true});
|
|
|
188 |
chart20.addPlot("front_grid", {type: "Grid", hMajorLines: true, vMajorLines: false});
|
|
|
189 |
chart20.addPlot("default", {type: "Columns", gap: 2});
|
|
|
190 |
chart20.addPlot("back_grid", {type: "Grid", hMajorLines: false, vMajorLines: true});
|
|
|
191 |
chart20.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
192 |
chart20.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
193 |
chart20.render();
|
|
|
194 |
|
|
|
195 |
var chart21 = new dojox.charting.Chart2D("test21");
|
|
|
196 |
chart21.addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true});
|
|
|
197 |
chart21.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major",
|
|
|
198 |
includeZero: true, min: 0, max: 8, minorLabels: false,
|
|
|
199 |
majorTicks: true, minorTicks: true, microTicks: false,
|
|
|
200 |
majorTickStep: 2, minorTickStep: 1, microTickStep: 0.5});
|
|
|
201 |
chart21.addPlot("front_grid", {type: "Grid", hMajorLines: true, vMajorLines: false});
|
|
|
202 |
chart21.addPlot("default", {type: "Columns", gap: 2});
|
|
|
203 |
chart21.addPlot("back_grid", {type: "Grid", hMajorLines: false, vMajorLines: true});
|
|
|
204 |
chart21.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
205 |
chart21.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
206 |
chart21.render();
|
|
|
207 |
|
|
|
208 |
var chart22 = new dojox.charting.Chart2D("test22");
|
|
|
209 |
chart22.addAxis("x");
|
|
|
210 |
chart22.addAxis("y", {vertical: true});
|
|
|
211 |
chart22.addPlot("default", {type: "Columns", gap: 2});
|
|
|
212 |
chart22.addPlot("grid", {type: "Grid"});
|
|
|
213 |
chart22.addSeries("Series A", [2, 1, 0.5, -1, -2], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
214 |
chart22.addSeries("Series B", [-2, -1, -0.5, 1, 2], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
215 |
chart22.render();
|
|
|
216 |
|
|
|
217 |
var chart23 = new dojox.charting.Chart2D("test23");
|
|
|
218 |
chart23.addAxis("x");
|
|
|
219 |
chart23.addAxis("y", {vertical: true});
|
|
|
220 |
chart23.addPlot("default", {type: "ClusteredColumns", gap: 2});
|
|
|
221 |
chart23.addPlot("grid", {type: "Grid"});
|
|
|
222 |
chart23.addSeries("Series A", [2, 1, 0.5, -1, -2], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
223 |
chart23.addSeries("Series B", [-2, -1, -0.5, 1, 2], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
224 |
chart23.addSeries("Series C", [1, 0.5, -1, -2, -3], {stroke: {color: "green"}, fill: "lightgreen"});
|
|
|
225 |
chart23.render();
|
|
|
226 |
|
|
|
227 |
var chart24 = new dojox.charting.Chart2D("test24");
|
|
|
228 |
chart24.addAxis("x");
|
|
|
229 |
chart24.addAxis("y", {vertical: true});
|
|
|
230 |
chart24.addPlot("default", {type: "Bars", gap: 2});
|
|
|
231 |
chart24.addPlot("grid", {type: "Grid"});
|
|
|
232 |
chart24.addSeries("Series A", [2, 1, 0.5, -1, -2], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
233 |
chart24.addSeries("Series B", [-2, -1, -0.5, 1, 2], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
234 |
chart24.render();
|
|
|
235 |
|
|
|
236 |
var chart25 = new dojox.charting.Chart2D("test25");
|
|
|
237 |
chart25.addAxis("x");
|
|
|
238 |
chart25.addAxis("y", {vertical: true});
|
|
|
239 |
chart25.addPlot("default", {type: "ClusteredBars", gap: 2});
|
|
|
240 |
chart25.addPlot("grid", {type: "Grid"});
|
|
|
241 |
chart25.addSeries("Series A", [2, 1, 0.5, -1, -2], {stroke: {color: "red"}, fill: "lightpink"});
|
|
|
242 |
chart25.addSeries("Series B", [-2, -1, -0.5, 1, 2], {stroke: {color: "blue"}, fill: "lightblue"});
|
|
|
243 |
chart25.addSeries("Series C", [1, 0.5, -1, -2, -3], {stroke: {color: "green"}, fill: "lightgreen"});
|
|
|
244 |
chart25.render();
|
|
|
245 |
|
|
|
246 |
var chart26 = new dojox.charting.Chart2D("test26");
|
|
|
247 |
chart26.setTheme(dojox.charting.themes.PlotKit.red);
|
|
|
248 |
chart26.addAxis("x", {min: 0, max: 6, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}});
|
|
|
249 |
chart26.addAxis("y", {vertical: true, min: 0, max: 10, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}});
|
|
|
250 |
chart26.addSeries("Series A", [{x: 0.5, y: 5}, {x: 1.5, y: 1.5}, {x: 2, y: 9}, {x: 5, y: 0.3}]);
|
|
|
251 |
chart26.addSeries("Series B", [{x: 0.3, y: 8}, {x: 4, y: 6}, {x: 5.5, y: 2}]);
|
|
|
252 |
chart26.render();
|
|
|
253 |
|
|
|
254 |
var chart27 = new dojox.charting.Chart2D("test27");
|
|
|
255 |
chart27.setTheme(dojox.charting.themes.PlotKit.purple);
|
|
|
256 |
chart27.addPlot("default", {type: "Scatter"});
|
|
|
257 |
chart27.addAxis("x", {min: 0, max: 6, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}});
|
|
|
258 |
chart27.addAxis("y", {vertical: true, min: 0, max: 10, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}});
|
|
|
259 |
chart27.addSeries("Series A", [{x: 0.5, y: 5}, {x: 1.5, y: 1.5}, {x: 2, y: 9}, {x: 5, y: 0.3}]);
|
|
|
260 |
chart27.addSeries("Series B", [{x: 0.3, y: 8}, {x: 4, y: 6}, {x: 5.5, y: 2}]);
|
|
|
261 |
chart27.render();
|
|
|
262 |
|
|
|
263 |
var chart28 = new dojox.charting.Chart2D("test28");
|
|
|
264 |
chart28.setTheme(dojox.charting.themes.PlotKit.blue);
|
|
|
265 |
chart28.addPlot("default", {type: "Default", lines: true, markers: true});
|
|
|
266 |
chart28.addAxis("x", {min: 0, max: 6, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}});
|
|
|
267 |
chart28.addAxis("y", {vertical: true, min: 0, max: 10, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}});
|
|
|
268 |
chart28.addSeries("Series A", [{x: 0.5, y: 5}, {x: 1.5, y: 1.5}, {x: 2, y: 9}, {x: 5, y: 0.3}]);
|
|
|
269 |
chart28.addSeries("Series B", [{x: 0.3, y: 8}, {x: 4, y: 6}, {x: 5.5, y: 2}]);
|
|
|
270 |
chart28.render();
|
|
|
271 |
};
|
|
|
272 |
|
|
|
273 |
dojo.addOnLoad(makeObjects);
|
|
|
274 |
|
|
|
275 |
</script>
|
|
|
276 |
</head>
|
|
|
277 |
<body>
|
|
|
278 |
<h1>Chart 2D</h1>
|
|
|
279 |
<!--<p><button onclick="makeObjects();">Go</button></p>-->
|
|
|
280 |
<p>1: Defaults: lines, no axes.</p>
|
|
|
281 |
<div id="test1" style="width: 400px; height: 400px;"></div>
|
|
|
282 |
<p>2: Defaults: lines, no axes, and custom strokes.</p>
|
|
|
283 |
<div id="test2" style="width: 400px; height: 400px;"></div>
|
|
|
284 |
<p>3: Areas, orange theme, no axes.</p>
|
|
|
285 |
<div id="test3" style="width: 400px; height: 400px;"></div>
|
|
|
286 |
<p>4: Areas, no axes, custom strokes and fills.</p>
|
|
|
287 |
<div id="test4" style="width: 400px; height: 400px;"></div>
|
|
|
288 |
<p>5: Lines, axes, blue theme.</p>
|
|
|
289 |
<div id="test5" style="width: 400px; height: 400px;"></div>
|
|
|
290 |
<p>6: Lines, axes (aligned on minor ticks), cyan theme.</p>
|
|
|
291 |
<div id="test6" style="width: 400px; height: 400px;"></div>
|
|
|
292 |
<p>7: Lines, axes (aligned on major ticks), green theme.</p>
|
|
|
293 |
<div id="test7" style="width: 400px; height: 400px;"></div>
|
|
|
294 |
<p>8: Lines and markers, no axes, purple theme, custom min/max.</p>
|
|
|
295 |
<div id="test8" style="width: 200px; height: 200px;"></div>
|
|
|
296 |
<p>9: Markers only, no axes, custom theme, custom markers, custom min/max.</p>
|
|
|
297 |
<div id="test9" style="width: 200px; height: 200px;"></div>
|
|
|
298 |
<p>10: Lines and markers, shadows, no axes, custom theme, custom markers, custom min/max.</p>
|
|
|
299 |
<div id="test10" style="width: 200px; height: 200px;"></div>
|
|
|
300 |
<p>11: Stacked lines, markers, shadows, no axes, custom strokes, fills, and markers.</p>
|
|
|
301 |
<div id="test11" style="width: 200px; height: 200px;"></div>
|
|
|
302 |
<p>12: Stacked areas, axes (aligned on major ticks), custom strokes and fills.</p>
|
|
|
303 |
<div id="test12" style="width: 200px; height: 200px;"></div>
|
|
|
304 |
<p>13: Columns, no axes, custom strokes and fills.</p>
|
|
|
305 |
<div id="test13" style="width: 200px; height: 200px;"></div>
|
|
|
306 |
<p>14: Columns with gaps beetwen them, vertical axis aligned on major ticks, custom strokes, fills.</p>
|
|
|
307 |
<div id="test14" style="width: 200px; height: 200px;"></div>
|
|
|
308 |
<p>15: Stacked columns, no axes, custom strokes and fills.</p>
|
|
|
309 |
<div id="test15" style="width: 200px; height: 200px;"></div>
|
|
|
310 |
<p>16: Bars, axes aligned on major ticks, no minor ticks, custom strokes and fills.</p>
|
|
|
311 |
<div id="test16" style="width: 200px; height: 200px;"></div>
|
|
|
312 |
<p>17: Stacked bars, no axes, custom strokes and fills.</p>
|
|
|
313 |
<div id="test17" style="width: 200px; height: 200px;"></div>
|
|
|
314 |
<p>18: Clustered columns, custom axes, custom strokes, fills, and gap.</p>
|
|
|
315 |
<div id="test18" style="width: 200px; height: 200px;"></div>
|
|
|
316 |
<p>19: Clustered bars, custom axes, custom strokes, fills, and gap.</p>
|
|
|
317 |
<div id="test19" style="width: 200px; height: 200px;"></div>
|
|
|
318 |
<p>20: Columns with gaps beetwen them, grids, custom strokes, fills, axes.</p>
|
|
|
319 |
<div id="test20" style="width: 200px; height: 200px;"></div>
|
|
|
320 |
<p>21: Columns with gaps beetwen them, grids, custom strokes, fills, axes, with min=0, max=8, and manually specified ticks on the vertical axis.</p>
|
|
|
321 |
<div id="test21" style="width: 200px; height: 200px;"></div>
|
|
|
322 |
<p>22: Columns with positive and negative values, axes, and grid.</p>
|
|
|
323 |
<div id="test22" style="width: 200px; height: 200px;"></div>
|
|
|
324 |
<p>23: Clustered columns with positive and negative values, axes, and grid.</p>
|
|
|
325 |
<div id="test23" style="width: 200px; height: 200px;"></div>
|
|
|
326 |
<p>24: Bars with positive and negative values, axes, and grid.</p>
|
|
|
327 |
<div id="test24" style="width: 200px; height: 200px;"></div>
|
|
|
328 |
<p>25: Clustered bars with positive and negative values, axes, and grid.</p>
|
|
|
329 |
<div id="test25" style="width: 200px; height: 200px;"></div>
|
|
|
330 |
<p>26: Default lines with 2D data, custom axis, red theme.</p>
|
|
|
331 |
<div id="test26" style="width: 200px; height: 200px;"></div>
|
|
|
332 |
<p>27: Scatter chart, custom axis, purple theme.</p>
|
|
|
333 |
<div id="test27" style="width: 200px; height: 200px;"></div>
|
|
|
334 |
<p>28: Markers, lines, 2D data, custom axis, blue theme.</p>
|
|
|
335 |
<div id="test28" style="width: 200px; height: 200px;"></div>
|
|
|
336 |
<p>That's all Folks!</p>
|
|
|
337 |
</body>
|
|
|
338 |
</html>
|