Menu

#949 Panning when using a periodaxis

1.0.x
closed-works-for-me
nobody
General (896)
5
2009-09-22
2009-07-25
Craio
No

Not sure if this is a bug or that i'm doing something wrong.
When trying to pan the axis is zoomed aswell.
Attached a modified demo file that illustrates the bug.
The problem is much more present when there is data for every minute (or shorter) then when there's data every hour (or longer).

Discussion

  • Craio

    Craio - 2009-07-25

    Modified demo source

     
  • Craio

    Craio - 2009-08-14

    Tried to figure out what is causing it myself.
    I think it has something to do with .setAutoRangeTimePeriodClass( setting and how this is handled when panning / changing the range of a periodaxis.
    Range adjustments that are requested seem to get rounded down (or up) to match the period of the autorange (so if autorange is 1 hour its 3600000). Because this happens, this goes wrong when the percentile range adjustment gets rounded down differently then rounded up. Meaning for example the lower limit changes but the upper limit stays the same (or other way around).
    I've made a workaround (changing the void panDomainAxes( method in XYplot).
    But this is a rather ugly solution. When i manage to make it cleaner i'll post it.

     
  • Craio

    Craio - 2009-08-20

    Altered PeriodAxis file

     
  • Craio

    Craio - 2009-08-20

    Not sure if this is the correct way of solving this, but it works.
    Added my altered PeriodAxis.java
    - A private long has been added
    - line 357 has been added
    - added pan( percent) which overrides the one in valueaxis

     
  • Craio

    Craio - 2009-09-22
    • status: open --> closed-works-for-me
     

Log in to post a comment.