Closed moffitj closed 2 years ago
Currently the color range is mapped according to the min/max values in data. So, let's say you use a color palette that goes from green (min) to red (max), and the data has values between 0 and 100, 0 will be mapped to green and 100 will be mapped to red. Values in between will be mapped according to the selected Scale Type
If I understand you correctly, you would like to specify a Max value, which would override the max value from the data. So, if we use the same example and set the "Manual Max" value to 5, it would mean:
Is the above correct? Also, what do you mean by Softmax?
Both 1 and 2 are correct. If my values are from 0 to 2, there would be green and some light yellow but no red because I have defined 5 to be "red".
By softmax I mean that I set a max of 5 and all values in the data are colored on a scale of 0 to 5, regardless of the actual max value in the data. This is the same as Max so far. But if any values in my data go over 5, then the higher value of the data is considered the Max.
So when Softmax is implemented, Max becomes the greater of {Softmax, Data Value}
I've made the suggested changes, let me know if you have any comments before I submit the update to the plugin. I've added two configuration parameters:
Max Type
- A radio button with 3 options: From Data
, Explicit
or Soft Max
Max
- A text field for inputting an explicit max valueAs an example, consider a data set with the values 1,2,3,4,5,6,7,8,9,10, and Max
set to 5
When From Data
is selected, the Max
value has no effect
When
Explicit
is selected:
When
Soft Max
is selected:
Now with Max
set to 20:
When Explicit
is selected:
When
Soft Max
is selected:
Does this implementation line up with what you had in mind?
Yes that's exactly what I expected.
This will help a lot for networking and other loads where the maximum value is fixed and known.
I've committed the change and sent the update to Grafana for review. It will probably take several days until it is updated in the marketplace.
If you want, you can just update the plugin directly by downloading this release: v1.0.9
The updated plugin is now published in the marketplace
@moffitj did you get a chance to check the updated plugin? Can this issue be closed?
Yes. That was a great addition. Thank you.
I spun up a couple of panels with this plugin and something that feels missing is a manual Max or Softmax value.
If values up to 100 are acceptable but typically the values range from 0 to 5, then whenever there is a 5 it will show up as "red".
Is there another way to accomplish this without a panel option?