Home Forums Chart Support newline in labels

newline in labels

Viewing 4 posts - 1 through 4 (of 4 total)
  • #25742

    Hi! Could I ask for help with inserting newline in labels?
    The <br/> seems to work on the tooltip, but they still display as one big line on the axis label.

    jsfiddle

    Thank you in advance!

    #25756

    @jeremylee,

    HTML tags are not supported in title, labels and other elements except toolTip, as of now. However to break the axis label, you can set labelMaxWidth property which wraps the axis labels if width of labels exceeds the max-width of it.

    Setting axisX labelMaxWidth in chart

    ___________
    Indranil Deo
    Team CanvasJS

    #34098

    Bummer, especially for column charts the ability to control this visual aspect would be nice.
    I can’t use labelMaxWidth because its globally set on Axis (doesn’t work on dataPoints individually) and different dataPoints have different text lengths.

    #34116

    @ebrewer,

    Sorry, adding a line break to axis labels is not available as of now.

    ___________
    Indranil Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.