I have created three variables: hourlyGallonscurrent, gallonscurrent, and priorhourlygallons
At the beginning of each hour (starting at 1 AM) I get the counter value from my water counter (I have checked this and its working properly) and then calculate the difference in the counter value from the prior hour. Then the difference is placed into hourly gallons used and then that value is used for the next hours "priorhour" calculation. I then update the gallons current for that hour to be the total for the day up to that point. At midnight I zero out the values and start again the next day
I am attempting to create two charts:
1) shows an hourlyusage throughout the day,
For the hours chart I used hourlygallonscurrent as the variable refreshed every hour with 24 bars, scale every day. What I get is figure in light blue below (First figure). What I want is figure similar to dark green hourly chart below (Figure 2)?
2) a monthly chart showing the total used each day. I am plotting gallonscurrent
For the daily chart I am plotting gallonsused refreshed everyday with 31 bars and scale every month. What I get is the bars in lt blue (larger plot) - Figure 3.
I want the plot below that shows things in days as one bar total for the day. If the plot is generated in the middle of the day then I want the gallons used so far for the day to be shown like the monthly chart below - Figure4.
I must be doing something basically wrong but not sure what?