Skip to content

ts-3156/chasingchart

Repository files navigation

Chasingchart

Bars chase other bars. Live demo

Demo

Gross Domestic Product (GDP) The number of tourists to Japan
Edit in JSFiddle Edit in JSFiddle
Gross Domestic Product (GDP) The number of tourists to Japan

Getting Started

<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>

Input data format

Demo using the below data

[{
    "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"}}
}]

Contributing

Anything is OK. Feel free to submit issues or pull-requests.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments