chart = {
const context = DOM.context2d(width, height);
const path = d3.geoPath(null, context).projection(projection);
context.canvas.style.maxWidth = "100%";
context.lineJoin = "round";
context.lineCap = "round";
context.beginPath();
path(italyBorders);
context.fillStyle = '#f9f9f9'
context.fill();
context.beginPath();
path(subRegionBorders);
context.lineWidth = 0.5;
context.strokeStyle = "#aaa";
context.stroke();
context.beginPath();
path(regionBorders);
context.lineWidth = 1;
context.strokeStyle = "#888";
context.stroke();
context.beginPath();
path(italyBorders);
context.lineWidth = 1;
context.strokeStyle = "#000";
context.stroke();
context.save();
for (const gasStation of selectedGasStations) {
const point = gasStation.point
const detail = gasStation.pricesMap?.get(fuelType)?.get(isSelf)
context.beginPath();
context.moveTo(point[0], point[1]);
context.arc(point[0], point[1], 1.5, 0, 2 * Math.PI);
context.fillStyle = detail ? colorScale(priceAccessor(detail)) : 'none';
context.fill();
}
context.restore()
return context.canvas;
}