chart = {
const svg = d3
.select(DOM.svg(width, height))
.style("width", "100%")
.style("height", "auto");
const projection = d3.geoAlbers().rotate([126, -10]);
projection.fitSize(
[960, 500],
topojson.feature(health, health.objects.BCHA_HEALTH_AUTHORITY_BNDRY_SP)
);
const path = d3.geoPath().projection(projection);
const color = d3.scaleOrdinal(d3.schemeCategory10).domain([2, 361]);
var feat = topojson.feature(bc, bc.objects.rd).features;
svg
.append("g")
.selectAll("path")
.data(
topojson.feature(health, health.objects.BCHA_HEALTH_AUTHORITY_BNDRY_SP)
.features
)
.enter()
.append("path")
.attr("fill", d => color(d.properties.HLTH_AUTHORITY_CODE))
.attr("d", path);
svg
.append("path")
.datum(topojson.mesh(bc, bc.objects.rd, (a, b) => a !== b))
.attr("fill", "none")
.attr("stroke", "none")
.attr("stroke-linejoin", "round")
.attr("d", path);
return svg.node();
}