]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Remove type attribute from dataset specific type specification (#10869)
authorJacco van den Berg <jaccoberg2281@gmail.com>
Sun, 13 Nov 2022 17:36:25 +0000 (18:36 +0100)
committerGitHub <noreply@github.com>
Sun, 13 Nov 2022 17:36:25 +0000 (19:36 +0200)
src/plugins/plugin.colors.ts
types/index.d.ts

index 234171cd2b3b580205207316dbb920d6985a1de0..956447a0446385a78d107cb6bd0269c13ef5565f 100644 (file)
@@ -1,4 +1,4 @@
-import type {Chart, ChartDataset} from '../types';
+import type {Chart, ChartConfiguration, ChartDataset} from '../types';
 
 export interface ColorsPluginOptions {
   enabled?: boolean;
@@ -94,7 +94,7 @@ export default {
       type,
       options: {elements},
       data: {datasets}
-    } = chart.config;
+    } = chart.config as ChartConfiguration;
 
     if (containsColorsDefinitions(datasets) || elements && containsColorsDefinitions(elements)) {
       return;
index 3c55cf0104db1c12c8da10705f5ec6cdcada2e64..2e0369a093a5ba18a1fda50f8f9f4dc16bf4b79d 100644 (file)
@@ -3651,7 +3651,6 @@ export interface ChartConfigurationCustomTypesPerDataset<
   TData = DefaultDataPoint<TType>,
   TLabel = unknown
 > {
-  type: TType;
   data: ChartDataCustomTypesPerDataset<TType, TData, TLabel>;
   options?: ChartOptions<TType>;
   plugins?: Plugin<TType>[];