I am trying to create a scatter plot where when you select a point it will create a new graph with different data. This works fine.
The issue is when you zoom in on the second scatter plot then press reset zoom, the chart resizes and pushes all the data to the left (I'm assuming because all my data points have the same x coordinate or because the values are very small). I thought by using setExtremes() the reset zoom would use those values as the min and max.
Here's the JSFiddle: http://jsfiddle.net/kzBxB/5/
Below is the function I'm using to create the new chart. Do I need to change anything to make the 'reset zoom' register my given xAxis min and max values?
function newPoints() {
var chart = jQuery('#container').highcharts();
for (var i = 0; i < chart.series.length; i++) {
serie = chart.series[i];
//sets the new x axis and new data
chart.yAxis[0].setExtremes(0, 10);
chart.xAxis[0].setExtremes(.001, .003);
chart.addSeries({
type: 'scatter',
name: serie.name,
data: [
[.002, 1],
[.002, 2],
[.002, 3],
[.002, 4],
[.002, 5][.002, 6]
]
}, false);
//removes the old series
serie.remove(false);
}
//redraws the chart
chart.redraw();
}