Skip to content

histogram percentile widget#1929

Open
kavigupta wants to merge 1 commit intomainfrom
histogram-percentile
Open

histogram percentile widget#1929
kavigupta wants to merge 1 commit intomainfrom
histogram-percentile

Conversation

@kavigupta
Copy link
Copy Markdown
Owner

No description provided.


export function renderNumberHighlyRounded(x: number, places = 0): string {
const rounded = formatToSignificantFigures(x, 3)
return separateNumber(rounded)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The places parameter is accepted but never used — all callers passing 0, 1, or 2 now silently get the same behavior (3 significant figures via formatToSignificantFigures).

This also changes the display format for existing callers: the old implementation produced compact labels like "1.50k", "2M", "1.50B", while this returns full numbers with thin-space separators (e.g., "1 500 000"). That's a significant visual change on Y-axis tick labels and tooltips.

If this is intentional, the places parameter should be removed to avoid confusion. If not, this may be a regression.

title="Look up percentile"
/>
{showPercentileBox && (
<div
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing alt attribute on this <img> — screen readers won't be able to describe the button. Add something like alt="Look up percentile".

export function renderNumberHighlyRounded(x: number, places = 0): string {
const rounded = formatToSignificantFigures(x, 3)
return separateNumber(rounded)
} No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Missing newline at end of file.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Screenshots merge 247580d84ef2a8d7acc037fae7a6e22475d04695

!updateScreenshots to update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant