LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change BG color of items in cursor list?

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.

 

 

0 Kudos
Message 1 of 6
(3,126 Views)

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-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 2 of 6
(3,108 Views)

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?

0 Kudos
Message 3 of 6
(3,098 Views)

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-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 4 of 6
(3,091 Views)

That's correct, Nick.  It would be an easy visual for out-of range values.

 

Kevin

0 Kudos
Message 5 of 6
(3,088 Views)

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

 

change cursor color.png

 

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-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 6 of 6
(3,073 Views)