SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

I have a custom modifier class that extends RubberBandXyZoomModifier and overrides OnModifierMouseUp and OnModifierDoubleClick. When the user mouses up after zooming, is there a property or best practice of determining if the chart is zoomed in or not?

I’m wanting to disable/enable certain features based on the chart being zoomed in or not.

Below is my custom class…

public class CustomRubberBandXyZoomModifier : RubberBandXyZoomModifier
    {
        public override void OnModifierMouseUp(ModifierMouseArgs e)
        {
            Console.WriteLine("MOUSE UP");

            // Determine if the chart is zoomed in or not

            base.OnModifierMouseUp(e);
        }

        public override void OnModifierDoubleClick(ModifierMouseArgs e)
        {
            base.OnModifierDoubleClick(e);

            Console.WriteLine("DOUBLE CLICK");

            // Determine if the chart is zoomed in or not

            ParentSurface.ZoomExtents();
        }
    }
Version
5.4.0.12119
  • Greg Knox
    I thought ParentSurface.ZoomState might do the trick but it always says: UserZooming
  • Andrew Burnett-Thompson
    Hi Greg, I’ve just sent you a renewal notification as your subscription has expired a week ago. The ParentSurface.ZoomState property should work – this detects basically if the Chart XAxis.VisibleRange equals the Dataseries.XRange (union of all series on that axis). The ZoomState API is used in our tutorial #6 on realtime updates: https://www.scichart.com/documentation/v5.x/webframe.html#Tutorial%2006%20-%20Adding%20Realtime%20Updates.html. This basically approximates whether zoomed in, or not. Would you like to process the renewal (if you have not already) and then contact support with a small code sample? We can test it out for you.
  • Greg Knox
    Sounds good! I actually just renewed for one year but is there a way to renew for 2-3 years at an even deeper discount? I’ll check out the tutorial. Thanks!
  • You must to post comments
0
0

Hi Greg!

Thank you for renewing the support for SciChart! We can see your order but it looks like you have not activated the latest key. We suggest doing so than your profile will be shown as support active to our stuff!

Absolutely you can renew for up to 3 years with more discounts. I will get you in touch with our sales for a quote!

Let us know if you have any other questions!

Best regards,
Julia,
SciChart team.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.