filter.playback.start
start(handle: FilterHandle, opts: PlaybackOptions): voidBegin animated playback over a range or dateRange handle. Throws when called on any other filter type.
handle | FilterHandle | A handle returned by filter.nodes.range / .dateRange or filter.edges.range / .dateRange. |
opts.windowSize | number | Width of the active window in the filter's units (numeric range units or ms for dateRange). |
opts.step | number | Slide / grow / shrink amount per tick. |
opts.durationMs | number | Total playback duration in milliseconds. Default: implementation default. |
opts.loop | boolean | Restart from the beginning after reaching the end. |
opts.reverse | boolean | Play 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,
});