Chartjs-Leaflet polygon display charts after click

1👍

You probably want to use onEachFeature

function countryFunc(feature, layer){
  layer.on('click', function(){
    // console.log(feature);
    /* get your chart now */
  });
}
const country = L.geoJson(data, {style: style, onEachFeature:countryFunc}).addTo(map);

Leave a comment