When the data range is very narrow, the auto-formatted tick labels lose precision and show duplicate values.
Example: Y-axis data ranges from 35.00 to 35.12. With the default one-decimal format, the ticks render as:
The first two ticks are indistinguishable (both show "35.0" but represent different values like 35.00 and 35.04). The third and fourth are also duplicates.
Expected: The formatter should detect when adjacent tick values would produce the same label and increase precision:
35.00
35.03
35.06
35.09
35.12
Suggested fix: In Axis.autoRange() or the tick formatting logic, after computing tick values, check if any adjacent ticks format to the same string. If so, increase the decimal places until all labels are unique, or base the format on the tick interval size (e.g., interval < 0.1 → use 2 decimals, interval < 0.01 → use 3 decimals).
Discovered while charting Autobench Single Core values in h5m (range ~35.0 to ~35.1).
When the data range is very narrow, the auto-formatted tick labels lose precision and show duplicate values.
Example: Y-axis data ranges from 35.00 to 35.12. With the default one-decimal format, the ticks render as:
The first two ticks are indistinguishable (both show "35.0" but represent different values like 35.00 and 35.04). The third and fourth are also duplicates.
Expected: The formatter should detect when adjacent tick values would produce the same label and increase precision:
Suggested fix: In
Axis.autoRange()or the tick formatting logic, after computing tick values, check if any adjacent ticks format to the same string. If so, increase the decimal places until all labels are unique, or base the format on the tick interval size (e.g., interval < 0.1 → use 2 decimals, interval < 0.01 → use 3 decimals).Discovered while charting Autobench Single Core values in h5m (range ~35.0 to ~35.1).