Add types for @types/chart.js (tooltip model) (#42740)

* Add new tooltip model types

* Fix mistyping
This commit is contained in:
MarcoRu
2020-03-02 18:41:05 +01:00
committed by GitHub
parent c59c876a6a
commit f581dbb72f

View File

@@ -24,6 +24,7 @@
// Oscar Cabrera <https://github.com/mrjack88>
// Carlos Anoceto <https://github.com/canoceto>
// Nobuhiko Futagami <https://github.com/nobu222>
// Marco Ru <https://github.com/Marcoru97>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -370,26 +371,33 @@ declare namespace Chart {
}
interface ChartTooltipModel {
afterBody: string[];
backgroundColor: string;
beforeBody: string[];
body: ChartTooltipModelBody[];
bodyFontColor: string;
bodyFontSize: number;
bodySpacing: number;
borderColor: string;
borderWidth: number;
caretPadding: number;
caretSize: number;
caretX: number;
caretY: number;
cornerRadius: number;
dataPoints: ChartTooltipItem[];
displayColors: boolean;
footer: string[];
footerFontColor: string;
footerFontSize: number;
footerMarginTop: number;
footerSpacing: number;
height: number;
labelColors: string[];
labelTextColors: string[];
legendColorBackground: string;
opacity: number;
title: string[];
titleFontColor: string;
titleFontSize: number;
titleMarginBottom: number;