Aggregation chart problem

I want make a bar chart to show a day PV production. I have data like this :

and my chart setup:

my problem is, that sometimes value goes to zero few seconds after midnight and maximum from previous day is used for the actual day.
Is it possible somehow set, that for maximum calculation is used let say time period 1:00 - 23:00 ?


One idea would be to use a dummy item. And a rule that sets the dummy item generally when the real item changes, but with some special handling to zero its value at midnight.