|
|
@ -3,22 +3,44 @@ |
|
|
|
<link rel="stylesheet" type="text/css" href="/css/c3.css"> |
|
|
|
<link rel="stylesheet" type="text/css" href="/css/c3.css"> |
|
|
|
</head> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<body> |
|
|
|
<div id="chart"></div> |
|
|
|
<div id="chart1"></div> |
|
|
|
|
|
|
|
<div id="chart2"></div> |
|
|
|
|
|
|
|
|
|
|
|
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> |
|
|
|
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> |
|
|
|
<script src="/js/c3.js"></script> |
|
|
|
<script src="/js/c3.js"></script> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
var chart = c3.generate({ |
|
|
|
|
|
|
|
|
|
|
|
var chart1 = c3.generate({ |
|
|
|
|
|
|
|
bindto: '#chart1', |
|
|
|
|
|
|
|
data: { |
|
|
|
|
|
|
|
columns: [ |
|
|
|
|
|
|
|
['data1', 30, 200, 100, 400, 150, 250], |
|
|
|
|
|
|
|
['data2', 50, 20, 10, 40, 15, 25] |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
labels: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
subchart: { |
|
|
|
|
|
|
|
show: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var chart2 = c3.generate({ |
|
|
|
|
|
|
|
bindto: '#chart2', |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
columns: [ |
|
|
|
columns: [ |
|
|
|
['data1', 30, 200, 100, 400, 150, 250], |
|
|
|
['data1', 30, 200, 100, 400, 150, 250], |
|
|
|
['data2', 50, 20, 10, 40, 15, 25] |
|
|
|
['data2', 50, 20, 10, 40, 15, 25] |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
labels: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
subchart: { |
|
|
|
subchart: { |
|
|
|
show: true |
|
|
|
show: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
axis: { |
|
|
|
|
|
|
|
rotated: true |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
</html> |
|
|
|