Debian Codegraph @

dojox/charting/tests/BidiSupport/bidi_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 render();
111 };
112
113 makeObjects = function(){
114 chart1 = new dojox.charting.Chart("test1",{textDir:"auto",title:"\u05d0\u05e0\u05d9\u0020\u05db\u05d5\u05ea\u05e8\u05ea of the chart."
115 , titleFontColor: "blue"}).
116 addPlot("default", {type: "Lines"}).
117 addSeries("Series A", [3, 5, 3, 4, 2], {stroke: {color: "orange"}, fill: "yellow"}).
118 addPlot("default2", {type: "Columns", gap: 15, hAxis: "x2", vAxis: "y2"}).
119 addSeries("Series B", [12, 8, 15, 20], {plot: "default2", stroke: {color: "blue"}, fill: "lightblue"});
120 updateAxis();
121
122 var chart2 = new dojox.charting.Chart("test2",{title:"\u05d0\u05e0\u05d9\u0020\u05db\u05d5\u05ea\u05e8\u05ea of the chart."
123 , titleFontColor: "blue"
124 , titlePos: "bottom"
125 , titleFont: "normal normal normal 15pt Arial"
126 }).
127 addAxis("x", {
128 title: "\u05d7\u05d5\u05d3\u05e9 of 2010.",
129 titleGap: 20,
130 titleFont: "normal normal normal 10pt Arial",
131 titleFontColor: "green",
132 titleOrientation: "away",
133 rotation: 30,
134 includeZero: true, natural: true, fixLower: "major", fixUpper: "major",
135 labels: [
136 {value: 0, text: ""},{value: 1, text: "\u05d9\u05e0\u05d5\u05d0\u05e8."},{value: 2, text: "Feb."},
137 {value: 3, text: "\u05de\u05e8\u05e5."},{value: 4, text: "Aprl."},{value: 5, text: "May."}
138 ]
139 }).
140 addAxis("y", {
141 title: "Production(Quantity).",
142 titleGap: 15,
143 titleFont: "normal normal normal 10pt Arial",
144 titleFontColor: "orange",
145 titleOrientation: "axis",
146 vertical: true, includeZero: true, natural: true,
147 fixLower: "major", fixUpper: "major", majorTickStep: 30000
148 }).
149 addPlot("default", {type: "Markers"}).
150 addSeries("Series A", [200000, 80000, 120000, 140000, 150000], {stroke: {color: "red"}, fill: "lightpink"}).
151 addSeries("Series B", [30000, 60000, 90000, 120000, 200000], {stroke: {color: "blue"}, fill: "lightblue"}).
152 render();
153 };
154
155 dojo.addOnLoad(function(){
156 makeObjects();
157
158 doh.register("parse", function(){
159 dojo.parser.parse();
160 });
161
162 doh.run();
163 });
164
165 </script>
166 </head>
167 <body class="tundra">
168 <h1>Chart2D Titles</h1>
169 <p>Column chart with axis title</p>
170 <p>
171 Axis Title Gap:&nbsp;
172 <input dojoType="dijit.form.NumberSpinner" id="axisTitleGap" value="15" constraints="{min: 0, max: 50, fractional: false}" style="width: 8em;">
173 &nbsp;&nbsp;
174 Axis Rotation
175 <input dojoType="dijit.form.NumberSpinner" id="rotation" value="0" constraints="{min: 0, max: 360, fractional: false}" style="width: 8em;">
176 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
177 <select id="orientation">
178 <option value="axis">axis title facing the axis</option>
179 <option value="away">axis title facing away</option>
180 </select>
181 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
182 <button dojoType="dijit.form.Button" onClick="updateAxis()">Apply</button>
183 </p>
184 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
185 <h2>Line chart, textDir = auto</h2>
186 <div id="test1" style="width: 500px; height: 400px;"></div>
187 <h2>Line chart, default textDir (inherited from UI)</h2>
188 <div id="test2" style="width: 500px; height: 400px;"></div>
189 </body>
190 </html>