Debian Codegraph @

dojox/charting/tests/BidiSupport/mirror_ChartAxisTitle.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>Chart2D Title</title>
19 <style type="text/css">
20 @import "../../../../dojo/resources/dojo.css";
21 @import "../../../../dijit/tests/css/dijitTests.css";
22 @import "../../../../dijit/themes/tundra/tundra.css";
23
24 .axisTitleRotation90 {
25 transform: rotate(90deg);
26 -o-transform: rotate(90deg);
27 -webkit-transform: rotate(90deg);
28 -moz-transform: rotate(90deg);
29 }
30 .axisTitleRotation180 {
31 transform: rotate(180deg);
32 -o-transform: rotate(180deg);
33 -webkit-transform: rotate(180deg);
34 -moz-transform: rotate(180deg);
35 }
36 .axisTitleRotation270 {
37 transform: rotate(-90deg);
38 -o-transform: rotate(-90deg);
39 -webkit-transform: rotate(-90deg);
40 -moz-transform: rotate(-90deg);
41 }
42 </style>
43 <script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true, has:{'dojo-bidi': true}"></script>
44 <script type="text/javascript">
45 dojo.require("dojo.parser");
46 dojo.require("doh.runner");
47
48 dojo.require("dojox.charting.Chart");
49 dojo.require("dojox.charting.axis2d.Default");
50 dojo.require("dojox.charting.plot2d.Lines");
51 dojo.require("dojox.charting.plot2d.Markers");
52 dojo.require("dojox.charting.plot2d.Columns");
53 dojo.require("dojox.charting.themes.PlotKit.blue");
54 dojo.require("dojox.charting.themes.PlotKit.cyan");
55 dojo.require("dojox.charting.themes.PlotKit.green");
56 dojo.require("dojox.charting.themes.PlotKit.orange");
57 dojo.require("dojox.charting.themes.PlotKit.purple");
58 dojo.require("dojox.charting.themes.PlotKit.red");
59 dojo.require("dijit.form.Button");
60 dojo.require("dijit.form.NumberSpinner");
61
62 var chart1;
63
64 var updateAxis = function(){
65 var gap = dijit.byId("axisTitleGap").get("value"),
66 rotation = dijit.byId("rotation").get("value"),
67 orientation = dojo.byId("orientation").value || "axis";
68 chart1.addAxis("x", {
69 title: "Quarter \u05dc\u05e9\u05e0\u05ea 2010.",
70 titleGap: gap,
71 titleFontColor: "orange",
72 titleOrientation: orientation,
73 rotation: rotation,
74 includeZero: true, natural: true, fixLower: "major", fixUpper: "major",
75 labels: [
76 {value: 0, text: ""},{value: 1, text: "1 Qtr"},{value: 2, text: "2 Qtr"},
77 {value: 3, text: "3 Qtr."},{value: 4, text: "\u05e8\u05d1\u05e2\u05d5\u05df 4."},{value: 5, text: "End."}
78 ]
79 }).
80 addAxis("y", {
81 title: "\u05ea\u05e9\u05d5\u05d0\u05d4 \u0028\u05d1\u05de\u05dc\u05d9\u05d5\u05e0\u05d9\u05dd\u0029.",
82 titleGap: gap,
83 titleFontColor: "orange",
84 titleOrientation: orientation,
85 rotation: rotation,
86 vertical: true, includeZero: true, natural: true, fixLower: "major", fixUpper: "major", majorTickStep: 2,
87 labels: [
88 {value: 0, text: ""},{value: 1, text: "One."},{value: 2, text: "\u05e9\u05ea\u05d9\u05d9\u05dd."},
89 {value: 3, text: "My name: \u05d8\u05dc."},{value: 4, text: "\u05e7\u05d5\u05e8\u05d0\u05d9\u05dd\u0020\u05dc\u05d9: Tal."},{value: 5, text: "Five"},{value: 6, text: "Six"}
90 ]
91 }).
92 addAxis("x2", {
93 title: "\u05e8\u05d1\u05e2\u05d5\u05df of 2010.",
94 titleGap: gap,
95 titleFontColor: "blue",
96 titleOrientation: orientation,
97 rotation: rotation,
98 leftBottom: false,
99 includeZero: true, natural: true, fixLower: "major", fixUpper: "major"
100 }).
101 addAxis("y2", {
102 title: "Quantity(ton).",
103 titleGap: gap,
104 titleFontColor: "blue",
105 titleOrientation: orientation,
106 rotation: rotation,
107 leftBottom: false,
108 vertical: true, includeZero: true, natural: true, fixLower: "major", fixUpper: "major", majorTickStep: 2
109 }).
110 setDir("rtl").
111 render();
112 };
113
114 makeObjects = function(){
115 chart1 = new dojox.charting.Chart("test1",{textDir:"auto",title:"\u05d0\u05e0\u05d9\u0020\u05db\u05d5\u05ea\u05e8\u05ea of the chart."
116 , titleFontColor: "blue"}).
117 addPlot("default", {type: "Lines"}).
118 addSeries("Series A", [3, 5, 3, 4, 2], {stroke: {color: "orange"}, fill: "yellow"}).
119 addPlot("default2", {type: "Columns", gap: 15, hAxis: "x2", vAxis: "y2"}).
120 addSeries("Series B", [12, 8, 15, 20], {plot: "default2", stroke: {color: "blue"}, fill: "lightblue"});
121 updateAxis();
122
123 var chart2 = new dojox.charting.Chart("test2",{title:"\u05d0\u05e0\u05d9\u0020\u05db\u05d5\u05ea\u05e8\u05ea of the chart."
124 , titleFontColor: "blue"
125 , titlePos: "bottom"
126 , titleFont: "normal normal normal 15pt Arial"
127 }).
128 addAxis("x", {
129 title: "\u05d7\u05d5\u05d3\u05e9 of 2010.",
130 titleGap: 20,
131 titleFont: "normal normal normal 10pt Arial",
132 titleFontColor: "green",
133 titleOrientation: "away",
134 rotation: 30,
135 includeZero: true, natural: true, fixLower: "major", fixUpper: "major",
136 labels: [
137 {value: 0, text: ""},{value: 1, text: "\u05d9\u05e0\u05d5\u05d0\u05e8."},{value: 2, text: "Feb."},
138 {value: 3, text: "\u05de\u05e8\u05e5."},{value: 4, text: "Aprl."},{value: 5, text: "May."}
139 ]
140 }).
141 addAxis("y", {
142 title: "Production(Quantity).",
143 titleGap: 15,
144 titleFont: "normal normal normal 10pt Arial",
145 titleFontColor: "orange",
146 titleOrientation: "axis",
147 vertical: true, includeZero: true, natural: true,
148 fixLower: "major", fixUpper: "major", majorTickStep: 30000
149 }).
150 addPlot("default", {type: "Markers"}).
151 addSeries("Series A", [200000, 80000, 120000, 140000, 150000], {stroke: {color: "red"}, fill: "lightpink"}).
152 addSeries("Series B", [30000, 60000, 90000, 120000, 200000], {stroke: {color: "blue"}, fill: "lightblue"}).
153 setDir("rtl").
154 render();
155 };
156
157 dojo.addOnLoad(function(){
158 makeObjects();
159
160 doh.register("parse", function(){
161 dojo.parser.parse();
162 });
163
164 doh.run();
165 });
166
167 </script>
168 </head>
169 <body class="tundra">
170 <h1>Chart2D Titles</h1>
171 <p>Column chart with axis title peeeep</p>
172 <p>
173 Axis Title Gap:&nbsp;
174 <input dojoType="dijit.form.NumberSpinner" id="axisTitleGap" value="15" constraints="{min: 0, max: 50, fractional: false}" style="width: 8em;">
175 &nbsp;&nbsp;
176 Axis Rotation
177 <input dojoType="dijit.form.NumberSpinner" id="rotation" value="0" constraints="{min: 0, max: 360, fractional: false}" style="width: 8em;">
178 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
179 <select id="orientation">
180 <option value="axis">axis title facing the axis</option>
181 <option value="away">axis title facing away</option>
182 </select>
183 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
184 <button dojoType="dijit.form.Button" onClick="updateAxis()">Apply</button>
185 </p>
186 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
187 <h2>Line chart, textDir = auto</h2>
188 <div id="test1" style="width: 500px; height: 400px;"></div>
189 <h2>Line chart, default textDir (inherited from UI)</h2>
190 <div id="test2" style="width: 500px; height: 400px;"></div>
191 </body>
192 </html>