Closed starwarsfan closed 4 months ago
nice
but what is the difference to the val_best parameter? With this you can already determine the direction...
Example:
{val_min: 0, val_max: 3000, val_best: 3000}
val_max is green
{val_min: 0, val_max: 3000, val_best: 0}
or
{val_min: 0, val_max: 3000}
val_min is green
To turn the scale, it is sufficient to swap the min and max values.
{val_min: 3000, val_max: 0}
A new parameter brings no advantage or extension for the code.
Well, seems I did something completely wrong because what you mentioned did not work as expected. But thx for clarification, I will check the configuration again.
@starwarsfan We are now closing the pull request or are there any comments?
The default colorScale shows low values 'green' and high values 'red'. By setting
colorScaleInvert:true
this can easily be inverted, which allows proper coloring for values like i. e. battery SoC. Low values will now be displayed in 'red' vs. high values in 'green' color.