Select to view content in your preferred language

Add a grouping per month in the chart/filter widget that truly groups per month, meaning a fixed time frame for each month regardless of other filters

1242
4
02-08-2024 01:35 AM
Status: Open
Sibe
by
Occasional Contributor

I have a Line Chart widget where I want to see the count of features per month. For this, I have set the 'Category type' to 'By group' with a date column as the 'Category field.' The interval for the time binning options is set to 1 month.

Sibe_0-1707384457362.png

 

 

The expected behavior is that the data is categorized per month, so if there are 10 features in January, the value for the label 'January' should always be 10. However, this is not the case currently. For example, when I look at all values from January 1, 2021, the value for November 2022 is 686.

Sibe_5-1707384481096.png

 

 

Now, I am only adjusting the starting value, specifically from January 1, 2022. This should not change the value for November 2022. However, this value now jumps to 719.

Sibe_6-1707384553848.png

 

 

 

The reason for this is that behind the scenes, the time frame is changing. In the first case, it is from November 4 to December 3, and in the second case, it is from November 3 to December 2. The expectation is that this time frame is fixed from November 1 to November 30 (since grouping is done per month).

Sibe_3-1707384457375.png

 

Sibe_4-1707384457375.png

 

 

The concrete idea is therefore to add this option: a grouping per month that truly groups per month, meaning a fixed time frame for each month regardless of other filters.

4 Comments
ThomasRickett

What are your Interval Alignment and your Trim incomplete interval settings set too?

Sibe
by

@ThomasRickett 

Interval alignment is set to “Snap to the first data point”, but switching to “Snap to the last data point” does not lead to what I want either.

Trim incomplete interval is switched off.

ThomasRickett

I ran into this issue and I'm not sure how I fixed it awhile ago. From what I can remember, I republished my layer and then I adjusted the Timeline widget settings. 

ThomasRickett_0-1710255182542.png

 

HollyTorpey_LSA

I totally agree with this idea. In my case, I am trying to show burrow survey results per week, but unless I fudge the first date for my data, it's starting every week on a Thursday because my chart is set to snap to the first data point. So if the surveyor goes out on Thursday one week and Wednesday the second week to survey the same 100 burrows, the chart will show zero burrows surveyed the first week and 200 burrows the next week, when in fact there are only ever 100 burrows to survey per week. I want to set it to aggregate the data in Sunday-to-Saturday weeks (or calendar months, or years, or maybe starting at an arbitrary date of my choosing) regardless of when my first record was collected (and regardless of what date filters the app users impose on the data).