Debian Codegraph @

dojox/charting/tests/BidiSupport/bidi_SelectableLegend.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>Chart: Selectable Legend test</title>
19 <style type="text/css">
20 @import "../../../../dojo/resources/dojo.css";
21 @import "../../../../dijit/tests/css/dijitTests.css";
22 @import "../../../../dijit/themes/claro/claro.css";
23 @import "../../resources/Legend.css";
24 </style>
25 <style>
26 .bars{
27 width:300px;
28 height:200px;
29 }
30 .columns{
31 width:300px;
32 height:250px;
33 }
34 .pie {
35 width:500px;
36 height:300px;
37 }
38 .bubble{
39 width:320px;
40 height:300px;
41 }
42 </style>
43
44 <script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true, has:{'dojo-bidi': true}"></script>
45 <script type="text/javascript">
46 dojo.require("dojo.parser");
47 dojo.require("doh.runner");
48
49 dojo.require("dijit.dijit");
50 dojo.require("dojox.charting.Chart");
51 dojo.require("dojox.charting.axis2d.Default");
52 dojo.require("dojox.charting.plot2d.Lines");
53 dojo.require("dojox.charting.plot2d.StackedAreas");
54 dojo.require("dojox.charting.plot2d.Bars");
55 dojo.require("dojox.charting.plot2d.ClusteredBars");
56 dojo.require("dojox.charting.plot2d.StackedBars");
57 dojo.require("dojox.charting.plot2d.Columns");
58 dojo.require("dojox.charting.plot2d.ClusteredColumns");
59 dojo.require("dojox.charting.plot2d.StackedColumns");
60 dojo.require("dojox.charting.plot2d.Bubble");
61 dojo.require("dojox.charting.plot2d.Pie");
62 dojo.require("dojox.charting.themes.MiamiNice");
63 dojo.require("dojox.charting.widget.SelectableLegend");
64 dojo.require("dojox.charting.action2d.Highlight");
65
66 var bars;
67 dojo.addOnLoad(function(){
68 bars = new dojox.charting.Chart("bars").
69 setTheme(dojox.charting.themes.MiamiNice).
70 addPlot("default",{type: "Bars",gap:2}).
71 addAxis("x",{natural: true, includeZero: true}).
72 addAxis("y",{natural: true, vertical:true}).
73 addSeries("\u05e1\u05d9\u05df\u002e",[1,3,5,7,2,4,6]).
74 render();
75 var barsLegend = new dojox.charting.widget.SelectableLegend({chart: bars},"barsLegend");
76
77 var linesColumns = new dojox.charting.Chart("linesColumns", {textDir:"rtl"}).
78 setTheme(dojox.charting.themes.MiamiNice).
79 addPlot("lines",{type: "Lines",markers:true}).
80 addPlot("default",{type: "Columns",gap:2}).
81 addAxis("y",{natural: true, vertical:true,includeZero: true}).
82 addAxis("x",{natural: true,includeZero: true}).
83 addSeries("\u05e1\u05d9\u05df\u002e",[2,4,6,8,3,5,7]).
84 addSeries("India.",[1,3,5,7,2,4,6],{plot:"lines"}).
85 render();
86 var linesColumnsLegend = new dojox.charting.widget.SelectableLegend({chart: linesColumns},"linesColumnsLegend");
87
88 var pie = new dojox.charting.Chart("pie",{textDir:"auto"}).
89 setTheme(dojox.charting.themes.MiamiNice).
90 addPlot("default",{type:"Pie",radius:100,font: "normal normal 10pt Tahoma",htmlLabels:true,labelOffset:-20}).
91 addSeries("\u05d0\u05e3\u002e",[{
92 y: 12.1,
93 text: "\u05e1\u05d9\u05df\u002e"
94 },{
95 y: 9.52,
96 text: "India."
97 }, {
98 y: 2.66,
99 text: "USA."
100 }, {
101 y: 2.06,
102 text: "Indonesia."
103 }, {
104 y: 1.63,
105 text: "Brazil."
106 },{
107 y: 1.48,
108 text: "Russian."
109 },{
110 y: 1.29,
111 text: "Pakistan."
112 },{
113 y: 1.25,
114 text: "Japan."
115 }]).
116 render();
117 var ainm = new dojox.charting.action2d.Highlight(pie,"default");
118 var pieLegend = new dojox.charting.widget.SelectableLegend({chart: pie,horizontal:false, outline: true},"pieLegend");
119
120 var bubble = new dojox.charting.Chart("bubble").
121 setTheme(dojox.charting.themes.MiamiNice).
122 addPlot("default",{type:"Bubble"}).
123 addAxis("x",{natual:true, includeZero: true, max:7}).
124 addAxis("y",{natual:true, vertical: true, includeZero: true,max:10}).
125 addSeries("\u05e1\u05d9\u05df\u002e",[{x:3,y:5,size:1},{x:1,y:7,size:1},{x:4,y:2,size:3}]).
126 addSeries("India.",[{x:5,y:5,size:2},{x:2,y:3,size:4},{x:6,y:2,size:1}]).
127 addSeries("C.",[{x:2,y:7,size:3},{x:6,y:8,size:3}]).
128 render();
129 var bubbleLegend = new dojox.charting.widget.SelectableLegend({chart: bubble, horizontal:false, outline:true},"bubbleLegend");
130
131 doh.register("parse", function(){
132 dojo.parser.parse();
133 });
134
135 doh.register("test textDir", [
136 {
137 name: "textDir inherited",
138
139 runTest: function(){
140 doh.is("ltr", bars.textDir, "bars: inherited from GUI");
141 doh.is("rtl", bubble.textDir, "bubble inherited from html container");
142 }
143 },
144 {
145 name: "textDir in constructor",
146
147 runTest: function(){
148 doh.is("rtl", linesColumns.textDir, "direction of : linesColumns");
149 doh.is("auto", pie.textDir, "direction of : pie");
150 }
151 },
152 {
153 name: "textDir of legends",
154
155 runTest: function(){
156 doh.is(bars.textDir, barsLegend.textDir, "direction of : barsLegend");
157 doh.is(linesColumns.textDir, linesColumnsLegend.textDir, "direction of : linesColumnsLegend");
158 doh.is(bubble.textDir, bubbleLegend.textDir, "direction of : bubbleLegend");
159 doh.is(pie.textDir, pieLegend.textDir, "direction of : pieLegend");
160 }
161 }
162 ]);
163 doh.run();
164 });
165
166 </script>
167 </head>
168 <body class="claro">
169 <h1>Chart: Selectable Legend</h1>
170 <h3>Click the legends</h3>
171 <div style="clear:both;">
172 <div style="float:left;">
173 <h2>1.Bars</h2>
174 <div id="bars" class="bars"></div>
175 <div id="barsLegend"></div>
176 </div>
177 <div style="float:left;">
178
179
180 <div style="float:left;">
181 <h2>2.Lines&Columns</h2>
182 <div id="linesColumns" class="columns"></div>
183 <div id="linesColumnsLegend"></div>
184 </div>
185 </div>
186
187 <div style="clear:both;">
188 <div style="float:left;">
189 <h2>3.Pie</h2>
190 <div id="pie" class="pie" style="float:left;" ></div>
191 <div style="float:left;">
192 <div id="pieLegend"></div>
193 </div>
194 </div>
195 <div style="float:left;margin-left:40px">
196 <h2>4.Bubble</h2>
197 <div id="bubble" class="bubble" style="float:left;" dir="rtl"></div>
198 <div style="float:left;">
199 <div id="bubbleLegend"></div>
200 </div>
201 </div>
202 </div>
203
204 </body>
205 </html>