Browse Source

Update samples

pull/329/head
Masayuki Tanaka 11 years ago
parent
commit
3c2a4c834c
  1. 14
      htdocs/samples/api_axis_range.html
  2. 47
      htdocs/samples/padding_update.html

14
htdocs/samples/api_axis_range.html

@ -48,12 +48,6 @@
}
});
setTimeout(function () {
chart.axis.min({x: -10})
chart.axis.max({x: 10})
}, 1000);
/*
setTimeout(function () {
chart.axis.max(500);
}, 1000);
@ -75,9 +69,13 @@
}, 5000);
setTimeout(function () {
chart.axis.range({max: {y: 600, y2: 100}, min: {y: -100, y2: 0}});
chart.axis.range({min: {y: 1000}, max: {y: 2000}});
}, 6000);
*/
setTimeout(function () {
chart.axis.range({max: {y: 600, y2: 100}, min: {y: -100, y2: 0}});
}, 7000);
</script>
</body>
</html>

47
htdocs/samples/padding_update.html

@ -0,0 +1,47 @@
<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.js"></script>
<script>
var chart = c3.generate({
data: {
x: 'x',
columns: [
['x', '2014-01-01', '2014-02-01', '2014-03-01', '2014-04-01'],
['data1', 190, 200, 190, null],
],
type: 'bar',
labels: {
format: function (v, id) {
if (v === null) {
return 'Not Applicable';
}
return d3.format('$')(v);
}
}
},
axis: {
x: {
type: 'categorized'
},
rotated: true
},
});
setTimeout(function () {
chart.hide();
}, 1000);
setTimeout(function () {
chart.show();
}, 2000);
</script>
</body>
</html>
Loading…
Cancel
Save