Use a Sankey chart in your dashboard.
The core version relies on you setting up areas for your devices correctly but is pretty much automatic after that: Energy cards - Home Assistant
The custom version is highly configurable but a little more complex to set up: Anyone using the Sankey Chart Card?