node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

More colours for charts (and other dashboard widgets?)

Open jdotbdot opened this issue 1 year ago • 0 comments

Description

The chart node config has a palette of 9 colours (of which 4 are red/brown & 4 are blue/magenta) Once a chart has used all of these, it repeats the sequence.

With dashboard 1 there was the same palette of 9 colours, plus a fallback set of 24 (?) specified in ~/ .node-red/node_modules/node-red-dashboard/dist/js/app-min.js, and these can be augmented to get as many different colours as you might want. var c=(t.colors||["#1F77B4","#AEC7E8","#FF7F0E","#2CA02C","#98DF8A","#D62728","#FF9896","#9467BD","#C5B0D5"]).concat( ["#7EB3C6","#BB9A61","#3F8FB9","#57A13F","#BC5879","#6DC2DF","#D7D185","#91CA96", "#DEB64D","#31615A","#B46E3F","#9B2FAA","#61A240","#AA3167","#9D6D5E","#3498DB", "#EC7063","#DAF7A6","#FFC300","#D98880","#48C9B0","#7FB3D5","#F9E79F","#922B21"] );

Can a similar arrangement allow for more colours beyond the first nine in DB2?
A minified javascript file may not be the best place to specify them since it cannot easily be edited. Maybe an environment variable could hold a list of colours, or else settings.js?

See https://discourse.nodered.org/t/how-to-specify-colours-for-bar-chart/52536 for a discussion of the DB1 arrangement.

Have you provided an initial effort estimate for this issue?

I can not provide an initial effort estimate

jdotbdot avatar Sep 18 '24 19:09 jdotbdot