How Do I Programmatically Change the Background Color of a Graph?

Updated Aug 29, 2023

Environment

Software

  • LabVIEW

Programming Language

  • LabVIEW G

How can I control the background color of my graph programmatically?

This can be done by placing a property node linked to the graph and/or chart.

The specific property node can be accessed by right-clicking the terminal of the graph or chart, and browsing to Create»Property Node»Plot Area»Colors»BG Color.

The specific color can be selected either by wiring in a hexadecimal number with the form RRGGBB or by wiring a color box constant to the property.

For example, the below VI generates a random RGB color and updates the front panel graph's background color every second: