LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to have three different colors at the same time as a background to a strip chart. As an example 0-50 green,50-80 yellow, 80-100 red. This would allow the operator to see the critical ranges for data.

Hello BryanJ,
The LabWindows/CVI strip chart only supports one background color at a time, so there is no built-in functionality for what you request. What I have often seen people do to accomplish something similar is to plot multiple traces on a chart -- data input, low level, high level. Often the "level" traces are thick and brightly colored. There is generally an algorithm that calculates if the data is below a low threshold or above a high threshold, and if so, a warning LED on the user interface is turned on and possibly the computer begins beeping or uses a DAQ board to activate an audible warning. You could also change the background color of the chart when the thresholds are crossed to assist the user in noticing and locating the data that is out of thresh
old.

Jeremiah Cox
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 7
(3,233 Views)
If the scaling and position of the chart never change, you could make the chart background transparent. Then put colored boxes behind the chart and fudge the sizes to the areas that you need. Then make the chart the top object to display.
0 Kudos
Message 3 of 7
(3,233 Views)
Here is another approach. If you can afford the memory usage, add three more signals to your data array. Then use the fill to baseline/plot option and the colors of each plot to get the red green yellow background that you want. You could even wire a variable to the ranges.
0 Kudos
Message 4 of 7
(3,233 Views)
Greetings, BryanJ:

YOu can also use the Intensity Chart do do what you want. You will need to transpose your data, because the intensity is by default geared to your "Y" data. YOu will want to sumultaneously direct the Y data to both the Y and Z axis, and then map the intensity to the color you want. It's a convoluted, if perhaps overkill approach, but I've used it for years. Hope this helps!

Chutla
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 5 of 7
(3,233 Views)
In message <506500000008000000AE200000-991728092000@quiq.com>, BryanJ
writes
>Is there a way to have three different colors at the same time as a
>background to a strip chart. As an example 0-50 green,50-80 yellow,
>80-100 red. This would allow the operator to see the critical ranges
>for data.
>
>
1. Create a canvas the same size as the chart.
2. Use a graphics editor to create the three colour image for the chart
background and load it into the canvas.
3. Put the canvas behind (z-plain) the chart.
4. Make the chart & chart background colours transparent.

The main draw back is that it is difficult to keep the scaling correct
if you need to resize the chart at run-time.

You will also need to select chart line colours to contrast well with
your chosen ba
ckground colours.

--
Regards,

John Cameron.
Electronic & Software Design.
OB5 Ltd. Registered in England & Wales 4633860.
Registered Office: Lowther House Lowther Street Kendal Cumbria LA9 4DX.
Tel: +44 (0) 1539 734238 Fax: +44 (0) 1539 738064 Mobile: +44 (0) 781 462 8633
0 Kudos
Message 6 of 7
(3,233 Views)
Hi,

a very easy solution is to use the CWGraph ( ActiveX from components works) and define 3 plots filled from base in the colour of your choice. The values of the plots are 50, 80, 100.
Of course, you add your own plots !
0 Kudos
Message 7 of 7
(3,233 Views)