How to get the series number or name on mouse hover on a chart

How can I get the number or name of a series on mouse hover event?

1 Like

I just got it. I leave the code here for someone that may have the same question.

var hitTestArgs = chart2.getHitTestArguments(e);

    var hitTestResult = chart2.control.hitTest(hitTestArgs.offsetX, hitTestArgs.offsetY, hitTestArgs.target);     

    if (hitTestResult.point) {
      var name = hitTestResult.point.series.name;
    }
3 Likes