Solution
While this is a known limitation of the legend, you can programmatically set the visibility of charts larger than index 256 using LabVIEW Property Nodes. Follow the steps below to use this method:
- Right-click on the chart and go to Create»Property Node»Active Plot.
- Drop the Property Node on the Block Diagram.
- Expand the Property Node by hovering over it with the mouse and dragging down the blue dot that appears on the bottom.
- Click on the new box and select Visible.
- Right-click on the Property Node and select Change All to Write.
You can now assign the plot you would like to make visible to the Active Plot property and set the visibility to True. The final Property Node configuration can be shown in the code snippet below:
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
When using this method, the Chart's Legend will still display the name of the plot, regardless of whether the plot's visibility is set to True or False. This is designed intentionally, so that the plot can be re-enabled when desired. If you wish to remove the plot from the Legend entirely, it will be necessary to design a custom Legend using an array of Clusters, where:
- Each array element corresponds to a plot.
- Each Cluster consists of:
- A String to store the plot name.
- A Boolean to store the visibility of the plot.
- A Color Box to store the plot colour.
Using Property Nodes and Events, this custom array can be used as an alternative Legend, where array elements (i.e. plots) can be deleted as desired. An example of using a custom Legend in this manner has been attached.