Pre loader

ZoomPanModifier and History

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


Hi all,

In my chart I have ZoomPanModifier. I should load historical data, when user dragged the chart backwards.

  1. How can I catch event when chart drag is completed?
  2. Is there any easy way to fill the gaps in the data series? (the gaps are defined in the series as “”)

Best regards,

  • You must to post comments

Hi there,

  1. Please, try out this:
    public class ZoomPanModifierEx: ZoomPanModifier
        public event EventHandler DragCompleted;

        public override void OnModifierMouseUp(ModifierMouseArgs modifierMouseArgs)


        private void OnDragComplete()
            var handler = DragCompleted;

            if(handler != null)
                handler(this, EventArgs.Empty);

If you use SciStockChart, you need to replace the old modifier with this new:

            var group = ((ModifierGroup) stockChart.ChartModifier);

//Find and remove old ZoomPan
            var panModifier = group["ZoomPanModifier"];

//Create new modifier and subscribe it
            var zoomPan = new ZoomPanModifierEx();
            zoomPan.DragCompleted += OnDragCompleted;

//Add to ModifierGroup
  1. You should use Update(x, y) or FindIndex(oldValue)/RemoveAt(index)/Insert(index, newValue)

Hope this is helpful!

Best regards,

  • Arthur Romanov
    Hi, Thank you, I'll change it for MVVM. Thanks, Arthur
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.