-
Notifications
You must be signed in to change notification settings - Fork 0
/
linecharts.html
112 lines (100 loc) · 2.21 KB
/
linecharts.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html>
<head>
<title>Trends</title>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="./css/c3.css" rel="stylesheet" type="text/css">
<script src="./js/d3.min.js" charset="utf-8"></script>
<script src="./js/c3.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
<style type="text/css">
.chart {
height:400px;
}
.chart-title{
text-align: center;
margin-top: 10px;
}
/*.domain {
stroke:#FFF;
}*/
.released-header{
height: 200px;
/*background-color: green;*/
}
</style>
<div class="container">
<br/>
<div id='chart1' class='chart'></div>
<br/>
<div id='chart2' class='chart'></div>
</div>
<script type="text/javascript">
c3.generate({
bindto: '#chart1',
padding: {
top: 0,
right: 0,
bottom: 0,
left: 30,
},
data: {
columns: [
['before', 130, 100, 140, 200, null, null],
['after', null, null, null, 200, 150, 120]
],
types: {
before: 'area',
after: 'area'
}
},
// tooltip: {
// show: false
// },
point: {
show: false
},
color: {
pattern: ['#aec7e8','#1f77b4', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5']
},
// legend: {
// show: false
// }
});
c3.generate({
bindto: '#chart2',
padding: {
top: 0,
right: 0,
bottom: 0,
left: 30,
},
data: {
columns: [
['before', 130, 100, 140, 200, 150, 180],
['after', 130, 140, 170, 153, 165, 165]
],
types: {
before: 'spline',
after: 'spline'
}
},
// tooltip: {
// show: false
// },
point: {
show: false
},
color: {
pattern: ['#aec7e8','#1f77b4', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5']
},
// legend: {
// show: false
// }
});
</script>
</body>
</html>