Bars chase other bars. Live demo
Gross Domestic Product (GDP) | The number of tourists to Japan |
---|---|
Edit in JSFiddle | Edit in JSFiddle |
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://ts-3156.github.io/chasingchart/chasingchart-latest.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<button id="button">Start</button>
<script>
var input = [...];
var chart = Chasingchart.chart('container');
chart.setData(input);
document.getElementById('button').addEventListener("click", function (event) {
chart.start();
}, false);
</script>
[{
"data": {"cat1": 500, "cat2": 400, "cat3": 300, "cat4": 200, "cat5": 100},
"options": {"title": {"text": "Something statistics"}, "subtitle": {"text": "1900"}}
}, {
"data": {"cat1": 500, "cat2": 550, "cat3": 300, "cat4": 200, "cat5": 100},
"options": {"title": {"text": "Something statistics"}, "subtitle": {"text": "2000"}}
}]
Anything is OK. Feel free to submit issues or pull-requests.
This project is licensed under the MIT License - see the LICENSE file for details