filterplayback

filter.playback.start

start(handle: FilterHandle, opts: PlaybackOptions): void

Begin animated playback over a range or dateRange handle. Throws when called on any other filter type.

handleFilterHandleA handle returned by filter.nodes.range / .dateRange or filter.edges.range / .dateRange.
opts.windowSizenumberWidth of the active window in the filter's units (numeric range units or ms for dateRange).
opts.step numberSlide / grow / shrink amount per tick.
opts.durationMs numberTotal playback duration in milliseconds. Default: implementation default.
opts.loop booleanRestart from the beginning after reaching the end.
opts.reverse booleanPlay from the end of the domain back to the start.
opts.mode 'slide' | 'expand' | 'shrink'Animation pattern. Default: 'slide'.

Returns: void

Example

const recent = api.filter.nodes.dateRange({
  property: "createdAt",
  after: "2024-01-01",
  before: "2024-12-31",
  granularity: "day",
});

api.filter.playback.start(recent, {
  windowSize: 1000 * 60 * 60 * 24 * 7,   // 7-day window
  durationMs: 10_000,
  loop: true,
});