sgratzl / chartjs-chart-geo

Chart.js Choropleth and Bubble Maps
https://www.sgratzl.com/chartjs-chart-geo/
MIT License
338 stars 36 forks source link

Choropleth doesn't appear #195

Closed MalcolmBrt closed 11 months ago

MalcolmBrt commented 11 months ago

I can't get my choropleth map to appear in my canvas. I must surely be wrong somewhere but I don't know where, I copied line for line an example that worked with the map of the United States. I think I'm doing something wrong but I can't figure out what.

Screenshots / Sketches https://codepen.io/MalcolmBrt/pen/PoXeWdX

Context

sgratzl commented 11 months ago

the default projection is albersUsa which is optimized for showing the US. You have to specify a different projection method like

scales: {
        projection: {
          axis: 'x',
          projection: 'equalEarth',
        },
}
MalcolmBrt commented 11 months ago

Thanks, it works. So many hours wasted just because of that 😭