Rotate label around anchor

I am trying to draw a chord diagram. Essentially I want to draw this: https://observablehq.com/@d3/hierarchical-edge-bundling

I have a scatter plot with the nodes drawn in a circle. I’m trying to rotate the labels around its anchor point, but I can only figure out how to anchor the text box and rotate the text within the box.
Is it possible to rotate the label around it’s anchor as seen in the d3 example above?