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

Unable to use Charts.js 2.7.0 as it requires CSP style directive unsafe-inline #161

Open
anand-bhat opened this issue Jan 9, 2018 · 0 comments
Labels
Milestone

Comments

@anand-bhat
Copy link
Owner

Site currently uses 2.6.0 and CSP style directive unsafe-inline is not allowed. However, upgrading to 2.7.0 or 2.7.1 (latest at this time) causes a CSP violation. This causes the chart not to appear.

chartjs/Chart.js#4591 introduced in 2.7.0 appears to be injecting CSS and causing the breakage --
<style type="text/css">/* Chart.js */ @-webkit-keyframes chartjs-render-animation{from{opacity:0.99}to{opacity:1}}@keyframes chartjs-render-animation{from{opacity:0.99}to{opacity:1}}.chartjs-render-monitor{-webkit-animation:chartjs-render-animation 0.001s;animation:chartjs-render-animation 0.001s;} </style>

I'll be retaining the library at 2.6.0 until I find a resolution for this or use a different library. Enabling unsafe-inline is not an option.

@anand-bhat anand-bhat added the bug label Jan 9, 2018
@anand-bhat anand-bhat added this to the Core milestone Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant