Sorry if this topic has already been discussed here.
I am trying to find the way to make a chart title with sup- and sub-indexies inside.
It should be something like "12C scattering angle" in HTML format.
Is any solution? Please, give an example...
thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The actual text of the chart title. It can contain basic HTML text markup like &tl;b>, &tl;i> and spans with style. Defaults to "Chart title".
I believe Highcharts parses this text and transforms these "basic HTML text markup" to specific SVG (or equivalent) code.
Indeed, if I call:
.setChartTitleText("Daily visits at <b>w</b>w<i>w</i>.highcharts.com")
I see the following SVG:
<textx="500"y="25"style="font-family:[...];font-size:16px;color:#3E576F;fill:#3E576F;"text-anchor="middle"class="highcharts-title"zIndex="4"><tspanx="500">Daily visits at </tspan><tspanstyle="font-weight:bold"dx="3">w</tspan><tspandx="3">w</tspan><tspanstyle="font-style:italic"dx="3">w</tspan><tspandx="3">.highcharts.com</tspan></text>
So this basic HTML is interpreted and translated to SVG, VML or Canvas instructions, and it seems that more sophisticated / rare tags like sub or sup are not handled.
Note that if all you have to display are superscript and subscript digits, you can use the corresponding Unicode characters: \u2070 is SUPERSCRIPT ZERO, \u2080 is SUBSCRIPT ZERO, and so on.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry if this topic has already been discussed here.
I am trying to find the way to make a chart title with sup- and sub-indexies inside.
It should be something like "12C scattering angle" in HTML format.
Is any solution? Please, give an example...
thanks in advance.
The setChartTitleText() method's JavaDoc says:
I believe Highcharts parses this text and transforms these "basic HTML text markup" to specific SVG (or equivalent) code.
Indeed, if I call:
I see the following SVG:
So this basic HTML is interpreted and translated to SVG, VML or Canvas instructions, and it seems that more sophisticated / rare tags like sub or sup are not handled.
Note that if all you have to display are superscript and subscript digits, you can use the corresponding Unicode characters: \u2070 is SUPERSCRIPT ZERO, \u2080 is SUBSCRIPT ZERO, and so on.
thanks a lot...