andymchugh / andrewbmchugh-flow-panel

Apache License 2.0
34 stars 2 forks source link

Feature Request label/fill color valueMapping #64

Closed netforce closed 3 months ago

netforce commented 4 months ago

ability to use 'colorMapping' in the same way 'valueMappings' is implemented.

We would like to set the label of fill color based on the value without using the thresholds, because the values are set numers/errorcodes/whatever which might no be in correct numeral order to use thresholds, or even might be text instead of integers.

For example network interface states up/down/error/nan mapped to a specific color.

andymchugh commented 4 months ago

numbers have an order so if your incoming data is numerical you can get the color you want, you just have to order the thresholds from lower to higher. Threshold indexes don't have a meaning, just a traversal order.

will have a think about the string data. That as you say is unsupported.

I558191 commented 4 months ago

+1 for adding the feature to base the colors on string values. the deprecated flowcharting plugin used to solve this by providing an input for color, pattern and level in the threshholds section.

andymchugh commented 3 months ago

This has been added using thresholds rather than mappings. Now in addition to thresholds and thresholdsRef there's also thresholdPatterns and thresholdPatternsRef. This is an example use.

With this you can use a text data-series to drive labelColor, strokeColor and fillColor via regex.

It will be in the next build.

andymchugh commented 3 months ago

published in 1.14.0