Debian Codegraph @

dojox/charting/tests/test_axes.html

raw symbols SCIP
1 <!--[if IE 7]>
2 <!DOCTYPE>
3 <html lang="en">
4 <head>
5 <![endif]-->
6 <!--[if IE 8]>
7 <!DOCTYPE>
8 <html lang="en">
9 <head>
10 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
11 <![endif]-->
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>Testing Axes</title>
19 <style type="text/css">
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"></script>
24 <script>
25
26 dojo.require("dojox.charting.Chart");
27 dojo.require("dojox.charting.axis2d.Invisible");
28 dojo.require("dojox.charting.axis2d.Default");
29 dojo.require("dojox.charting.plot2d.Markers");
30 dojo.require("dojox.charting.themes.ThreeD");
31
32 makeObjects = function(){
33 dojo.query("button").style("disabled", true);
34
35 var customTheme = dojox.charting.themes.ThreeD.clone();
36 customTheme.plotarea.fill = "#fed";
37
38 var chart1 = new dojox.charting.Chart("test1").
39 setTheme(customTheme).
40 addAxis("x", {fixLower: "major", fixUpper: "major", natural: true, includeZero: true, majorTick: { length: -10}}).
41 addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", natural: true, includeZero: true}).
42 addPlot("default", {type: "Markers"}).
43 addSeries("Series A", [{x: 1, y: 1}, {x: 2, y: 2}, {x: 3, y: 1}]).
44 addSeries("Series B", [{x: 3, y: 2}, {x: 4, y: 3}, {x: 5, y: 2}]).
45 addSeries("Series C", [{x: 5, y: 3}, {x: 6, y: 4}, {x: 7, y: 3}]).
46 render();
47
48 var chart2 = new dojox.charting.Chart("test2").
49 setTheme(customTheme).
50 addAxis("x", {fixLower: "major", fixUpper: "major", natural: true, includeZero: true, majorTick: { length: 10}}).
51 addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", natural: true, includeZero: true, majorTick: {length: -5}, minorTicks: false}).
52 addPlot("p1", {type: "Markers"}).
53 addPlot("p2", {type: "Markers"}).
54 addPlot("p3", {type: "Markers"}).
55 addSeries("Series A", [{x: 1, y: 1}, {x: 2, y: 2}, {x: 3, y: 1}], {plot: "p1"}).
56 addSeries("Series B", [{x: 3, y: 2}, {x: 4, y: 3}, {x: 5, y: 2}], {plot: "p2"}).
57 addSeries("Series C", [{x: 5, y: 3}, {x: 6, y: 4}, {x: 7, y: 3}], {plot: "p3"}).
58 render();
59
60 var chart3 = new dojox.charting.Chart("test3").
61 setTheme(customTheme).
62 addAxis("x", {type: "Invisible", fixLower: "major", fixUpper: "major", natural: true, includeZero: true}).
63 addAxis("y", {type: "Invisible",vertical: true, fixLower: "major", fixUpper: "major", natural: true, includeZero: true}).
64 addPlot("default", {type: "Markers"}).
65 addSeries("Series A", [{x: 1, y: 1}, {x: 2, y: 2}, {x: 3, y: 1}]).
66 addSeries("Series B", [{x: 3, y: 2}, {x: 4, y: 3}, {x: 5, y: 2}]).
67 addSeries("Series C", [{x: 5, y: 3}, {x: 6, y: 4}, {x: 7, y: 3}]).
68 render();
69
70 var chart4 = new dojox.charting.Chart("test4").
71 setTheme(customTheme).
72 addPlot("default", {type: "Markers"}).
73 addSeries("Series A", [{x: 1, y: 1}, {x: 2, y: 2}, {x: 3, y: 1}]).
74 addSeries("Series B", [{x: 3, y: 2}, {x: 4, y: 3}, {x: 5, y: 2}]).
75 addSeries("Series C", [{x: 5, y: 3}, {x: 6, y: 4}, {x: 7, y: 3}]).
76 render();
77 };
78
79 dojo.ready(makeObjects);
80
81 </script>
82 </head>
83 <body>
84 <h1>Testing Axes</h1>
85 <!--<p><button onclick="makeObjects();">Go</button></p>-->
86 <p>1: Shared axes and three series</p>
87 <div id="test1" style="width: 200px; height: 200px;"></div>
88 <p>2: Shared axes and three plots.</p>
89 <div id="test2" style="width: 200px; height: 200px;"></div>
90 <p>3: Like #1 but invisible axes.</p>
91 <div id="test3" style="width: 200px; height: 200px;"></div>
92 <p>4: Like #1 but no axes.</p>
93 <div id="test4" style="width: 200px; height: 200px;"></div>
94 <p>That's all Folks!</p>
95 </body>
96 </html>