如何在高图表甘特图的工具提示中显示依赖项的数据?



将鼠标悬停在高图表甘特图的每个条形上后,如何在工具提示中显示依赖项的数据(如标题(?而且,在这种情况下,我想隐藏依赖项箭头,只在工具提示中显示它们的标题。

您应该能够使用tooltip.formatter回调函数来实现它。

以下是指南: https://jsfiddle.net/BlackLabel/qcgmjuvo/

tooltip: {
formatter(tooltip) {
let output = tooltip.defaultFormatter.call(this, tooltip),
customText = this.point.options.customTooltipText;
if (customText) {
output.push(`<br><span>${customText}</span>`);
}
return output
}
},

API:https://api.highcharts.com/highcharts/tooltip.formatter

最新更新