Chart EWO as heat map?

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
jliebstueckel
Posts:3
Joined: Tue Apr 26, 2011 6:20 pm

Chart EWO as heat map?

Post by jliebstueckel »

Hi!

I tried to use the chart ewo as heat map as described here:
https://www.winccoa.com/documentation/W ... heat%2Cmap

Beside the fact, that the behaviour is not as explained there (color transition is black (lowest) -> green -> white (highest)), how can I implement a color transition from e.g. blue -> red. How can I set these additional colors? Is it possible to use CSS there fore?

BR
Jens

hpuchegger
Posts:86
Joined: Fri Oct 08, 2021 10:38 am

Re: Chart EWO as heat map?

Post by hpuchegger »

Hello,

I haven't checked it, but maybe there is some truth in this answer from our ChatGPT:

To implement a color transition from blue to red in a heat map using the Chart EWO in WinCC OA, you can utilize the setSeriesColorStop function to define color stops at specific positions. This allows for interpolation of colors between the defined stops.

Here’s how you can set it up:

1. Define Color Stops: Use the setSeriesColorStop function to specify the colors at certain positions. For example, you can set blue at position 0.0 and red at position 1.0.

shape.setSeriesColorStop(seriesIndex, 0.0, "{0,0,255}"); // Blue
shape.setSeriesColorStop(seriesIndex, 1.0, "{255,0,0}"); // Red

2. Add Series: Ensure you have added a series to your chart where these color stops will be applied.

3. Enable Color Mapping: You may also want to ensure that the property bubbleColorFromValue is set to TRUE if you are using bubble charts, which will allow the colors to reflect the values dynamically.

Chart_ewo1.bubbleColorFromValue = TRUE;

Regarding the use of CSS, while you can style various elements in WinCC OA using CSS, the color transitions for the heat map specifically rely on the functions provided in the Chart EWO and not directly on CSS. CSS can be used for other UI elements but not for defining color transitions in charts.

For more details, you can refer to the documentation on setting color stops and series in the Chart EWO:
https://www.winccoa.com/documentation/W ... rStop.html

Br, Herbert

jliebstueckel
Posts:3
Joined: Tue Apr 26, 2011 6:20 pm

Re: Chart EWO as heat map?

Post by jliebstueckel »

Hi!

Works like a charm! Thank you for your input.

I had already tried the ColorMap without success. But this approach is working fine.

BR
Jens

3 posts • Page 1 of 1