Accepted answer

I found the answer by looking at the source - call "setState('hover');" on the point that you want to be highlighted.


To give a more direct answer (e.g. for then you don't have access to the highcharts instance):

you need to create a mouseover event and give it proper pageX and pageY attributes before you trigger it.


Here is an example of how to select (hover) the last valid point in series programmatically:

  // Find last not-null point in data
  let last = data.indexOf(null) - 1;
  last = (last === -2) ? data.length - 1 : last;
  const lastPoint = this.series[0].points[last];

  // Trigger the hover event 
  lastPoint.state = '';  // You need this to fix hover bug
  this.tooltip.refresh(lastPoint); // Show tooltip

Full JSFiddle exapmle

enter image description here


Just to add an important information:

For StockChart this solution doesn't work:

In this example you have to replace this:


to this:


One possible solution is available here.

Related Query

More Query from same tag