Example Code

Adding a Scrollbar to a Waveform Graph

Code and Documents

Attachment

This VI shows how to use a horizontal slider to mimic the behavior of a scrollbar.

Waveform charts have built in scrollbars, but waveform graphs do not. You can use Property Nodes to achieve the same functionality on a graph.

The VI generates 1000 random numbers and plots them on both a chart and a graph. The chart scrollbar is visible, and you can scroll through the points, displaying 100 at a time. Using the value of a slider to control the minimum and maximum value of the display area on the graph, you can obtain the same effect as a scrollbar.

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

Contributors