07-24-2018 02:55 AM
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?
Solved! Go to Solution.
07-24-2018 03:05 AM - edited 07-24-2018 03:17 AM
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.
07-24-2018 03:06 AM - edited 07-24-2018 03:07 AM
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:
In the listbox on the upper left the user can select signals to view them in the graph…
07-24-2018 03:12 AM
Ok. I get that. but how do I get plot names into the list box? listbox is I32...
07-24-2018 03:14 AM
07-24-2018 03:43 AM
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...
07-24-2018 03:57 AM
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.
hope that helps
07-24-2018 04:00 AM
Thanks! that works for me!