From: Jacco van den Berg Date: Sun, 13 Nov 2022 17:36:25 +0000 (+0100) Subject: Remove type attribute from dataset specific type specification (#10869) X-Git-Tag: v4.0.0-release~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53b79673eb50348364fa910aa7609f3051c28fb3;p=thirdparty%2FChart.js.git Remove type attribute from dataset specific type specification (#10869) --- diff --git a/src/plugins/plugin.colors.ts b/src/plugins/plugin.colors.ts index 234171cd2..956447a04 100644 --- a/src/plugins/plugin.colors.ts +++ b/src/plugins/plugin.colors.ts @@ -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; diff --git a/types/index.d.ts b/types/index.d.ts index 3c55cf010..2e0369a09 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -3651,7 +3651,6 @@ export interface ChartConfigurationCustomTypesPerDataset< TData = DefaultDataPoint, TLabel = unknown > { - type: TType; data: ChartDataCustomTypesPerDataset; options?: ChartOptions; plugins?: Plugin[];