如何删除工具提示中的数字

时间:2018-11-29 13:35:06

标签: javascript highcharts

我想删除工具提示中的一个选项,我不知道它是否可能 我有一个设置所有图表参数的函数。我想我需要把它放在这里:

Highcharts.setOptions({
    lang: {
        numericSymbols: null
    },
    tooltip: {
        valueDecimals: 2

        }
    }
});

我要删除此处显示为0的工具提示部分。

So you can see the infobubble appear when i put my cursor on a bar. i want to remove the number 0, he change in accordance with xAxis

谢谢

1 个答案:

答案 0 :(得分:1)

像这样从工具提示中删除标题文本:

Highcharts.setOptions({
  tooltip: {
    headerFormat: null,
    ...
  },
  ...
});

headerFormat上的API https://api.highcharts.com/highcharts/tooltip.headerFormat