New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Histogram: Respect min/max panel settings for x-axis #62273
Conversation
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
I hope this is not forgotten about. This is an important change for myself and many others. I am still using old graph panel histograms due to this missing functionality, however it looks like that will be deprecated soon. #63732 |
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Why are you actually ignoring this obvious bug? |
This fix was not released yet? |
for everyone here, can you tell me if/how you expect this to work any differently than simply pre-filtering your data using https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/#filter-data-by-value this is pretty much the question we're struggling to understand to see whether this approach should offer anything meaningfully different or should be identical and we just apply that transformation internally. e.g. what do you expect legend calcs to read when you apply these limits in the panel? should they be full range or filtered range? |
actually i should be more specific here. the legend calcs always happen before the data hits the panel. so they will always be full range. would you find it confusing that your min/max/avg in the legend do not correspond to the min/max limits you set in the panel? if you think this is confusing, then we would have to re-calculate the legend stats a second time based on the panel's min/max filters, which is currently not legend behavior that occurs in any existing panel. this incongruity is why the PR has not simply been merged. |
My use case is that I want to set the max and min to levels outside the normal operating range. As an example, imagine the output of solar panel. In full light, it can output 200W. On a cloudy day, it may only output a max of 100W. If I was to plot these a low light day and a full light day on a histogram without the same x-axis max value, the histogram would look roughly similar each day. But in reality, the behaviours are very different. Once the defined max and min x axis values are available, you could know if its a poor light day if the peak is further to the left, and a good light day if the peak is further to the right. There could also be two peaks if it suddenly turned very cloudy halfway through the day. In summary, setting a max and min on the x-axis allows you to get a feeling for not only the distribution, but also the mean and standard deviation. Regarding the legend, I haven't put any thought into that, especially with respect to applying transformations. |
thanks. yeah, that makes sense. what's being asked for in https://community.grafana.com/t/does-min-and-max-standard-options-work-with-histograms/75380/3 is a combo of this. (grow the max and clip the min). it sounds like if you want the legend to reflect any limits smaller than data min/max, then you should use transformations, and this PR should land as-is. so for the case linked above it would be transform/filter out values < 20, and then set panel to min: 20, max: 70. |
(cherry picked from commit 8f8baf1)
(cherry picked from commit 8f8baf1)
Fixes #62237
histogram-min-max.json
histogram-limits.mp4