Bar chart Energy consumption per day with graphite

Hello!

I’m trying to plot a bar chart which display energy consumption per day, for the last 7 days, for example. Should look like this:
image

I have a series which holds the total energy consumption and from that i have to calculate the consumption the last 24 hours, thats how far i’ve gotten, but how do i do that for the last x days?

I am using graphite as my data source!
Help would be very appreciated,
Thanks

what is your query for calculating the last day of energy consumption? It sounds like you might be able t template that query using template variables. then you choose the number of days from a select dropdown

Here are the docs on template variables. And here is a list of good examples on play.grafana.org that use template variables. You can inspect each dashboard to see just how the variables are constructed.

See the solution here: https://community.grafana.com/t/default-datetime-formatting-to-weekday-possible/60702/3?u=originschnudl

1 Like