
Panning error in Log axis with Absolute Min/Max
This discussion was imported from CodePlex
ryoujr wrote at 2013-06-17 20:11:
Dears,
I found one issue when it applies Log axis with Absolute Min/Max values, Panning should be blocked with those absolute values, but when I tried the panning, the chart showed wrong range of values and graph was disappeared.
I think I found the cause of this as below, but I'm not sure how I can apply this modification on you main source tree, so, after reviewing this I would appreciate it if you could apply this change on your main release.
in "LogarithmicAxis.cs"
Ian Ryou.
I found one issue when it applies Log axis with Absolute Min/Max values, Panning should be blocked with those absolute values, but when I tried the panning, the chart showed wrong range of values and graph was disappeared.
I think I found the cause of this as below, but I'm not sure how I can apply this modification on you main source tree, so, after reviewing this I would appreciate it if you could apply this change on your main release.
in "LogarithmicAxis.cs"
public override void Pan(ScreenPoint ppt, ScreenPoint cpt)
{
...
if (newMaximum > this.AbsoluteMaximum)
{
newMaximum = this.AbsoluteMaximum;
//Original Code
// newMinimum = newMaximum * this.ActualMaximum / this.ActualMinimum;
// New Fix
newMinimum = newMaximum / this.ActualMaximum / this.ActualMinimum;
}
}
Regards, Ian Ryou.
objo wrote at 2013-06-18 12:22:
Thanks for reporting the bug!
I think the correct code should be
For future bug fixes:
I think the correct code should be
newMinimum = newMaximum * this.ActualMinimum / this.ActualMaximum;
I am submitting the updated source code now. I have also included an example model that can be tested in the example browser.
For future bug fixes:
- create a fork
- create an example/unit test that I can use to verify that the fix is working
- submit a pull request
ryoujr wrote at 2013-06-18 18:30:
Hello Objo,
Thank you for your kind response.
Yes correct! After posting the issue, I applied my fix and found another issue and I found that the exact solution was the same as you suggested.
I hope you have a great day.
Regards,
Ian.
Servicio de atención al cliente por UserEcho