Updated
This commit is contained in:
65
master/examples/test_grad_pie2.html
Normal file
65
master/examples/test_grad_pie2.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--[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 #2</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: "linear", space: "plot", x1: 0, y1: 0, x2: 100, y2: 100,
|
||||
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "red" }]
|
||||
}
|
||||
},
|
||||
{
|
||||
fill: {
|
||||
type: "linear", space: "plot", x1: 0, y1: 100, x2: 100, y2: 0,
|
||||
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "blue" }]
|
||||
}
|
||||
},
|
||||
{
|
||||
fill: {
|
||||
type: "linear", space: "plot", x1: 0, y1: 0, x2: 100, y2: 100,
|
||||
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "green" }]
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var chart1 = new dojox.charting.Chart("c1").
|
||||
setTheme(theme1).
|
||||
addPlot("default", {type: "Pie", radius: 180}).
|
||||
addSeries("Series A", [2, 3, 4]).
|
||||
render();
|
||||
};
|
||||
|
||||
dojo.addOnLoad(run);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p><button id="start" onclick="run();">Start!</button></p>
|
||||
<h1>plot-space diagonal gradient</h1>
|
||||
<p>Pie</p>
|
||||
<div id="c1" style="position: relative; width: 400px; height: 400px;"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user