TimeRulerConfig
type TimeRulerConfig = object;Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
autoRender? | boolean | Whether to automatically re-render when viewport or configuration changes. Default true |
autoResize? | boolean | Whether to automatically resize canvas pixel resolution when container dimensions change. Default true |
backgroundColor? | string | Canvas background fill color. Default "transparent" |
color? | string | Primary color for axis lines, tick marks, and text labels. Default "#a0a0a0" |
devicePixelRatio? | boolean | number | Device pixel ratio scaling factor for HiDPI/Retina displays. Default window.devicePixelRatio |
font? | string | CSS font specification for time labels. Default "10px monospace" |
labelColor? | string | Specific color override for text labels. Default color |
minMajorPixelSpacing? | number | Minimum pixel spacing between adjacent major tick labels. Default 75 |
renderer? | | TimeRulerRendererName | TimeRulerRenderer | Visual renderer: standard tick lines or segmented boxes. Default "ticks" |
tickColor? | string | Specific color override for tick lines. Default color |
tickPosition? | "top" | "bottom" | "both" | "inside" | Tick mark position relative to the ruler baseline. Default "top" |
timeFormat? | TimeFormatMode | Numeric timestamp formatting mode. - “auto”: Adapts precision based on zoom level. - “seconds”: Displays raw seconds (e.g., 12.5s). - “timecode”: Broadcast notation (mm:ss.ms). - “hhmmss”: Clock time (hh:mm:ss). - Custom function (sec: number) => string. Default "auto" |