How to show electricity usage per hour of the day?

How can I show electricity usage per hour of the day? By this I mean total usage of last year/month/week divided in hourly bins. So, total electricity usage between 00:00-00:59, 01:00-01:59 etc. Something like this:
image. I have a P1 meter that shows the current usage (kW) and total usage (kWh).

In my country, it’s possible to pay for electricity priced on an hourly basis and I want to investigate if that would be benificial, or how much I would need to change electricity usage to make it beneficial. Ie use more power at early morning, use less at ~18:00 when prices peak.

There are lots of graphing dashboard elements. I find this one good GitHub - kalkih/mini-graph-card: Minimalistic graph card for Home Assistant Lovelace UI

Set up the energy dashboard (feed it your total energy use sensor). It shows hourly use.