add animation config in resize
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 @@
(opts?: {
width?: number|string,
height?: number|string,
- silent?: boolean
+ silent?: boolean,
+ animation?: {
+ duration?: number
+ easing?: string
+ }
}) => ECharts
```
@@ -295,6 +299,10 @@
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 @@
(opts?: {
width?: number|string,
height?: number|string,
- silent?: boolean
+ silent?: boolean,
+ animation?: {
+ duration?: number
+ easing?: string
+ }
}) => ECharts
```
@@ -295,6 +299,10 @@
是否禁止抛出事件。默认为 `false`。
+ + `animation`
+
+ resize 的时候是否应用过渡动画,包含时长`duration`和缓动`easing`两个配置,默认`duration`为 0,即不应用过渡动画。
+
**Tip:** 有时候图表会放在多个标签页里,那些初始隐藏的标签在初始化图表的时候因为获取不到容器的实际高宽,可能会绘制失败,因此在切换到该标签页时需要手动调用 `resize` 方法获取正确的高宽并且刷新画布,或者在 `opts` 中显示指定图表高宽。
## dispatchAction(Function)