Debian Codegraph @

dojox/charting/tests/BidiSupport/mirror_chartTitle.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 </style>
24 <script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true, has:{'dojo-bidi': true}"></script>
25 <script type="text/javascript">
26
27 dojo.require("dojox.charting.Chart");
28 dojo.require("dojox.charting.axis2d.Default");
29 dojo.require("dojox.charting.plot2d.Lines");
30 dojo.require("dojox.charting.plot2d.Columns");
31 dojo.require("dojox.charting.themes.PlotKit.blue");
32 dojo.require("dojox.charting.themes.PlotKit.cyan");
33 dojo.require("dojox.charting.themes.PlotKit.green");
34 dojo.require("dojox.charting.themes.PlotKit.orange");
35 dojo.require("dojox.charting.themes.PlotKit.purple");
36 dojo.require("dojox.charting.themes.PlotKit.red");
37 dojo.require("dijit.form.Button");
38 dojo.require("dijit.form.NumberSpinner");
39 dojo.require("dojo.parser");
40
41 var chart1;
42
43 updateTitleGap = function(){
44 chart1.titleGap = dijit.byId("titleGap").get("value");
45 chart1.fullRender();
46 }
47
48 makeObjects = function(){
49 chart1 = new dojox.charting.Chart("test1", {title: "Production(ton)"}).
50 addAxis("x", {
51 includeZero: true, natural: true, fixLower: "major", fixUpper: "major",
52 labels: [
53 {value: 0, text: ""},{value: 1, text: "Jan"},{value: 2, text: "Feb"},
54 {value: 3, text: "Mar"},{value: 4, text: "Aprl"},{value: 5, text: "May"}
55 ]
56 }).
57 addAxis("y", {
58 vertical: true, includeZero: true, natural: true, fixLower: "major", fixUpper: "major", majorTickStep: 2
59 }).
60 addPlot("default", {type: "Columns"}).
61 addSeries("Series A", [2, 6, 14, 3, 3], {stroke: {color: "orange"}, fill: "yellow"}).
62 addSeries("Series B", [2, 8, 8, 8, 6], {stroke: {color: "green"}, fill: "lightgreen"}).
63 setDir("rtl").
64 render();
65
66 var chart2 = new dojox.charting.Chart("test2", {
67 title: "Production(Quantity)",
68 titlePos: "bottom",
69 titleGap: 25,
70 titleFont: "normal normal normal 15pt Arial",
71 titleFontColor: "orange"
72 }).
73 addAxis("x", {
74 includeZero: true, natural: true, fixLower: "major", fixUpper: "major",
75 labels: [
76 {value: 0, text: ""},{value: 1, text: "Jan"},{value: 2, text: "Feb"},
77 {value: 3, text: "Mar"},{value: 4, text: "Aprl"},{value: 5, text: "May"}
78 ]
79 }).
80 addAxis("y", {
81 vertical: true, includeZero: true, natural: true, fixLower: "major", fixUpper: "major", majorTickStep: 200
82 }).
83 addPlot("default", {type: "Lines"}).
84 addSeries("Series A", [400, 800, 200, 600, 600], {stroke: {color: "red"}, fill: "lightpink"}).
85 addSeries("Series B", [200, 300, 500, 700, 800], {stroke: {color: "blue"}, fill: "lightblue"}).
86 setDir("rtl").
87 render();
88 };
89
90 dojo.addOnLoad(makeObjects);
91
92 </script>
93 </head>
94 <body class="tundra">
95 <h1>Chart2D Title</h1>
96 <p>Column chart with chart title</p>
97 <p>
98 Title Gap:&nbsp;
99 <input dojoType="dijit.form.NumberSpinner" id="titleGap" value="20" constraints="{min: 0, max: 100, fractional: false}" style="width: 8em;">
100 &nbsp;
101 <button dojoType="dijit.form.Button" onClick="updateTitleGap()">Apply</button>
102 </p>
103 <div id="test1" style="width: 400px; height: 300px;"></div>
104 <p>Line chart with customized chart title</p>
105 <div id="test2" style="width: 400px; height: 300px;"></div>
106
107 </body>
108 </html>