Pre loader

MVVM ZoomPanModifier Event on Extents reached

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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

Version
8.2.1.27958
  • You must to post comments
0
0

Hi Marco

I would suggest – its not the ZoomPanModifier that notifies you when data extents is reached, its the axis.

  1. Subscribe to Axis.VisibleRangeChanged event
  2. 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

  • You must to post comments
0
0

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

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.