Example Code

Change Graph Plot and Background Color in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

1. Overview:

This VI shows how to use property nodes to change the plot and background color of a Waveform Chart programmatically

 

2. Description: 

Changing the properties of the elements in the front panel is a very common requirement in LabVIEW applications. To implement this, is necessary to perform callings to the VI server through the property or invoke nodes. In this case, the example shows how to use the property nodes in order to change the plot color and the background color of a waveform chart while the application is running.

 

3. Requirements

  • LabVIEW 2012 (or compatible)

4. Steps to Implement or Execute Code

  1. Run the VI
  2. When changing the plot color, the color of the line that plots the graph will change to the one selected
  3. When changing the background color, the background of the graph will change its appearance

 5. Additional Information or References 

VI Block Diagram

 

Block Diagram.JPG

**This document has been updated to meet the current required format for the NI Code Exchange.**

Caleb W

National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.