mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
add properties of ChartTooltipOptions
http://www.chartjs.org/docs/latest/configuration/tooltip.html filter, intersect, itemSort, position, caretPadding, displayColors, borderColor, borderWidth
This commit is contained in:
@@ -18,6 +18,16 @@ let chart: Chart = new Chart(new CanvasRenderingContext2D(), {
|
||||
]
|
||||
},
|
||||
options: {
|
||||
tooltips: {
|
||||
filter: data => Number(data.yLabel) > 0,
|
||||
intersect: true,
|
||||
itemSort: (a, b) => Math.random() - 0.5,
|
||||
position: "average",
|
||||
caretPadding: 2,
|
||||
displayColors: true,
|
||||
borderColor: "rgba(0,0,0,0)",
|
||||
borderWidth: 1,
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
ticks: {
|
||||
|
||||
Vendored
+8
@@ -201,6 +201,7 @@ declare namespace Chart {
|
||||
enabled?: boolean;
|
||||
custom?(a: any): void;
|
||||
mode?: string;
|
||||
intersect?: boolean;
|
||||
backgroundColor?: ChartColor;
|
||||
titleFontFamily?: string;
|
||||
titleFontSize?: number;
|
||||
@@ -225,6 +226,13 @@ declare namespace Chart {
|
||||
cornerRadius?: number;
|
||||
multiKeyBackground?: string;
|
||||
callbacks?: ChartTooltipCallback;
|
||||
filter?(item: ChartTooltipItem): boolean;
|
||||
itemSort?(itemA: ChartTooltipItem, itemB: ChartTooltipItem): number;
|
||||
position?: "average"|"nearest";
|
||||
caretPadding?: number;
|
||||
displayColors?: boolean;
|
||||
borderColor?: ChartColor;
|
||||
borderWidth?: number;
|
||||
}
|
||||
|
||||
interface ChartHoverOptions {
|
||||
|
||||
Reference in New Issue
Block a user