Review how the checkbox works https://material.angular.io/components/checkbox/examples
Then see if you can capture the true/false state in the bar-chart.component.ts file. You can use the console.log somewhere in the file to see if you can detect when the check box is checked and unchecked.