How to draw paths for the islands in world map using d3.js

199 views Asked by At

I am facing an issue while doing d3.js maps, the issue is every country I am able to fill the color but coming to islands I am unable to see the islands places

    attr("stroke", function(d){
                    console.log("stroke",d.properties.name_sort)
                var s = d.properties.name_sort+"";
                if(s.includes("Islands")){
                  return "#FF0000";
                }
              return "#fff";
              })
              .attr("stroke-width", function(d){    
                var s = d.properties.name_sort+"";        
                if(s.includes("Islands")){ 
                  return 2;
                }
              return 0.1;
              })
 

please observe the image when I hard code it

0

There are 0 answers