mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
#23371 Fiy typo and updat test
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Chart, ChartData } from 'chart.js';
|
||||
import { Chart, ChartData, Point } from 'chart.js';
|
||||
|
||||
// alternative:
|
||||
// import chartjs = require('chart.js');
|
||||
@@ -67,10 +67,9 @@ if (chart.chartArea) {
|
||||
}
|
||||
|
||||
// http://www.chartjs.org/docs/latest/configuration/tooltip.html#position-modes
|
||||
Chart.Tooltip.positioners.custom = function(elements: any, eventPosition: any) {
|
||||
const tooltip = this;
|
||||
Chart.Tooltip.positioners.custom = function(elements: any[], eventPosition: Point) {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
x: eventPosition.x,
|
||||
y: eventPosition.y + 10
|
||||
};
|
||||
};
|
||||
|
||||
Vendored
+2
-2
@@ -46,7 +46,7 @@ declare class Chart {
|
||||
};
|
||||
|
||||
// Tooltip Static Options
|
||||
static Tooltip: Chart.ChartTooltipsStaticConfiguartion;
|
||||
static Tooltip: Chart.ChartTooltipsStaticConfiguration;
|
||||
}
|
||||
declare class PluginServiceStatic {
|
||||
register(plugin: PluginServiceRegistrationOptions): void;
|
||||
@@ -278,7 +278,7 @@ declare namespace Chart {
|
||||
borderWidth?: number;
|
||||
}
|
||||
|
||||
interface ChartTooltipsStaticConfiguartion {
|
||||
interface ChartTooltipsStaticConfiguration {
|
||||
positioners: {[mode: string]: ChartTooltipPositioner};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user