Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

wpf graph limit zoom

Is it possible to limit zoom factor at WPF Scatter Graph? When I scale it too much, it simply stucks. So I'd like to limit it to say x200.

0 Kudos
Message 1 of 6
(5,771 Views)

There is no property to limit the zoom on an axis. To achieve this, you will need to use the RangeChanged event, check whether then delta for the new range is acceptable, or revert to the previous range if it is too small.

~ Paul H
0 Kudos
Message 2 of 6
(5,749 Views)

Hi eugenem,

 

Take a look at the zoom discussion on this forum post.

 

Best,

Regards,

Kristen M

Automated Test Product Marketing Engineer
National Instruments
0 Kudos
Message 3 of 6
(5,740 Views)

I use this event already. But how do I get previous range?

 

void AxisY_RangeChanged(object sender, EventArgs e)

0 Kudos
Message 4 of 6
(5,730 Views)

I'm afraid the previous range is not available through the event. You will need to use a separate variable to track the range (i.e. in the change event, if the new range is valid, update the variable; if the new range is not valid, update the axis to use the value saved in the variable).


I have created a task to provide the previous range value in the event.

~ Paul H
0 Kudos
Message 5 of 6
(5,720 Views)

Just wanted to let you know that we have updated the RangeChanged event to report the previous range in the Measurement Studio 2015 release.

~ Paul H
0 Kudos
Message 6 of 6
(5,230 Views)