Routine for graph in Google Hub

Good morning,
I have openHab on a Raspberry and I configured the Overview Page with some measures including total electricity consumption.
From the Overview page I can do the analysis and see the trend of consumption in 24 hours. I would like to display a chart on a Google Hub when I ask “Show me electricity consumption”: what should I do? I would think of creating a routine on Google associated with the request, which calls chart analysis, turns it into an image and displays it. But I don’t know how to do it! Would it be possible?
Thank you
Matteo

Something like This?

Thank you very much: the solution is interesting.
I have a doubt: the Raspberry is used without X11/XVFB installed, only at the command line from a remote SSH connection to have a more streamlined and responsive system (it is a PI 1 Model B +).
To use XVFB I would have to activate X, but I would have too many system resources used. Isn’t there another way to export data from a “dynamic” chart to an image? For example, the call for the graph is a GET and returns a JSON with the timestamp-value data of the measures. Isn’t there anything that can read that data, create a chart, and turn it into an image? For example some JS library (which I don’t know)?
Thanks

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.