我正在尝试使用 Highcharts 显示 x 轴类别标签下方的工具提示值但行不通。我找到了下面的链接,但不起作用。
我现在拥有的是:
xAxis: {
categories: ['7789 - 70', '7877 - 12', '7876 - 12', '7876 - 7', '7877 - 7', '7876 - 20', '7876 - 28', '7875 - 12', '7876 - 129', '7877 - 129'],
labels: {
formatter: function () {
return this.value+'<br>'+'{series.name}';
}
}
}
工作中fiddle
最佳答案
这是一个黑客,但你可以尝试,会尝试找到更好的解决方案并发布
xAxis: {
categories: ['7789 - 70', '7877 - 12', '7876 - 12', '7876 - 7', '7877 - 7'],
labels: {
formatter: function() {
console.log(this.chart.series);
return this.chart.series[0].name;
}
}
}
关于javascript - 如何使用 Highcharts 在 x 轴类别标签下方显示工具提示数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40600899/