I have radios aligned on an arch.
I would like to add a transition that slides the selected inner blue dot along the arch to the newly selected radio.
I have a working demo setup. WORKING DEMO
See a solution in the fiddle (click on the blue button):
Just put the button in a "g" and rotate it with transition:
const button = d3.select("#button");
let angle = 60;
button.on("click", () => {
angle = -angle;
button.transition().duration(1000).attr("transform", `translate(${cX}, ${cY}) rotate(${angle})`);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With