-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtooltips_try.html
63 lines (59 loc) · 1.17 KB
/
tooltips_try.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="build/xcharts_baseball.css">
<script src="xcharts_startup/d3.v2.min.js"></script>
<script src="build/xcharts.js"></script>
</head>
<body>
<figure class="xchart" id="myChart" style="height:600px"></figure>
<script>
var data = {
"xScale": "time",
"yScale": "linear",
"main": [
{
"className": ".pizza",
"data": [
{
"x": "2012-11-05",
"y": 6
},
{
"x": "2012-11-06",
"y": 6
},
{
"x": "2012-11-07",
"y": 8
},
{
"x": "2012-11-08",
"y": 3
},
{
"x": "2012-11-09",
"y": 4
},
{
"x": "2012-11-10",
"y": 9
},
{
"x": "2012-11-11",
"y": 6
}
]
}
]
};
var opts = {
"dataFormatX": function (x) { return d3.time.format('%Y-%m-%d').parse(x); },
"tickFormatX": function (x) { return d3.time.format('%A')(x); },
};
var myChart = new xChart('line-dotted', data, '#myChart', opts);
</script>
</body>
</html>