I'm new to d3. I've been looking everywhere for an example of how to do this. But essentially, I created a bunch of d3-annotations on an svg, pointing to various x,y coordinates. My project is a mapping project, so I created a zoom function as such:
d3
.zoom()
.scaleExtent([1, 100])
.on('zoom', event => {
g1.attr('transform', event.transform);
})
This works great for scaling up the map and the circles I've added to the map separately. However the annotations also grow equally large. How can I "transform" or "scale" the map / group (g) such that the annotations continue to point at the proper locations, but the rendered annotation doesn't also get significantly large with it.