-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmultiple.html
More file actions
38 lines (35 loc) · 1.31 KB
/
multiple.html
File metadata and controls
38 lines (35 loc) · 1.31 KB
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
33
34
35
36
37
38
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="../simplechart.css" />
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="../simplechart.js"></script>
<script type="text/javascript">
var data = [];
for(var l = 0; l < 4; l++) {
data[l] = {};
for(var i = 1; i < 10; i++) {
data[l]["2014-04-0" + i] = Math.ceil(Math.random() * 100);
}
}
window.onload = function() {
var options = {
points: true,
pointSize: 2,
pointClick: function(d, v, i) {
alert("Clicked line " + i + ". Date is " + d + " and value is " + v);
},
pointTitle: function(d, v, i) {
return "Line " + i + ". Date is " + d + " and value is " + v
},
grid: true,
area: true
};
SimpleChart.Line("chart", data, options);
};
</script>
</head>
<body>
<div id="chart" style="width: 1100px; height: 240px;"></div>
</body>
</html>