Debian Codegraph @

dojox/charting/tests/test_mouseZoomAndPan.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 <title>Mouse Zoom And Pan</title>
18 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19 <style type="text/css">
20 @import "../../../dojo/resources/dojo.css";
21 @import "../../../dijit/themes/tundra/tundra.css";
22 </style>
23 <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true"></script>
24 <script type="text/javascript">
25 dojo.require("dojo.parser");
26 dojo.require("dojox.charting.Chart");
27 dojo.require("dojox.charting.axis2d.Default");
28 dojo.require("dojox.charting.plot2d.Lines");
29 dojo.require("dojox.charting.themes.PlotKit.orange");
30 dojo.require("dojox.charting.action2d.MouseZoomAndPan");
31
32 var chart;
33 makeObjects = function(){
34 chart = new dojox.charting.Chart("chart");
35 chart.setTheme(dojox.charting.themes.PlotKit.orange);
36 chart.addAxis("x", {type : "Default", fixLower: "minor", natural: true, stroke: "gray", enableCache: true,
37 htmlLabels: false, majorTick: {color: "red", length: 4}, minorTick: {color: "blue", length: 2}});
38 chart.addAxis("alternate", {type : "Default", fixLower: "minor", natural: true, stroke: "gray", enableCache: true,
39 htmlLabels: false, majorTick: {color: "red", length: 4}, minorTick: {color: "blue", length: 2}, leftBottom: false});
40 chart.addAxis("y", {vertical: true, min: 0, max: 100, majorTickStep: 10, minorTickStep: 5, stroke: "gray",
41 majorTick: {stroke: "black", length: 4}, minorTick: {stroke: "gray", length: 2}});
42 chart.addPlot("default", {type: "Default", markers: false});
43 chart.addPlot("second", {type: "Default", markers: false, hAxis:"alternate"});
44 chart.addSeries("Series A", [
45 8, 7, 3, 2, 5, 7, 9, 10, 2, 10,
46 14, 16, 18, 13, 16, 15, 20, 19, 15, 12,
47 24, 20, 20, 26, 28, 26, 28, 29, 24, 29,
48 31, 35, 37, 31, 35, 37, 37, 36, 31, 30,
49 50, 49, 42, 46, 44, 40, 47, 43, 48, 47,
50 51, 52, 52, 51, 54, 57, 58, 50, 54, 51,
51 62, 68, 67, 62, 62, 65, 61, 66, 65, 62,
52 74, 78, 78, 77, 74, 74, 72, 74, 70, 78,
53 84, 83, 85, 86, 86, 89, 89, 85, 86, 86,
54 98, 97, 93, 91, 92, 92, 99, 93, 94, 92
55 ]);
56 chart.addSeries("Series B", [
57 3, 1, 3, 2, 4, 7, 9, 10, 2, 9,
58 14, 16, 18, 15, 13, 14, 21, 18, 17, 14,
59 24, 20, 25, 22, 28, 26, 28, 29, 24, 29,
60 31, 35, 37, 31, 34, 37, 37, 34, 39, 30,
61 48, 44, 47, 48, 41, 41, 43, 49, 44, 45,
62 52, 56, 52, 51, 58, 56, 57, 59, 54, 51,
63 61, 63, 63, 62, 61, 61, 61, 63, 64, 63,
64 73, 70, 79, 76, 73, 73, 74, 75, 75, 75,
65 85, 88, 81, 81, 85, 85, 81, 83, 84, 84,
66 95, 96, 93, 88, 97, 93, 91, 95, 98, 92
67 ], {plot: "second"});
68 new dojox.charting.action2d.MouseZoomAndPan(chart, "default", { axis: "x", keyZoomModifier: dojo.isIE?"none":"ctrl" });
69 new dojox.charting.action2d.MouseZoomAndPan(chart, "second", { axis: "alternate", keyZoomModifier: dojo.isIE?"none":"ctrl" });
70 chart.render();
71 };
72
73 dojo.addOnLoad(makeObjects);
74
75 </script>
76 </head>
77 <body class="tundra" style="height:100%;width:100%">
78 <div id="chart" style="width:640px;height:480px"></div>
79 </body>
80 </html>