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: model.positioner is not a function #23

Closed
sreejithqb opened this issue Jan 15, 2018 · 8 comments
Closed

Uncaught TypeError: model.positioner is not a function #23

sreejithqb opened this issue Jan 15, 2018 · 8 comments

Comments

@sreejithqb
Copy link

Hello thank you for your plugin and latest update.
We have a small problem from 0.2.0 update, after the update we are getting the error and labels are missing from the chart.

**

Uncaught TypeError: model.positioner is not a function
Uncaught TypeError: model.positioner is not a function
at coordinates (chartjs-plugin-datalabels.js:359)
at Object.afterDatasetDraw (chartjs-plugin-datalabels.js:618)
at Object.notify (Chart.min.js:10)
at t.drawDataset (Chart.min.js:10)
at t.drawDatasets (Chart.min.js:10)
at t.draw (Chart.min.js:10)
at t.render (Chart.min.js:10)
at Object.callback (Chart.min.js:10)
at Object.advance (Chart.min.js:10)
at Object.startDigest (Chart.min.js:10)
at Chart.min.js:10
**

@simonbrunel
Copy link
Member

Hi @sreejithqb, sorry for that. Can you build a jsfiddle that reproduces this issue and/or share the page that doesn't work anymore?

@simonbrunel
Copy link
Member

From your stack trace, it doesn't seem to match 0.2.0:

But still 0.1.0:

@sreejithqb
Copy link
Author

Ok. So https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels will not pull the latest version?

@simonbrunel
Copy link
Member

simonbrunel commented Jan 15, 2018

https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels pulls the latest version if it's not cached by the browser but it's definitely not a good practice as warned in the docs and in the jsDelivr docs:

Requesting the latest version (as opposed to "latest major" or "latest minor") is dangerous because major versions usually come with breaking changes. Only do this if you really know what you are doing.

There is nothing we can do on our side, I think clearing your cache will fix the issue. I would recommend you to always use a fully versioned URL in your project in production environments:

https://cdn.jsdelivr.net/npm/[email protected]

@simonbrunel
Copy link
Member

Though, I don't understand why you get this error because even if it still uses 0.1.0 (cached), it should work. But I can't investigate further without a test case that reproduces that issue.

@sreejithqb
Copy link
Author

Thanks Simon. We will check the issue in detail. We are using Angle Theme for Angle. I Think it is a cache issue

@simonbrunel
Copy link
Member

@sreejithqb did you figure out what was the issue?

@sreejithqb
Copy link
Author

Yes Simon. That was an issue with Angle theme caching. Resolved the issue.
Thanks for your help. I am closing this issue

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

2 participants