Continuity Operators

These operators are intented to assist with driving the continuity functionity on most charts, allowing gaps to represent dropped connections, or distinct runs of data without connecting geometry.

deltaThresholdContinuityBreaker

Screenshot of component operatorsContinuity deltaThresholdContinuityBreaker

The deltaThresholdContinuityBreaker operator emits a 'false' event when the delta between the last two values exceeds a given threshold.

When plugged into a LineChart, this will insert a hole just before the event, but won't cause any data to be ignored.

import { useDataTransformer } from '@electricui/timeseries-react'
import { deltaThresholdContinuityBreaker } from '@electricui/dataflow'
 
const timeoutDS = useDataTransformer(() => {
return deltaThresholdContinuityBreaker(dataSource, 100)
})

deltaTimeContinuityBreaker

Screenshot of component operatorsContinuity deltaTimeContinuityBreaker

The deltaTimeContinuityBreaker operator emits a 'false' event when the difference between the previous pair of values exceeds a specified threshold.

The duration argument accepts the duration in milliseconds. The duration must be greater than 0.

When plugged into a LineChart, this will insert a hole just before the event, but won't cause any data to be ignored.

import { useDataTransformer } from '@electricui/timeseries-react'
import { deltaTimeContinuityBreaker } from '@electricui/dataflow'
 
const timeoutDS = useDataTransformer(() => {
return deltaTimeContinuityBreaker(dataSource, 10)
})