Example Code

Keeping Graph Label Centered Programmatically

Code and Documents

Attachment

 

Overview
This program uses property nodes to keep the label of the graph or waveform chart centered as the front panel window moved or changed.


Description
It is a useful property to keep the label of a graph or waveform chart centered as you resize the front panel window. This example shows how to achieve this.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Place down a waveform chart on your LabVIEW front panel
  2. On your block diagram, create a reference to the waveform chart. Using property nodes set the position of the label of the graph based on the width of the x-axis and the width of the label itself
  3. Using these parameters, the left end of the label is set in a certain position

 

Additional Information or References
VI Block Diagram

 5-299.png

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

 

 

Sinead B.
Applications Engineer
National Instruments

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