Graphs over time, like binary cache and selective test effectiveness, should primarily help to uncover trends over time. However, our default of 30 days where x axis unit is a day makes that difficult due to weekend jumps. Additionally, the graphs are not that visually pleasing with those jumps.
Possible options going forward:
Fill in data for missing days using values from the previous day. This feels ok in some cases, like bundle size, but it doesn’t feel right for graphs like binary cache effectiveness.
Skip days with no data – I don’t like this as it will make the x axis odd
Default to graphs representing data weekly
I’m leaning to go with the last option. To show data weekly, we’d need to change the default of 30 days to be instead week-based, such as the “Last 6 weeks”. We can also choose a default to present data monthly, but I believe the default time range should make it easy to spot recent trends, whereas monthly is only useful to spot trends over longer periods of time.
I agree it looks odd. It makes me think that there might be a bug in either Tuist, or in our setup.
We can try the third option, and iterate with the input from users. We can also ask publicly to get their thoughts. We have a handful of companies already interacting with the dashboard.
Have you seen other services doing that? Another minor drawback of using a 3-day average for days with no data points is that if you do get the occasional data point during a weekend, it might skew the data compared to a weekday’s average.
Yes, we should update the filters to 1W, 1M, and 12M, or consider adding a custom date range selector. Including a random ‘Last n weeks’ option between 7 days and 12 months might feel a bit out of place.
In addition to the existing time range filter, we could introduce an “Interval” dropdown with options like Daily, Weekly, and Monthly.
In the example above, I’ve selected a 30-day range with the Weekly interval, so the x-axis displays a summarized view by week (e.g., Week 1, Week 2, etc.). If I switch the interval to Daily, the graph would revert to the current behavior, showing data points for each day.
What do you think about this approach?
It keeps things flexible and visually cleaner when needed — and in the future, we could also consider adding a custom date range filter for more customization option.
Shouldn’t “Last 30 days” be changed to “Last 4 weeks”? As you can’t really have a weekly interval for 30 days which you can’t split by weeks without some remaining days.
We can switch to ‘Last 4 Weeks’ instead, or split the last 30 days into weekly segments starting from each Monday. So the first label on the x-axis could be ‘Week of May 12’, then ‘Week of May 19’, and so on. The current or ‘Present Week’ would include data from the Monday of that week.
Even if our start date is, say, Tuesday, April 22nd, we could still label the first segment as ‘Week of April 21st’ to keep it consistent. Does that approach make sense?
I would change the label to ‘Last 4 weeks’ where the most recent week would be “Current week” and it would have variable number of days starting from Monday. If we split 30 days into 4 weeks, it will be imho confusing to users how we split the extra 2 days.