Files
openlayers/master/examples/test_grad_pie8.html
Éric Lemoine 5d14b9e2d4 Updated
2013-02-20 10:38:25 +01:00

66 lines
2.2 KiB
HTML

<!--[if IE 7]>
<!DOCTYPE>
<html lang="en">
<head>
<![endif]-->
<!--[if IE 8]>
<!DOCTYPE>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<![endif]-->
<![if gte IE 9]>
<!DOCTYPE HTML>
<html lang="en">
<head>
<![endif]>
<title>Gradient: Pie #8</title>
<script type="text/javascript" src="../../../../dojo/dojo.js" djConfig="isDebug: true"></script>
<script>
dojo.require("dojox.charting.Chart");
dojo.require("dojox.charting.plot2d.Pie");
run = function(){
dojo.attr("start", "disabled", true);
var theme1 = new dojox.charting.Theme({
seriesThemes: [
{
fill: {
type: "radial", space: "shape", cx: 0, cy: 0, r: 100,
colors: [{ offset: 0, color: "red" }, { offset: 1, color: "white" }]
}
},
{
fill: {
type: "radial", space: "shape", cx: 0, cy: 0, r: 100,
colors: [{ offset: 0, color: "green" }, { offset: 1, color: "white" }]
}
},
{
fill: {
type: "radial", space: "shape", cx: 0, cy: 0, r: 100,
colors: [{ offset: 0, color: "blue" }, { offset: 1, color: "white" }]
}
}
]
});
var chart1 = new dojox.charting.Chart("c1").
setTheme(theme1).
addPlot("default", {type: "Pie", radius: 180, radGrad: "linear"}).
addSeries("Series A", [2, 3, 4]).
render();
};
dojo.addOnLoad(run);
</script>
</head>
<body>
<p><button id="start" onclick="run();">Start!</button></p>
<h1>radial-to-linear pie slice gradient</h1>
<p>Pie</p>
<div id="c1" style="position: relative; width: 400px; height: 400px;"></div>
</body>
</html>