-
6 Sep 2012 2:17 AM #1
Demo: Area Renderer Chart yAxis scaling problem
Demo: Area Renderer Chart yAxis scaling problem
You got to add the ValueProvider in the same order to axis and series.addYField. Otherwise the scale of the y-Axis is broken, if you choose to show one/some series via legend.
Here is code of the AreaRendererExample:
vs.Code:NumericAxis<BrowserProxy> axis = new NumericAxis<BrowserProxy>(); axis.setPosition(Position.LEFT); axis.addField(props.Chrome()); axis.addField(props.Firefox()); axis.addField(props.IE()); axis.addField(props.Opera()); axis.addField(props.Other()); axis.addField(props.Safari());
This leads to the described faulty behaviour.Code:AreaSeries<BrowserProxy> series = new AreaSeries<BrowserProxy>(); series.setHighlighting(true); series.setYAxisPosition(Position.LEFT); series.addYField(props.IE()); series.addYField(props.Chrome()); series.addYField(props.Firefox()); series.addYField(props.Safari()); series.addYField(props.Opera()); series.addYField(props.Other());
http://www.sencha.com/examples/#Exam...arendererchart
-
7 Sep 2012 1:48 PM #2
Thanks for the report! I have opened a bug in our bug tracker.
-
19 Dec 2012 2:23 PM #3
I'm having a hard time reproducing this issue, though I may be missing something. The example has the ordering of the items as you've specified already (this is as of 3.0.1, it might have been different in an earlier version) - the axis field list is different from the series yfield list. The values seem to be correct - when I hide IE, the chart starts around 55% and ends just over 70%. What do you mean when you say "the scale of the y-Axis is broken"?
Perhaps the issue is fixed, but we neglected to close this issue? This seems unlikely since 3.0.1 was released in August, but your ticket opened in September.
-
20 Dec 2012 2:39 AM #4
The problem still exists in 3.0.1 at http://www.sencha.com/examples/#Exam...arendererchart
It becomes most obvious when you deactivate all but one series.
Only IE active: series falls from 44.8 to 27.5; scale of yAxis is 0 to 25 ==> wrong
Only Chrome active: series rises from 3.9 to 22.4; scale of yAxis is 0 to 50 ==> wrong (should have been 0 to 25 (0 to 24 with a step of 3))
Only Firefox active: series highest value is 47.9; scale of yAxis is 0 to 45 ==> wrong
It seems like IE, FF and Chrome switched their yAxis scales. This is due to the fact, that their adding order got messed up.
Only Safari active: series highest value is 4.0; scale of yAxis is 0 to 3 ==> wrong
Only Opera active: series highest value is 2.3; scale of yAxis is 0 to 1 ==> wrong
Only Other active: series highest value is 0.9; scale of yAxis is 0 to 4 ==> wrong
It seems like Safari, Opera and Other switched their yAxis scales. This is due to the fact, that their adding order got messed up.
Do I have to be more precise?
Even only deactivating IE, like you did, shows the problem in a minor way: sum of the remaining series ends up slightly above 70% while scale of yAxis is 0 to 100. Should have been 0 to 80.
Regards,
Andreas
-
20 Dec 2012 8:03 AM #5
Thanks for the additional detail, I clearly wasn't looking hard enough.
The bug is in NumericAxis, but there isn't a clean workaround other than to order the insertion of the fields, as you have noted.
You found a bug! We've classified it as
EXTGWT-2413
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote