| 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: Bubble #3</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.axis2d.Default"); |
| 22 |
dojo.require("dojox.charting.plot2d.Bubble"); |
| 23 |
dojo.require("dojox.charting.Theme"); |
| 24 |
|
| 25 |
run = function(){ |
| 26 |
dojo.attr("start", "disabled", true); |
| 27 |
|
| 28 |
var theme1 = new dojox.charting.Theme({ |
| 29 |
seriesThemes: [ |
| 30 |
{ |
| 31 |
fill: { |
| 32 |
type: "linear", space: "shape", x1: 0, y1: 0, x2: 100, y2: 100, |
| 33 |
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "red" }] |
| 34 |
} |
| 35 |
}, |
| 36 |
{ |
| 37 |
fill: { |
| 38 |
type: "linear", space: "shape", x1: 0, y1: 0, x2: 100, y2: 0, |
| 39 |
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "blue" }] |
| 40 |
} |
| 41 |
}, |
| 42 |
{ |
| 43 |
fill: { |
| 44 |
type: "linear", space: "shape", x1: 0, y1: 0, x2: 100, y2: 100, |
| 45 |
colors: [{ offset: 0, color: "white" }, { offset: 1, color: "green" }] |
| 46 |
} |
| 47 |
} |
| 48 |
], |
| 49 |
noRadialConv: true |
| 50 |
}); |
| 51 |
|
| 52 |
var chart1 = new dojox.charting.Chart("c1"). |
| 53 |
setTheme(theme1). |
| 54 |
addAxis("x", {minorLabels: false}). |
| 55 |
addAxis("y", {vertical: true, minorLabels: false, max: 10}). |
| 56 |
addPlot("default", {type: "Bubble"}). |
| 57 |
addSeries("Series A", [ |
| 58 |
{ x: 0.5, y: 5, size: 1.4 }, |
| 59 |
{ x: 1.5, y: 1.5, size: 4.5 }, |
| 60 |
{ x: 2, y: 9, size:1.5 }, |
| 61 |
{ x: 5, y: 0.3, size:0.8 } |
| 62 |
]). |
| 63 |
addSeries("Series B", [ |
| 64 |
{ x: 0.3, y: 8, size: 2.5 }, |
| 65 |
{ x: 4, y: 8, size:1.1 }, |
| 66 |
{ x: 5.5, y: 2, size: 3.2 }, |
| 67 |
{ x: 3, y: 6, size: 3.2 } |
| 68 |
]). |
| 69 |
render(); |
| 70 |
}; |
| 71 |
|
| 72 |
dojo.addOnLoad(run); |
| 73 |
</script> |
| 74 |
</head> |
| 75 |
<body> |
| 76 |
<p><button id="start" onclick="run();">Start!</button></p> |
| 77 |
<h1>shape-space gradient</h1> |
| 78 |
<p>Bubble</p> |
| 79 |
<div id="c1" style="position: relative; width: 600px; height: 400px;"></div> |
| 80 |
</body> |
| 81 |
</html> |