Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/controllers/controller.line.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default class LineController extends DatasetController {

initialize() {
this.enableOptionSharing = true;
this.supportsDecimation = true;
super.initialize();
}

Expand Down
1 change: 1 addition & 0 deletions src/core/core.datasetController.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export default class DatasetController {
this._drawStart = undefined;
this._drawCount = undefined;
this.enableOptionSharing = false;
this.supportsDecimation = false;
this.$context = undefined;
this._syncList = [];

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/plugin.decimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default {
return;
}

if (meta.type !== 'line') {
if (!meta.controller.supportsDecimation) {
// Only line datasets are supported
return;
}
Expand Down
4 changes: 4 additions & 0 deletions types/index.esm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,10 @@ export class DatasetController<
readonly index: number;
readonly _cachedMeta: ChartMeta<TElement, TDatasetElement, TType>;
enableOptionSharing: boolean;
// If true, the controller supports the decimation
// plugin. Defaults to `false` for all controllers
// except the LineController
supportsDecimation: boolean;

linkScales(): void;
getAllParsedValues(scale: Scale): number[];
Expand Down