09-29-2015 04:57 PM
Hello,
I am trying to achieve something but I havent been able to.
I am wondering if it is possible in labview also.
I have two list boxes. One to select data files in a directory and the other one to select channels of data in that file selected. Both listboxes are set for multiselection mode.
So when I select a data files and I select a channel, I would like the legend for the channel to display on the side of the graph where the normal legend location is. but also I would like to show the legend of the channel as well at the bottom of the graph or anywhere off teh graph.
In other words, i want both legends for both item selected in the list boxes.So far I can only do it for either or not both. That was possible using the waveform graph property node, plotname(data files name string) , activeplot, legNumRows. I tried to do the same for the channels but it overwrites the previous legend each time.
Can I get some help. Lead me in the right direction
09-29-2015 07:08 PM
How about a picture box that displays the front panel image of the real legend?
09-29-2015 08:06 PM
@ritch_by_nature wrote:
location is. but also I would like to show the legend of the channel as well at the bottom of the graph or anywhere off teh graph.
Why not set the Caption to the "legend of the channel"? Make the Caption visible and (you'll forgive the phrase) "Bob's Your Uncle".
Bob Schor
09-29-2015 08:12 PM
Maybe Ritch could post a picture showing what he is looking for.
10-01-2015 09:16 AM
here's the frotn VI, and the code that handles that
10-01-2015 10:08 AM
What if I select more than one channel, what would happen?
10-01-2015 10:47 AM
Ritch,
Can you attach the VI's, not pictures of the VI's? I was hoping to open the VI, turn on the Plot Legend (so you could see the Channel names) and turn on the Caption (and set it programmatically to something like the Plot Name), demonstrating that we seem to have already answered your original question (although you do not seem to have responded to our suggestions).
However, I cannot open your attached PNG as LabVIEW code (though it seems to be a Snippet ...). What is wrong with the previous suggestions? Why don't you attach real code so we can demonstrate, with your code (preferably with data "attached" to the inputs so if we run it, Plots will appear), what we are talking about (so you can say "Yes, that's what I want" or "No, I want this other thing, instead)?
Bob (frustrated) Schor
10-01-2015 11:47 AM
10-01-2015 12:19 PM
I still don't quite understand what you are looking for.
A legend is a list of plots that make up a graph. It is a one to one relationship. As it is now, your graph shows 2 plots, but only shows 1 plot listed on the legend. (Probably needs to be expanded.).
It sounds like you want some sort of "tree" arrangement where you have a one to one relationship with "channels" to plots on the graph, but somehow want that grouped together in some way based on a file.
A plot legend isn't going to give you that capability.
10-01-2015 12:46 PM - edited 10-01-2015 12:51 PM
here are the vis. That legend shows 2 plots because I select one data files and two column from that data files.. the plot is dependant on both channels and data files. if I were to select one more data files, I would have 4 plots on the graph but two legends. So the legend you're seeing is because I select the data files. That is the name of the data file. But I want to show Also the name of the channels selected. Therefore I was wondering If I can ceate a second legend for that graph. I would have one legend showing data files name selected and anouther showing channels selected