[chart.js] Fix dafaults and controllers Chart (#23027)

This commit is contained in:
Guillaume RODRIGUEZ 2018-01-23 21:57:46 +01:00 committed by Andy
parent 7d0fba3465
commit db0522e8fe

View File

@ -7,6 +7,7 @@
// Daniel Luz <https://github.com/mernen>
// Joseph Page <https://github.com/josefpaij>
// Dan Manastireanu <https://github.com/danmana>
// Guillaume Rodriguez <https://github.com/guillaume-ro-fr>
// 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;
}