How would I add a piechart that will self-update itself by user input in HTML CSS and JS? [closed]

I am working on an expense tracker web application and I want to add a pie chart to show the user the difference between their expenses and income. I would like this pie chart to update itself visual as the user inserts input in the

<input type="number" id="amount" placeholder="Enter an amount..." />

Can’t find any resources online that show this type of concept so please help.