Showing results for 
Search instead for 
Did you mean: 

Cursor and annotation default color

Go to solution


I am looking for a way to change default color for graph annotations and cursors. The default color is a bright yellow. I am using white background graphs and they are almost invisible. Since I did dot find a way to change the default color, I looked for a way to detect that a cursor or annotation was placed on the graph but there is no such events. Right now, the only way I found to solve the problem is to read periodically the annotation and cursor lists, and change the colors of the found cursors to black. However, this solution consumes precious CPU tile on my 500 MHz Geode.


If there was a way to simply  change the default color, that would be the best solution.


Anybody has an idea about how to do it?


Al Capote

Al Capote
Certified LabVIEW Architect
0 Kudos
Message 1 of 5
Accepted by topic author Al_Capote

Hi Al,


I do something similar in one of my applications, where a user can add cursors. I hijack the add cursor event and set the cursor parameters before I add the cursor to the cursor list.




This isn't the same as setting the default colour and I'm not sure how much CPU time it would save but it may be worth a go.  Make the cursor definition cluster a typedef.


I know the build array may be a problem, but this is just a quick fix  Smiley Wink


Message Edited by DavidU on 10-06-2008 12:29 PM
0 Kudos
Message 2 of 5

Hi Al Capote,


In order to change graph cursors, you can use two property nodes.  (Input a Waveform Graph reference into a property node » Select Cursor: Reference » Input this into another property node » Select Cursor Color)


In order to change graph annotations, refer to this discussion forum posting: how do you change the annotation color  (See posting 6.)  (In short, you use a property node referencing the Annotation List.  Just remember that what this property node requires as input is an array of a cluster.  One element in that cluster is the color.)


I hope this helps,

Kevin S.

Applications Engineer

National Instruments

0 Kudos
Message 3 of 5

Thanks to both of you.


I am already using property nodes with annotation and cursor list but I am polling the graph because I did not find an event that was triggered by "An annotation (or a cursor) has been added to the graph".


I will go with think the solution proposed by DavidU, I will create my own function to add cursors and annotation and they will be the right color when I add them.


Al Capote

Al Capote
Certified LabVIEW Architect
0 Kudos
Message 4 of 5

Not to drag up an old thread, but... searches brought it up (and another thread less useful), and a whole lot of nothing else.  I thought I'd add a solution for anyone else searching this. After some playing around, here is the simplest method I could find for changing the default color on annotations.




Message 5 of 5