自定义标记点上的Highcharts工具提示,并在其他点上显示默认工具提示
我有一个Highcharts折线图,并启用了工具提示。自定义标记点上的Highcharts工具提示,并在其他点上显示默认工具提示,highcharts,tooltip,Highcharts,Tooltip,我有一个Highcharts折线图,并启用了工具提示。 如何仅为带有标记的点自定义工具提示,并使所有其他点显示默认工具提示。我需要在工具提示中为具有标记的点添加额外的文本。我已经想出了如何做到这一点: tooltip :{ formatter: function(a) { if(condition) return "custom tooltip for the marker point"; //otherwise call the
如何仅为带有标记的点自定义工具提示,并使所有其他点显示默认工具提示。我需要在工具提示中为具有标记的点添加额外的文本。我已经想出了如何做到这一点:
tooltip :{
formatter: function(a) {
if(condition)
return "custom tooltip for the marker point";
//otherwise call the defaultFormatter function this way
return a.defaultFormatter.call(this, a);
}
}