I’m trying to adapt this amcharts 5 example on how to highlight a series when hovering the legend : https://www.amcharts.com/demos/highlighting-line-chart-series-on-legend-hover/
Here is my codepen : https://codepen.io/rduteil/pen/YzYeKew
What I am trying to do is to make the bullets opacity match the stroke.
But changing the series opacity has no effect on bullet as those are rendered through a function and never updated after that.
I was wondering if there was a way to change the bullets appearance in the legend’s pointerhover
event without clearing the series bullets to force a rerender.
I want to get rid of this piece of code :
series.bullets.clear();
series.bullets.push(() => am5.Bullet.new(root, {
sprite: am5.Circle.new(root, {
opacity: 0.15,
fill: series.get("fill"),
radius: 3
})
}));