I am currently working on creating an animated SVG pie chart. The setup involves two SVG elements, where the first element is given a border-radius
of 50%
, and the second element is a circle that is filled up to a specific value. This results in one circle appearing above another circle, both having identical dimensions.
However, there seems to be some sort of SVG aliasing issue that is proving difficult to eliminate. This aliasing is quite noticeable on the top, left, bottom, and right "corners" of the circle, particularly when viewed on Google Chrome.
Below is the snippet of the HTML code:
<figure id="pie" data-percentage="60">
<div class="receiver"></div>
<svg width="200" height="200" class="chart" shape-rendering="geometricPrecision">
<circle r="50" cx="100" cy="100" class="pie" shape-rendering="geometricPrecision"/>
</svg>
</figure>
You can also refer to my codepen link for a more detailed insight into the problem. I have explored several solutions, including utilizing the shape-rendering attribute in SVG, but unfortunately, the issue persists.
Additionally, here is a screenshot showcasing the aliasing problem, although it may not be as pronounced as displayed in the codepen (at least from my perspective):