svg text wrapping issues

The drawTick() function is calling another function called wrap() to plot the text. As might be suggested by that name, wrap() is splitting the input text into words and wrapping it onto a new line if it gets wider than the width you pass in.

The width value is the “30” in the following line:


Try changing it to something bigger so that it doesn’t wrap so soon. 180 seems to be about the right value.

Browse More Popular Posts

Leave a Comment