| 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 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 18 |
<title>Pie 2D</title> |
| 19 |
<style type="text/css"> |
| 20 |
@import "../../../../dojo/resources/dojo.css"; |
| 21 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 22 |
</style> |
| 23 |
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, has:{'dojo-bidi': true}"></script> |
| 24 |
<script type="text/javascript"> |
| 25 |
|
| 26 |
dojo.require("dojox.charting.Chart"); |
| 27 |
dojo.require("dojox.charting.widget.Legend"); |
| 28 |
dojo.require("dojox.charting.plot2d.Pie"); |
| 29 |
dojo.require("dojox.charting.themes.PlotKit.blue"); |
| 30 |
dojo.require("dojox.charting.themes.PlotKit.green"); |
| 31 |
dojo.require("dojox.charting.themes.PlotKit.red"); |
| 32 |
dojo.require("dojox.charting.themes.Adobebricks"); |
| 33 |
dojo.require("dojox.charting.themes.Algae"); |
| 34 |
makeObjects = function(){ |
| 35 |
var chart1 = new dojox.charting.Chart("test1"); |
| 36 |
chart1.setTheme(dojox.charting.themes.PlotKit.blue); |
| 37 |
chart1.addPlot("default", { |
| 38 |
type: "Pie", |
| 39 |
font: "normal normal bold 12pt Tahoma", |
| 40 |
fontColor: "blue", |
| 41 |
radius: 70, |
| 42 |
labelOffset: 5, |
| 43 |
labelStyle: "columns", |
| 44 |
labelWiring: "ccc" |
| 45 |
}); |
| 46 |
chart1.addSeries("Series A", [4, 4]); |
| 47 |
chart1.setDir("rtl"); |
| 48 |
chart1.render(); |
| 49 |
|
| 50 |
var legend = new dojox.charting.widget.Legend({ |
| 51 |
chart: chart1, |
| 52 |
horizontal:false |
| 53 |
}, "legend"); |
| 54 |
}; |
| 55 |
|
| 56 |
dojo.addOnLoad(makeObjects); |
| 57 |
|
| 58 |
</script> |
| 59 |
</head> |
| 60 |
<body> |
| 61 |
<h1>Pie</h1> |
| 62 |
<p>Pie with 2 50% slices</p> |
| 63 |
<div id="test1" style="width: 300px; height: 300px;"></div> |
| 64 |
<div id="legend"></div> |
| 65 |
<p>That's all Folks!</p> |
| 66 |
</body> |
| 67 |
</html> |