How to programmatically change plot legend

I have a chart on which I'll plot one or more signals. I can't predict
the signal names in advance so I'd like to programmatically change the
legend(s). Is there a way to do that in LV 6.1?
Thanks,
Dave

Yes.
- Create a property node for the chart
- add elements for "Active Plot" and "Plot -> Plot Name"
- Wire an index of the plot name you want to change to "ActPlot"
- Wire an string with the new name to "Plot.Name"
A simple implementation would be to make an array of new names and then auto-index a for loop with the increment counter tied to "ActPlot".
Good luck.

Similar Messages

  • How can I change the legend of a plot in an excel chart using LabView?

    Hi,
    My question is:
    I create a chart in Excel with LabView7 using ActiveX. There are 4 plots in one chart. How can I rename the legend (the name) of each plot with LabView?
    Thanks.
    Michi

    Use the SeriesCollection(1).Name function. In LV, wire up the following:
    _Chart into Method SeriesCollection (index = 1 to 4)
    Cascade into Variant to Data (wire type Excel.Series)
    Wire Series into Property Name, Write the string
    Michael Munroe
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • How to programmatically change the width of a graph?

    How can I programmatically change the width of a Waveform Graph or Waveform Chart? When I create an implicit property node for a graph or chart, it is read-only. Changing the plot bounds worked in earlier versions of LabVIEW, but not anymore.
    Solved!
    Go to Solution.

    It works for me in LV2013 but I'm using the Plot Area : Size : Width property.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • How to programmatically change the cell color of an ADF table ?

    Hi all,
    I have an ADF table with some fields on it. Depending on the value of a field named, say, "F1", I would like to change its background color.
    So far I can change the field color with this EL expression inside the InlineStyle table column property:
    font-size:medium; background-color:#{viewScope.myBean.setColor};
    where setColor is a bean function, in where I access the field "F1" via binding, parse its value, and return the right value - so far, so good.
    The bad thing is, the InlineStyle affects that field in all the rows of the table, while I would like to change only the field in the rows, which have that specific value in it.
    So for example having the rows:
    F1
    abc#1 ----> currently selected row
    cde#2
    efg#3
    I want to change the background color to all the F1 fields which have a "1" after the '#' and let the other "F1" row cells background color stay unchanged.
    But as you can imagine, the InlineStyle affect the "F1" background color in all the rows (assuming that the first row of the table is selected).
    So the question: how to access a single cell of a row in an ADF table, and programmatically change its background color ?
    So far I can iterate through the ADF table with:
    BindingContext bindingctx = BindingContext.getCurrent();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("aTableIterator");//access the iterator by its ID value in the PageDef file
    RowSetIterator rsi = dciter.getRowSetIterator();
    System.out.println("rsi getrowcount = " rsi.getRowCount());+
    Row row = null;
    +if (rsi.getRowCount() > 0) {+
    row = rsi.getCurrentRow();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    System.out.println("class : " row.getAttribute("F1").getClass().toString());+
    +}+
    +while (rsi.hasNext()) {+
    row = rsi.next();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    +}+
    Regards,
    Sergio.

    Hi,
    I mean a specific cell within a row.
    Here are two pictures that show an ADF table with two rows and some fields on it:
    https://skydrive.live.com/?cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents#cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents
    bild_A is what I have, bild_B is what I would like. Note that:
    in bild_A the first row contain a yellow background color for the field F4 and an orange background color for the field F5. This is correct, because F4 has an "1" at the end of its string value, and F5 has a "3" at the end. So far so good.
    But the second row (again, bild_A) has also the fields F4 with yellow background color, and the field F5 with orange background color, even if the value in both fields is 0.
    What is should be, is shown in bild_B.
    The problem is that the solution provided affects all the cells of the column, while I need to change the background color of a single cell, and leave the other unchanged (see bild_B).
    I hope that clarify a bit :)
    Sergio.

  • How to programmatically change the password of user accounts in PDF Generator

    I am using 4 user accounts for multi-thread converting Word documents to PDF in PDF Generator ES3, and I have to update the password of those user accounts. Does PDF Generator ES3 save the password somewhere on the Windows 2008 server? Can I programmatically change the password of those accounts other than updating them manually from LiveCycle Admin console?
    Thanks,
    Will

    Not in LiveCycle API.
    Changing user account password is related to Operating System.

  • How to programmatically change the feedback device??

    Hello,
    We are using the NI UMI7774, together with a Servo-drive for a linear actuator. In our application, we must first go to a certain position, then maintain a certain force for while, then go back to a certain position....
    For the position control we have mapped the actuator's encoder as the feedback device in MAX - and it works well. For the force control part, we want do use the "Force control using analog feedback"-method (see NI-Motion manual, chapter 13). For this, the force sensor needs to be mapped as the feedback device...
    (1) The question is, HOW can we make this mapping programmatically in our application source code???...is there a method "setFeedbackDevice()" or something??
    (2) Is it likely that we have to have 2 PID-settings (one for the position control part and one for the force control part) and if yes, how can we load the PID parameters programmatically, without opening MAX??
     (3) In the mean time, we have experimented a bit: Using MAX and the encoder as the feedback device, we have positioned the actuator to a certain point. Then we mapped the Force sensor as the feedback device in MAX and pressed Save. However, when we run the force-control-using-analog-feedback example, it didnt work. It still used the encoder as the feedback and hence just moved to a certain position.....We then did another try, where we set the force sensor as the feedback device in MAX, pressed SAVE and pressed INITIALISE.....the actuator subsequently started rattling, without us issueing another move command??.....does anybody know, what this could mean and what we should do????......
    THANKS a LOT FOR ANY ANSWER AND YOUR EFFORTS.......
    p.s. We know that there is also the option of "Force Control using Monitoring Force", but after some discussion on here, it appears that the Analog Feedback-method seems to give better force control results in our application....

    Hi janClose,
    You can change the feedback programmatically by using flex_config_axis(). The axis needs to be stopped when you call this function.
    The control behavior differs significantly when you change the feedback resource, so yes, you will have to tune your axes for both feedback modes seperately. You can change the PID parameters by using flex_load_pid_parameters(). Please note, that you can define two sets of PID parameters and you can switch between these two sets by calling flex_load_single_pid_parameter().
    The last paragraph in the online help for flex_load_pid_parameters() discusses this feature.
    Parameter changes in MAX are not applied before you reinitialize the board, so if you just save the changes the board's operation mode is not affected. The reason why the motor starts rattling when you initialize it, is due to the fact that you are still using the position control PID parameters, which are typically not valid after changing to force control.
    I hope that helps,
    Jochen

  • How to programmatically change color of arc in cwknob

    trying to change color of arc in cwknob control conditonally

    I'm not entirely sure what part of the control you are referring to by "arc". Can you elaborate?
    If you mean the (by default) black line that the pointer points to when you choose a meter style and to which the major and minor ticks are connected, you can change its color with the following code:
    CWKnob1.Axis.Ticks.MajorTickColor = vbYellow
    If you looked for and didn't find the property you need, I suggest you check out the properties of the Axis subobject of the knob. People frequently overlook this important subobject of the knob and slide.
    In general, if you are able to configure a property on any property page except the Advanced property page, you should be able to configure it programmatically.
    If my suggestions above don't get the job done
    for you, you could take screen capture of the control, drop it in Paint, circle the portion of the control you want to configure, and attach it to a response to this post.

  • How to programmatically change a pdf to an image?

    PDF files, as you might know, cannot be read off of a web server using Microsoft Internet Explorer.
    Is there a programmatically way to convert a PDF to an image on the back-end?
    There are lots of solutions to convert a pdf to an image file locally.  Is there a way to do it programmatically with existing software libraries that can be used as a plug-in?

    PDF files, as you might know, cannot be read off of a web server using Microsoft Internet Explorer.
    What? Of course they can. You just need to have a PDF plugin installed in your browser.
    Is there a way to do it programmatically with existing software libraries that can be used as a plug-in?
    Plugin for what, exactly?
    You can use various libraries to convert PDF files to image files in a stand-alone application, sure. For example, you can use PDFBox in Java to do it.

  • How to programmatically change style in an ADF table

    Hi,
    I got an ADF table generated form my data controls.
    But I need to change de style of every cell in my backing bean.
    I can't really find anything usefull on google, hopefully you guys can provide me with some usefull information.

    I got my answer somewhere else :
    >
    Based on the comments we now know that you use jdev 11.1.2.2.0. What you can do is to bind the styleClass property of the table to a backing bean property. The property in the bean has a getter and a setter method. In the setter method you can get all the values you need from the row and do you calculation. Based on the outcome you return the name of a style class suitable for the cell. The different style classes you define in a skin fro the application. If you e.g. defien the following style classes in your skin
    .high_value { background-color:green; }
    .negative_value { background-color:red;}
    and in a bean in request scope, which you access from the page the table is on
        private String styleForCell;
    public String getStyleForCell()
        // get the value of the cell
        FacesContext lContext = FacesContext.getCurrentInstance();
        ELContext lELContext = lContext.getELContext();
        ExpressionFactory lExpressionFactory = lContext.getApplication().getExpressionFactory();
        Number val;
        val = (Number) lExpressionFactory.createValueExpression(lELContext, "#{row.valargument}", Object.class).getValue(lELContext);
        if (val == null)
            return "";
        // do the calculation and return the suitable style class
        int ival = val.intValue();
        if (ival >= 100000 )
            return "high_value";
        else if (ival < 0)
            return "negative_value";
        else
            return "";        
    public void setStyleForCell(String aStyleForCell)
        this.styleForCell = aStyleForCell;
    }Now you can access the calculated style class from the tables column styleClass property as #{beanname.styleForCell} This will call the method for each cell of the column.

  • Changing Chart Legend Title

    How do I change a legend title? I created a bar chart using the chart wizard, and the legend title was taken from the name of the column appearing on the Y-axis. I changed the axis label, but this change was not propagated to the legend title. Is there anyway to change the legend title, either directly or through PL/SQL?

    Bill,
    Oracle Graphics allows for the direct access to any object within a Chart via PL/SQL. This can be done either through a number of built-ins or even by traversing the Chart's Object Heirarchy (VGS tree) By getting the handle to the label object it is possible to directly change the text. The Reports Team is correct in that it cannot be done directly from within the Reports Builder (though may be passed as a parameter at run time). Instead create an OPEN_DISPLAY trigger in the Oracle Graphics Builder for the OGD which takes the desired text as a parameter.
    There are examples of getting the handle to a chart opject in the demos & documentation.

  • Can I Programmatically Change the Active Group on a Hypertrend in DSC?

    I would like to know how to programmatically change the active group of a hypertrend in Labview DSC.  I saw a link which said it can be done in Lookout.  But in the DSC module, the active group is read only.
    I know of a hard way to do it.  I could save the hypertrend settings as xmlSettings to a temporary file.  The active group is one of the settings.  I could then change the active group in this text file to point to the new group and then reload the settings.  But this is not a clean way of dong it.
    Anyone know if there is a easy way?
    Solved!
    Go to Solution.

    I found a way to do it but its not very clean.  I dont know why there is not a function to change the current group.
    Here is how I did it.

  • 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

  • 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

  • How to chang the number of plots in the plot legend during run time?

    Hi, I am using waveform graph. At run time only i will come to know, how many plots should be plotted in the waveform graph. Based on the number of plots i have to change the plot legend. Is there any method to do the same?

    Maybe something like this?
    The inputs on the left are (from the top)
    your array of data you want to plot (or anything that contains the number of inputs you have)
    next one is an array of colorschemes (maybe you dont need this)
    and the third is an array of booleans that are true if that "channel" should be plotted and false otherwise
    /Anders
    Message Edited by Tohatsu on 01-08-2008 08:56 AM
    Attachments:
    graph.JPG ‏10 KB

  • Programmatically expanding label space in Plot Legends

    I know that manually expanding the Plot legend with the left corners expands the label area. How do I do the same thing programmatically? Changing the width property seems to add space to the right side.

    According to the Help File entries for those properties the size properties expand or contract from the right side. Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • TextArea component & external css

    hello, i have searched but not found an answer... i can style the text with an internal style sheet (within the flash file), but i wonder if this can be done on a textArea from an external CSS? thank you.

  • Activation date passed and still no BB!!!!

    I left my previous ISP due to poor service.....I somehow thought BT would be better but so far they have been utter rubbish, I am actually regretting my move from Tiscali/talk talk!! that says a lot as they have got to be the worst ISP's out! My late

  • Copy command fails after installing Raid system and new user accounts

    Any help is appreciated. We installed a Raid to an existing Xserve at our school. We have created new accounts on the server.All other commands such as observe, control, sending messages and so works OK. When I try to copy files, pictures, and so on.

  • Where do I go to reinstall Acrobat Pro

    I've uninstalled Acrobat Pro from my old laptop and now I want to reinstall it on my new computer. Where do I go to do this and how do I do it?

  • Compatibility with Bridge in CS2 - filters

    I made the assumption that I would be able to use the filter features in Lightroom 1.0 and Bridge (CS2 version) interchangeably. Specifically I was assuming that the filters I used in Bridge would show up in Lightroom, and when I applied a filter in