Skip to content

[v5] Compare: drop shadow markers when zoomed out, and give each shadow a dash pattern - #676

Merged
ldionne merged 1 commit into
llvm:mainfrom
ldionne:v5-compare-shadow-dashes
Nov 19, 2026
Merged

ldionne merged 1 commit into
llvm:mainfrom
ldionne:v5-compare-shadow-dashes

Conversation

@ldionne

@ldionne ldionne commented Nov 19, 2026

Copy link
Copy Markdown
Member

With many tests, the markers on a shadow's line merged into a thick band. The shadows' points now have markers only while at most 200 tests are in view, as on the Graph (GR1), and each shadow gets a dash pattern of its own, shown on its chip, so that the lines stay distinguishable without markers. The Graph's marker rule moves to a shared useMarkers hook.

Fixes #670

…ow a dash pattern

With many tests, the markers on each point of a shadow's line merged
into a thick band. The shadows' points now follow the Graph's rule
(GR1): they have markers only while at most 200 tests are in view, and
zooming in brings them back. A line with a single point keeps its
marker.

Since the markers can no longer tell the shadows apart on their own,
each shadow also gets a dash pattern of its own (solid, dash, dot,
dash-dot, long dash), given by its position like its color and marker.
Its chip shows it as a stroke of its line with the marker on it. The
line stays 1.5px wide, as on the Graph: thinner, the dotted and dashed
lines fade.

The Graph's marker rule moves to chart-markers.ts, as a useMarkers hook
that both charts use, with its helpers renamed to name positions of the
x-axis rather than commits (positionsInView, MARKED_POSITIONS).

Compare's x-axis fits what it plots, and Plotly pads it for markers
only. Not zoomed, a line without markers therefore ends at the plot's
edge, where rounding may put its last point a fraction of a pixel
beyond: counted out of view, it would turn the markers on, which pad
the axis, which turns them off again, without end. positionsInView now
counts a position within half a pixel of an edge as in view. Giving the
x-axis an explicit range instead, as the Graph does, would avoid the
padding, but Plotly then loses part of the user's zoom whenever the
number of tests changes, and a double-click resets to the range of the
first draw, against CP3.

Fixes llvm#670
@ldionne
ldionne force-pushed the v5-compare-shadow-dashes branch from 4ec7df6 to 8e2fbae Compare November 19, 2026 19:26
@ldionne ldionne changed the title [v5] Compare: draw shadows as finer, dashed lines when zoomed out [v5] Compare: drop shadow markers when zoomed out, and give each shadow a dash pattern Nov 19, 2026
@ldionne
ldionne merged commit 12a50e1 into llvm:main Nov 19, 2026
9 checks passed
@ldionne
ldionne deleted the v5-compare-shadow-dashes branch November 19, 2026 19:38
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.

[v5] Compare: Pinning a shadow should use a finer line

1 participant