Unable to relate avg value to bar graph

I have following representation on grafana:

max, total values shown in legend match with the bars in the graph. But I am not able to relate avg value in the legend with the bars in the graph. Any input would be helpful.
Note; My prometheus query is like this:


Minstep is set to 60m as I want to find data consumed per hour.