score:33

Accepted answer

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

score:1

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.

score:4

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.setstate('hover');
  lastpoint.state = '';  // you need this to fix hover bug
  this.tooltip.refresh(lastpoint); // show tooltip

full jsfiddle exapmle

enter image description here

score:12

just to add an important information:

for stockchart this solution doesn't work:

in this example you have to replace this:

chart.tooltip.refresh(chart.series[0].data[i]);

to this:

chart.tooltip.refresh([chart.series[0].points[i]]);

one possible solution is available here.


Related Query

More Query from same tag