Tick periods control how time-based axes are segmented and labeled. When a field is mapped to aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TargetProcess/tauCharts/llms.txt
Use this file to discover all available pages before exploring further.
period scale, Taucharts uses a period definition — a pair of cast and next functions — to align date values to boundaries and step through them. The tickPeriod API lets you retrieve built-in periods or register custom ones.
API reference
Retrieve a period object by name.Returns
null if the name is not registered. Pass { utc: true } to retrieve the UTC variant of a period.Register a new named period.Call with
{ utc: true } to register the UTC variant separately from the local-time variant.Period object shape
A period consists of two pure functions that operate onDate objects:
Round a date down to the start of the period boundary. For example, a
month cast rounds any date to the first of its month at midnight.Advance a date to the start of the next period boundary. Must always move forward in time.
Built-in periods
The following periods are available in both local-time and UTC variants (suffix-utc not needed; pass { utc: true } to get/add):
| Name | Boundary | Step |
|---|---|---|
day | Midnight of each day | +1 day |
week | Midnight of Sunday of each week | +7 days |
month | First day of each month at midnight | +1 month |
quarter | First day of each calendar quarter at midnight | +3 months |
year | January 1 at midnight | +1 year |
Using a period in guide
SettickPeriod on the x or y axis guide. The field must use a period scale (set automatically for time dimensions, or explicitly via dimensions):
UTC time support
By default all periods use local time. Enable UTC globally with theutcTime setting, or pass { utc: true } when retrieving a period directly:
utcTime: true is set in ChartSettings, Taucharts automatically selects UTC variants for all period and time scales in that chart.