Skip to content

Commit

Permalink
chore(types): Fix wrong type definition
Browse files Browse the repository at this point in the history
- Add missing y ticks show option
- Fix on wrong type definition: .load(), tooltip.position

Close #1247
  • Loading branch information
Wonju Jeon authored and netil committed Feb 21, 2020
1 parent dea4b65 commit 395a604
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Christophe Coevoet <[email protected]>
Jung Hoon Park <[email protected]>
Kamil Michalski <[email protected]>
Zhongde Liu <[email protected]>
Wonju Jeon <[email protected]>
5 changes: 5 additions & 0 deletions types/axis.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ export interface YTickConfiguration {
*/
stepSize?: number;

/**
* Show or hide axis tick line.
*/
show?: boolean;

text?: {
/**
* Set the x Axis tick text's position relatively its original position
Expand Down
2 changes: 1 addition & 1 deletion types/chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export interface Chart {
type?: string;
types?: { [key: string]: string };
unload?: boolean | ArrayOrString;
done?(): () => any;
done?: () => any;
}): void;

/**
Expand Down
4 changes: 2 additions & 2 deletions types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,12 +867,12 @@ export interface TooltipOptions {
* Or set tooltip's position unit.
* This option can't be used along with `tooltip.position` custom function. If want to specify unit in custom function, return value with desired unit.
*/
position?(
position?: ((
data: any,
width: number,
height: number,
element: any
): { top: number; left: number } | { unit: string; };
) => { top: number; left: number }) | { unit: string; };

/**
* Set custom HTML for the tooltip.
Expand Down

0 comments on commit 395a604

Please sign in to comment.