Skip to content

cupertino-files / GroupingType

Variable: GroupingType

const GroupingType: object

Defined in: src/tst/categories.ts:119

How a column's values become groups.

Anything but GroupingType.BY_VALUE buckets the values first, and carries a TSCE.FunctorArchive — the bucketing formula — alongside. The group's own value is then the bucket, expressed as a date at the bucket's start.

The date codes are read off numbers-parser-v26.0-categories.numbers, which has one table per bucketing the UI offers. Each is confirmed by the shape of the dates it produces rather than by the table's name: year groups are all 1 January, quarter groups fall only in months 1/4/7/10, week groups every land on the same weekday, and weekday groups collapse into six dates within one reference week.

Type Declaration

BY_DAY

readonly BY_DAY: 4 = 4

By exact day.

BY_VALUE

readonly BY_VALUE: 0 = 0

One group per distinct value.

BY_WEEKDAY

readonly BY_WEEKDAY: 3 = 3

By day of the week: seven buckets, dated within one reference week.

BY_YEAR

readonly BY_YEAR: 1 = 1

Dates bucketed by year: every group value is 1 January.

BY_YEAR_MONTH

readonly BY_YEAR_MONTH: 2 = 2

By calendar month: every group value is the 1st.

BY_YEAR_QUARTER

readonly BY_YEAR_QUARTER: 6 = 6

By quarter: every group value is 1 January, April, July or October.

BY_YEAR_WEEK

readonly BY_YEAR_WEEK: 5 = 5

By week: every group value falls on the week's first day.

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.