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

Unremovable white border around line chart #9663

Closed
danielcolinjames opened this issue Sep 20, 2021 · 2 comments · Fixed by #9716
Closed

Unremovable white border around line chart #9663

danielcolinjames opened this issue Sep 20, 2021 · 2 comments · Fixed by #9716

Comments

@danielcolinjames
Copy link

Expected Behavior

Chart has no border around it when the correct option flags for hiding it are enabled.

Current Behavior

When resizing the window, a thin white border line appears.

Steps to Reproduce

  1. Visit: https://codepen.io/dcj/pen/oNwqmVo?editors=0110
  2. Resize browser window width
  3. See thin white border appear between the chart and the div underneath it

Context

I'm using Chart.js with a React wrapper (react-chartjs-2) and trying to make the chart disappear seamlessly into the div underneath it. There is more context documented here, and here. I also tried using Chart.js directly (without the React wrapper) and that makes the line go away on the first load, but then it appears again when resizing the browser window.

Environment

@kurkle
Copy link
Member

kurkle commented Sep 20, 2021

Couple of notes:

I think it would be best to let user override or disable this automatic padding.

Edit: A pen with the notes applied

@danielcolinjames
Copy link
Author

Thanks for your detailed answer and for linking to this from the new PR @kurkle! 🙌 I'm wondering, is this new option (and new options in general) something that should get picked up automatically when using the React wrapper (react-chartjs-2), or would the maintainers of that library have to add that functionality manually? Sorry, I'm not entirely sure how wrappers like that work, and no worries if you don't know the answer.

Thanks again, really appreciate your hard work on this amazingly powerful library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants