Skip to content

Commit

Permalink
feat: support firstVisible in axis label
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoHe committed Sep 27, 2024
1 parent 7e5d7b0 commit 32529ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/vchart/src/component/axis/cartesian/axis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ export abstract class CartesianAxis<T extends ICartesianAxisCommonSpec = ICartes
...super._tickTransformOption(),
noDecimals: this._tick?.noDecimals,
labelLastVisible: this._spec.label?.lastVisible,
labelFirstVisible: this._spec.label?.firstVisible,
labelFlush: this._spec.label?.flush
} as ICartesianTickDataOpt;
}
Expand Down
12 changes: 6 additions & 6 deletions packages/vchart/src/component/axis/cartesian/interface/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ export type ICartesianLabel = ILabel & {
* @default false
*/
flush?: boolean;
// /**
// * 第一个坐标轴文字是否显示。默认根据标签重叠策略自动判定。
// * @default null
// */
// firstVisible?: boolean | null;
/**
* `sampling` 开启时生效。
* 最后一个坐标轴文字是否显示。默认根据标签重叠策略自动判定。
* @default null
*/
lastVisible?: boolean | null;
/**
* 第一个坐标轴文字是否显示。默认根据标签重叠策略自动判定。
* @default null
* @since 1.12.8
*/
firstVisible?: boolean | null;
/**
* label 相对于容器整体的对齐方式
* - `top`:整体向上对齐(垂直方向)
Expand Down

0 comments on commit 32529ae

Please sign in to comment.