Highcharts工具提示x轴字体大小

时间:2016-05-23 06:57:06

标签: javascript highcharts

来自highcharts api它说我们可以在工具提示中编辑fontsize,但是,这只会编辑值而不是x轴标签。

enter image description here

有没有办法增加5月17日星期二......等等?即x轴标签?

编辑真正的xaxis标签不起作用。

谢谢! :)

1 个答案:

答案 0 :(得分:3)

对于自定义工具提示格式,您可以使用formatter属性来传递返回自定义html的函数。

tooltip: {
        formatter: function () {
            return 'The value for <b>' + this.x +
                '</b> is <b>' + this.y + '</b>';
        }
    }, 
useHTML: true

小提琴here

更多信息here

相关问题