mirror of https://github.com/masayuki0812/c3.git
Quite good looking graph derived from d3.js
http://c3js.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
<html> |
|
<head> |
|
<link href="/css/c3.css" rel="stylesheet" type="text/css"> |
|
</head> |
|
<body> |
|
<div id="chart1"></div> |
|
<div id="chart2"></div> |
|
<div id="chart3"></div> |
|
|
|
<script src="http://d3js.org/d3.v4.min.js" charset="utf-8"></script> |
|
<script src="/js/c3.js"></script> |
|
<script> |
|
|
|
var chart1 = c3.generate({ |
|
bindto: '#chart1', |
|
data: { |
|
columns: [ |
|
['data1', 300, 350, 300, 0, 0, 100], |
|
['data2', 130, 0, 140, 200, 0, 50], |
|
], |
|
type: 'area-spline', |
|
groups: [['data1', 'data2']], |
|
} |
|
}); |
|
|
|
var chart2 = c3.generate({ |
|
bindto: '#chart2', |
|
data: { |
|
columns: [ |
|
['data1', -300, -350, -300, 0, 0, -100], |
|
['data2', -130, 0, -140, -200, 0, -50] |
|
], |
|
type: 'area-spline', |
|
groups: [['data1', 'data2']], |
|
} |
|
}); |
|
|
|
var chart3 = c3.generate({ |
|
bindto: '#chart3', |
|
data: { |
|
columns: [ |
|
['data1', -300, 350, -300, 0, 0, 100], |
|
['data2', -130, 0, 140, -200, 150, -50] |
|
], |
|
type: 'area-spline', |
|
groups: [['data1', 'data2']], |
|
} |
|
}); |
|
|
|
</script> |
|
</body> |
|
</html>
|
|
|