[@types/chart.js] Add missing getElementsAtXAxis method. Closes #23159 (#43697)

This commit is contained in:
Dan Manastireanu 2020-04-08 20:10:48 +03:00 committed by GitHub
parent d1971526d5
commit cf9b46e5d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -454,3 +454,7 @@ const timeLabelsChartData: Chart.ChartData = {
moment(), moment(), moment(),
],
};
const event = new MouseEvent('click');
chart.getElementsAtEvent(event);
chart.getElementsAtXAxis(event);

View File

@ -49,6 +49,7 @@ declare class Chart {
generateLegend: () => {};
getElementAtEvent: (e: any) => [{}];
getElementsAtEvent: (e: any) => Array<{}>;
getElementsAtXAxis: (e: any) => Array<{}>;
getDatasetAtEvent: (e: any) => Array<{}>;
getDatasetMeta: (index: number) => Meta;
ctx: CanvasRenderingContext2D | null;