Old topic now new, chart line colorization? Spent considerable time reading many threads on how to colorize series lines in ui_chart nodes. And I am stumped at the moment. As I understand it, I should be able to add a ui_control part to the data point message, and as long as it is { 'colors': ['red','red','red','red','red','red','red','red','red' ] } where the array is 9 elements, the data point should be 'that' color right? Index 0, first series, index 1, second series, right?
[{"id":"5822e4e79e99a650","type":"inject","z":"ab3cb18017d31f4a","name":"Red","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":1240,"wires":[["f28464ef1b7494dd"]]},{"id":"53d75ef73e78a600","type":"ui_chart","z":"ab3cb18017d31f4a","name":"","group":"c10ca462e0388e9a","order":1,"width":0,"height":0,"label":"Test","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"One Moment Please...","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":470,"y":1280,"wires":[[]]},{"id":"f28464ef1b7494dd","type":"function","z":"ab3cb18017d31f4a","name":"Red","func":"msg.ui_control={ colors: ['#FF0000','#FF0000','#FF0000','#FF0000','#FF0000','#FF0000','#FF0000','#FF0000','#FF0000'] };\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":1280,"wires":[["53d75ef73e78a600","4d332bf51793e3e1"]]},{"id":"4d332bf51793e3e1","type":"debug","z":"ab3cb18017d31f4a","name":"Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":460,"y":1360,"wires":[]},{"id":"7edba99c10b2285e","type":"inject","z":"ab3cb18017d31f4a","name":"Reset","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[]","payloadType":"json","x":90,"y":1280,"wires":[["f28464ef1b7494dd"]]},{"id":"010196df0f10bbab","type":"function","z":"ab3cb18017d31f4a","name":"Blue","func":"msg.ui_control={ colors: [ '#0000FF','#0000FF','#0000FF','#0000FF','#0000FF','#0000FF','#0000FF','#0000FF','#0000FF' ] };\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":1360,"wires":[["53d75ef73e78a600","4d332bf51793e3e1"]]},{"id":"16e22304b1d86fa0","type":"inject","z":"ab3cb18017d31f4a","name":"Blue","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":1400,"wires":[["010196df0f10bbab"]]},{"id":"65ae9bf9a48b0c11","type":"inject","z":"ab3cb18017d31f4a","name":"Reset","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[]","payloadType":"json","x":90,"y":1360,"wires":[["010196df0f10bbab"]]},{"id":"c10ca462e0388e9a","type":"ui_group","name":"Test","tab":"13ecdbb1ece78207","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"13ecdbb1ece78207","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
Thinking the color might only change as the chart node is initialized or configured, I created the flow above, and that appears to be case, you can't change the color map on-demand, you have to clear the chart. Clearing a chart resets the colors?
How to set the color per data point? Without having to clear the chart? That is what I am trying to get to.