DataPipeline<X extends num, Y extends num> class
A data processing pipeline for efficient large dataset handling.
The pipeline provides:
- Viewport-aware data filtering
- Automatic decimation when needed
- Spatial index building for hit testing
- Change notification for reactive updates
Example:
final pipeline = DataPipeline<double, double>(
rawData: largeDataset,
decimationConfig: DecimationConfig.standard,
);
// Get visible data for current viewport
final visible = pipeline.getVisibleData(
controller.viewport,
chartArea,
);
Constructors
-
DataPipeline({required List<
DataPoint< rawData, DecimationConfig decimationConfig = const DecimationConfig()})X, Y> > - Creates a data pipeline for processing chart data.
Properties
- decimationConfig → DecimationConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLargeDataset → bool
-
Whether the dataset is considered large (needs decimation).
no setter
-
rawData
→ List<
DataPoint< X, Y> > -
The raw unprocessed data.
no setter
- rawDataCount → int
-
Number of raw data points.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
appendData(
List< DataPoint< newPoints) → voidX, Y> > - Appends new data points (for streaming scenarios).
-
buildSpatialIndex(
Rect chartArea, CoordinateMapper mapper) → SpatialIndex< DataPointInfo> - Builds a spatial index for efficient hit testing on visible data.
-
getAllData(
) → List< DataPoint< X, Y> > - Returns all data without viewport filtering (but still decimated if large).
-
getBounds(
) → DataBounds? - Gets the data bounds (min/max for X and Y).
-
getVisibleData(
ChartViewport viewport, Rect chartArea) → List< DataPoint< X, Y> > - Returns processed data optimized for the current viewport.
-
invalidateCache(
) → void - Invalidates all cached data, forcing reprocessing on next access.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeOlderThan(
X minX) → void - Removes data points older than the given x value (for rolling windows).
-
toString(
) → String -
A string representation of this object.
inherited
-
updateData(
List< DataPoint< newData) → voidX, Y> > - Updates the raw data and invalidates cache.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited