0

I've been trying to draw a network of streets. I used paths and images to perform this as you guys can see in the image : enter image description here

I am also displaying labels on top of the images with some information about them. The problem is that the data source sometimes has overlapping traffic lights in the same coordinate. And as a result of that the labels get overlapped. I was wondering what's the best way to handle those overlaps in d3 v5? I've found some similar questions but none of them seem to work in d3 version 5.

This is one question that I looked at : D3js: Automatic labels placement to avoid overlaps? (force repulsion)

I guess I am looking for something similar, but something that would work with version 5?

  • 2
    You tried running the arrangeLabels function in the example you linked to? I didn't spot anything in it that would prevent it from running in v5. – rguttersohn Jul 20 '20 at 15:53
  • I get an error when I copy the full example with the overlap logic. It says "export 'transform' (imported as 'd3') was not found in 'd3'" – Mohammad Al-Huneidi Jul 20 '20 at 18:01

0 Answers0