Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

joshhunt
Copy link
Contributor

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:

@joshhunt joshhunt added this to the 9.2.0 milestone Aug 11, 2022
@joshhunt joshhunt requested review from torkelo, kaydelaney, a team and ivanortegaalba and removed request for a team August 11, 2022 09:43
@@ -280,6 +280,7 @@ export const getAllStandardFieldConfigs = () => {
id: 'decimals',
path: 'decimals',
name: 'Decimals',
description: 'Leave empty to calculate based on the value',
Copy link
Member

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"

Copy link
Member

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

Copy link
Contributor Author

@joshhunt joshhunt Aug 11, 2022

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.

Copy link
Contributor Author

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 😅

Copy link
Contributor Author

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"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see also, #53331 (comment)

Copy link

@yosiasz yosiasz Aug 19, 2022

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. 😉

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Collaborator

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.

@joshhunt joshhunt closed this Sep 20, 2022
@github-actions github-actions bot removed this from the 9.2.0 milestone Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PanelEdit: Include description of what "auto" decimals does
5 participants