This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How to Programmatically Add an Annotation to a Graph

Updated Aug 29, 2023

Reported In

Software

  • LabVIEW

Issue Details

I am using an XY graph and I need to set labels above each point in my graph. I want each point to be labeled with its position in the array (X1,Y1--> "1", X2,Y2 -->"2" and so on)

Solution

To get a label over each X,Y point in a graph, you can create an annotation for each point using the Annotation List property of the Waveform Graph. 

        

Additional Information

  • Waveform graphs have a property called Annotation List that contains the list of annotations. The list is an array of clusters, where each cluster contains information about the annotation including the color and text string. The attributes list of Annotation List property can be found here.
  • To create the Annotation List property node do the following:

    1) Right click Graph Control/Indicator 
    2) Select Create>> Property Node >> Annotation List

  • Find an example that uses the functionality in the community: Programmatically Add Annotation to Waveform Graph at Cursor Location