06-23-2011 11:48 AM
hello,
I am looking to change the Range of my Y-scale limits based on values entered by the user. If I use autoscale the range is preset and hence the limits change randomly depending on the value on the graph...if I use properties---> Scale ----> and then set the value, the scale never changes to the limits entered. How can I get what I need ?
thanks!
06-23-2011 01:18 PM - edited 06-23-2011 01:24 PM
Did you forget to turn autoscaling OFF before you set the scale range programatically???
EDIT: You can also use a property node to turn autoscaling on and off. It's the Scale Fit property in the sub-menus of X Scale and Y Scale.
06-23-2011 01:23 PM
If you programmatically set the YScale.Maximum value you also need to turn off autoscaling with the Scale Fit property: http://digital.ni.com/public.nsf/allkb/578F3AE9DD5FA9D986256BE9006BA819
06-23-2011 01:56 PM
Even if I turn off autoscale, how would I alter the range of the scale based on the data entered by the user ?
06-23-2011 02:00 PM
I need to have the scale change based on values entered. For example, the user enters a= 5, b= 3(during runtime). I need the waveform chart to range from 5 to 3 on the Y-axis. Using scale fit only turns off autoscale but doesn't set the graph to the range specified by the user.
06-23-2011 02:05 PM - edited 06-23-2011 02:05 PM
You'd set the scale using the appropriate property nodes:
06-23-2011 02:15 PM
Thanks a lot! That helped!!
06-24-2011 09:23 AM
You do realize that the charts and graphs have built-in functionality for this right? Your user can simply right-click in various places of your chart and get a pop-ups that control its behavior. You can turn off autoscaling and then set the range to new values by double clicking the top and bottom scale numbers and change them anytime you want without using property nodes.
Property nodes are usually used when you want to programatically control the displays and NOT let the user change things. Of course you can always combine the display's built-in functionality with your own controls and property nodes to make a much fancier and useful graph or chart if you desire.