You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/04/20 03:30:04 UTC

[echarts-doc] branch master updated: add animation config in resize

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e04479  add animation config in resize
8e04479 is described below

commit 8e044799e8ae8ec972fa5731a84a0c99ce513d43
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Apr 20 11:29:41 2021 +0800

    add animation config in resize
---
 en/api/echarts-instance.md | 10 +++++++++-
 zh/api/echarts-instance.md | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/en/api/echarts-instance.md b/en/api/echarts-instance.md
index dc2aaee..93aad60 100644
--- a/en/api/echarts-instance.md
+++ b/en/api/echarts-instance.md
@@ -272,7 +272,11 @@ myChart.setOption({
 (opts?: {
     width?: number|string,
     height?: number|string,
-    silent?: boolean
+    silent?: boolean,
+    animation?: {
+        duration?: number
+        easing?: string
+    }
 }) => ECharts
 ```
 
@@ -295,6 +299,10 @@ Resizes chart, which should be called manually when container size changes.
 
         Specify whether or not to prevent triggering events.
 
+    + `animation`
+
+        Whether to apply transition animation when resize, including `duration` and `easing`, the default `duration` is 0, that is, no transition animation is applied.
+
 **Tip:** Sometimes charts may be placed in multiple tabs. Those in hidden labels may fail to initialize due to the ignorance of container width and height. So `resize` should be called manually to get the correct width and height when switching to the corresponding tabs, or specify width/heigth in `opts` explicitly.
 
 ## dispatchAction(Function)
diff --git a/zh/api/echarts-instance.md b/zh/api/echarts-instance.md
index f45146e..0090519 100644
--- a/zh/api/echarts-instance.md
+++ b/zh/api/echarts-instance.md
@@ -272,7 +272,11 @@ myChart.setOption({
 (opts?: {
     width?: number|string,
     height?: number|string,
-    silent?: boolean
+    silent?: boolean,
+    animation?: {
+        duration?: number
+        easing?: string
+    }
 }) => ECharts
 ```
 
@@ -295,6 +299,10 @@ myChart.setOption({
 
         是否禁止抛出事件。默认为 `false`。
 
+    + `animation`
+
+        resize 的时候是否应用过渡动画,包含时长`duration`和缓动`easing`两个配置,默认`duration`为 0,即不应用过渡动画。
+
 **Tip:** 有时候图表会放在多个标签页里,那些初始隐藏的标签在初始化图表的时候因为获取不到容器的实际高宽,可能会绘制失败,因此在切换到该标签页时需要手动调用 `resize` 方法获取正确的高宽并且刷新画布,或者在 `opts` 中显示指定图表高宽。
 
 ## dispatchAction(Function)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org