Need help with set up energy dashboard in HA

Hello, would be great if some could help me with configuration my energy dashboard. I working on Home Assistant and trying to do in grafana make similar energy dashboard like in home assistant. At first is possible to use in one grapgh like is in HA Energy dashboard: Energy returned, energy consumed from PV and energy consumed from grid?

Second thing, how can I set up graph with entity which already shows decent number, for example: I have entity Energy consumed from grid: for now shows 1869kWh, and trying to put it to graph, need graph which show me consume for every hour.

So this shows value of entity in this moment, not differences. For example: in 7:00 - 1869kwh, in 8:00 - 1871kwh → it should show 7:00-8:00 - 2kwh. Is possible to do something like that?

Anyway, I have entitis - 2x pv, consume in real time, production in real time, consume from grid total, return to grid total. Maybe someone has already energy dashboard with similar things and could help me configure all, or show me json? Thanks for help. Regards