参考链接:
https://jshare.com.cn/hcharts.cn/hhhGyk
核心函数表达式: chart.tooltip.refresh('数据列数据');
<script type="text/javascript" th:inline="javascript">
/*<![CDATA[*/
var options = {
chart: {
type: 'bubble',
zoomType: 'xy',
},
credits: {
enabled: false //不显示LOGO
},
title: {
text: [[${textName}]]'
},
legend: {
enabled: false //关闭域名logo
},
plotOptions: {
bubble: {
marker: {
radius: 5,
states: {
hover: {
enabled: true,
lineColor: 'rgb(100,100,100)'
}
}
},
states: {
hover: {
marker: {
enabled: true
}
}
},
tooltip: {
headerFormat: '{series.name}',
// animation: true,
pointFormat: '<br><b>xxx:</b>{point.z}%'
}
}
},
xAxis: {
labels: {
enabled: false
}
},
yAxis: {
title: {
text: false
},
labels: {
enabled: false
}
},
series : serie
};
// 图表初始化函数
var chart = Highcharts.chart([[${chartId}]], options);
//刚打开图表时,悬浮显示第一个提示框内容
serie.length > 0 ? chart.tooltip.refresh(chart.series[0].data[0]): '';
});
/*]]>*/
</script>