Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Studio WaveFormGraph Axes Captions

Solved!
Go to solution

Can measurement studio waveform graph axes caption be programmatically modified?  And if not, then why not?

0 Kudos
Message 1 of 5
(3,944 Views)

Hi CraigByrd

 

Yes, you should be able to edit waveform graph axis captions at runtime. Are you using a Windows Form Application or a WPF Application?

 

Andy F.
Applications Engineering
National Instruments
Message 2 of 5
(3,925 Views)

Thank you for your quick response.

 

I am developing an NI VISA Windows Application using Visual Studio 2010.

 

0 Kudos
Message 3 of 5
(3,919 Views)

Hi CraigByrd

 

You should be able to set the property at runtime by typing the following:

 

<Object instance of your waveform plot here>.XAxis.Caption="Insert Text Here";

 

Andy F.
Applications Engineering
National Instruments
Message 4 of 5
(3,874 Views)
Solution
Accepted by topic author CraigByrd

Thanks to your solution repsonse I was able solve the problem.

 

It turns out the X & Y captions were not part of the wave form graph , but rather a separate xAxis1 and yAxis1 were present in the form1.Designer.cs file as shown below:

 

//
// wfgPLOT
//
this.wfgPLOT.Location = new System.Drawing.Point(689, 371);
this.wfgPLOT.Name = "wfgPLOT";
this.wfgPLOT.Plots.AddRange(new NationalInstruments.UI.WaveformPlot[] {
this.waveformPlot1});
this.wfgPLOT.Size = new System.Drawing.Size(754, 337);
this.wfgPLOT.TabIndex = 15;
this.wfgPLOT.UseColorGenerator = true;
this.wfgPLOT.XAxes.AddRange(new NationalInstruments.UI.XAxis[] {
this.xAxis1});
this.wfgPLOT.YAxes.AddRange(new NationalInstruments.UI.YAxis[] {
this.yAxis1});
//
// waveformPlot1
//
this.waveformPlot1.XAxis = this.xAxis1;
this.waveformPlot1.YAxis = this.yAxis1;
//
// xAxis1
//
this.xAxis1.Caption = "Number of Readings";
//
// yAxis1
//
this.yAxis1.Caption = "Measured Value";

 

 

 

Thus the following code provided the solution.

 

// modifying default wave form graph Axis Caption follows

wfgPLOT.Caption = sTableName;
xAxis1.Caption = plotXlbl;
yAxis1.Caption = plotYlbl;

 

Thanks Again

 

Craig

 

 

 

 

0 Kudos
Message 5 of 5
(3,867 Views)