Skip to content

React UI: insufficient significant digits in Y axis labels over small range #9204

Description

@candlerb

What did you do?

In the PromQL React UI, gave a PromQL expression where the Y values are over a small range, then view as a graph.

To replicate: e.g. foo < 0.10 > 0.096 or foo < 0.11 > 0.096

What did you expect to see?

Each Y-axis label should be distinct, with sufficient significant digits to distinguish them. e.g.

  • 0.096
  • 0.097
  • 0.098
  • 0.099
  • 0.100
  • 0.101

What did you see instead? Under which circumstances?

In the following graph, the data points range from 0.0965 to 0.0999:

image

I believe the Y axis label positions actually correspond to 0.0960, 0.0965, 0.0970 ... 0.1000, 0.1005, but all are showing as 0.10.

With values from 0.0965 to 0.11:

image

In this case I believe the Y axis positions correspond to 0.096, 0.098, 0.100, 0.102, ... 0.110, 0.112; but half of them show as 0.10 and half as 0.11

(Real-world use case which triggered this: alerts set at disks having less than 10% free space, then viewing the graph of the alerting expression when the values are only just dipping below and above 10%)

Workaround

Manually add * 100 (or other scale as required) to the expression you are graphing.

image

Reference

Possibly relates to old issue #3084

Environment

  • System information:

    Linux 4.15.0-153-generic x86_64
    
  • Prometheus version:

    prometheus, version 2.28.1 (branch: HEAD, revision: b0944590a1c9a6b35dc5a696869f75f422b107a1)
      build user:       root@2915dd495090
      build date:       20210701-15:20:10
      go version:       go1.16.5
      platform:         linux/amd64
    
  • Alertmanager version:

    n/a

  • Prometheus configuration file:

    n/a

  • Alertmanager configuration file:

    n/a

  • Logs:

    n/a

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions