Browse Source

Add sample for zoom

pull/3/head
Masayuki Tanaka 11 years ago
parent
commit
0c7d4358ac
  1. 13
      htdocs/index.html
  2. 23
      htdocs/samples/interaction_zoom.html

13
htdocs/index.html

@ -101,6 +101,19 @@
</div>
</div>
</div>
<div class="section">
<a href="/#chart_type" name="chart_type"><h2># <span>Interaction</span></h2></a>
<div>
<div class="row">
<div class="col-md-4">
<h3>Zoom</h3>
<p>Zoom by mouse wheel event and slide by drag.</p>
<p><a class="btn btn-default" href="/samples/interaction_zoom.html" role="button">View details &raquo;</a></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

23
htdocs/samples/interaction_zoom.html

@ -0,0 +1,23 @@
<html>
<head>
<link href="/css/c3.css" rel="stylesheet" type="text/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({
data: {
columns: [
['sample', 30, 200, 100, 400, 150, 250, 150, 200, 170, 240, 350, 150, 100, 400, 150, 250, 150, 200, 170, 240, 100, 150, 250, 150, 200, 170, 240, 30, 200, 100, 400, 150, 250, 150, 200, 170, 240, 350, 150, 100, 400, 350, 220, 250, 300, 270, 140, 150, 90, 150, 50, 120, 70, 40]
]
},
zoom: {
enabled: true
}
});
</script>
</body>
</html>
Loading…
Cancel
Save