Highcharts navigator error: Invalid negative value for attribute width <rect>

Does anyone know why I am seeing this error - "error: Invalid negative value for attribute width when using Highstock navigator? Please see this JsFiddle for my code - http://jsfiddle.net/Yrygy/250/

var chart = new Highcharts.StockChart({
    chart: {
        renderTo: 'container',
        height: 120
    },
    navigator: {
        series: {
            data: chartData
        }
    },
    series: [{
        data: [null],
        markers: {
            enabled:true
        }
    }]
});

      

+3


source to share


2 answers


Your data is all in one day. MinRange of highstock is one day by default. So the reason your rangeselector is unusable when you have correctly defined your data in the series is because you have already zoomed in one day.
Move data from navigator to series and change xAxis minRange to a smaller number (I choose 1 minute)

var chart = new Highcharts.StockChart({
    chart: {
        renderTo: 'container'
    },
    series: [{
        data: chartData,
        markers: {
            enabled:true
        }
    }],
    xAxis : {
        minRange: 60 * 1000 // one minute
    },
});

      



http://jsfiddle.net/blaird/Yrygy/256/

+4


source


I have this error when i used navigator.series.setData()

. All you need to do is set the minimum and maximum values ​​withchart.xAxis[0].setExtremes(min, max)



0


source







All Articles