Does anyone know why I am seeing this error - "error: Invalid negative value for attribute width" while using the 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
}
}]
});
Your data is all on one day. The minRange of highstock is one day by default. So, the reason it appears your rangeselector is unusable when you have your data correctly defined within the series is that you are already zoomed into one day.
Move the data from the navigator to a series and change the xAxis minRange to be 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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With