Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#124 Scrolling while zoomed causes jump

open
nobody
General (54)
5
2012-09-19
2011-01-10
Dave
No

I was plotting two different linear series on Y1 and Y2. When I zoomed in on a small area then clicked the vertical scroll bar thumb, one of the scales would jump. I.e. the scales would no longer match up where they did before. This happened when you just clicked the thumb, before any actual scrolling had taken place. When scrolling, the two plotted series would pan at different rates.

This happened when the scales had min/max auto = true, and the min/max values were being rounded up or down to "nice" values. Only happened when the rounding amount exceeded the calculated scrollgrace value.

SetScrollRangeFromData() was setting the scroll range based on rangeMin/Max + grace, but not handling the fact that the actual min/max of the scale might be outside this range.

I've attached a simple fix for this that resolved the issue for my test case.

Discussion

  • Dave
    Dave
    2011-01-10

    Fixes to ZedGraphControl.ScrollBars.cs