Dashboard chart colours (again)

My final thoughts on this.

Well yes, understood and the chart is much better for you taking that approach.
But I'm not suggesting anyone is required to supply colour or any other value.

In the spirit of allowing more dynamic charts, consider feeding a bar chart from an SQL query:

select timestamp, temperature, case when temperature > 100 then "red" else "green" end as color from test;

If the chart config "Series" was "None" you could use this to get red bars when above 100, green when below.

I use bar colours to help visually correlate the same event plotted on two charts and displayed in a table. I display 1 bar per day for the past month. 9 colours works for this but is not ideal.

For unique colours that implies 31 rows in the editable list.
Not ideal to define 31 colours in the SQL query (or in a function node) either, possible though.

I could also ensure that a bar for Monday is always red, Tuesday green, ...
I can't see how that is possible with a rolling dataset using the editable list approach.

Other chart types

I don't know what data you have to feed a pie chart with but a similar approach to colour the slices. {{nation:"USA", population: 200, "color": "blue"}, {nation: "China", population: 1500, color: "red"}, ...}

For a line chart, hmm. The analogue is colour & style of the points, I'm not sure how this would relate to the line colour, which applies to the entire data set not individual points.

1 Like

Good point, well presented - thanks @jbudd

Bart, I understand. At the minute, I'm okay with the capabilities that is already supplied, so on that, thankyou.

1 Like