For example: A date range of 2017-01-01 to 2018-07-20

Shows a chart like this, with every day itemized:

It should be grouped by month.
Seems like our $day_by_day value is getting set to true when it should be false somewhere.
I'm curious why this should be grouped by month (besides for obvious visual reasons). Is it just that it's expected behavior based on the code, and therefore this is a bug? Or is it because of the display issue?
I definitely don't want it to display the way it does, but I understand why it displays this way.
When using the custom filter over random date ranges, what determines if it should be day by day or month by month? What if the filter covers 3 months? What about 6 months?
The logic was incorrect here to start with. Currently any range longer a year gets grouped by month. This fixed in https://github.com/easydigitaldownloads/easy-digital-downloads/commit/c730f15bd7d3acf2a51bf4fb1edecc54454ef8ca.
However, our logic currently sets anything longer than a quarter of a range to be grouped by month as shown here: https://github.com/easydigitaldownloads/easy-digital-downloads/blob/release/3.0/includes/reports/reports-functions.php#L754-L787
My vote is to adjust the condition on line 775 to be $difference >= ( YEAR_IN_SECONDS / 4 ).
Interested in your thoughts @SDavisMedia and @mindctrl.
@sdavismedia 100% get that view. I think it's just expected. It could be interesting to have a way to "toggle" the grouping. By month, week, day etc. Probably not for 3.0 scope but I like it. For now I think we stick to just the existing scope and we can add on to it later.
@sunnyratilal I definitely agree with that adjustment. If I'm looking at the current release/3.0 code correctly, you could run a this_year range in February and get results grouped by month, which only include January and February. 馃憥
Changing the entire condition to $difference >= ( YEAR_IN_SECONDS / 4 ) appears to force all ranges greater than a quarter to month by month, and all ranges shorter than a quarter to day by day. I'm with that. :+1:
@cklosowski We just commented at the same time lol. I agree, that would be cool in the future.