69 lines
2.2 KiB
HTML
69 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: Scatter #2</title>
|
|
<script type="text/javascript" src="../../../../dojo/dojo.js" djConfig="isDebug: true"></script>
|
|
<script>
|
|
dojo.require("dojox.charting.Chart");
|
|
dojo.require("dojox.charting.axis2d.Default");
|
|
dojo.require("dojox.charting.plot2d.Scatter");
|
|
|
|
run = function(){
|
|
dojo.attr("start", "disabled", true);
|
|
|
|
var theme1 = new dojox.charting.Theme({
|
|
seriesThemes: [
|
|
{
|
|
shadow: null,
|
|
fill: {
|
|
type: "radial", space: "plot", cx: 50, cy: 50, r: 75,
|
|
colors: [{ offset: 0, color: "red" }, { offset: 0.5, color: "yellow" }, { offset: 1, color: "green" }]
|
|
}
|
|
}
|
|
]
|
|
});
|
|
|
|
var run1 = [], run2 = [], run3 = [];
|
|
for(var i = 0; i < 12; ++i){
|
|
for(var j = 0; j < 8; ++j){
|
|
run1.push({x: i + 0.7, y: j + 0.7});
|
|
run2.push({x: i + 1.3, y: j + 1.3});
|
|
run3.push({x: i + 0.7, y: j + 1.3});
|
|
}
|
|
}
|
|
|
|
var chart1 = new dojox.charting.Chart("c1").
|
|
setTheme(theme1).
|
|
addAxis("x", {includeZero: true, minorLabels: false}).
|
|
addAxis("y", {vertical: true, includeZero: true, minorLabels: false}).
|
|
addPlot("default", {type: "Scatter"}).
|
|
addSeries("Series A", run1).
|
|
addSeries("Series B", run2).
|
|
addSeries("Series C", run3).
|
|
render();
|
|
};
|
|
|
|
dojo.addOnLoad(run);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p><button id="start" onclick="run();">Start!</button></p>
|
|
<h1>plot-space radial gradient</h1>
|
|
<p>Scatter</p>
|
|
<div id="c1" style="position: relative; width: 600px; height: 400px;"></div>
|
|
</body>
|
|
</html>
|