Home › forums › Using CanvasJS › Add HTML element in axis label
This topic contains 4 replies, has 2 voices, and was last updated by Vishwas R 7 months, 3 weeks ago.
I need to show and axis labels as HTML elements, something like this
IP: 192.168.1.10 <br>
is there any way I can do this?
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.
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?
Same is the requirement for legend items
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.
You must be logged in to reply to this topic.