Debian Codegraph @

dojox/charting/tests/BidiSupport/bidi_Event2d.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>Event 2D</title>
19 <style type="text/css">
20 @import "../../../../dojo/resources/dojo.css";
21 @import "../../../../dijit/tests/css/dijitTests.css";
22 </style>
23 <!-- required for Tooltip: a default dijit theme: -->
24 <link rel="stylesheet" href="../../../../dijit/themes/claro/claro.css">
25 <style>
26 .dojoxLegendNode {border: 1px solid #ccc; margin: 5px 10px 5px 10px; padding: 3px}
27 .dojoxLegendText {vertical-align: text-top; padding-right: 10px}
28 </style>
29 <script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, has:{'dojo-bidi': true}"></script>
30 <script type="text/javascript">
31 dojo.require("dojo.parser");
32 dojo.require("doh.runner");
33
34 dojo.require("dojox.charting.Chart");
35 dojo.require("dojox.charting.axis2d.Default");
36 dojo.require("dojox.charting.plot2d.Default");
37 dojo.require("dojox.charting.plot2d.Columns");
38 dojo.require("dojox.charting.plot2d.ClusteredColumns");
39 dojo.require("dojox.charting.plot2d.Bars");
40 dojo.require("dojox.charting.plot2d.Bubble");
41 dojo.require("dojox.charting.plot2d.Grid");
42 dojo.require("dojox.charting.plot2d.Pie");
43
44 dojo.require("dojox.charting.themes.PlotKit.green");
45
46 dojo.require("dojox.charting.action2d.Highlight");
47 dojo.require("dojox.charting.action2d.Magnify");
48 dojo.require("dojox.charting.action2d.MoveSlice");
49 dojo.require("dojox.charting.action2d.Shake");
50 dojo.require("dojox.charting.action2d.Tooltip");
51
52 dojo.require("dojox.charting.widget.Legend");
53
54 dojo.require("dojo.colors");
55 dojo.require("dojo.fx.easing");
56
57 var dc = dojox.charting;
58
59 var dur = 450;
60
61 var chart1, legend1, chart3, legend3, chart6, legend6, chart9, legend9,
62 chart10, legend10;
63
64 makeObjects = function(){
65 chart1 = new dc.Chart("test1",{textDir:"rtl", title:"\u05d6\u05d4\u05d5\u0020\u05ea\u05e8\u05e9\u05d9\u05dd\u0020\u05de\u05d4\u05de\u05dd."});
66 chart1.setTheme(dc.themes.PlotKit.green);
67 chart1.addPlot("default", {type: "Default", lines: true, markers: true, tension:2});
68 chart1.addAxis("x", {min: 0, max: 6, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}
69 , labels: [
70 //{value: 0, text: "zero"},
71 {value: 2, text: "\u05e9\u05ea\u05d9\u05d9\u05dd."},
72 {value: 4, text: "four."}
73 ]
74 , title:"\u05e6\u05d9\u05e8 x."
75 , titleGap: 20
76 , titleFont: "normal normal normal 10pt Arial"
77 , titleOrientation: "away"
78 });
79 chart1.addAxis("y", {vertical: true, min: 0, max: 10, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3}, title:"\u05e6\u05d9\u05e8 y."});
80 chart1.addSeries("\u05e1\u05d3\u05e8\u05d4\u0020\u05d0\u0027.", [{x: 0.5,value:"Name." ,y: 5, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {x: 1.5, y: 1.5, tooltip:"\u05e7\u05d5\u05e8\u05d0\u05d9\u05dd\u0020\u05dc\u05d9 Dvora."}, {x: 2, y: 9, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {x: 5, y: 0.3, tooltip:"\u05e7\u05d5\u05e8\u05d0\u05d9\u05dd\u0020\u05dc\u05d9 Dvora."}]);
81 chart1.addSeries("Series B.", [{x: 0.3, y: 8, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {x: 4, y: 6, tooltip: "Custom tooltip"}, {x: 5.5, y: 2, tooltip:"\u05e7\u05d5\u05e8\u05d0\u05d9\u05dd\u0020\u05dc\u05d9 Dvora."}]);
82 var anim1a = new dc.action2d.Magnify(chart1, "default");
83 var anim1b = new dc.action2d.Tooltip(chart1, "default");
84 chart1.render();
85 legend1 = new dojox.charting.widget.Legend({chart: chart1, horizontal: false}, "legend1");
86
87 chart3 = new dc.Chart("test3",{textDir:"auto", title:"\u05d6\u05d4\u05d5\u0020\u05ea\u05e8\u05e9\u05d9\u05dd\u0020\u05de\u05d4\u05de\u05dd."});
88 chart3.setTheme(dc.themes.PlotKit.green);
89 chart3.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major",
90 labels: [
91 {value: 1, text: "one."},
92 {value: 2, text: "\u05e9\u05ea\u05d9\u05d9\u05dd."},
93 {value: 4, text: "\u05d4\u05ea\u05d7\u05dc\u05d4 end."}
94 ]
95 });
96 chart3.addPlot("default", {type: "Columns", gap: 2, htmlLabels:false});
97 chart3.addSeries("\u05e1\u05d3\u05e8\u05d4\u0020\u05d0\u0027.", [1, 2, 3, 4, 5], {stroke: {color: "black"}, fill: "red"});
98 chart3.addSeries("Series B.", [{y:5, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {y:4, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {y:3, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {y:2, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {y:1, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}], {stroke: {color: "black"}, fill: "blue"});
99 var anim3a = new dc.action2d.Highlight(chart3, "default");
100 var anim3b = new dc.action2d.Tooltip(chart3, "default");
101 chart3.render();
102 legend3 = new dojox.charting.widget.Legend({chart: chart3, horizontal: false}, "legend3");
103
104 chart6 = new dc.Chart("test6",{title:"\u05d6\u05d4\u05d5\u0020\u05ea\u05e8\u05e9\u05d9\u05dd\u0020\u05de\u05d4\u05de\u05dd.",textDir:"auto"});
105 chart6.setTheme(dc.themes.PlotKit.green);
106 chart6.addAxis("x",{
107 labels: [
108 //{value: 0, text: "zero"},
109 {value: 2, text: "\u05e9\u05ea\u05d9\u05d9\u05dd."},
110 {value: 4, text: "four."}
111 ]
112 , title:"\u05e6\u05d9\u05e8 x."
113 , titleGap: 20
114 , titleFont: "normal normal normal 10pt Arial"
115 , titleOrientation: "away"
116 });
117 chart6.addAxis("y", {vertical: true,
118 labels: [
119 {value: 1, text: "one."},
120 {value: 2, text: "\u05e9\u05ea\u05d9\u05d9\u05dd."},
121 {value: 4, text: "\u05d4\u05ea\u05d7\u05dc\u05d4 end."}
122 ],
123 title:"\u05e6\u05d9\u05e8 y."
124
125
126 });
127 chart6.addPlot("default", {type: "ClusteredColumns", gap: 10});
128 chart6.addPlot("grid", {type: "Grid"});
129 chart6.addSeries("\u05e1\u05d3\u05e8\u05d4\u0020\u05d0\u0027.", [{y:2, tooltip:"I work at \u05d9\u05d1\u05de in Israel."}, {y:1, tooltip:"I work at \u05d9\u05d1\u05de in Israel."}, {y:0.5, tooltip:"I work at \u05d9\u05d1\u05de in Israel."},{y: -1, tooltip:"I work at \u05d9\u05d1\u05de in Israel."},{y: -2,tooltip:"\u05d0\u05e0\u05d9\u0020\u05e2\u05d5\u05d1\u05d3\u05ea\u0020\u05d1\u002d IBM \u05d9\u05e9\u05e8\u05d0\u05dc."}], {stroke: {color: "black"}, fill: "red"});
130 chart6.addSeries("Series B.", [{y: -2,tooltip:"\u05d0\u05e0\u05d9\u0020\u05e2\u05d5\u05d1\u05d3\u05ea\u0020\u05d1\u002d IBM \u05d9\u05e9\u05e8\u05d0\u05dc."}, {y:-1,tooltip:"\u05d0\u05e0\u05d9\u0020\u05e2\u05d5\u05d1\u05d3\u05ea\u0020\u05d1\u002d IBM \u05d9\u05e9\u05e8\u05d0\u05dc."}, {y:-0.5,tooltip:"\u05d0\u05e0\u05d9\u0020\u05e2\u05d5\u05d1\u05d3\u05ea\u0020\u05d1\u002d IBM \u05d9\u05e9\u05e8\u05d0\u05dc."}, {y:1,tooltip:"\u05d0\u05e0\u05d9\u0020\u05e2\u05d5\u05d1\u05d3\u05ea\u0020\u05d1\u002d IBM \u05d9\u05e9\u05e8\u05d0\u05dc."}, {y:2,tooltip:"\u05d0\u05e0\u05d9\u0020\u05e2\u05d5\u05d1\u05d3\u05ea\u0020\u05d1\u002d IBM \u05d9\u05e9\u05e8\u05d0\u05dc."}], {stroke: {color: "black"}, fill: "blue"});
131 chart6.addSeries("Series C", [1, 0.5, -1, -2, -3], {stroke: {color: "black"}, fill: "green"});
132 var anim6a = new dc.action2d.Highlight(chart6, "default", {
133 duration: dur,
134 easing: dojo.fx.easing.sineOut
135 });
136 var anim6b = new dc.action2d.Shake(chart6, "default");
137 var anim6c = new dc.action2d.Tooltip(chart6, "default");
138 chart6.render();
139 legend6 = new dojox.charting.widget.Legend({chart: chart6}, "legend6");
140
141 chart9 = new dc.Chart("test9", {textDir:"", title:"This is some \u05ea\u05e8\u05e9\u05d9\u05dd."});
142 chart9.setTheme(dc.themes.PlotKit.green);
143 chart9.addPlot("default", {type: "Bubble", shadows: {dx: 2, dy: 2, dw: 2}});
144 chart9.addAxis("x", {min: 0, max: 6, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3},
145 labels: [
146 {value: 1, text: "one."},
147 {value: 2, text: "\u05e9\u05ea\u05d9\u05d9\u05dd."},
148 {value: 4, text: "\u05d4\u05ea\u05d7\u05dc\u05d4 end."}
149 ] });
150 chart9.addAxis("y", {vertical: true, min: 0, max: 10, majorTick: {stroke: "black", length: 3}, minorTick: {stroke: "gray", length: 3},
151 labels: [
152 {value: 1, text: "one."},
153 {value: 2, text: "\u05e9\u05ea\u05d9\u05d9\u05dd."},
154 {value: 4, text: "\u05d4\u05ea\u05d7\u05dc\u05d4 end."}
155 ] });
156 chart9.addSeries("\u05e1\u05d3\u05e8\u05d4\u0020\u05d0\u0027.", [{x: 0.5, y: 5, size: 1.4}, {x: 1.5, y: 1.5, size:4.5}, {x: 2, y: 9, size:1.5}, {x: 5, y: 0.3, size:0.8}],
157 {stroke: {color: "black"}, fill: "red"});
158 chart9.addSeries("Series B.", [{x: 0.3, y: 8, size: 2.5, tooltip:"My name is \u05e8\u05d1\u05e7\u05d4\u0020\u05d1\u05ea\u0020\u05de\u05e9\u05d4."}, {x: 4, y: 6, size:1.1, tooltip:"\u05d0\u05e0\u05d9\u0020\u05e2\u05d5\u05d1\u05d3\u05ea\u0020\u05d1\u002d IBM \u05d9\u05e9\u05e8\u05d0\u05dc."}, {x: 5.5, y: 2, size: 3.2, tooltip:"I work at \u05d9\u05d1\u05de in Israel."}],
159 {stroke: {color: "black"}, fill: "blue"});
160 var anim9a = new dc.action2d.Magnify(chart9, "default", {
161 scale: 1.1
162 });
163 var anim9b = new dc.action2d.Highlight(chart9, "default");
164 var anim9c = new dc.action2d.Tooltip(chart9, "default");
165 chart9.render();
166 legend9 = new dojox.charting.widget.Legend({chart: chart9, horizontal: false}, "legend9");
167
168 chart10 = new dc.Chart("test10", {title:"Pie.",textDir:"rtl"});
169 chart10.setTheme(dc.themes.PlotKit.green);
170 chart10.addPlot("default", {
171 type: "Pie",
172 font: "normal normal 11pt Tahoma",
173 fontColor: "black",
174 labelOffset: -30,
175 radius: 150,
176 startAngle: 45
177 });
178 chart10.addSeries("\u05e1\u05d3\u05e8\u05d4\u0020\u05d0\u0027.", [
179 {y: 4, text: "My color is - \u05d0\u05d3\u05d5\u05dd.", color: "red", stroke: "black", tooltip: "\u05d4\u05e6\u05d1\u05e2\u0020\u05e9\u05dc\u05d9\u0020\u05d4\u05d5\u05d0: red, \u05d5\u05d0\u05e0\u05d9\u0020\u05ea\u05d5\u05e4\u05e1 50% \u05de\u05d4\u05e2\u05d5\u05d2\u05d4!!!"},
180 {y: 2, text: "\u05d4\u05e6\u05d1\u05e2\u0020\u05e9\u05dc\u05d9\u0020\u05d4\u05d5\u05d0: green.", color: "green", stroke: "black", tooltip: "Green is \u05d4\u05e6\u05d1\u05e2\u0020\u05d4\u05d0\u05d4\u05d5\u05d1\u0020\u05e2\u05dc\u05d9, because that's the color of my team!!"},
181 {y: 1, text: "Blue.", color: "blue", stroke: "black", tooltip: "I am feeling Blue!"},
182 {y: 1, text: "Other.", color: "white", stroke: "black", tooltip: "Mighty <strong>\u05d7\u05d6\u05e7</strong><br>With two lines!"}
183 ]);
184 var anim10a = new dc.action2d.MoveSlice(chart10, "default");
185 var anim10b = new dc.action2d.Highlight(chart10, "default");
186 var anim10c = new dc.action2d.Tooltip(chart10, "default");
187 chart10.render();
188 legend10 = new dojox.charting.widget.Legend({chart: chart10}, "legend10");
189 };
190
191 dojo.addOnLoad(function(){
192 makeObjects();
193
194 doh.register("parse", function(){
195 dojo.parser.parse();
196 });
197
198 doh.register("test textDir", [
199 {
200 name: "initial.",
201
202 runTest: function(){
203 doh.is("rtl", chart1.textDir, "textDir of : chart1");
204 doh.is("rtl", legend1.textDir, "textDir of : legend1");
205
206 doh.is("auto", chart3.textDir, "textDir of : chart3");
207 doh.is("auto", legend3.textDir, "textDir of : legend3");
208
209 doh.is("auto", chart6.textDir, "textDir of : chart6");
210 doh.is("auto", legend6.textDir, "textDir of : legend6");
211
212 doh.is("ltr", chart9.textDir, "textDir of : chart9");
213 doh.is("ltr", legend9.textDir, "textDir of : legend9");
214
215 doh.is("rtl", chart10.textDir, "textDir of : chart10");
216 doh.is("rtl", legend10.textDir, "textDir of : legend10");
217 }
218 }
219 ]);
220 doh.run();
221 });
222
223 </script>
224 </head>
225 <body class="claro">
226 <h1>Event 2D</h1>
227 <!--<p><button onclick="makeObjects();">Go</button></p>-->
228 <p>Hover over markers, bars, columns, slices, and so on.</p>
229 <h2>1: textDir = "rtl"</h2>
230 <div id="test1" style="width: 500px; height: 300px;"></div>
231 <div id="legend1"></div>
232 <h2>2: textDir = "auto"</h2>
233 <div id="test3" style="width: 500px; height: 300px;"></div>
234 <div id="legend3"></div>
235 <h2>3: textDir = "auto"</h2>
236 <div id="test6" style="width: 500px; height: 300px;"></div>
237 <div id="legend6"></div>
238 <h2>4: textDir inherited from UI</h2>
239 <div id="test9" style="width: 500px; height: 300px;"></div>
240 <div id="legend9"></div>
241 <h2>5: textDir = "rtl"</h2>
242 <div id="test10" style="width: 500px; height: 500px;"></div>
243 <div id="legend10"></div>
244 <p>That's all Folks!</p>
245 </body>
246 </html>