Home Forums Chart Support Add HTML element in axis label

Add HTML element in axis label

Viewing 7 posts - 1 through 7 (of 7 total)
  • #19795

    I need to show and axis labels as HTML elements, something like this

    IP: 192.168.1.10 <br>
    Location: Mumbai

    is there any way I can do this?

    #19797

    @himanshu_tanwar,

    HTML tags are not supported in labels as of now. Instead, you can use labelMaxWidth property of axisX/axisY to wrap the label once the label-width reaches the specified max-width.

    Please take a look at this jsfiddle.


    Vishwas R
    Team CanvasJS

    #19798

    @Vishwas,

    That does not fulfil the requirement, setting the maxWidth does not allow me to break the text at a specific point.
    Moreover I cannot make any specific section of the label to be bold.

    Is there any workaround for this or can HTML labels be supported anytime shortly?

    #19799

    Same is the requirement for legend items

    #19806

    @himanshu_tanwar,

    Sorry, as of now html tags are not supported except in toolTip, take a look at toolTipContent for the same. It’s there in our features wishlist, but there is no definite timeline.


    Vishwas R
    Team CanvasJS

    #34284

    Hi

    Is there any update on this?

    #34297

    @myezasifiso,

    HTML tags are not supported in axis labels. As addressed in previous reply, if you like to break word into multiple lines you can use labelMaxWidth. If you like to add symbols in labels, you can use unicode characters. Please take a look at this thread for more information.
    Unicode in Legend

    If this doesn’t fulfill your requirements, kindly brief us more about your requirements so that we can understand it better & try to help you achieve the same.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.