0
votes

I don't understand why the rangeSelector does not appear when I use HighStock with async loading. Here is an example code: http://jsfiddle.net/8y85e0ux/

rangeSelector is activated:

rangeSelector:{
    enabled:true
},
2

2 Answers

2
votes

Use your setData function in chart callback.

$('#container').highcharts({
        chart: {
            type: 'line'            },
        title: {
            text: 'Monthly Average Temperature'
        },
        rangeSelector:{
            enabled:true
        },
         xAxis : [{
            type: 'datetime'
         }],            
        series: [{
            name: 'Tokyo',
            data: []
        }]
    },function(chart){
        setData();
    });

Example: http://jsfiddle.net/8y85e0ux/3/

1
votes

Instead of:

$('#container').highcharts({

Use:

$('#container').highcharts('StockChart', {