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
PanelEdit: Add description for auto decimals behaviour #53573
Conversation
@@ -280,6 +280,7 @@ export const getAllStandardFieldConfigs = () => { | |||
id: 'decimals', | |||
path: 'decimals', | |||
name: 'Decimals', | |||
description: 'Leave empty to calculate based on the value', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this? by default it's empty, and the default (empty) placeholder says "auto"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean this description does not really add any descriptive power other than saying it's automatic (and automatic I think implies it's based on the value) otherwise it would just be fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah fair. I agree, kinda. I wanted to see if there was something we could include to help clarify a part of the confusion from this https://github.com/grafana/support-escalations/issues/3553 - specifically mention that leaving blank will round decimal places,
When "Decimals" under standard options set to "auto", I expected it show 99.99 or for that matters any number of decimals like 99.999 or 99.99999
I dont think it’s clear what empty/auto means, and I think it’s reasonable to incorrectly assume that not specifying a value here will give you full precision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If i could concisely describe what auto is (e.g. "Leave blank to round to 3 significant places"), I would, but im not 100% sure exactly what it is 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Leave blank to round automatically"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see also, #53331 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto = grafana decides what happens to your number. Please git pull grafana
and search code base to see what auto does
I kid, I kid! But I am trying to make the point that your basic grafana user has no clue what the heck happened to my trailing decimal numbers. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@torkelo Is the documentation for this correct? https://grafana.com/docs/grafana/latest/panels/configure-standard-options/#decimals
Decimals
Number of decimals to render value with. Leave empty for Grafana to use the number of decimals provided by the data source.
"use the number of decimals provided by the data source" seems incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshhunt yes, that is incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshhunt , taking a shot here to see if we get any closer to desired wording. "Specify the number of decimals Grafana includes in the rendered value. If you leave this field blank, Grafana automatically truncates the number of decimals based on the value. For example...(add one or two examples of what Grafana does to a specific value)."
I can continue helping to tweak the wording based on the example.
What this PR does / why we need it:
Describes the behaviour of "Decimals: auto" in panel edit options
Which issue(s) this PR fixes:
Fixes #53572
Special notes for your reviewer: