Skip to content

Commit

Permalink
fix(tooltip): Correct the type of selectedData
Browse files Browse the repository at this point in the history
Change the type of selectedData as an array of DataItem

Fix #2056
Close #2058
  • Loading branch information
sung-oh-park authored and netil committed Apr 23, 2021
1 parent 052c51a commit 05b694d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ Alan Hamlett <[email protected]>
Nicolas Forêt <[email protected]>
Marc Faber <[email protected]>
Donald Pipowitch <[email protected]>
Sung Oh Park <[email protected]>
8 changes: 4 additions & 4 deletions types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1046,22 +1046,22 @@ export interface TooltipOptions {
/**
* Set a callback that will be invoked before the tooltip is shown.
*/
onshow?(this: Chart, selectedData: DataItem): void;
onshow?(this: Chart, selectedData: DataItem[]): void;

/**
* Set a callback that will be invoked after the tooltip is shown
*/
onshown?(this: Chart, selectedData: DataItem): void;
onshown?(this: Chart, selectedData: DataItem[]): void;

/**
* Set a callback that will be invoked before the tooltip is hidden.
*/
onhide?(this: Chart, selectedData: DataItem): void;
onhide?(this: Chart, selectedData: DataItem[]): void;

/**
* Set a callback that will be invoked after the tooltip is hidden.
*/
onhidden?(this: Chart, selectedData: DataItem): void;
onhidden?(this: Chart, selectedData: DataItem[]): void;

/**
* Set if tooltips on all visible charts with like x points are shown together when one is shown.
Expand Down

0 comments on commit 05b694d

Please sign in to comment.