Legible labels on dense sunburst chart

393 views
Skip to first unread message

John Williams

unread,
May 1, 2013, 11:11:40 AM5/1/13
to d3...@googlegroups.com
I am building a densely-packed sunburst chart (not unlike http://bl.ocks.org/mbostock/4063423), and I need to add labels to it. There are a lot of examples of this, but the examples tend to put the labels inside each arc and they rapidly become illegible. 

What I'd like to do is a kind of force-directed layout on the labels, with lines drawn from the labels to the centroids of each sunburst arc, but I haven't seen any examples of this. Has someone tried force-directed layout of labels combined with more rigid charts, like pie charts sunbursts?

I'm also open to other layout suggestions other than "don't use a sunburst" and "don't show all the labels," both of which are (unfortunately) hard requirements. I'm sympathetic to those suggestions, but can't do anything about them. 

Chris Viau

unread,
May 1, 2013, 12:59:57 PM5/1/13
to d3...@googlegroups.com
If the labels are very dense, even a relaxed constraint positioning will be hard to achieve, like this example but in polar space: http://bl.ocks.org/syntagmatic/4054247 If you want guaranteed visibility, one trick would be to list the labels on each side and then draw a link to each wedge.


--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Williams

unread,
May 1, 2013, 2:10:54 PM5/1/13
to d3...@googlegroups.com
That's actually really helpful -- I had not seen the "relaxed constraints" example before. Placing the labels in columns to either side is also an interesting idea, and I'll float that one as well. 

John Williams

unread,
Sep 24, 2013, 2:22:26 PM9/24/13
to d3...@googlegroups.com
Thought I'd update this thread -- we eventually went with constraint relaxing and (thankfully) pruning the labels. I put together another example ( http://bl.ocks.org/thudfactor/6688739 ) showing label placement in two dimensions. The routine is still pretty basic -- what we actually went with was complicated by quite a few more constraints -- but I hope this will help someone.
Reply all
Reply to author
Forward
0 new messages