Is html supported in axis major labels

Is there a possibility to have html in the axis major labels?
I basically want to achieve styling the axes major labels like this:
image

@Nabster No, not currently. The entire plot, including tick labels, is rendered on an HTML raster canvas, which does not support HTML formatting. Making this possible would require rendering individual tick labels as independent, absolutely positioned DOM elements on top of the canvas. It’s not impossible, but woudl be non-trivial, and it also might not be workable at all with some export methods. You could open a GitHub development discussion to propose it as a feature and see if there is any more interest or support for the idea.

You can check this previous post.

With a custom extension you can control each tick label independently when it is rendered, it is really hacky and not robust, but it works.

In that moment I had generated a github issue you can check here

Thanks a lot, this is quite a workaround…
I’m wondering if there is a leaner way of doing this, any tips on that?
I mean extending without copying and maintaining the entire class…

I am not an expert programmer, but it can be done leaner subclassing the categoricalAxis class, though I was not able to do it.

@nghenzi ,
Overriding the TS class is an option as you suggest but wouldnt work from maintenance perspective at the moment.
Thank you for the support!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.