In highcharts, I want to plot a scatter/bubble chart where the x values range from -50 to +50, and the y values from -100 to +100. Is there a way to get the x and y axis to be plotted so that they cross at zero in the center of the chart ?
I've tried using the 'offset' parameter in the axis, which does move the axis, e.g. http://bit.ly/Xd9Z51 but this approach has the following problems:
- You can't set the offset parameter dynamically, so if a series updates and changes the min/max x/y values, the axis no longer cross at zero.
- If you zoom, the axis no longer cross at zero.
- It's quite hard to calculate the offsets in pixels, taking into account div size, margins, titles etc.
- Resizing the containing div causes the required axis offset positions to change.