]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add declaration for Decimation plugin (#9172)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Fri, 28 May 2021 11:36:24 +0000 (14:36 +0300)
committerGitHub <noreply@github.com>
Fri, 28 May 2021 11:36:24 +0000 (07:36 -0400)
types/index.esm.d.ts
types/tests/register.ts [new file with mode: 0644]

index 175e4f6fcc15d85194b824d70892523ebc482923..17b06d78d13f5ef28df93032bd622b49a592d3f5 100644 (file)
@@ -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 (file)
index 0000000..3e293fc
--- /dev/null
@@ -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
+);