Repository navigation
[v5] Compare: drop shadow markers when zoomed out, and give each shadow a dash pattern - #676
Merged
Merged
Conversation
…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
force-pushed
the
v5-compare-shadow-dashes
branch
from
November 19, 2026 19:26
4ec7df6 to
8e2fbae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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