Panning error in Log axis with Absolute Min/Max

Jun 17, 2013 at 7:11 PM
Edited Jun 17, 2013 at 7:11 PM
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"
    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.
Jun 18, 2013 at 11:22 AM
Thanks for reporting the bug!
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
Jun 18, 2013 at 5:30 PM
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.