filler plugin fill extends past line when offset: true + index scale min/max - #12283
Open
sarathkumarsasi wants to merge 2 commits into
Open
filler plugin fill extends past line when offset: true + index scale min/max#12283sarathkumarsasi wants to merge 2 commits into
sarathkumarsasi wants to merge 2 commits into
Conversation
The fill area is now clipped to match the line stroke's visible bounds ensuring proper rendering when `offset: true` is used
Author
etimberg
reviewed
Aug 7, 2026
etimberg
left a comment
Member
There was a problem hiding this comment.
Would be good to include a test for this as well
Author
Added an image-based test fixture |
etimberg
approved these changes
Aug 7, 2026
Author
Member
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.
Fixes #12280
Root cause: LineController restricts the line's stroke to the index range implied by scales.x.min/max (via _getStartAndCountOfVisiblePoints), but the filler plugin only clipped the fill to the chart's rectangular chartArea, not to that same index-scale range. With offset: true, an out-of-range point's pixel position can still land inside chartArea, so the fill shape kept extending past the point where the line stroke stopped.
Fix: _drawfill now additionally clips to the index scale's min/max pixel bounds (matching what bounds the line stroke), skipping this for radial/circular scales (e.g. radar) where a linear pixel bound doesn't apply.
Example:
Bundle with issue: https://codepen.io/sarathkumarps/pen/BypbpBa
Bundle with the fix: https://codepen.io/sarathkumarps/pen/pvRYNmE