I have an svg node with polygon objects which have 2px stroke and sometimes depends on the polygon coordinates some parts of the stroke become more thicker than other, after some research i think it is due to antialiasing and the fixes that are recommended is to use shape-rendering="crispEdges" and vector-effect='non-scaling-stroke' css proprieties, but it didn't work out for me, stroke still is inconsistent as it was stroke example, what should i do to make a consistent 2px stroke at any coordinates in my svg node?
im using ReactJS + d3.js library here is parts of the code for svg component:
<svg
ref={svgRef}
width={"100%"}
height={"100%"}
className={"svg-canvas"}
viewBox={[0, 0, 1280, 768]}
preserveAspectRatio={"none"}
>
<g className='zones'>
{selectedTerritoryData
.sectors
.filter((zone) => {
if (isEditing || isEditingCards) {
return true;
} else if (zone.isRegistered) {
return true;
}
return false;
})
.map((zone) => (
<Zone key={getReactKey("zone")} zone={zone} />
))
}
</g>
</svg>