From db0522e8feb09f4e61dca02cc2cf92ca0bbe214a Mon Sep 17 00:00:00 2001 From: Guillaume RODRIGUEZ Date: Tue, 23 Jan 2018 21:57:46 +0100 Subject: [PATCH] [chart.js] Fix dafaults and controllers Chart (#23027) --- types/chart.js/index.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 6a59e19ffb..2c28be539d 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -7,6 +7,7 @@ // Daniel Luz // Joseph Page // Dan Manastireanu +// Guillaume Rodriguez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -36,6 +37,11 @@ declare class Chart { static defaults: { global: Chart.ChartOptions & Chart.ChartFontOptions; + [key: string]: any; + }; + + static controllers: { + [key: string]: any; }; } declare class PluginServiceStatic { @@ -66,6 +72,13 @@ interface PluginServiceRegistrationOptions { beforeDatasetsDraw?(chartInstance: Chart, easing: string): void; afterDatasetsDraw?(chartInstance: Chart, easing: string): void; + // Called before drawing the `tooltip`. If any plugin returns `false`, + // the tooltip drawing is cancelled until another `render` is triggered. + beforeTooltipDraw?(chartInstance: Chart): void; + // Called after drawing the `tooltip`. Note that this hook will not, + // be called if the tooltip drawing has been previously cancelled. + afterTooltipDraw?(chartInstance: Chart): void; + destroy?(chartInstance: Chart): void; // Called when an event occurs on the chart @@ -534,6 +547,7 @@ declare namespace Chart { tooltipFormat?: string; unit?: TimeUnit; unitStepSize?: number; + stepSize?: number; minUnit?: TimeUnit; }