SamAmco / track-and-graph

An android app for tracking personal data and creating custom graphs
GNU General Public License v3.0
428 stars 39 forks source link

Entries are not counted in the correct day bin on nar chart #257

Closed PropellantDyke closed 1 month ago

PropellantDyke commented 7 months ago

In daily bar chart, entries seems to be counted in the wrong day depending of the time.

The second "hole" in the bar chart below is here because I've added an entry at 16h instead of 8h like usual.

Maybe a problem with rounding or timezone ?

Screenshot_20231120_083302_Track   Graph Screenshot_20231120_083333_Track   Graph

SamAmco commented 6 months ago

Hey. Late reply i know. At first I didn't understand this issue but now i think i know what's happened. I think you've selected a rolling window of a month?

The monthly rolling window is I think 30 bars. Each one represents a bucket of data points. Each data point is placed into a bucket by rounding it to the nearest bucket. Note that not all months are the same length (they are not all 30 days) hence why data points can not be placed exactly in a correct bucket. I think your data points just got rounded to a different bucket because they were nearer that than the other one.

The Time Histogram is a bit of a weird graph and a pretty inaccurate one as well. It's really just a visual cue to help you establish at a glance do i tend to do X more at the beginning/middle/end of each month. I think a lot of people probably get a bit confused by it tbh. It's more accurate over "Durations" than "Periods". So for example there are always 7 days in a week so each data point should always be in the correct bucket for a weekly window.

SamAmco commented 1 month ago

closing this issue now, i don't think there's much of a path forward here.