chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height]);
svg.append('g')
.selectAll('path')
.data(countries.features)
.enter()
.append('path')
.attr('d', path)
.attr('stroke', '#fff')
.attr('stroke-width', 0.5)
.attr('fill', d => {
if (label.includes(d.properties.name))
{ return 'green' }
else
{ return '#E0E0E0' }
})
return svg.node();
}