Hi everyone,
I have a chart with a ZoomPanModifier that allows to pan over the X axis only, what I’d like to accomplish is to append more data when the user reaches the max value of the axis while panning.
Is there an event to bind to a command or some other way to do something like this in MVVM?
I’d like to avoid using visible range events and only have this behaviour while panning if possible.
Thanks a lot,
Marco
- Marco Bilardi asked 10 months ago
- You must login to post comments
Hi Marco
I would suggest – its not the ZoomPanModifier that notifies you when data extents is reached, its the axis.
- Subscribe to
Axis.VisibleRangeChanged
event - When
Axis.VisibleRange.Min == Axis.DataRange.Min
(or max) you are at extents
The subscription to Axis.VisibleRangeChanged
may be done anywhere in your code, for MVVM I’d suggest something like Event to Command or interaction triggers.
ZoomPanModifier
also has a ClipModeX
property which allows you to specify clipping behaviour, such as ‘do not scroll past extents’
Best regards,
Andrew
- Andrew Burnett-Thompson answered 10 months ago
- You must login to post comments
Hi Andrew,
sorry for the late reply, I ended up doing something similar even though there’s a minor issue with this since at the startup my chart begins at full visible range (that’s why I’d like to consider some kind of “pan tentative” rather than the visible range changed), so this triggers the append at the very start, aside from that it works fine, might consider to add a flag to skip first time.
Thanks a lot for the input and the solution,
Marco
- Marco Bilardi answered 10 months ago
- You must login to post comments
Please login first to submit.