The radial progress bars are driven by the
data-percentage
in each
svg
, and the radius (
r
) of its child
circle.complete
. The percentage is then calculated into the overall circumference (2πr) of the circle, and then spits out the value in
stroke-dashoffset
.
Each infographic will individually animate on scroll. The animation begins once the svg is approximately 25% into the window.
For a no JavaScript option, the
stroke-dashoffset
is manually inline-styled for each
circle.complete
. The JavaScript removes the inline styling, automatically calculates the value, and then spits it back out in a smooth transition.