[chart.js] add missing align fields to ChartTooltipOptions (#37612)

* [chart.js] add missing align fields to ChartTooltipOptions

* [chart.js] updated version
This commit is contained in:
Tobias Krahn
2019-08-14 18:34:13 -07:00
committed by Pranav Senthilnathan
parent f0cd0ddae0
commit 78d8ce4ee2
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -47,6 +47,7 @@ const chart: Chart = new Chart(ctx, {
displayColors: true,
borderColor: "rgba(0,0,0,0)",
borderWidth: 1,
titleAlign: 'center',
callbacks: {
title: ([point]) => point.label ? point.label.substring(0, 2) : 'title',
label(tooltipItem) {
+6 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for Chart.js 2.7
// Type definitions for Chart.js 2.8
// Project: https://github.com/nnnick/Chart.js, https://www.chartjs.org
// Definitions by: Alberto Nuti <https://github.com/anuti>
// Fabien Lavocat <https://github.com/FabienLavocat>
@@ -133,6 +133,8 @@ declare namespace Chart {
'easeInOutSine' | 'easeInExpo' | 'easeOutExpo' | 'easeInOutExpo' | 'easeInCirc' | 'easeOutCirc' | 'easeInOutCirc' | 'easeInElastic' |
'easeOutElastic' | 'easeInOutElastic' | 'easeInBack' | 'easeOutBack' | 'easeInOutBack' | 'easeInBounce' | 'easeOutBounce' | 'easeInOutBounce';
type TextAlignment = 'left' | 'center' | 'right';
interface ChartArea {
top: number;
right: number;
@@ -296,17 +298,20 @@ declare namespace Chart {
mode?: InteractionMode;
intersect?: boolean;
backgroundColor?: ChartColor;
titleAlign?: TextAlignment;
titleFontFamily?: string;
titleFontSize?: number;
titleFontStyle?: string;
titleFontColor?: ChartColor;
titleSpacing?: number;
titleMarginBottom?: number;
bodyAlign?: TextAlignment;
bodyFontFamily?: string;
bodyFontSize?: number;
bodyFontStyle?: string;
bodyFontColor?: ChartColor;
bodySpacing?: number;
footerAlign?: TextAlignment;
footerFontFamily?: string;
footerFontSize?: number;
footerFontStyle?: string;