Chartjs-I want to create dropdown in place of buttons for graphs change but my function is not working on <select> but with button it's working fine

0👍

Your problem should get solved, if you define a change event handler on your select element as follows.

<select (change)="chartType($any($event.target).value)">

Please take a look at this StackBlitz and see how it works.

Leave a comment