Debian Codegraph @

dojox/charting/tests/BidiSupport/bidi_Pies.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>Pie 2D</title>
19 <style type="text/css">
20 @import "../../../../dojo/resources/dojo.css";
21 @import "../../../../dijit/tests/css/dijitTests.css";
22 </style>
23 <script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad:true, has:{'dojo-bidi': true}"></script>
24 <script type="text/javascript">
25 dojo.require("dojo.parser");
26 dojo.require("doh.runner");
27
28 dojo.require("dojox.charting.Chart");
29 dojo.require("dojox.charting.plot2d.Pie");
30 dojo.require("dojox.charting.themes.PlotKit.blue");
31 dojo.require("dojox.charting.themes.PlotKit.green");
32 dojo.require("dojox.charting.themes.PlotKit.red");
33 dojo.require("dojox.charting.themes.Adobebricks");
34 dojo.require("dojox.charting.themes.Algae");
35 dojo.require("dojox.charting.action2d.Tooltip");
36
37 var chart1, chart2, chart8;
38 makeObjects = function(){
39 chart1 = new dojox.charting.Chart("test1", {textDir:"rtl"});
40 chart1.setTheme(dojox.charting.themes.PlotKit.blue);
41 chart1.addPlot("default", {
42 type: "Pie",
43 font: "normal normal bold 12pt Tahoma",
44 fontColor: "black",
45 labelOffset: 40,
46 htmlLabels: false
47 });
48 chart1.addSeries("Series A", [{y: 4, text: "\u05e9\u05dc\u05d5\u05dd big world!"}, {y: 2, text: "Hello \u05e2\u05d5\u05dc\u05dd\u0020\u05d2\u05d3\u05d5\u05dc!"}, {y: 1, text: "Blue."}, {y: 1, text: "Other..."}]);
49 new dojox.charting.action2d.Tooltip(chart1);
50 chart1.render();
51
52 chart2 = new dojox.charting.Chart("test2", {textDir:"auto"});
53 chart2.setTheme(dojox.charting.themes.PlotKit.blue);
54 chart2.addPlot("default", {
55 type: "Pie",
56 font: "normal normal bold 12pt Tahoma",
57 fontColor: "black",
58 labelOffset: -25,
59 precision: 0,
60 radius: 100,
61 htmlLabels: false
62 });
63 chart2.addSeries("Series A", [{y: 4, text: "\u05e9\u05dc\u05d5\u05dd!"}, {y: 2, text: "Hello!"}, {y: 1, text: "Blue!"}, {y: 1, text: "Other!"}]);
64 chart2.render();
65
66
67 chart8 = new dojox.charting.Chart("test8");
68 chart8.setTheme(dojox.charting.themes.Algae);
69 chart8.addPlot("default", {
70 type: "Pie",
71 font: "normal normal bold 12pt Tahoma",
72 fontColor: "white",
73 radius: 80,
74 htmlLabels: false
75 });
76 chart8.addSeries("Series A", [
77 {y: -1, text: "Red", color: "red"},
78 {y: 5, text: "\u05e9\u05dc\u05d5\u05dd!", color: "green"},
79 {y: 0, text: "Blue", color: "blue"},
80 {y: 0, text: "Other", color: "white", fontColor: "black"}
81 ]);
82 chart8.render();
83 };
84
85 dojo.addOnLoad(function(){
86 makeObjects();
87
88 doh.register("parse", function(){
89 dojo.parser.parse();
90 });
91
92 doh.register("test textDir", [
93 {
94 name: "Pies textDir",
95
96 runTest: function(){
97 doh.is("rtl", chart1.textDir, "chart1: internal labels");
98 doh.is("auto", chart2.textDir, "chart2: external labels");
99 doh.is("ltr", chart8.textDir, "chart8: Degenerated pie, textDir inherited");
100 }
101 }
102 ]);
103
104 doh.run();
105 });
106 </script>
107 </head>
108 <body>
109 <h1>Pie 2D</h1>
110 <table border="1"><tr>
111 <td><p>1: Pie with internal labels.</p>
112 <div id="test1" style="width: 300px; height: 300px;"></div></td>
113 <td><p>2: Pie with external labels.</p>
114 <div id="test2" style="width: 300px; height: 300px;"></div></td>
115 <td><p>3: Degenerated pie with 1 positive elements (out of 5).</p>
116 <div id="test8" style="width: 200px; height: 200px;"></div></td>
117 </tr></table>
118 <p>That's all Folks!</p>
119 </body>
120 </html>