Different colors Bar Chart (JavaScript) + CSS editor

Hello, I need someone to help me with some ideas on how I can implement a Bar Chart that represents service values with different colors, which I designate in the Rule Engine node. My table is formed as follows.

I’ve tried several ways, using CSS Editor nodes, String Manipulation to create a class where it contains the color and the value of “LISTA(NIVEL_S)” and pass it to the CSS editor, but I can’t manage to color the bar charts with the colors I want.

hi bsaigua,
i considered using a color and a bar chart node for data visualization … unsure if this approach would be optimal for datasets containing a significant number of data points.

1 Like

Hello Marzukim,
Thank you very much for your response, but I have already tried the approach you suggest. The issue is that I cannot work with dates as they change successively, and what indicates the color I should assign to that date is the value (LISTA(NIVEL_S)).

Similar to this

i apologize that did not meet as per your expectations. hope other knime members can assist you with this issue …

Hello @bsaigua
The chart is a simple bar char, it can be easily achieve with R/Py coding; as the chart libraries accept both HTML/CSS Hex color format plus relative ‘color names’ as input.

I don’t think that you can configure your custom color choice in ‘Color Manager’ node, other than automatic palette or color ramp for numeric values; besides manual picking assignment, that it isn’t an option for you.

What do you think about it? Can you handle scripting nodes?


1 Like

@marzukim If you don’t mind some configuration (and googling), I got pretty close with our Generic ECharts node.


“Thank you very much!! It was very helpful to me.”


One note: if your category column (LISTA(NIVEL_S)) contains many distinct values, picking colors manually will be very tedious and using a categorical palette will not really scale, since you run out of distinguishable colors pretty quickly (after 20 it gets tough). Choosing a color scale will… öh, scale much better :slight_smile: .

1 Like

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