Utilities
Public functions and default values exported from timescope.
defineTimescopeOptions
defineTimescopeOptions(options: TimescopeOptions): TimescopeOptionsReturns the same object, preserving inferred source names, row fields, metadata, and Track names while checking their references.
createDefineTimescopeOptions
createDefineTimescopeOptions(wrapper?: (options: object) => object): typeof defineTimescopeOptionsCreates 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.
createDataSource
createDataSource<S extends TimescopeDataSource>(input: S): S
createDataSource(input: TimescopeSourceOptions & { type: 'point-aggregate' }): TimescopeAppendOnlyDataSource
createDataSource(input: TimescopeSourceInput): TimescopeDataSourceInfers row and field types from input. A 'point-aggregate' source supports appending; an already supplied DataSource is returned unchanged.
defaultOptions
time- Value / type
null
zoom- Value / type
0
wheelSensitivity- Value / type
200
fit- Value / type
{ padding: 0 }
options- Value / type
{ font: undefined, cursor: true, showFps: false, sources: undefined, series: undefined, tracks: undefined, domains: undefined, selection: true }
cursor- Value / type
{ color: 'red', borderColor: 'transparent' }
domain- Value / type
{ scale: 'linear', animation: true, floatingGap: 20, axis: false, unit: '' }
domainRange- Value / type
{ default: [undefined, undefined], expand: false, shrink: true }
track- Value / type
{ height: undefined, symmetric: false, timeAxis: true }
timeAxis- Value / type
{ relative: false, timeZone: 'local', timeUnit: 's' }
series- Value / type
{ tooltip: true, fillAlpha: 0.25, instantaneous: { using: 'value' }, colors: ['#080', '#800', '#008', '#880', '#088', '#808'] }
chartStyle- Value / type
{ lineWidth: 1, fillOpacity: 1, radius: 0, offset: [0, 0], textAlign: 'center' }
chartSize- Value / type
{ mark: 5, text: 14, icon: 16 }
chartUsing- Value / type
Readonly<Record<'point' | 'area' | 'range' | 'region', Readonly<Using>>>
source- 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.