Google Apps Script is a powerful scripting language, but has limitations, so it is common to adapt the solution to what's possible. You find a "workaround"
To update charts in real-time, while they are being presented, the workaround is this:
1. Don't try to update the content of the slides while the slides are being presented
2. Instead, use Google sheets to present the charts
2. Put the charts on a Google spreadsheet, then publish the spreadsheet to the web
3. During the presentation, your audience opens the published spreadsheet, and the charts will update as you edit the values
I'm summarizing Keith Andersen's answer. I hope this translates ok.