Debian Codegraph @

dojox/charting/tests/gradients/test_grad_pie1.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>Gradient: Pie #1</title>
18 <script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script>
19 <script>
20 dojo.require("dojox.charting.Chart");
21 dojo.require("dojox.charting.plot2d.Pie");
22 dojo.require("dojox.charting.Theme");
23
24 run = function(){
25 dojo.attr("start", "disabled", true);
26
27 var theme1 = new dojox.charting.Theme({
28 seriesThemes: [
29 {
30 fill: {
31 type: "linear", space: "plot", x1: 0, y1: 0, x2: 100, y2: 0,
32 colors: [{ offset: 0, color: "#ed0" }, { offset: 0.5, color: "#eda" }, { offset: 1, color: "#ed0" }]
33 }
34 },
35 {
36 fill: {
37 type: "linear", space: "plot", x1: 0, y1: 0, x2: 100, y2: 0,
38 colors: [{ offset: 0, color: "#e00" }, { offset: 0.5, color: "#eaa" }, { offset: 1, color: "#e00" }]
39 }
40 },
41 {
42 fill: {
43 type: "linear", space: "plot", x1: 0, y1: 0, x2: 100, y2: 0,
44 colors: [{ offset: 0, color: "#0e0" }, { offset: 0.5, color: "#aea" }, { offset: 1, color: "#0e0" }]
45 }
46 },
47 {
48 fill: {
49 type: "linear", space: "plot", x1: 0, y1: 0, x2: 100, y2: 0,
50 colors: [{ offset: 0, color: "#00e" }, { offset: 0.5, color: "#aae" }, { offset: 1, color: "#00e" }]
51 }
52 }
53 ]
54 });
55
56 var chart1 = new dojox.charting.Chart("c1").
57 setTheme(theme1).
58 addPlot("default", {type: "Pie", radius: 180}).
59 addSeries("Series A", [2, 3, 4]).
60 render();
61 };
62
63 dojo.addOnLoad(run);
64 </script>
65 </head>
66 <body>
67 <p><button id="start" onclick="run();">Start!</button></p>
68 <h1>plot-space left-to-right gradient</h1>
69 <p>Pie</p>
70 <div id="c1" style="position: relative; width: 400px; height: 400px;"></div>
71 </body>
72 </html>