0

I want to add a mouseover event for a LineSeries in amCharts 5.

My try, but nothing happens:

series.strokes.template.interactionsEnabled = true;
series.strokes.template.events.enableType("pointerover");
series.strokes.template.events.on("pointerover", function(ev) {
  console.log("pointerover event", ev.target);
});
j.d.o.
  • 11
  • 2

1 Answers1

0

That does look like the correct syntax, and I have it working in this CodePen example: amCharts5 LineSeries with open data fields #DDV. (Note that for some reason I do not receive the dataContext attribute on the event target, as I would expect)

  series.strokes.template.events.on("pointerover", function(ev){
    console.log(ev.target);
  });
Dan Overlander
  • 166
  • 2
  • 13