source: Dev/trunk/src/client/dojox/charting/tests/test_nulls.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 3.9 KB
Line 
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<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"></script>
24<script>
25
26dojo.require("dojox.charting.Chart");
27dojo.require("dojox.charting.axis2d.Default");
28dojo.require("dojox.charting.plot2d.Lines");
29dojo.require("dojox.charting.plot2d.Areas");
30dojo.require("dojox.charting.plot2d.Markers");
31dojo.require("dojox.charting.plot2d.StackedLines");
32dojo.require("dojox.charting.plot2d.StackedAreas");
33dojo.require("dojox.charting.plot2d.Bars");
34dojo.require("dojox.charting.plot2d.ClusteredBars");
35dojo.require("dojox.charting.plot2d.StackedBars");
36dojo.require("dojox.charting.plot2d.ClusteredColumns");
37dojo.require("dojox.charting.plot2d.StackedColumns");
38dojo.require("dojox.charting.plot2d.Bubble");
39dojo.require("dojox.charting.plot2d.Candlesticks");
40dojo.require("dojox.charting.plot2d.Pie");
41
42makeObjects = 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                .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        .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        .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        .render();
92       
93};
94
95dojo.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>
Note: See TracBrowser for help on using the repository browser.