multiple axis alignment control
There seems to be a lot of posts in the forum asking how to align the 0 values of multiple y axes.
My thoughts for implementing this:
Chart level option (like alignTicks): alignBaseline: boolean (default: true)
Axis level option: baseline:(numeric) (default: 0)
By default 0 is the baseline for each axis, and by default the 0 value for each axis is aligned.
The user can set the baseline to any other set of numbers that should be aligned, or turn off alignment.
I implemented this experimentally, see http://jsfiddle.net/highcharts/jrXQe/.
One problem now is that ticks are added, but the amount of ticks is not regulated to match the tickPixelInterval. There are probably other issues as well, please feel free to comment as you find problems, and we’ll keep the demo updated.
@Luis Miguel: You need to supply a threshold. Lines don't have a threshold by default. http://jsfiddle.net/highcharts/jrXQe/5/
Luis Miguel commented
Hi, the change in the plugin (version 2013-12-02) works fine, but I detected another bug trying with different values.
For example, I used the following series:
type: 'line', data: [1129.9, 1171.5, 1106.4, 1129.2, 1144.0, 1176.0, 1135.6, 1148.5, 1216.4, 1194.1, 1195.6, 1154.4]
type: 'line', data: [29.9, -71.5, -106.4, -129.2, -144.0, -176.0, -135.6, -148.5, -216.4, -194.1, -95.6, -54.4]
type: 'line', data: [129.9, 271.5, 306.4, -29.2, 544.0, 376.0, 435.6, 348.5, 216.4, 294.1, 35.6, 354.4],
Serie 1, new. All values positive and higher than 1000
Serie 2, the same that original serie 1
Serie 3, the same that original serie 2
Whenever serie 1 is of type line, when it shows/hides serie 2 from the legend, does not align the axes.
The difference is that line series don't have a threshold by default, so you need to threshold: 0 on the line series. I've fixed this in the plugin so when no threshold is given, 0 is assumed.
We have the same problem as Luis, does not work for line and columns series in one chart.
Any fix for this ?
Hi, we have tested lines series and columns series together and I'm afraid that dual axes are not alienated.
Could you test it please?
Hello , is there any news about this feature ?
We appreciate the many votes - I'm afraid the train has left for 3.0, and we will have some catching up to do now before adding new features.
Pragnesh Patel commented
its been more than year for this issue. any chance to fix it?
J .Jetten commented
When do you expect this solution goes into production?
Phil Thompson commented
I found it odd that this was not the default. Would be great to have this as an option.
Bram Vd Eijken commented
I would absolutely love this idea. This would help a lot with my program where I have multiple y-axis each with different extremes.
Right now I have to do a dirty workaround >.>
Rick Deckard commented
This would be particularly useful for Input/output (e.g. network throughput) graphs, where input is on a normal yaxis, and output on a /reversed/ yaxis, but with the origin in the middle
Frans Wessels commented
I would like this feature a lot! Is there an idea when this may go into production?