Commit 52acfb5
authored
fix(dashboards): Improve rendering of small and fractional numbers in charts (#104456)
**Before:**
<img width="727" height="389" alt="Screenshot 2025-12-05 at 11 33 32 AM"
src="https://github.com/user-attachments/assets/7b86c633-e7da-47c7-845b-7dab685bc1e5"
/>
**After:**
<img width="774" height="383" alt="Screenshot 2025-12-05 at 11 33 42 AM"
src="https://github.com/user-attachments/assets/6a8d51e8-62ea-40e3-a40c-0f9f98ce5f93"
/>
The "number" type is susceptible to Y axis and tooltip rendering
problems if the values are very small. This PR forces our charts to show
"number" values at _full precision_ in the Y axis and the tooltip. The
code for the formatters explains in detail the tradeoffs and aspects of
the problem.
This in particular affects the metrics UI where the type and unit of the
values might not be known.1 parent 3e1613b commit 52acfb5
File tree
4 files changed
+57
-4
lines changed- static/app/views/dashboards/widgets/timeSeriesWidget/formatters
4 files changed
+57
-4
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
16 | 30 | | |
17 | 31 | | |
18 | 32 | | |
| |||
25 | 39 | | |
26 | 40 | | |
27 | 41 | | |
28 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
29 | 45 | | |
30 | 46 | | |
31 | 47 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
22 | 49 | | |
23 | 50 | | |
24 | 51 | | |
| |||
28 | 55 | | |
29 | 56 | | |
30 | 57 | | |
31 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
32 | 61 | | |
33 | 62 | | |
34 | 63 | | |
| |||
0 commit comments