From: Jukka Kurkela Date: Fri, 28 May 2021 11:36:24 +0000 (+0300) Subject: Add declaration for Decimation plugin (#9172) X-Git-Tag: v3.3.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa6a9737bd780231b0684eeaf6df132a12b7ecec;p=thirdparty%2FChart.js.git Add declaration for Decimation plugin (#9172) --- diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 175e4f6fc..17b06d78d 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -1953,6 +1953,8 @@ export class BasePlatform { export class BasicPlatform extends BasePlatform {} export class DomPlatform extends BasePlatform {} +export const Decimation: Plugin; + export const enum DecimationAlgorithm { lttb = 'lttb', minmax = 'min-max', diff --git a/types/tests/register.ts b/types/tests/register.ts new file mode 100644 index 000000000..3e293fcbd --- /dev/null +++ b/types/tests/register.ts @@ -0,0 +1,52 @@ +import { + Chart, + ArcElement, + LineElement, + BarElement, + PointElement, + BarController, + BubbleController, + DoughnutController, + LineController, + PieController, + PolarAreaController, + RadarController, + ScatterController, + CategoryScale, + LinearScale, + LogarithmicScale, + RadialLinearScale, + TimeScale, + TimeSeriesScale, + Decimation, + Filler, + Legend, + Title, + Tooltip +} from '../index.esm'; + +Chart.register( + ArcElement, + LineElement, + BarElement, + PointElement, + BarController, + BubbleController, + DoughnutController, + LineController, + PieController, + PolarAreaController, + RadarController, + ScatterController, + CategoryScale, + LinearScale, + LogarithmicScale, + RadialLinearScale, + TimeScale, + TimeSeriesScale, + Decimation, + Filler, + Legend, + Title, + Tooltip +);