Appearance
module useDownSampler.ts
function useDownSampler
ts
(dataSets: MaybeRef<DataSet[]>, maxPoints?: MaybeRef<number>) =>
ComputedRef<DataSet[]>
returns a computed version of the passed in dataSets
that reduces the total number of points. This is quite useful when the number of data points isn't known ahead of time, or there are more data than pixels.
Parameters
dataSets
MaybeRef<DataSet[]>
The datasets to be downsampled
maxPoints
MaybeRef<number>
The maximum number of points to allow in a single dataset