Show HighCharts tooltip when chart loads

2019-03-31 07:04发布

I am sing Highcharts to show years against premium amount of loan. I am showing a crosshair and tooltip when user hovers on chart area. However, I want to show this when the chart loads initially (without / before moving mouse). Is there any way to do this? to make the tooltip sticky, I used below code and it works (except IE8). Simillarly, looking for displaying it on load.

chart.tooltip.hide = function () { };

1条回答
神经病院院长
2楼-- · 2019-03-31 07:31

Refresh the tooltip with the point at which you wish to show the tooltip at load

chart.tooltip.refresh(chart.series[1].points[2]);

// If the tooltip.shared=true, the parameter is array of points
chart.tooltip.refresh([chart.series[1].points[2]]); 

Show Tooltip on Load @ jsFiddle

Read More @ Customizing Highcharts - Tooltip Visibility

查看更多
登录 后发表回答