Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

EditRange, Zoom or Pan once a Range has been set

I am currently setting my range by getting the min and max points and +- 250. my Range = new Range (min - 250, max + 250). Sometimes I may have a value at -20 and then another at 30000 and can only one and have to zoom and pan and edit the range to see the whole thing. Therefore, setting the range is done in order to keep all points on the graph when it is loaded.

However, I would still like to edit, zoom and pan...but I am unable to . I am able to type in another number for the range, it changes, then quickly snaps back to what it was previously set to. I have even set the CanScale to true for both the y and x axis. Any help?

0 Kudos
Message 1 of 4
(3,850 Views)
It sounds like AutoScaling is enabled for your graph, and you instead want to change the mode to Fixed.  This property can be set in the graph Properties pane of the form by going to Graph»X-Axes, select the ellipsis (...), then set Mode to Fixed.  Do the same for Graph»Y-Axes. 

Mark E.
National Instruments

0 Kudos
Message 2 of 4
(3,837 Views)
I've changed the Mode to Fixed, however, when I edit the range, it quickly changes back to the previous value.
0 Kudos
Message 3 of 4
(3,828 Views)

Here is a VS2008/Measurement Studio 8.6 project that uses a toggle switch that programmatically changes the range of the X-axis.  The same concept can be used for the Y-axis.  The Mode for the graph is set to Fixed, and the range is set by the xAxis.Range property.  For example:

xAxis.Range = new Range(0, 10);

 

Does this help?  If not, can you explain what you mean by CanScale? I'm not familiar with that property.


Mark E.
National Instruments

0 Kudos
Message 4 of 4
(3,811 Views)