| 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>Bar chart</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.Chart3D"); |
| 27 |
dojo.require("dojox.charting.plot3d.Bars"); |
| 28 |
|
| 29 |
makeObjects = function(){ |
| 30 |
var m = dojox.gfx3d.matrix; |
| 31 |
var chart = new dojox.charting.Chart3D("test", |
| 32 |
{ |
| 33 |
lights: [{direction: {x: 5, y: 5, z: -5}, color: "white"}], |
| 34 |
ambient: {color:"white", intensity: 2}, |
| 35 |
specular: "white" |
| 36 |
}, |
| 37 |
[m.cameraRotateXg(10), m.cameraRotateYg(-10), m.scale(0.8), m.cameraTranslate(-50, -50, 0)] |
| 38 |
); |
| 39 |
|
| 40 |
var plot1 = new dojox.charting.plot3d.Bars(500, 500, {gap: 10, material: "yellow"}); |
| 41 |
plot1.setData([1,2,3,2,1,2,3,4,5]); |
| 42 |
chart.addPlot(plot1); |
| 43 |
|
| 44 |
var plot2 = new dojox.charting.plot3d.Bars(500, 500, {gap: 10, material: "red"}); |
| 45 |
plot2.setData([2,3,4,3,2,3,4,5,5]); |
| 46 |
chart.addPlot(plot2); |
| 47 |
|
| 48 |
var plot3 = new dojox.charting.plot3d.Bars(500, 500, {gap: 10, material: "blue"}); |
| 49 |
plot3.setData([3,4,5,4,3,4,5,5,5]); |
| 50 |
chart.addPlot(plot3); |
| 51 |
chart.setDir("rtl"); |
| 52 |
chart.generate().render(); |
| 53 |
|
| 54 |
//dojo.byId("out1").value = dojo.byId("test").innerHTML; |
| 55 |
//dojo.byId("out2").value = dojox.gfx.utils.toJson(surface, true); |
| 56 |
}; |
| 57 |
|
| 58 |
dojo.addOnLoad(makeObjects); |
| 59 |
|
| 60 |
</script> |
| 61 |
</head> |
| 62 |
<body> |
| 63 |
<h1>Bar chart</h1> |
| 64 |
<div id="test" style="width: 500px; height: 500px;"></div> |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
<p>That's all Folks!</p> |
| 71 |
</body> |
| 72 |
</html> |