Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
<html>
2
<head>
3
<title>Cylinder chart</title>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
<style type="text/css">
6
	@import "../../../dojo/resources/dojo.css";
7
	@import "../../../dijit/tests/css/dijitTests.css";
8
</style>
9
<!--
10
The next line should include Microsoft's Silverligth.js, if you plan to use the silverlight backend
11
<script type="text/javascript" src="Silverlight.js"></script>
12
-->
13
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
14
<script type="text/javascript" src="../Chart3D.js"></script>
15
<script type="text/javascript" src="../plot3d/Base.js"></script>
16
<script type="text/javascript" src="../plot3d/Cylinders.js"></script>
17
<script type="text/javascript">
18
 
19
dojo.require("dojox.charting.Chart3D");
20
dojo.require("dojox.charting.plot3d.Cylinders");
21
 
22
makeObjects = function(){
23
	var m = dojox.gfx3d.matrix;
24
	var chart = new dojox.charting.Chart3D("test",
25
		{
26
			lights:   [{direction: {x: 5, y: 5, z: -5}, color: "white"}],
27
			ambient:  {color:"white", intensity: 2},
28
			specular: "white"
29
		},
30
		[m.cameraRotateXg(10), m.cameraRotateYg(-10), m.scale(0.8), m.cameraTranslate(-50, -50, 0)]
31
	);
32
 
33
	var plot1 = new dojox.charting.plot3d.Cylinders(500, 500, {gap: 10, material: "yellow"});
34
	plot1.setData([1,2,3,2,1,2,3,4,5]);
35
	chart.addPlot(plot1);
36
 
37
	var plot2 = new dojox.charting.plot3d.Cylinders(500, 500, {gap: 10, material: "red"});
38
	plot2.setData([2,3,4,3,2,3,4,5,5]);
39
	chart.addPlot(plot2);
40
 
41
	var plot3 = new dojox.charting.plot3d.Cylinders(500, 500, {gap: 10, material: "blue"});
42
	plot3.setData([3,4,5,4,3,4,5,5,5]);
43
	chart.addPlot(plot3);
44
 
45
	chart.generate().render();
46
 
47
	//dojo.byId("out1").value = dojo.byId("test").innerHTML;
48
	//dojo.byId("out2").value = dojox.gfx.utils.toJson(surface, true);
49
};
50
 
51
dojo.addOnLoad(makeObjects);
52
 
53
</script>
54
</head>
55
<body>
56
<h1>Cylinder chart</h1>
57
<div id="test" style="width: 500px; height: 500px;"></div>
58
<!--
59
<p><button onclick="makeObjects();">Go</button></p>
60
<p><textarea id="out1" cols="40" rows="5"></textarea></p>
61
<p><textarea id="out2" cols="40" rows="5"></textarea></p>
62
-->
63
<p>That's all Folks!</p>
64
</body>
65
</html>