Programmatic horizontal waveformchart legend

Hello,
As you can see in the picture, I itend to use a horizontal graphic legend.
I've added the plots as a simple 2d array (multiplot).
Whenever I start the VI labview seems to override my settings and reset the legend to vertical alignment.
I've tried several properties, but couldn't find the necessary.

ohmmega wrote:
[...]Whenever I start the VI labview seems to override my settings and reset the legend to vertical alignment.[...]
I cannot reproduce this using your VI using LV 2009f3. What version of LV are you using?
Please note that i deleted the case structure (including the connected property nodes) in the time out case which depends on the custom typedefinition.
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.

Similar Messages

  • 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.

  • Programmatically display graph legend

    I have a waveform graph to which I input a set of files using another subvi and the plot is shown in the mainvi where the waveform graph is placed.How to programmatically display the graph legend so that it shows all the plots that have been plotted. Manually this is done by resizing the legend.Is there a way to do that programmatically?Help please.

    Uzytkownik "Veena" napisal w wiadomosci
    news:[email protected]..
    > I have a waveform graph to which I input a set of files using another
    > subvi and the plot is shown in the mainvi where the waveform graph is
    > placed.How to programmatically display the graph legend so that it
    > shows all the plots that have been plotted. Manually this is done by
    > resizing the legend.Is there a way to do that programmatically?Help
    > please.
    You could try use Property Node [right mouse button &: 'Create > Property
    Node']. Waveform Graph has section for legend: right used LegPos and
    LegPlots sould get you sattisfaction.
    regards
    Zbigniew StS

  • Can you display a chart legend horizontally?

    I have a chart (actually several) that are contain 3 or 4 plots.  The legend on the top right (or wherever I put it) can only be stretched vertically to display the legend for the multiple plots.  This, for me, produces a big waste of realestate.  Is there anyway that this can be stretched horizontally so that each plot in the legend lie side by side along the length of the top of the chart?

    This is a pretty large hack that takes the image of the waveform chart legend and slices it into pieces. The slices are put into a 1D array. You could also reshape this 1D array into several rows and columns for a large number of plots.
    Message Edited by unclebump on 08-04-2006 05:41 PM
    Attachments:
    Horizontal plot legend.vi ‏161 KB
    Horizontal plot legend with 2D picture array.vi ‏183 KB

  • Scroll bar on legend for xy graph

    Is there a way to create a scroll bar for the legend of an XY graph?  The number of entries in the legend will be changing programmatically so the legend needs to be able to grow dynamically (which I have figured out how to do using property nodes).  Any ideas?
    Cheers
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

    Ultimately I will have 6 xy graphs in my vi, I would like to have a seperate scroll bar for the legend of each graph.  Each graphs legend will both grow and shrink as the program runs and I would like to use the scroll bar to keep the legend from growing off of the screen.  I would like to be able to dislpay the data from the point (6 m/s for example) along with its symbol on the xy graph (red dot for example) in the legend.  If I am umderstanding you correctly I need to bundle the type and color of the plot into a cluster with the data and then link that cluster to the scroll bar, I assume I can read the property node for each data point (setting it to active plot first) for both plot style and color?  Let me know if I am thinking about this correctly or if I have misinterpreted what you are saying.  Thank you very much for your help!
    Cheers!
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • Cursor Legend Tab Control BUG

    Attached is a VI illustrating a bug with the Cursor Legend when graphs are in tab controls. If you enter in a number in the "Cursor X position to move to", then switch pages on the tab control, you'll notice the cursor has moved to the appropriate place, BUT the cursor legend has not changed to reflect that. Once you manually move it, it updates.
    In short, if the cursor position changes programmatically, the cursor legend will update ONLY IF THE XY GRAPH IS VISIBLE, even though the cursor position DOES change.  
    I hope someone from NI will see this post and add it to the bug list (if not already there??). If anyone knows a work around, that would be appreciated also.
    Michael
    Using LV 8.2
    Attachments:
    CursorLegendTabControlBUG.vi ‏27 KB

    Good idea. It doesn't work exactlly, but gave me the idea for how to work around. It appears even if you have a tab value change event doing the same thing the Cursor X Position numeric indicator value change event, the cursor legend X value will not change. You can even try entering the same value in the indicator and pressing return after switching tabs, the cursor legend will not update. It thinks for some reason it is on the correct index. I made a Tab Value change event that first moves the cursor to the next index, then moves the cursor back to the correct index. Ugly but works. Hopefully in the next ver of LV they will have fixed a lot of these cursor bugs; there is definitely some work to be done (i.e. fixing cursor X position for XY graphs, an extremelly annoying bug)
    Michael
    Message Edited by miguelc on 02-23-2007 03:49 PM
    Message Edited by miguelc on 02-23-2007 03:50 PM
    Attachments:
    CursorLegendTabControlBUG_wrkaround.vi ‏34 KB

  • Legend for multiple waveform chart

    I have a Waveform Chart (and legend) with multiple waveforms.  I can control the visibility of a given waveform on the chart programmatically using the "ActPlot" and "Plot.Visible?" properties.
    Is it possible to programmatically make the legend only contain the plot names that are visible at any given time?
    Cheers,
    Dan
    Dan
    CLD

    Hello DanB,
    Following along the lines of what smercurio_fc suggested, you can use the Legend>Number Of Rows property (LegNumRows) to change the number of rows of your legend to the number of plots you are viewing, and then use the Plot>Plot Name property (Plot.Name) to edit the names of the plots yourself. I cannot see a property to extract these names dynamically, so this is probably your best bet.
    I hope this helps, otherwise please do let us know if there is anything further,
    Kind Regards,
    Michael S.
    Applications Engineer
    NI UK & Ireland

  • How to modify the cursor palette size in a waveform graph programmaticaly in LabVIEW8

    In previous version of LabVIEW it vas possible to create reference to cursor panel (array) so it was possible to resize, change number of rows, in it. It will be useful for me to have reference to TreeControl contained in cursor legend. How to create this reference? The method described in the manual works for scale legend but not work for cursors panel.

    Thank you JLS once again.
    In my opinion the cursor palette at list should have the following functionality:
    Automatic resizing of the panel while adding and removing cursors programmatically (like plot legend)
    Positioning the panel programmatically (like plot legend)
    Hiding any columns and rows. For example when I hide one of the cursors (let say the second one, not necessary the last one) also this one should disappear from cursors panel, removing cursor from cursor list might be inconvenient. If I have one cursor and not enough room to show cursor panel I can not hide the cursor name column that is unusable but occupies place on the panel
    Altering number of column and rows programmatically. If my cursors serve for selecting part of the signal to be processed (for example trimming signal) it is sense less to show cursors Y position
    Hiding cursor navigator, it works very badly (try to move cursor only to the next measurement point to select exactly for example 10000 points), so I move it under other controls.
    Formatting data displayed
    Having additional elements (coming from underlying tree control) is not necessary in several cases. Life will be much more pleasant if it will be possible to get reference to this tree control.
    By the way it is possible to customize this palette. In design mode configure WaveformGraf to show cursor legend. Select it and then select from menu “Customize control…” Now you can do whatever you (I) want, for example change the column name from X to Time. Save your work, if prompted replace original with just designed and… nothing changes – funny isn’t it?
    Best regards,
    Zygmunt

  • How to change the text in the legend of a graph programmat​ically in labview

    I have many graphs in one plot and want to show the legend the name of the graph (i.e. the filename). How do I change the text in the legend programmatically?

    Create a property node for your graph. Use the property node "Active Plot" to define which plot (or line) you want to rename. Then write the new legend label to the property node "Plot.Name". See attached.
    Tim
    Attachments:
    legend.vi ‏12 KB

  • Chart legend name programmatically

    Hi,
    How can I change programmatically the legend name of my chart?
    Thanks,
    ToNi.

    The property node used to access the string in the legend is in Plot>Plot.Name
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Chart legend too wide when using horizontal layout

    I am using a flex chart with about 15 series on it. I've set
    the legend direction variable to "horizontal". However since the
    panel width which contains the chart is fixed, the legend sprawls
    out to the right instead of going "wrapping around" nicely to stay
    within the panel. As a result, you can't read the whole legend when
    looking at the chart. The chart itself stays the proper width, but
    the legend is too wide and can only be seen via using the scrollbar
    to move horizontally. How can that be fixed?

    Solerous, you must create a custom legend. Here's an example
    that uses a grid to lay out the individual grid items. If you have
    a variable number of series, then you can probably come up with
    better logic for laying out the legend, but this should help get
    you going.
    hth,
    matt horn
    flex docs
    <?xml version="1.0"?>
    <!-- charts/CustomLegendInActionScript.mxml -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    backgroundColor="white" creationComplete="init()">
    <mx:Script><![CDATA[
    import mx.containers.GridItem;
    import mx.containers.GridRow;
    import mx.graphics.SolidColor;
    import mx.graphics.IFill;
    import mx.charts.LegendItem;
    import mx.charts.Legend;
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
    {Expense:"Taxes", April:2000, May:321, June:131, July:1100,
    August:200, September:1400, October:42},
    {Expense:"Rent", April:1000, May:95, June:313, July:600,
    August:400, September:200, October:52},
    {Expense:"Taxes", April:2000, May:321, June:131, July:90,
    August:500, September:900, October:300},
    {Expense:"Bills", April:100, May:478, June:841, July:400,
    August:600, September:1100, October:150}
    private function init():void {
    for (var i:int = 0; i < myChart.series.length; i++) {
    var li:LegendItem = new LegendItem();
    li.label = myChart.series
    .displayName;
    var sc:SolidColor = myChart.series.getStyle("fill");
    li.setStyle("fill", sc);
    var gi:GridItem = new GridItem();
    if (i < 3) {
    // First row
    gi.addChild(li);
    gr1.addChild(gi);
    } else if (i >= 3 && i < 6) {
    // Second row
    gi.addChild(li);
    gr2.addChild(gi);
    } else if (i >= 6) {
    // Third row
    gi.addChild(li);
    gr3.addChild(gi);
    ]]></mx:Script>
    <mx:Panel title="Bar Chart with Legend" width="500"
    height="600">
    <mx:BarChart id="myChart" dataProvider="{expenses}"
    height="400" showDataTips="true">
    <mx:verticalAxis>
    <mx:CategoryAxis
    dataProvider="{expenses}"
    categoryField="Expense"
    />
    </mx:verticalAxis>
    <mx:series>
    <mx:BarSeries xField="April" displayName="April (in
    $USD)"/>
    <mx:BarSeries
    xField="May"
    displayName="May (in $USD)"
    />
    <mx:BarSeries
    xField="June"
    displayName="June (in $USD)"
    />
    <mx:BarSeries
    xField="July"
    displayName="July (in $USD)"
    />
    <mx:BarSeries
    xField="August"
    displayName="August (in $USD)"
    />
    <mx:BarSeries
    xField="September"
    displayName="September (in $USD)"
    />
    <mx:BarSeries
    xField="October"
    displayName="October (in $USD)"
    />
    </mx:series>
    </mx:BarChart>
    <mx:Grid id="myGrid">
    <mx:GridRow id="gr1">
    </mx:GridRow>
    <mx:GridRow id="gr2">
    </mx:GridRow>
    <mx:GridRow id="gr3">
    </mx:GridRow>
    </mx:Grid>
    </mx:Panel>
    </mx:Application>

  • 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 do I flip the view of the legend bar so it is vertical instead of horizontal? I want the legend bar vertically positioned in my column chart.

    I clicked the show legend button and edited it according to my data but it placed it horizontally. I need it vertical and there does not seem to be a function to flip the view. Does anybody know how to switch the view of the legend bar?

    Use the handle at the left or right to the Legend box to reduce the width of the box. The strung-out list will change to columns, and eventually to a single column.
    Regards,
    Barry

  • Get rid of BarChart Legend and create a Horizontal Line on a specific value

    Hey,
    i'm working with BarCharts.
    1st Screen: I want to disable the Legend of my Barchart.
    http://imgur.com/wMo6Tfv,DRiNA9C
    Second Screen: I want to create a Line in my Barchart on a specific Value like 700 as seen on the screen.
    http://imgur.com/wMo6Tfv,DRiNA9C#1
    Is this Possible ? Also: For what object do i need to set the ID to change the bar's color. i've tried
    Chart barchart;
    barchart.setId("Chart");
    css:
    #barchart
    -fx-background-color: red;
    But it didn't work. Thanks!

    No, you're not missing anything; I had a temporary brain freeze. You can't add Nodes directly to an arbitrary region.
    So this makes it a bit harder. You need to add the line to the container in which your Chart is held, and of course that means you have to figure out the coordinates of the line relative to that container. To simplify it a bit, the axis has a scale property for converting from axis units to screen units, and also according to the css docs, the chart has a child with css class "chart-horizontal-zero-line". So one possible strategy is to grab that line and figure the change in coordinates needed from it. There's still work to do to figure the correct coordinates relative to the container, and if you want it to work with things moving around (such as when the user resizes the window), you need to do a bunch of binding.
    This seems to work:
    import java.util.Arrays;
    import java.util.List;
    import javafx.application.Application;
    import javafx.beans.binding.DoubleBinding;
    import javafx.beans.property.DoubleProperty;
    import javafx.beans.property.SimpleDoubleProperty;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.chart.CategoryAxis;
    import javafx.scene.chart.LineChart;
    import javafx.scene.chart.NumberAxis;
    import javafx.scene.chart.XYChart;
    import javafx.scene.control.Button;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.Region;
    import javafx.scene.shape.Line;
    import javafx.stage.Stage;
    import javafx.util.StringConverter;
    public class LineChartSample extends Application {
      @Override
      public void start(Stage stage) {
        stage.setTitle("Line Chart Sample");
        final CategoryAxis xAxis = new CategoryAxis();
        final NumberAxis yAxis = new NumberAxis();
        yAxis.setTickLabelFormatter(new StringConverter<Number>() {
          @Override
          public Number fromString(String string) {
            return Double.parseDouble(string);
          @Override
          public String toString(Number value) {
            return String.format("%2.2f", value);
        xAxis.setLabel("Month");
        final LineChart<String, Number> lineChart = new LineChart<String, Number>(
            xAxis, yAxis);
        lineChart.setTitle("Stock Monitoring, 2010");
        lineChart.setAnimated(false);
        final XYChart.Series<String, Number> series = new XYChart.Series<>();
        series.setName("My portfolio");
        final List<XYChart.Data<String, Number>> data = Arrays.asList(
        new XYChart.Data<String, Number>("Jan", 23),
            new XYChart.Data<String, Number>("Feb", 14),
            new XYChart.Data<String, Number>("Mar", 15),
            new XYChart.Data<String, Number>("Apr", 24),
            new XYChart.Data<String, Number>("May", 34),
            new XYChart.Data<String, Number>("Jun", 36),
            new XYChart.Data<String, Number>("Jul", 22),
            new XYChart.Data<String, Number>("Aug", 45),
            new XYChart.Data<String, Number>("Sep", 43),
            new XYChart.Data<String, Number>("Oct", 17),
            new XYChart.Data<String, Number>("Nov", 29),
            new XYChart.Data<String, Number>("Dec", 25));
        series.getData().addAll(data);
        final AnchorPane chartContainer = new AnchorPane();
        AnchorPane.setTopAnchor(lineChart, 0.0);
        AnchorPane.setBottomAnchor(lineChart, 0.0);
        AnchorPane.setLeftAnchor(lineChart, 0.0);
        AnchorPane.setRightAnchor(lineChart, 0.0);
        chartContainer.getChildren().add(lineChart);
        Button button = new Button("Show line");
        button.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            final double lineLevel = 35;
            final Region chartRegion = (Region) lineChart
                .lookup(".chart-plot-background");
            final Line zeroLine = (Line) lineChart
                .lookup(".chart-horizontal-zero-line");
            final DoubleProperty startX = new SimpleDoubleProperty(0);
            final DoubleProperty endX = new SimpleDoubleProperty(0);
            final DoubleProperty y = new SimpleDoubleProperty(0);
            startX.bind(new DoubleBinding() {
                super.bind(chartRegion.boundsInParentProperty());
              @Override
              protected double computeValue() {
                double x = chartRegion.getBoundsInParent().getMinX();
                for (Node n = zeroLine.getParent().getParent(); n != chartContainer && n.getParent() != null; n = n.getParent()) {
                  x += n.getBoundsInParent().getMinX();
                return x;
            endX.bind(new DoubleBinding() {
                super.bind(chartRegion.boundsInParentProperty());
              @Override
              protected double computeValue() {
                double x = chartRegion.getBoundsInParent().getMaxX();
                for (Node n = zeroLine.getParent().getParent(); n != chartContainer && n.getParent() != null; n = n.getParent()) {
                  x += n.getBoundsInParent().getMinX();
                return x;
            y.bind(new DoubleBinding() {
                super.bind(chartRegion.boundsInParentProperty(),
                    yAxis.scaleProperty(), zeroLine.startYProperty());
              @Override
              protected double computeValue() {
                double y = zeroLine.getStartY() + lineLevel * yAxis.getScale();
                for (Node n = zeroLine.getParent().getParent(); n != chartContainer && n.getParent() != null; n = n.getParent()) {
                  y += n.getBoundsInParent().getMinY();
                return y;
            Line line = new Line();
            line.startXProperty().bind(startX);
            line.endXProperty().bind(endX);
            line.startYProperty().bind(y);
            line.endYProperty().bind(y);
            chartContainer.getChildren().add(line);
        BorderPane root = new BorderPane();
        root.setCenter(chartContainer);
        root.setTop(button);
        Scene scene = new Scene(root, 800, 600);
        lineChart.getData().add(series);
        stage.setScene(scene);
        stage.show();
      public static void main(String[] args) {
        launch(args);
    }

  • Horizontal scrollbar for plot legend

    Hello,
    The plots in my plot legend for a graph can have quite long names so it would be great having a horizontal scrollbar.
    Quote from here
    >>To add a scroll bar to a plot legend, right-click the plot legend and select Visible Items»Horizontal Scrollbar or Visible Items»Vertical Scrollbar from the shortcut menu.
    I can see the entry horizontal scrollbar, but it is always grayed out, what's wrong?
    Thanks a lot for your help!
    Cheers,
    Rico

    I think you are misinterpreting the use of the scrollbar.  If you have a lot of plots on your graph, then you can use the scrollabr to not show all the plots at once and this allows you to scroll through the list.  It does not allow you to make the plot legend smaller to hide long names and scoll across.
    So, if you resize the plot to be horizontal, then you can display the horizontal scrollbar:
    If you resize it vertically, then you can display the vertical scrollbar:
    Message Edited by Matthew Kelton on 05-09-2008 12:09 PM
    Attachments:
    Plot legend horizontal.png ‏2 KB
    Plot legend vertical.png ‏2 KB

Maybe you are looking for

  • How to make the "@" on a Mac Book Pro when Windows XP is booted

    How do I make a "@" on the Mac Book black when Windows XP is booted? Sinc Alt GR does not exist I tried several possibilities, but I did not have success. Can anybody help me Regards Chris

  • Check interface

    My client will be doing the invoice processing in the legacy systems, but want SAP to pay through check. To me this means 2 types of inbound interfaces to SAP: Vendor master and Vendor Invoice line item. And after the payment is made, we need to send

  • Charging the Touchpad in Europe.

    I've been living in Germany since Jan and have been using a 220V-110V transformer to plug my  charger in to. Is that necessary or can I just use a plug adapter and plug directly in to a 220V wall socket. From looking at the writing on the plug, I sus

  • Translate \r\n to \n

    I have an internet file. I do not know if it has \r\n or \r as line ends. so I want to change \r\n to \n then change \r to \n Thus I end up with unix line ends. all as I want to do is translate \r\n to \n. I don't want to eliminate \r. mac $ cat '/Us

  • HP printer can't find my E2000 router

    I have checked everything from the FAQ page and everything is fine.  The printer is less than a year old and I bought the router a couple of months ago.  Does anyone know what to do? Thanks.