jqplot-轴标签中的上标 [英] jqplot - superscript in axis label

查看:88
本文介绍了jqplot-轴标签中的上标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,如何在jqplot图形的轴标签上添加上标字体?

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

我尝试使用Javascript sup()函数以及实际的html标签作为轴的标题,但是没有用.

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

基本上我需要显示m 3 等单位.我是否必须修改AxisLabelRenderer或我缺少任何明显的解决方法?

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?

谢谢.

推荐答案

您可以使用unicode字符;

You can use unicode characters for do that;

  1. 上标二"(\ u00B2)(2)
  2. 上标三"(\ u00B3)(³)
  3. 上标一"(\ 00B9)(¹)

尝试一下:

      xaxis: {
      label: "Units m\u00B3"
      },

这篇关于jqplot-轴标签中的上标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆