How To Stop Text Transitioning Off The Screen
I have a visual of a two ringed pie chart. What I'm building is the following: - if a sector's radians are too small for the specified text then the text is hidden. This is done
Solution 1:
When you initially position them you are transforming the text
elements. When you transition them you are positioning the outer g
elements. These causes conflicting transforms. Use:
arcs2.data(partition.nodes)
.select('text') //<-- apply on child text
.transition()
.duration(3500)
.attr("transform", function(d) {
...
});
Updated plunker.
Post a Comment for "How To Stop Text Transitioning Off The Screen"