Browse Source

Add sample for xy line chart

pull/34/merge
Masayuki Tanaka 11 years ago
parent
commit
30ff90f046
  1. 40
      htdocs/samples/chart_xy.html

40
htdocs/samples/chart_xy.html

@ -0,0 +1,40 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css/c3.css">
</head>
<body>
<div id="chart"></div>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="/js/c3.min.js"></script>
<script>
var chart = c3.generate({
bindto: '#chart',
data: {
x: 'x',
columns: [
['x', 30, 40, 100, 200, 250, 350],
['sample', 30, 200, 100, 400, 150, 250]
]
}
});
setTimeout(function () {
chart.load({
columns: [
['sample', 100, 300, 200, 300, 150, 300]
]
})
}, 1000);
setTimeout(function () {
chart.load({
columns: [
['x', 130, 140, 200, 300, 450, 550],
['sample', 200, 350, 100, 200, 50, 100]
]
})
}, 1500);
</script>
</body>
</html>
Loading…
Cancel
Save