[Chartjs]-How to hide other section of chartjs on click of lengend

1๐Ÿ‘

I have been using this ChartJS wrapper: ng2-charts. It works great on latest Angular 2+, I used it on Angular 5. This wrapper offers you a chartClick for the directive so you can link it with a function in your code. With no more info about what you are trying to do I would suggest you look at this and maybe work using that event object.

(chartClick)="chartClicked($event)"

0๐Ÿ‘

Simplest would be to set div around it and set *ngif option and click event.

Your chart

Leave a comment