Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function () {
- var chart;
- var min = 5;
- var max = 6;
- $('#container').highcharts({
- chart: {
- type: 'columnrange',
- inverted: true,
- events: {
- load: test
- }
- },
- xAxis: {
- type: 'category'
- },
- series: [{
- name: 'Temperature',
- data: [
- ['Temperature',5, 10]
- ]
- }]
- },function(e){
- chart = $('#container').highcharts();
- });
- function test() {
- chart.series[0].addPoint(['Temperature', min,max], true, chart.series[0].data.length > 2 ? true : false);
- min++;
- max++;
- setTimeout(test, 1000)
- }
- });
- <script src="http://code.highcharts.com/highcharts.js"></script>
- <script src="http://code.highcharts.com/highcharts-more.js"></script>
- <script src="http://code.highcharts.com/modules/exporting.js"></script>
- <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement