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

can't load directly in browser version 2.2.1 with chartjs 4.4.3 #89

Closed
jgrayson-apl opened this issue Jun 27, 2024 · 4 comments
Closed

Comments

@jgrayson-apl
Copy link

Trying to use 2.1.1 (and chartjs 4.4.3) via "Load directly in the browser" method and receiving the following browser error:

Uncaught SyntaxError: Cannot use import statement outside a module (at chartjs-plugin-trendline.min.js:17:1)

Is there live example such as a CodePen or similar that we can check out?

@Makanz
Copy link
Owner

Makanz commented Jun 28, 2024

Sounds like I have introduced a bug in the latest version. Thanks for letting me know. I will try to solve it asap.

@jgrayson-apl
Copy link
Author

Thanks for checking as I'd love to use what's already been done instead of trying to do this myself.

@Makanz
Copy link
Owner

Makanz commented Jul 3, 2024

Are you using the cdn/jsdelivr ?
Then try with
https://cdn.jsdelivr.net/npm/chartjs-plugin-trendline/dist/chartjs-plugin-trendline.min.js

@jgrayson-apl
Copy link
Author

Thank you, using that url no longer throws the error so now I can try and figure out the how to use it...

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

2 participants