Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.9] Versatile clipping for lines #6660

Merged
merged 1 commit into from
Oct 31, 2019
Merged

[2.9] Versatile clipping for lines #6660

merged 1 commit into from
Oct 31, 2019

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented Oct 31, 2019

This PR changes the default clipping so it will clip at chartArea edge, if the scale defining that edge is limited at that end (by ticks.min/ticks.max). If min/max is not defined, the current clipping rules apply (borderWidth / 2 outside chartArea)

Overriding this clipping is also allowed per dataset:

clip: 10 // would clip 10px outside chartArea on each edge
clip: -10 // would clip 10px inside chartArea on each edge
clip: false // would not clip
clip: 0 // would clip to chartArea
clip: { left: 10, right: -10, top: false, bottom: 0) // per edge config

Fixes: #6631

@etimberg etimberg merged commit fa1d329 into chartjs:2.9 Oct 31, 2019
etimberg pushed a commit that referenced this pull request Nov 2, 2019
@kurkle kurkle deleted the clip-2.9 branch November 13, 2019 06:10
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
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.

3 participants