Always 2 trailing zeros on the y-axis with unit “Percent (0.0-1.0)”

What happened:

This issue is intentionally a duplicate of #31397 and #31519.

What you expected to happen:

Let’s take the following estimates of pi: 3.1415, 3.14159265359 and try to plot them as a percentage.

image

The first 2 panels show that for both percentage units (0-1, 0-100) the decimals (3) are properly displayed on the y-axis, but with the 0-1 variant we always have 2 trailing zeros, and hence we get only 1 significant digit after the decimal point.

The 3rd panel shows the expected behavior: with 3 decimals, I’d expect 3 significant digits after the decimal point. This visualisation can be achieved with the 0-100 variant, but not with the 0-1 variant – this is the behaviour that I’d consider a bug.

Environment:

  • Grafana version: 7.4.3

1 possible answer(s) on “Always 2 trailing zeros on the y-axis with unit “Percent (0.0-1.0)”

  1. @istvanballok I see what you mean. Basically the Percent 0-1, decimals, always trailing zeroes (bug) graph is visually less detailed because the values on the x-axis are rounded up and down compared to the graph below it. The graph is basically correct, but again, less detailed on the first sight. I am going to pass it to @grafana/grafana-frontend-platform to determine if this is a bug.