Citect - Heatmap - Gradient Problem

Hi all,

I have a problem with arranging the Fill-Gradient attribute in Citect. I am trying to create a heatmap component that changes colors according to the variable tag from Blue to Red. But in this case, some unwanted colors(orange, yellow, green, etc.) is appearing between blue and red color borders. I am expecting to create a color change like Apparence-General-Gradient. I attached a screenshot, that shows the feature that I am expecting. The right picture is showing the correct color that I want.

  • It appears that runtime and configuration of color gradient are different. Is the following workaround acceptable?

    1. Create a rectangle object
    2. Fill it with the desirable Gradient color

    3. Then use the vertical scaling to control the vertical size as shown below

    4. It should be able to achieve your result.


    Hope it would help.

    Regards,

    Jacky

  • Maybe I'm misunderstanding, but I'm not clear how vertical scaling would help.

    I was thinking you could use the Array or Threshold fill types. If you just have an integer with a range of 16-32, use Array. You have to set the color for each integer value like this:

    to make it easier, I created a separate rectangle with a Appearance | General | Gradient and used the color picker (eyedropper) to pick colors from that for each array color.

    If your variable is a floating point value, you may want to use Threshold. For that, you specify a range of values for each color and you can add as many ranges as you feel like:

  • This intrigued me a little, in why the colors are picked like they are. So I did some testing..

    And the answer is quite visible in the color-picker, if you look at the map of colors in citect, you see the undesired colors between blue and red.
    Why citect choose this path and not a RGB-approach, well maybe it´s because of and old heritage from an old color-system that was available from the beginning?

    If you can stand substituting red for magenta, you will get a normal transition from blue to magenta.
    If you can´t, well I suppose an array-fill is the way to go.

    I did scrape a little on the CiCode color-functions, there seem to be functions for converting between citect-colors and RGB-colors.
    But creating code for something like this seems a bit cumbersome..