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

Uncaught TypeError: expando is undefined #424

Open
denis-migdal opened this issue Nov 16, 2024 · 0 comments
Open

Uncaught TypeError: expando is undefined #424

denis-migdal opened this issue Nov 16, 2024 · 0 comments

Comments

@denis-migdal
Copy link

Related to #69

Error message:

Uncaught TypeError: expando is undefined
    beforeUpdate chartjs-plugin-datalabels.esm.js:1233
    callback helpers.segment.js:79
    _notify chart.js:5096
    notify chart.js:5079
    notifyPlugins chart.js:6361
    update chart.js:5899

Reproductive example:
https://github.com/denis-migdal/ChartsHTML/tree/d45f9c3dc1336d1f1a6d7d3836f98d1b46fe05c2
Clone, start a Web server on the root, then open a web browser on /dist/dev/pages/playground/?example=js-datalabels

When you initially have:

plugins: {
					datalabels: false,
					//...
}

Update the graph, and then change it to :

plugins: {
					datalabels: {/*...*/},
					//...
}

It might cause the issue.

I am aware that doing datalabels: false is bad, and we should do datalabels: { display: false }.

But as it produces bug others had, I think this might help finding the cause of their issues.

On another note, could be nice to have a {enable: boolean} option like other Chart.js plugins.

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

1 participant