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

cannot read property 'map' of undefined #2115

Closed
sourcecodenepal opened this issue Mar 10, 2016 · 4 comments
Closed

cannot read property 'map' of undefined #2115

sourcecodenepal opened this issue Mar 10, 2016 · 4 comments

Comments

@sourcecodenepal
Copy link

I am getting this error. Is this because of jquery conflict? or am I doing something nasty in code?
untitled

@dibsyjr1
Copy link
Contributor

I don't think you need to do window.myBar, try just:

myBar = new Chart(ctx1, { type: 'bar', data: barChartData1, options: options }

@etimberg
Copy link
Member

@sourcecodenepal can you post a JSFiddle for this?

@etimberg etimberg added the v2.x label Mar 10, 2016
@UnnarThorBachmann
Copy link

Have you tried putting this inside
windows.onload = function () {

}?

@etimberg
Copy link
Member

I looked up all the uses of map inside of the source.

Does your data object have a labels array? It should also needs to have a dataset array. For a bar chart, this should only happen if the datasets array does not exist which is an error. I pushed a fixed in #2186 that better handles this case.

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

4 participants