You must be logged in to post your query.
Home › Forums › Chart Support › Add HTML element in axis label
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.
Is there any update on this?
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.
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.
You must be logged in to reply to this topic. Login/Register