Skip to content

Commit 05bb8ae

Browse files
committed
add doc for tooltip displayTransition option (apache/echarts#20966)
1 parent 846b557 commit 05bb8ae

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

en/option/component/tooltip.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,18 @@ className: 'echarts-tooltip echarts-tooltip-dark'
250250

251251
The transition duration of tooltip's animation, in seconds. When it is set to be 0, it would move closely with the mouse.
252252

253+
## displayTransition(boolean) = true
254+
255+
<ExampleUIControlBoolean default="true" />
256+
257+
{{ use: partial-version(
258+
version = "6.0.0"
259+
) }}
260+
261+
Whether to enable the display transition.
262+
263+
By default, the tooltip uses the opacity fading to make itself invisible rather than setting the DOM element's `display` property to `'none'`. This might cause the scrollbar to be always visible when the tooltip content size is large, even if the tooltip is already invisible. In this scenario, or if you just want no fading, you can set this option to `false` to disable the display transition.
264+
253265
{{ use: partial-tooltip-common(
254266
scope = 'global',
255267
prefix = '#'

zh/option/component/tooltip.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,18 @@ className: 'echarts-tooltip echarts-tooltip-dark'
250250

251251
提示框浮层的移动动画过渡时间,单位是 s,设置为 0 的时候会紧跟着鼠标移动。
252252

253+
## displayTransition(boolean) = true
254+
255+
<ExampleUIControlBoolean default="true" />
256+
257+
{{ use: partial-version(
258+
version = "6.0.0"
259+
) }}
260+
261+
提示框显示/隐藏时是否启用过渡动画。
262+
263+
默认情况下,提示框通过透明度淡入淡出过渡效果来实现显示/隐藏,而不是直接将 DOM 元素的 `display` 属性设置为 `'none'`。这在提示框内容比较多出现滚动条时,可能导致提示框隐藏后滚动条仍然存在的问题。在这种情况下,或者如果只是不想使用淡入淡出效果,可以将此选项设置为 `false` 以禁用显示/隐藏过渡动画。
264+
253265
{{ use: partial-tooltip-common(
254266
scope = 'global',
255267
prefix = '#'

0 commit comments

Comments
 (0)