Assigning colors with Color Manager

I want to color the rows in my TableView (JS), based on the value of a column (pos, see workflow)
As long as I have at least 1 row below and 1 row above my cut-of-point, the colors are ok.
But when I have only one color to display, the Color Manager takes the first color in the palette,
and that is not necessary the right color. See the workflow. Suggestions to fix?
color_manager.knwf (35.8 KB)

Hi @HansS,

You can select the “Custom” option instead of the color sets and choose the colors from the sets.

:blush:

1 Like

Hi @armingrudd

Tnx, although I learned something new, how to add the custom colors :slightly_smiling_face: . My final solution is different. With only one-color-value appearing in my data column, I can’t assign an other color (because the value does not exist in the selection). So after some trying, I pre-defined the colors with a table and the color manager and assign the right colors with the color appender. So thank you, your solution pushed my thinking in the right direction.

2 Likes

Actually there is a potential better and more convenient way to do this but I think for some reasons it’s not available yet.

If you go to the Flow Variables tab of the Color Manager node after selecting the custom option, this is possible to assign the colors by variables (when you choose colors manually and choose variable names for the options, you can see the color names). But assigning the color number by variables is disabled and assigning a color name by variables does not work. Maybe we will have the option in the future. Or maybe I’m missing something? @ScottF

:blush:

P.S.

And yes, having the option to define custom palettes is a great option. Specially by having them as options in Flow Variables tab. That will be really great.

4 Likes

I guess the flow variable route depends on what is being expected as the string. What do you get if you define something in the ‘Color Settings’ tab, and then in the 'Flow Variables tab, in the white box at the right hand end of the bit you highlighted put in something like ‘Colour’? This should give you the value from your settings in the flow variable ‘Colour’ at the output port

Steve

Yeah, that’s exactly what I did and that’s how I found out there is a potential solution to assign colors by flow vars. When you set colors and take the vars, you can see color names like “red”, “green”, … but assigning the same value to the flow variable option (StringCell) of the node, does not work:
Color mapping does not match possible values.

Each color has its own number but this option is not available for input. (as shown in the picture, each column-“red” column for example- can be assigned by an integer which is a number that defines the color)

3 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.