Basically, you need to scrap this idea. The charts are rendered in JavaScript, so unless you plan on writing a browser in Apex code, it's just not going to happen. You could try using Google's Chart Images, but they may choose to shut it down any day (it's been deprecated for 5 years now).
Or, find an alternative service that can do the work, either for free with watermarks or nominal monthly/annual charges; there's a lot of choices out there at an apparently reasonable price.
Alternatively, you could use open source like Image Magick and write a frontend for it, host it on heroku or AWS EB for a few cents/dollars a month. Basically, you'll need to make a callout to generate the charts from any of the above options.
Finally, maybe you could just create SVG images directly in Apex code. While I find that SVG is not the most human-friendly thing to do, once generated, you could store these files as attachments, and when they open in modern browsers, you'll have your chart image rendered.