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

Does not work with chart.js version 3 #8

Open
techquestions opened this issue Aug 14, 2021 · 3 comments
Open

Does not work with chart.js version 3 #8

techquestions opened this issue Aug 14, 2021 · 3 comments

Comments

@techquestions
Copy link

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?

@shellyln
Copy link
Owner

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:
582974b

out

@bitbytebit1
Copy link

Is it possible for you you release the patch for ChartJs 3?

@shellyln
Copy link
Owner

Hi, @bitbytebit1 .
There are no immediate plans to apply the patch to red-agate/packages/red-agate-svg-canvas.
Please use 582974b .

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

No branches or pull requests

3 participants