mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
[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:
committed by
Pranav Senthilnathan
parent
f0cd0ddae0
commit
78d8ce4ee2
@@ -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) {
|
||||
|
||||
Vendored
+6
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user