Documentation / @ripl/charts / createTimeAxisScale
Function: createTimeAxisScale() ​
createTimeAxisScale(
options,domain,range):Scale<Date,number>
Defined in: charts/src/core/scales.ts:61
Builds a time-axis Scale from resolved axis options over a millisecond extent and pixel range. An explicit numeric min/max (epoch milliseconds) overrides the corresponding end of the data extent. Ticks are calendar-aligned Date values from the core time scale.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
options | ChartAxisItemOptions | The resolved axis options (min/max in epoch milliseconds where set). |
domain | number[] | The data extent [min, max] in epoch milliseconds. |
range | number[] | The pixel range [start, end] the scale maps onto. |
Returns ​
Scale<Date, number>
A scale mapping Date values to pixels.