From 2744f47b72c53f050f9c1f22a6bd35cd67ab9656 Mon Sep 17 00:00:00 2001 From: xile611 Date: Wed, 19 Jun 2024 09:52:16 +0800 Subject: [PATCH] docs: update docs of tooltip --- .../en/component/tooltip-common/tooltip-theme.md | 9 +++++++++ .../zh/component/tooltip-common/tooltip-theme.md | 11 +++++++++++ .../vchart/src/component/tooltip/interface/theme.ts | 2 +- .../components/tooltip-handler/interface/style.ts | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/assets/option/en/component/tooltip-common/tooltip-theme.md b/docs/assets/option/en/component/tooltip-common/tooltip-theme.md index 996cac28f5..1daabb2f8f 100644 --- a/docs/assets/option/en/component/tooltip-common/tooltip-theme.md +++ b/docs/assets/option/en/component/tooltip-common/tooltip-theme.md @@ -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 diff --git a/docs/assets/option/zh/component/tooltip-common/tooltip-theme.md b/docs/assets/option/zh/component/tooltip-common/tooltip-theme.md index 96f453fc92..14c5789fb6 100644 --- a/docs/assets/option/zh/component/tooltip-common/tooltip-theme.md +++ b/docs/assets/option/zh/component/tooltip-common/tooltip-theme.md @@ -114,3 +114,14 @@ #${prefix} maxContentHeight(number) **可选** 设置最大内容区高度,内容区若超过该高度将显示局部滚动条(适用于 dom tooltip)。自 1.9.0 版本开始支持。 + + +#${prefix} align('left' | 'right') + +自 1.11.5 版本开始支持。 + +**可选** 设置内容的对齐方式: + +- 'left': shape、标题、数值从左到右展示,左对齐 +- 'right': shape、标题、数值从右到左展示,右对齐 + diff --git a/packages/vchart/src/component/tooltip/interface/theme.ts b/packages/vchart/src/component/tooltip/interface/theme.ts index b90a17b351..db90ef678d 100644 --- a/packages/vchart/src/component/tooltip/interface/theme.ts +++ b/packages/vchart/src/component/tooltip/interface/theme.ts @@ -86,7 +86,7 @@ export interface ITooltipTheme { y?: number; }; /** - * @since 1.11.4 + * @since 1.11.5 * * shape、key、value的对齐方式,可选项如下: * 'left': 从左到右对齐 diff --git a/packages/vchart/src/plugin/components/tooltip-handler/interface/style.ts b/packages/vchart/src/plugin/components/tooltip-handler/interface/style.ts index 7aac021feb..9bc2c55f3f 100644 --- a/packages/vchart/src/plugin/components/tooltip-handler/interface/style.ts +++ b/packages/vchart/src/plugin/components/tooltip-handler/interface/style.ts @@ -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': 从左到右对齐