0

I've created a sunburst chart following the example at http://strongriley.github.io/d3/ex/sunburst.html:

enter image description here

Everything fine, also when attaching text to the chart (via text and textPath element using an xlink:href attribute that points to the ID of an arc). Same when animating (open / close effect) the chart without the attached text (as on the example). As long as the text is attached however the animation slows down (dragging behavior). This happens only on iPad but not on Desktop. I thought it was because of the webkit of the tablet. Maybe I'm missing something.

NOTE: since the text is attached to the arc, no transition is applied to the text element only the path is animated using the following:

path
  .data(partition.value(val))
  .transition().duration(1500).attrTween("d", arcTween);

Using this approach the text (attached) to the path animates smoothly on web but not on iPad.

VividD
  • 10,456
  • 6
  • 64
  • 111
mdc
  • 1
  • Animating textPaths is pretty expensive, I don't think there's any way you can get this to play out smooth on an iPad. I'd suggest foregoing animation on the iPad. – methodofaction Jun 26 '13 at 18:21
  • Thank for the tip. I'll try removing the textPath (xlink:href). By overlaying the Text (without attaching it to the path) I should be able to drive the effects for text and path separately. – mdc Jun 27 '13 at 08:58

0 Answers0