キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

adding and deleting plot on xy graph

解決済み
解決策を見る

Hi,

 

I am creating a VI whereby one can add xy plots from csv files to a xy graph. the xy plots are held in a cluster array. so far so good.

 

Now I would like to created a drop down list of the plot names of the plots added to the xy graph. Is there any way to do that? My aim here is to be able to select a plot from the dropdown and then delete it. is that possible?

0 件の賞賛
メッセージ1/8
5,633件の閲覧回数

You could consider using a Listbox and either setting the Visible property of a specific plot, or just using Delete From Array to remove the specific cluster from your array collection (make sure to also remove it from the Listbox in that case).

 

If you want to show and hide the Listbox, you can have a boolean button who's value change triggers a change on the Listbox's Visible property.

 

If you're familiar or comfortable looking at Actor Framework projects, I can send you a project I have for displaying graph data. It's quite a bit more in-depth than what you're looking for, because it has handling for a "Measurement Result" type that I've used to group different outputs from different measurements, but the actual graph being used is still an XY-Graph and the overlay is a Multicolumn Listbox.

 

You might also like these VIs for transparency: Transparency VIs. I use some modified version of these for my overlay.


GCentral
0 件の賞賛
メッセージ2/8
5,628件の閲覧回数

Hi sherzaad,

 

Now I would like to created a drop down list of the plot names of the plots added to the xy graph. Is there any way to do that?

Yes: create a dropdown list to let the user select the plots…

 

My aim here is to be able to select a plot from the dropdown and then delete it. is that possible?

Yes sure! You need to program the logic behind those operations in LabVIEW…

 

I prefer listboxes: much easier to handle, for both the programmer and the user:

check.png

In the listbox on the upper left the user can select signals to view them in the graph…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 件の賞賛
メッセージ3/8
5,625件の閲覧回数

Ok. I get that. but how do I get plot names into the list box? listbox is I32...

0 件の賞賛
メッセージ4/8
5,615件の閲覧回数

Hi sherzaad,

 

you set the listbox item names by using a property node of the listbox named "item names"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 件の賞賛
メッセージ5/8
5,611件の閲覧回数

ok thank you... one more thing what property name should I use to list them in the list box? I tried using "plot name" but I do not think it's the right one to use to get all the plot names...

0 件の賞賛
メッセージ6/8
5,599件の閲覧回数
解決策
受理者 sherzaad

you have to iterate through all plots to get each plot name.

if the number of plots is static or known, you can use a for-loop,

otherwise, just iterate until the property node errors.

plot-names.png

hope that helps


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 件の賞賛
メッセージ7/8
5,592件の閲覧回数

Thanks! that works for me!

0 件の賞賛
メッセージ8/8
5,588件の閲覧回数