IS there any evnt which gets fired when zooming or panning?

Sep 2, 2010 at 2:26 AM

I need the event which gets fired when doing zooming or panning. I want to fetch the x-axis (like, x-axis is dateaxis; so the date value) and y-axis value. Any idea?

Thanks in advance

Sep 2, 2010 at 5:23 AM

The viewport implement INotifyPropertyChanged and you can just listen for changes to the Visible property

 

// Add handler
            SpeedChart.Viewport.PropertyChanged += new EventHandler<ExtendedPropertyChangedEventArgs>(Viewport_PropertyChanged);

.....

// Respond to changes
        void Viewport_PropertyChanged(object sender, ExtendedPropertyChangedEventArgs e)
        {
            if (e.PropertyName == "Visible")
            {
                StrokeChart.Viewport.Visible = new DataRect(SpeedChart.Viewport.Visible.XMin, StrokeChart.Viewport.Visible.YMin, SpeedChart.Viewport.Visible.Width, StrokeChart.Viewport.Visible.Height);
            }
        }

 

 

Sep 2, 2010 at 5:53 AM

My x-axis is datetimeaxis. How to get value in datetime for SpeedChart.Viewport.Visible.XMin ?