Does not work with chart.js version 3
After upgrading chart.js to 3.5.0 (latest version as of today), the build runs fine but this is what I get after running start:
> [email protected] start
> npm run start:wp
> [email protected] start:wp ~/chart.js-node-ssr-example
> node bin/index.js
~/chart.js-node-ssr-example/bin/index.js:2
# removed lots of meaningless output
Error: "linear" is not a registered scale.
at Object._get (~/chart.js-node-ssr-example/bin/index.js:2:140751)
at Object.getScale (~/chart.js-node-ssr-example/bin/index.js:2:139996)
at ~/chart.js-node-ssr-example/bin/index.js:2:149372
at R (~/chart.js-node-ssr-example/bin/index.js:2:41146)
at ys.buildOrUpdateScales (~/chart.js-node-ssr-example/bin/index.js:2:149168)
at ys.update (~/chart.js-node-ssr-example/bin/index.js:2:151091)
at new ys (~/chart.js-node-ssr-example/bin/index.js:2:147717)
at ~/chart.js-node-ssr-example/bin/index.js:2:225927
at Object.717 (~/chart.js-node-ssr-example/bin/index.js:2:226036)
at i (~/chart.js-node-ssr-example/bin/index.js:2:226123)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start:wp: `node bin/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:wp script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2021-08-14T15_18_58_083Z-debug.log
Could you please take a look at this?
Hi, @techquestions
Thank you for your report.
linear is not ... error seems to be caused by a change in the way 3.x setup.
https://www.chartjs.org/docs/latest/getting-started/v3-migration.html
Also, the method resetTransform() of the SvgCanvas object is missing.
The changes to SvgCanvas have not been made yet, but the following commits have made it possible to render:
https://github.com/shellyln/chart.js-node-ssr-example/commit/582974b4903636d5a327eee13c1693f1ff4550d8

Is it possible for you you release the patch for ChartJs 3?
Hi, @bitbytebit1 .
There are no immediate plans to apply the patch to red-agate/packages/red-agate-svg-canvas.
Please use https://github.com/shellyln/chart.js-node-ssr-example/commit/582974b4903636d5a327eee13c1693f1ff4550d8 .