Apache OpenOffice (AOO) Bugzilla – Issue 80518
Second y-axis with no series attached has different auto-scaling than the first y-axis
Last modified: 2013-02-24 21:20:10 UTC
1. Create a chart (use numbers greater than 12 to see the effect) 2. Check Insert/Axis/Secondary Axes/Y Axis => The axis has an auto-scaling that goes from 0 to 12 no matter what the first y-axis uses as scaling. The second y-axis should mirror the scaling properties of the first y-axis when no series are attached to it for all properties that are on "automatic". Note that e.g. auto-max on the second axis does not mean auto-calculated maximum of the values, but the maximum of the first y-axis, i.e. if you set max to 17 on the first axis, the second one should also use 17 when being on auto.
Just remembered also this automatism: If all series are attached to the 2nd y-axis and there is an auto-property at the first y-axis, this must also just take the value from the 2nd one. And I suppose the automatisms only affect min, max and auto. Because if you scale a second y-axis to max==1000, where auto was 10, you don't want to have the major interval from the other axis when it is on auto.
changed target due to limited resources
Created attachment 55162 [details] patch_080717
@iha: The patch for this issue is submitted. Please let me know your suggestions. Thanks!
@weiz, please try to avoid the additional parameter xDiagram as it confuses the interface. One option without interface change would be to change the method VCoordinateSystem::prepareScaleAutomatismForDimensionAndIndex. When no data is available fMin and fMax will be NAN.
@iha: The new patch is finished, please let me know your suggestions. Thank you very much!
Created attachment 55431 [details] patch_080729
@weiz: Could you also implement the other scenario as described by Björn? When the first axes has set explicit values the second axes should take that explicit values as long as the according values at the second axes are set to automatic and no series are attached to the second axes. Thanks!
Created attachment 56338 [details] patch_080909
@iha: The new patch is submitted, hope I didn't miss anything. :-) Please let me know your suggestions. Thanks.
Fixed in CWS chart30. @weiz, thanks for the patch! I replaced the new method getExplicitScaleAndIncrementState() by a new method getScale() which is simpler to understand and allows access to the same information. Further I copied Orientation and Scaling from the source scale to the target scale to behave like OOo 2.2 in this case. I also replaced ChartTypeHelper::allSeriesAttachedToSameAxis with a search about all series. Searching only the first chart type seems wrong to me. And I added a check to not set a minimum>maximum. The other parts are fine.
@KLA, please verify in CWS chart30.
Seen ok in CWS chart30 -> verified
Seen ok in current master -> closed
*** Issue 100656 has been marked as a duplicate of this issue. ***