| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
<![if gte IE 9]> |
| 13 |
<!DOCTYPE HTML> |
| 14 |
<html lang="en"> |
| 15 |
<head> |
| 16 |
<![endif]> |
| 17 |
<title>Gradient: Pie #4</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: "shapeX", x1: 0, y1: 0, x2: 100, y2: 100, |
| 32 |
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "red" }] |
| 33 |
} |
| 34 |
}, |
| 35 |
{ |
| 36 |
fill: { |
| 37 |
type: "linear", space: "shapeX", x1: 0, y1: 0, x2: 100, y2: 0, |
| 38 |
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "blue" }] |
| 39 |
} |
| 40 |
}, |
| 41 |
{ |
| 42 |
fill: { |
| 43 |
type: "linear", space: "shapeY", x1: 0, y1: 0, x2: 100, y2: 100, |
| 44 |
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "green" }] |
| 45 |
} |
| 46 |
} |
| 47 |
] |
| 48 |
}); |
| 49 |
|
| 50 |
var chart1 = new dojox.charting.Chart("c1"). |
| 51 |
setTheme(theme1). |
| 52 |
addPlot("default", {type: "Pie", radius: 180}). |
| 53 |
addSeries("Series A", [2, 3, 4]). |
| 54 |
render(); |
| 55 |
}; |
| 56 |
|
| 57 |
dojo.addOnLoad(run); |
| 58 |
</script> |
| 59 |
</head> |
| 60 |
<body> |
| 61 |
<p><button id="start" onclick="run();">Start!</button></p> |
| 62 |
<h1>1D shape-space gradient</h1> |
| 63 |
<p>Pie</p> |
| 64 |
<div id="c1" style="position: relative; width: 400px; height: 400px;"></div> |
| 65 |
</body> |
| 66 |
</html> |