Skip to content

Commit aa3dbcc

Browse files
authored
fix: update axis tickMethod type (#1715)
1 parent 48951c3 commit aa3dbcc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/common/axis.en.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656

5757
##### tickMethod
5858

59-
<description>**可选** _Function_</description>
59+
<description>**可选** _string | Function_</description>
6060

61-
功能描述:自定义计算 tick 的方法
61+
功能描述:指定 tick 计算方法,或自定义计算 tick 的方法,内置 tick 计算方法包括 `cat``time-cat``wilkinson-extended``r-pretty``time``time-pretty``log``pow``quantile``d3-linear`
6262

6363
默认配置:`false`
6464

docs/common/axis.zh.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656

5757
##### tickMethod
5858

59-
<description>**可选** _Function_</description>
59+
<description>**可选** _string | Function_</description>
6060

61-
功能描述:自定义计算 tick 的方法
61+
功能描述:指定 tick 计算方法,或自定义计算 tick 的方法,内置 tick 计算方法包括 `cat``time-cat``wilkinson-extended``r-pretty``time``time-pretty``log``pow``quantile``d3-linear`
6262

6363
默认配置:`false`
6464

src/types/axis.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type Axis = AxisOption & {
4141
readonly tickInterval?: number;
4242

4343
/**
44-
* 自定义计算 tick 的方法
44+
* 指定 tick 计算方法或自定义计算 tick 的方法
4545
*/
46-
readonly tickMethod?: (scale: any) => any[];
46+
readonly tickMethod?: string | ((scale: any) => any[]);
4747
};

0 commit comments

Comments
 (0)