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

chartjs-chart-financial example doesn't work with chart.js version 3.8.0 and above #10665

Closed
Arantiryo opened this issue Sep 12, 2022 · 3 comments

Comments

@Arantiryo
Copy link

Expected behavior

chartjs-chart-financial example should work with the latest Chart.js version.

Current behavior

The following error message is displayed:

TypeError
String.prototype.toString requires that 'this' be a String
isPatternOrGradient
https://ejif5i.csb.app/node_modules/chart.js/dist/chunks/helpers.segment.js:1851:24
color
https://ejif5i.csb.app/node_modules/chart.js/dist/chunks/helpers.segment.js:1857:10
Animation.color [as _fn]
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:472:39
Animation.tick
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:542:31
eval
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:376:16
Animator._update
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:362:18
eval
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:353:12
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
This error overlay is powered by `react-error-overlay` used in `create-react-app`.

Reproducible sample

https://codesandbox.io/s/elegant-cache-ejif5i?file=/src/index.js

Optional extra steps/info to reproduce

No response

Possible solution

Looks like isPatternOrGradient helper function has been changed in v3.8.0 as the example works just fine with v3.7.1.
Error is thrown when a Proxy object is passed to isPatternOrGradient so updating isPatternOrGradient to handle this use case should solve the issue.

Context

No response

chart.js version

v3.9.1

Browser name and version

No response

Link to your project

No response

@etimberg
Copy link
Member

This issue should probably be moved to https://github.com/chartjs/chartjs-chart-financial/issues

@LeeLenaleee
Copy link
Collaborator

There is already an open issue for this: chartjs/chartjs-chart-financial#128

@Arantiryo
Copy link
Author

Oh, I see. Thank you, I'll close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants