Skip to content

Utilities ​

Public functions and default values exported from timescope.

defineTimescopeOptions ​

Returns the same object, preserving inferred source names, row fields, metadata, and Track names while checking their references.

TimescopeOptions · Shared configuration

createDefineTimescopeOptions ​

ts
createDefineTimescopeOptions(wrapper?: (options: object) => object): typeof defineTimescopeOptions

Creates a typed options helper around a wrapper such as a framework's reactive helper. Returns the wrapper's result with the input's inferred type; the wrapper must preserve the options structure and value types. Without a wrapper, returns the input unchanged.

createDataLoader ​

Infers snapshot or range mode and preserves a supplied loader's mode. A shared loader shares acquisition settings, not loaded data or invalidation state.

Options · TimescopeDataLoader

createDataSource ​

Infers row and field types from input. A 'point-aggregate' source supports appending; an already supplied DataSource is returned unchanged.

Source inputs · TimescopeDataSource · Live Streaming

defaultOptions ​

time
Property
Value / type
null
zoom
Property
Value / type
0
wheelSensitivity
Property
Value / type
200
fit
Property
Value / type
{ padding: 0 }
options
Property
Value / type
{ font: undefined, cursor: true, showFps: false, sources: undefined, series: undefined, tracks: undefined, domains: undefined, selection: true }
cursor
Property
Value / type
{ color: 'red', borderColor: 'transparent' }
domain
Property
Value / type
{ scale: 'linear', animation: true, floatingGap: 20, axis: false, unit: '' }
domainRange
Property
Value / type
{ default: [undefined, undefined], expand: false, shrink: true }
track
Property
Value / type
{ height: undefined, symmetric: false, timeAxis: true }
timeAxis
Property
Value / type
{ relative: false, timeZone: 'local', timeUnit: 's' }
series
Property
Value / type
{ tooltip: true, fillAlpha: 0.25, instantaneous: { using: 'value' }, colors: ['#080', '#800', '#008', '#880', '#088', '#808'] }
chartStyle
Property
Value / type
{ lineWidth: 1, fillOpacity: 1, radius: 0, offset: [0, 0], textAlign: 'center' }
chartSize
Property
Value / type
{ mark: 5, text: 14, icon: 16 }
chartUsing
Property
Value / type
Readonly<Record<'point' | 'area' | 'range' | 'region', Readonly<Using>>>
source
Property
Value / type
{ chunkSize: 256, chunkOrigin: 0, immediate: true, cacheSize: 1000 }

Groups and arrays are frozen; copy individual groups when customizing. This is not a complete constructor configuration and contains no named DataSources, Series, Domains, or Tracks. Unspecified Track heights share available space, a Series uses the first Track, and primitive colors inherit the Series color; leaving those settings unspecified preserves their contextual defaults.