The above looks right to me, but does not seem to customize the chart line color, only have 1 series so should only have to change the first color, right?
I am rolling my own 'msg' since I a function node that has multiple outputs to various UI elements...
I know the temperature, enable, color object properties are working, but never tried to set ui_control this way before. The Colorize() function varies the color based on a scale so temperature 40C red, 35C orange, etc.
Ok, I was cleaning up the code a bit, and replacing the static colors array with an array fill method, and the colorization worked! So scratching my head a bit, why the following works...
Ok... I swear it worked, but now I just looked at it again, and default color has taken over. So a simple array of 9 identical color values for 'colors' in ui_control, is not working? What did I goof-up?
I found a forum thread, that suggested I quality the entire settings for chart, which I tired. Again.... this looks right to me... But it clearly is not working as expected, I just get the default color. Interesting that no errors, and if change the line type or other settings the chart adapts. Just don't seem to get the color accepted.
Ok, I figured out what gets the colorization to work... but someone that knows the 'code' logic applicable will have to explain why this is the case.
I figured out that after I set the colors (array) I have to sent chart clear payload? Or I should say clear chart payload, the colorization starts working? Color me [COUGH] confused.
The question is... how to change the color without clearing the chart? I don't want to reset/clear the chart just to change the line color. Please tell me there is a way to do this, I hope?