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?
Solved! Go to Solution.
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
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,
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.
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.