fix: clamp vertical marker stacks at the canvas edge - #262
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Blocker resolvedMerged current The integrated tree was revalidated before pushing:
No functional review findings remain. |
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.
What
"vertical"marker column is now also capped where the next glyph would cross the canvas edge, not just atmaxVisible.maxVisible); the base glyph always draws.Bugs fixed
maxVisiblecaps the glyph count but not the geometry, so a short cap on a tall chart still let edge-anchored columns escape.Why bounds live on
ClusterMarkersOpts, notMarkerClusterConfig0/canvasHeight, the clamp is always-on, andClusterMarkersOptsstays unexported — no public API change.Why canvas bounds, not plot-area bounds
[0, canvasHeight], so a stack may still enter the axis gutters — glyphs stay fully visible, which is the bug being fixed; clamping to the padded plot rect would hide more than necessary.Why the base slot always draws (cap floor of 1)
Test plan
npm run verifygreen (typecheck, lint, 99 suites / 1502 tests); the pre-commit hook re-ran the tests on commit.markerClustertests: fit math foraboveandbelowcolumns, cap floor of 1 with negative room, min(maxVisible, bounds cap) in both directions, pass-through when a bound is missing, and the step-0 (overlap: 1) guard. Existing tests pass unmodified (bounds omitted = behavior-identical).🤖 Generated with Claude Code