Anil Soman
Anil Soman

Reputation: 2467

Show HighCharts tooltip when chart loads

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 () { };

Upvotes: 3

Views: 10760

Answers (1)

Jugal Thakkar
Jugal Thakkar

Reputation: 13472

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

Upvotes: 25

Related Questions