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

Problem with Dataset #9

Closed
jhoelzl opened this issue Dec 16, 2019 · 4 comments
Closed

Problem with Dataset #9

jhoelzl opened this issue Dec 16, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jhoelzl
Copy link
Contributor

jhoelzl commented Dec 16, 2019

Hello, i am using the Europe map and your example to have a dataset with random values for all countries which works fine: https://codepen.io/sgratzl/pen/mdyENoX

However, when i want to define values on my own, the map gets empty. I just replace the line

 data: countries.map((d) => ({feature: d, value: Math.random()})),

by

data: [
        { value: 0.4, feature: Germany },
        { value: 0.3, feature: Austria }
      ]

as written in section "Data Structure" in the README.md (https://github.com/sgratzl/chartjs-chart-geo).

@jhoelzl jhoelzl added the bug Something isn't working label Dec 16, 2019
@sgratzl sgratzl self-assigned this Dec 16, 2019
@sgratzl
Copy link
Owner

sgratzl commented Dec 16, 2019

I'm playing with https://codepen.io/sgratzl/pen/qBEqNpJ and got no problem so far, can you elaborate how you came to Germany and Austria?

@jhoelzl
Copy link
Contributor Author

jhoelzl commented Dec 16, 2019

Germany and Austria are countries within Europe (https://raw.githubusercontent.com/deldersveld/topojson/master/continents/europe.json).

@sgratzl
Copy link
Owner

sgratzl commented Dec 17, 2019

I adopted https://codepen.io/sgratzl/pen/mdyENoX?editors=0010 and it works as expected

@jhoelzl
Copy link
Contributor Author

jhoelzl commented Dec 17, 2019

Thank you!

@jhoelzl jhoelzl closed this as completed Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants