The code uses plotly.js. At the time of writing this, the current version was 2.33.0. It should be updated if there are significant bug fixes or security issues.
To reduce the size of the Javascript, we generate a custom bundle only supporting the scatter plot functionality:
npm i plotly.js
cd node_modules/plotly.js
npm i
npm run custom-bundle -- --out scatter --traces scatter --strict
--strict should improve compatibility with CSP.
plotly.js is not fully compatible with a strict Content Security Policy.
- style-src: 'unsafe-inline' is required to allow CSS modifications.
- img-src: blob: is required for PNG image exports.