Skip to content

Conversation

@kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Dec 14, 2022

This builds on PR #4 and can be rebased when #4 is merged, but ChartJS uses ".clearRect()" to clear the charting area, but the SvgCanvas was incorrectly setting the fill to "white" instead of "transparent", but canvas are supposed to be transparent by default, causing any charts to render with a white background irrespective of the document background. It doesn't work as a general purpose solution, because the SvgCanvas "stacks" the calls to the canvas, meaning that clearRect wouldn't work in general purpose use cases, but does for ChartJS, therefore it can't really be upstreamed.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can now use charts in non white background. Looks like a nice improvement. Thanks! LGTM 👍

BEFORE
スクリーンショット 2022-12-20 19 53 49

AFTER
スクリーンショット 2022-12-20 19 53 38

@kt3k kt3k merged commit ef469b8 into denoland:main Dec 20, 2022
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.

2 participants