Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

how to keep the Y-axis width or the plot area size fixed whenever Y-axis range varies during run-time?

how to keep the y axis width or the plot area size fixed during runtime?
Plot area size changes whenever the range of y axis changes during runtime. Whats the equivalent of Visual Basic's label.width here in Visual Basic. NET?
0 Kudos
Message 1 of 4
(3,904 Views)
Just want to make above question clear. I'm trying to keep the width of the y-axis or the size of the plot area fixed on NationalInstruments.UI.WindowsForms.WaveformGraph.
I used to set CWLabels.width in Measurement Studio 6.0 to keep the y-axis width on CWGraph object fixed all the time. How do you set the same in .NET to keep the Y-axis or the plot area size from changing when the range of the Y-axis changes during runtime?
0 Kudos
Message 2 of 4
(3,904 Views)
There is not a perfect solution for this in Measurement Studio 7.0. You can get close to it by specifying a #: (where # is a the minimum field width of the string) prefix before the format string. For example, the default format string for the axis labels is the numeric format string "G5". If you wanted to specify a format string with a minimum field width of 7, you could change this format string to "7:G5".

This may do what you want, but note that this is not an ideal solution because a.) you will only get consistent results with a fixed width font, and b.) if affects the total width of the label, which could potentially impact how many labels you see when the axis is using auto spacing.

The next release of Measurement Studio provides a better sol
ution via XAxis.MinimumHeight and YAxis.MinimumWidth properties that give you finer control over the size of the axis without messing with the axis labels. If you are interested in evaluating the beta, please go to http://www.ni.com/beta to sign up. If you have any questions, you can e-mail the beta coordinator at mstudio.beta@ni.com.

- Elton
Message 3 of 4
(3,904 Views)
Elton:

Your soultion a#: works perfect for my application. I changed the label font to a fixed width font as you said.
Thanx a lot for your help.

Rajesh
0 Kudos
Message 4 of 4
(3,904 Views)