-
Notifications
You must be signed in to change notification settings - Fork 5
/
chart.html
32 lines (30 loc) · 929 Bytes
/
chart.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<head>
<title>Interactive Morphic Charts!</title>
<script type="text/javascript" src="morphic.js"></script>
<script type="text/javascript" src="widgets.js"></script>
<script type="text/javascript" src="charts.js"></script>
<script type="text/javascript">
var world, chart;
window.onload = function () {
world = new WorldMorph(document.getElementById('world'));
world.worldCanvas.focus();
world.setColor(new Color(255, 255, 255));
chart = new ChartMorph();
chart.setPosition(new Point(10, 10));
world.add(chart);
loop();
};
function loop() {
requestAnimationFrame(loop);
world.doOneCycle();
}
</script>
</head>
<body>
<canvas id="world" width="800" height="600" style="position: absolute;">
<p>Your browser doesn't support canvas.</p>
</canvas>
</body>
</html>