Synchronizing a listbox and a plot legend

Hello all,
I'm working on some code where I would like to be able to select/deselect as many as 50 plots on an XY graph.  Because of the relatively large number of plot names, it makes sense to place them in a scrolling legend or listbox. 
Problem is (as far as I know) the plot legend can't be used to *easily* make plots disappear and appear with a single click-- one must right click, go to colors, and select transparent, etc. then reverse the procedure to make the plot reappear.
An alternative might be to use a list box 10 rows long as the master indicator, then use some of its properties to create a dynamic plot legend borrowed from a second hidden graph.  This plot legend would reconfigure its line/symbol colors dynamically based upon the where the user is within the scrolling listbox.
One problem I've encountered is that the Label.ScrollPosition property will not write out to an indicator for me.  Please see the example code.
Top row provides some feedback from the listbox, but not enough info to do the job properly.
Any thoughts?
Regards,
Ted
Solved!
Go to Solution.
Attachments:
scrolling listbox Row numbers.vi ‏16 KB

Hi to know the position of the list box element...
try this...
<<Kudos are welcome>>
ELECTRO SAM
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
- John 3:16
Attachments:
scrolling listbox Row numbers.vi ‏18 KB

Similar Messages

  • Line width on plot and on plot legend not matching

    Hello,
    I wrote a program that "highlights" (changes the linewidth to 4) one of two plots using a boolean switch.  However, the corresponding linewidth in the legend does not always show the same width as the plots value.  For example, if plot 0 is thick, and its legend is thick, and plot 1 and its legend are thin, then I select plot 1 to become the highlighted one, plot 1 in the graph will become thick, but either its legend will not become thick, or plot 0s will remain thick, while plot 0 on the actual graph will be switched to thin.
    Thank you for any help you may be able to provide.
    Attachments:
    Testing LineWidth.vi ‏16 KB

    Hi  M.Bobby,
    I can see the same behavior on my machine as well. This was reported to R&D (238303 CAR ID) for further investigation. R&D is currently investigating this issue. A possible workaround is to hover over the legend to make it update.  We are sorry for the inconvenience, and appreciate your feedback!
    Thanks and have a great day.
    Esmail Hamdan | Applications Engineering | National Instruments

  • Programmatically formatting the active plot and plot legend

    I am monitoring 6 production sequences on an XY graph. A ring control selects which sequence I show on the graph. For each sequence I have tag data showing the "actuals" and tag data showing the "averages" and a boolean toggle switch controls which of these plots I show on the graph. I am having trouble controlling the formatting of the plots (both actuals and averages are currently shown in white) and the plot legend is wrong. I have tried programming my vi to format my plots using a property node from the XY graph and writing to the correct plot inputs, however it doesn’t seem to be working. I would also like the plot legend to show ONLY the active plot on the XY graph.
    I would like a red continuous line for the averages and blue square scatter points for my actuals. I can’t seem to get this at all. I have attached my vi if anyone can help?
    Many thanks for taking the time to help,
    Best regards,
    Stuart
    Attachments:
    Historical Handling Time Trends.vi ‏137 KB

    Hi Stuart
    Maybe this helps you.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Plots.vi ‏65 KB

  • How can I limit the vertical size of the plot legend?

    Hi all,
    in my program I use a waveform graph and its plot legend.
    My problem is that the vertical size of the plot legend increases out of my frame and screen if I add too many plots to the graph!!!!
    Is there a possibilty to limit the vertical size of the plot legend and/or to use a vertical scrollbar in the plot legend?
    I use LV 8.2.1 .
    Thanks
    daHans

    You can write to the "Active Plot" property node. The example given in the thread I linked to before shows using this. Did you take a look at that example?
    I'm only suggesting the alternative of an "Active Plot" control if you're trying to give the user the ability to manipulate one of the plots (like color, point style, etc). If you have a lot of plots, and the plot legend is too big, you can provide a numeric control where the user selects the plot, and then additional controls to set the properties for that plot. Not as intuitive as the plot legend, but if that's what you've gotta do, that's what you've gotta do. Attached is a simple example (LabVIEW 8.20).
    Attachments:
    plot.vi ‏21 KB

  • What's this crap on my plot legend? And; how to get rid of it?

    Forgive the lack of a technical term; but what's the crap (shading/vertical lines) added to the mini-plot previews on the Plot Legend on this XY Graph in LV2012 SP1?
    And how do i get rid of it to make it look more like the original (e.g., just a solid color background)?
    I would normally specifcally identify these parts by name; yet it appears these parts have no name:
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

    Figured it out: it's from setting the Plot Area:Colors:BG Color property to Transparent. Changing this to a solid color likewise changes the preview to a solid color.
    Bonus points: who can describe those design elements that appear when plot area is transparent? This is not a trick question; i don't know the answer, and am curious.
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • Why do waveforms show garbage in the plot legend and why is no one mentioning this?

    I have tried this on multiple machines and the result is the same. The plot legend expands and shrinks with garbage characters each time the waveform is updated.
    Sometimes the plot legend expands to as many as 100 garbage characters (or more). Is NI aware of this?

    Hi Ben
    Ok I managed to get a small enough version of it to zip it up and show what happens. I hope the demo is intact enough to show the plot legend.
    just run the VI "0_bloat-OVEN.vi"
    It uses a simulation file for the waveform but if u have a DAQ bd just uncheck the "Simulate DAQ bd?" button.
    Ive seen this on 3 machines now WIn 98 WIn XP and Win2K.
    Attachments:
    WF-PlotLegend.zip ‏778 KB

  • How to remove a plot and resize the plot legend in LV 8.6 as in this link to a LV 7.0 example

    This VI ( ftp://ftp.ni.com/pub/devzone/epd/201150.vi ) works exactly as I want an 8.6 application to - but the property node used in the example is no longer supported.
    I can add/remove plots and resize the plot legend with 8.6 using the "LegNumRows" property however this property does not appear to behave the same way.
    It seems this should be straight forward but I must be missing something.
    Solved!
    Go to Solution.

    Hi again!
    I have implemented a method to shuffle the plots in the legend and was satisfied with one exception- the plot colors. This application allows the user to add or delete plots from the graph, adding a plot is easy as the new plot name gets appended to the next place on the legend and the number of rows grows by one. Deleting a plot is also quite easy but this action brought up a usability issue in that the existing plots that were shuffled on the legend would also shift their colorsaccordingly. To eliminate possible confusion I want to keep the correlation between existing plots and their assigned colors so I tried to use the plot color property to change the plot color programmatically with unexpected results.
    Programmatically changing a color from the "Plot Colors" array does not change the color of that plot if it is set to any of the "Common Plots" wih the exception of "Common Plot 0" - i.e. this doesn't seem to work for Bar Plots which is what I am using.
    I have attached a demo VI to illustrate this behavior - there are detailed free labels on the front panel which describe this in more detail.
    Regards and thank's in advance!
    Attachments:
    Plot color behavior.vi ‏27 KB

  • Plot legend color

    During data acquisition I am checking the values of certain data to make sure they are in the allowable range.  I am plotting several of these "checked" values on the same waveform graph.  I was wondering if there is a way to change the color of the background of the plot legend (as seen in the picture) while the program is running?  I would also like to be able to change each one independently.
    I have seen ways of changing the color of the waveform graph colors before running and I have also seen the use of a multicolumn listbox for something similar, but I would like to use the legend itself.  I have searched and as of a year or so ago it appears as if there is no way to do this.  I was just wondering if this had changed.
    Thanks for your help.
    --Robert
    Message Edited by knapkerd on 07-14-2008 04:26 PM
    Attachments:
    graph_legend_color.PNG ‏9 KB

    Afaik, you cannot use the plot legend itself to change the background color but you can have a front panel color box control and use this to write to a property node. You cannot have different background because you have a single graph and obviously, only one background color. For displaying data in and out of tolererance, have you seen the example called Envelope? It uses the new Plot Images property.

  • Display particular plot legend

    Hi there,
    I have a listbox that has 100 items into it and I plot like 25 items at a time but the plot legend has all the 100 plots legends. How could I just display the 25 Plot legend selected from the list box.
    Thanks
    Solved!
    Go to Solution.

    Hi,
    try this :
    Right click on your graph -> Untick "Autosize plot legend"
    Right click on your graph -> Properties -> Appearance -> Plot Shown : select 25.
    Hope this helps
    J.D.
    French Labview beginner
    N'oubliez pas de complimenter les bonnes réponses - Don't forget Kudos for good answers

  • How to Generate Event on change in Plot Legend for XY Graph

    Hi,
    I have two XY graphs on the front panel and would like to maintain a common plot legend such that any change in the plot legend affects both graphs.
    Objective: I would like any value change in plot legend to fire an event.
    How do I program that?
    I know of value change event for the graph but am unable to find something specific to the plot legend. Other option is to have the user press a "refresh" button that will fire the event.
    Feel free to share thoughts on other elegant methods to achieve the same objective.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    Hi Sarah,
    Looks like you are talking of exactly what I want!
    I have attached a sample VI to try achieve what I want. But it still has some issues which are:
    1) I am unable to configure a Plot Attribute Change Event. I have used a mouse leave event instead. How does one configure a Plot Attribute Change Event?
    2) Is there no single property which will transfer all the settings of plot legend from one graph to plot legend of another graph? In my sample VI, I have to read each property of the master graph and feed it into the slave graph.
    Kindly note I am using LV FDS 7.1 on Win2000
    Thanks,
    Gurdas
    Message Edited by Gurdas on 03-27-2006 11:51 PM
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu
    Attachments:
    Graph_PlotLegend_Event.vi ‏45 KB

  • Start position on plot legend scrollbar

    If I right click on the plot legend I can show the index display and vertical scrollbar. When I move the scrollbar the index changes accordingly. Does anyone know how to programmatically find the value of this index so that I know which plot labels the user sees. I've tried looking at the property node but I can't see anything that gives me what I need.

    Thanks for your reply Rob.
    I was thinking that was the case. Sometimes it’s possible that there are clever little tricks hidden away in the set up screens. I’ve ended up now with my old method which looks very clumsy (see attached vi), I can make it look much better when I get the scroll bar position.
    I’ll follow up on the product suggestion though as it would be a very useful feature.
    Attachments:
    Scrollbar Demo.vi ‏52 KB

  • How do I programmatically change the plot legend names on my xy graph?

    I have a need to change the names/labels on my XY Graph's Legend at run time.  This is because plot 0 is not always the same set of data.  I have searched high and low for a couple days now to no avail.  The closest thing I've seen is overlaying a string over the plot legend, but I would prefer to do change the property of this box.  Any help would be appreciated.

    Hello Ben,
    with waveforms this also works for me fine. So where is the pitfall? (if always all works fine, one don't really gets experience)
    greets, Dave
    P.S. @ J.B. I used the Code Capture Tool from the Starware Thread, this made me so fast. If I could do, I would give it five stars each time I use it.
    Btw. would it be possible to programmatically give ratings with LV? Here it should be used. Thanks again to tst & the others
    Message Edited by daveTW on 06-14-2007 09:13 AM
    Greets, Dave
    Attachments:
    Example_FP.png ‏5 KB

  • Strange Fonts in labview graph's plot legend.

    Hello All,
        I am running labview 7.1 on a Windows XP machine and
    the default and only language is English (US). Verified this under
    Control Panel > Regional Settings.
        When I run a VI, I get strange fonts in the plot
    legend. They keep updating as the VI runs. Here is a screen shot of the
    plot legend:
    I change the font to something I can read, save the VI and run it again
    and it automatically changes to this unreadable font again. Any ideas
    on what I can do? Thanks.
    KB

    Is it just the font that is off, or are these actually non-printable characters?
    Are you graphing e.g. dynamic data types? Do you possibly have weird names for your signals?
    LabVIEW Champion . Do more with less code and in less time .

  • Plots legend arrangement

    Hi all,
    I am design my software front panel.  I have a problem about plots legend. The defaut arrangement is in vertical direction as attachment shown. I want to arrange the plots legend in horizontal direction. I searched  Labview help and did not find the solution. Would you give me some clue? Thanks in advance!
    Lang.D
    帖子被Mechtest在 03-03-2010 07:09 PM
    时编辑过了
    Solved!
    Go to Solution.
    Attachments:
    Plot legend.png ‏5 KB

    Placae the Graph or chart on the front panel and then pull the plot legend horizontally....(when you click on the plot legend and drag the highlighted part of the legend horizontally so that multiple plot legends can be seen.Pull them vertically if you want to see them in vertical position)
    Guru
    Regards
    Guru (CLA)

  • Plot legend customization bug in 8.5?

    If someone can confirm this for me, I would appreciate it.
    I have 2 issues which I think may be based on the same problem:
    1.  Take the attached control and insert into a LV 7.1 - 8.2 VI.  The plot legend should have the system box instead of the 3D decoration.  Insert the same control into 8.5.  It changes back to the default 3D decoration.  This doesn't appear to happen all the time, as this control properly inserts itself into 8.5.
    2.  The customization of the plot legend is not working properly.  Take any of the attached controls, or use a standard Waveform Graph.  Customize it.  Go into customize mode.  8.5 has taken away the old method where you can simply right click on a decoration of a sub-control and replace it.  But, you can select the sub-control and go to Edit->Customize Control, then replace the decoration.  You can see this works with the Cursor list and axes list.  However, when you select the plot legend, and go to Edit->Customize, LV doesn't do anything.  No error beep, no nothing.  So the plot legend cannot be customized.  I see this behavior for charts, grpahs, and XY plots.
    Message Edited by Matthew Kelton on 11-05-2007 02:47 PM
    Attachments:
    Waveform Graph lost plot legend customization.ctl ‏26 KB
    Waveform Graph kept plot legend customization.ctl ‏12 KB

    OK, I will post more pictures.
    So, I try to customize the standard waveform graph in LV, but right-clicking on the plot and select Advanced-> Customize or Edit->Customize Control form the menu.  Go into Customize mode.
    In 8.2 and before, you used to be able to just right-click on the decoration for the plot legend and replace it with something from the clipboard, etc.
    In 8.5, this functionality has been removed.
    However, you can select the item and go to Edit->Customize Control (I show it here for the cursor legend, as it works).  You get a new control window.
    (Continued in next post)
    Message Edited by Matthew Kelton on 11-06-2007 03:23 PM
    Attachments:
    cursors customize.png ‏15 KB
    customize dec 8.2.png ‏12 KB
    customize dec 8.5.png ‏11 KB

Maybe you are looking for

  • Problem in package body creation

    Hello, I am a newbie in PL/SQL.I am sorry for posting a very silly question,but I am struggling since 2 days trying to get this PL/SQL code working.Dont know whats wrong with it.I consulated a lot of tutorials and online sources..But still couldnt fi

  • Phones calling my online number

    i have recently set up an online number which works fine. I have all of my contacts from my iPhone on my Skype contacts as it transfered them accross when I downloaded the new Skype.  But when I call on my mobile for example, sometimes it displays 07

  • Side effects of SP 18

    Hi all, Does anyone know what are the side effects with support package 18 for BI 7.00 Thanks, Joseph M

  • Some font in gnome not working[Solved]

    Hello, I have archlinux up and running in various desktops, laptops and even two workstations. Each one of them with different hardware and software issues. But one of the users just complained about having problems starting Mathematica. At first I t

  • Logic won't connect to the internet - can't load additional content

    Hello, when i click on 'download additional content' logic just says, that it isn't connected to the internet. But my internet connection is working fine! Surfing with Safari is no problem. Is there a solution for this problem? Thank you for your hel