Skip to content

Commit

Permalink
docs: update docs of tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Jun 19, 2024
1 parent c621727 commit 2744f47
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,12 @@ Configure tooltip background frame style.
#${prefix} maxContentHeight(number)

**Optional** Configure the maximum height of the content area, and if the content area exceeds this height, a local scrollbar will be displayed (applicable to dom tooltip). Supported since version 1.9.0.

#${prefix} align('left' | 'right')

Supported since version 1.11.5.

**Optional** Set the content alignment:

- 'left': shape, title, and values are displayed from left to right, aligned to the left
- 'right': shape, title, and values are displayed from right to left, aligned to the right
11 changes: 11 additions & 0 deletions docs/assets/option/zh/component/tooltip-common/tooltip-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,14 @@
#${prefix} maxContentHeight(number)

**可选** 设置最大内容区高度,内容区若超过该高度将显示局部滚动条(适用于 dom tooltip)。自 1.9.0 版本开始支持。


#${prefix} align('left' | 'right')

自 1.11.5 版本开始支持。

**可选** 设置内容的对齐方式:

- 'left': shape、标题、数值从左到右展示,左对齐
- 'right': shape、标题、数值从右到左展示,右对齐

2 changes: 1 addition & 1 deletion packages/vchart/src/component/tooltip/interface/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface ITooltipTheme<ColorType = string> {
y?: number;
};
/**
* @since 1.11.4
* @since 1.11.5
*
* shape、key、value的对齐方式,可选项如下:
* 'left': 从左到右对齐
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ITooltipAttributes extends TooltipAttributes {
/** dom tooltip 内容区的最大高度,canvas tooltip 不支持 */
maxContentHeight?: number;
/**
* @since 1.11.4
* @since 1.11.5
*
* shape、key、value的对齐方式,可选项如下:
* 'left': 从左到右对齐
Expand Down

0 comments on commit 2744f47

Please sign in to comment.