charton API / @chart-on/core / index / barBucket
Function: barBucket()
barBucket(
options):BarBucket
Defined in: packages/core/src/data/aggregate.ts:53
The bucketing rule used by createBarBuilder and resampleBars, for apps that group data themselves. Intraday bars (seconds, minutes, hours) are multiples of their length since the unix epoch, or since the session range's open with a session. Daily and longer bars start at midnight, in timezone, of their first trading day: Nd counts days since 1970-01-01, weeks start on Monday, and months, quarters and years follow the calendar.