Option 1: In ggplot2, ggrepel fixes this. I'll search for something similar for d3, or else try to copy their algorithm.
Option 2: Maybe I can try a simple approach, like moving labels to the left or up or down until they no longer conflict, and drawing a line if the label moves too far from the point.
Option 3: Do simple things, and if it fails just give up and either (a) leave a mess or (b) don't draw the label.
Option 1: In
ggplot2
,ggrepel
fixes this. I'll search for something similar for d3, or else try to copy their algorithm.Option 2: Maybe I can try a simple approach, like moving labels to the left or up or down until they no longer conflict, and drawing a line if the label moves too far from the point.
Option 3: Do simple things, and if it fails just give up and either (a) leave a mess or (b) don't draw the label.