04-03-2012 01:22 PM
Does anyone know if there is a way to programmatically change the background color of a given X/Y point in a cursor list? For a given X value, I have about 20 Y-value points shown in the cursor list of a mixed mode graph. I would like to change the background color of some of those points' displayed cursor value if they fall outside a threshold.
04-04-2012 01:29 PM
The links below are the lists of Cursor and Cursor List properties that can be accessed using a property node.
http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/cursor_p/
http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/waveformgraph_crsr_list/
You modify your desired properties programmatically after checking to see if the cursor value falls outside your desired threshold.
-Nick-
04-05-2012 07:35 AM
Thanks for those links, Nick. I had already looked through whatever properties I could find and saw nothing related to the cursor legend (I'm talking about changing background properties in the multi-column list showing the cursor and its Y-values). Unless I'm missing something, I didn't see anything in your links that reference that object. Am I missing something?
04-06-2012 08:42 AM
I haven't been able to find any information about changing the background color like you are describing here. I'll continue to search around for more information or an example program that implements this. When you refer to cursor legend, you mean the multicolumn list that is a part of the graph, correct?
-Nick-
04-06-2012 08:57 AM
That's correct, Nick. It would be an easy visual for out-of range values.
Kevin
04-09-2012 10:42 AM
Kevin,
There is a property of XY graphs called Cursor.Color, have you tried using this? I'm not sure if that property changes the color of all cursors in the list.
I've attached a snippet of a VI below that may help to solve you problem
You can select a particular cursor from the list using the Index Array VI where the index value is the cursor #. Using the Bundle by Name VI you can change the cursor color for only that particular cursor and replace the cursor in the list using the Replace Array Subset VI.
Hope this helps!
The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
-Nick-