Skip to content

Commit

Permalink
fix(types): Allow string dates for zoom() domain
Browse files Browse the repository at this point in the history
The changes in 5f7779b ("fix(types): Fix wrong type definition")
provided support for Date type as argument in zoom(), but string dates
are also accepted and parsed properly, e.g. "2021-01-01T01:02:03.567".

Fix naver#2316

Signed-off-by: Adrian Schmutzler <dev@schmutzler.it>
  • Loading branch information
adschm committed Sep 23, 2021
1 parent 1ce7333 commit 92df004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export interface Chart {
* Zoom by giving x domain.
* @param domain If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.
*/
(domain?: Array<Date|number>): Array<Date|number>;
(domain?: Array<Date|number|string>): Array<Date|number|string>;

/**
* Enable and disable zooming.
Expand Down

0 comments on commit 92df004

Please sign in to comment.