Home Forums Chart Support indexLabelFormatter newline character?

indexLabelFormatter newline character?

Viewing 2 posts - 1 through 2 (of 2 total)
  • #34463

    Is there any character code I can insert into the return value to insert a line break?

    I have a pie chart with values like
    Bill 23%
    Stephanie 34%

    I would like a line break after the name so the percent always shows on the 2nd line, but because the length of the name varies i cannot use the indexLabelMaxWidth property.

    #34475

    @ebrewer,

    Sorry, line-break is not supported in indexLabel as of now. However you can add multiple space in-between the words to bring it to new-line once it crosses the max-width as shown in this JSFiddle.
    Pie Chart with Indexlabel Wrapped


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.