Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Stacking Plots in Measurement Studio

Hi,

I was wondering if the Componentworks Graphs have the capability to Stack plots like Labview? Please look at the link below:

I need multiple plots on the same control but in different areas. Using mulitple Plots properties is not the right option.

http://www.cstsoft.com/english/list3.htm#trend

Thanks,

Ashm01
0 Kudos
Message 1 of 5
(6,720 Views)
Yes, you can do this with the CWGraph. Check out the example under ..\MeasurementStudio\VB\Samples\UI\Graph\Simple Graph to see how to accomplish this. I hope this helps
Bilal Durrani
NI
0 Kudos
Message 2 of 5
(6,720 Views)
Bilal,

I am sorry if I didn't make things more clear, I understand that you can have multiple plots on on control. However, I cannot find an option for STACKING them within the same control. Attached is a simple screen shot from Labview where I have stacked plots. I need the same in VB using the Measurement studio.

Thanks,

Ashm01
0 Kudos
Message 3 of 5
(6,701 Views)
Bilal,

I am sorry if I didn't make things more clear, I understand that you can have multiple plots on on control. However, I cannot find an option for STACKING them within the same control. Attached is a simple screen shot from Labview where I have stacked plots. I need the same in VB using the Measurement studio.

Thanks,

Ashm01
0 Kudos
Message 4 of 5
(6,697 Views)
Thanks for clarifying that. I'm afraid there is no automatic way to do this. You can dynamically create graphs based on the number of plots on the single graph, and then hide the main graph. This document shows you how to create graphs dynamically.

Something like this

If Not graphsCreated Then

numPlots = CWGraph1.Plots.Count
CWGraph1.Visible = Not CWGraph1.Visible

For i = 0 To numPlots
graphName = "MyGraph" + LTrim(CStr(i))
Form1.Controls.Add "CWUIControlsLib.CWGraph.1", graphName
With Form1.Controls(graphName)
.Visible = True
.Top = CWGraph1.Top + i * (CWGraph1.Height / 3#)
.Width = CWGraph1.Width
.Height = CWGraph1.Height / 3#
.Caption = "Dynamic Graph Control" + CStr(i)
End With
Next i
graphsCreated = True
End If


I hope this helps
Bilal Durrani
NI
0 Kudos
Message 5 of 5
(6,692 Views)