Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqplot - superscript in axis label

As the title says how do I add superscript fonts to the axis labels in a jqplot graph?

I tried using Javascript sup() function and also actual html tags for the titles of the axes but to no vain.

Basically I need to display units like m3 etc. Do I have to tinker with the AxisLabelRenderer or is there any obvious workaround I am missing?

Thanks.

like image 258
Siva Avatar asked Nov 16 '25 21:11

Siva


1 Answers

You can use unicode characters for do that;

  1. "Superscript two"(\u00B2) (2)
  2. "Superscript three" (\u00B3) (³)
  3. "Superscript one" (\00B9) (¹)

try this:

      xaxis: {
      label: "Units m\u00B3"
      },
like image 144
iJay Avatar answered Nov 19 '25 14:11

iJay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!