here is a stackblitz link of my Angular app with amchart. Amchart Angular app
For UX reasons I am keeping the chart stack colors same. Now in code if am using amcharts default legend (line 225 of code) everything works fine. On clicking on legends it filter the stack chart accordingly, but again for UX reasons am using custom item for legends (line 227 to 235 in code) and here when I click on legend the stack columns are not getting filtered accordingly. How to achieve amchart's default legend behaviour in this scenario?
I figured it out, added following changes in my code and I achieved the desired result: