ZingChart: How do you wrap label, legend, etc. text?

Text overflow can easily be controlled for all text objects in the ZingChart library.

The most direct way is to first set a max-width  for the object in which you want to wrap the text.  Next set, wrapText  to a value of true 

maxWidth: 40,
wrapText: true

However, there are other possibilities as well.  In the demo below we have use 3 different methods to address text length.

  1. Set the object width and the wrapText  attribute

  2. Simply place a <br>  tag within the text string to force a break

  3. Limit the number of characters which will be displayed using the maxChars  attribute. (See the scale labels)

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us