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/09/10 05:09:13 UTC
[echarts-handbook] branch master updated: update universal
transition import in minimal bundle
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-handbook.git
The following commit(s) were added to refs/heads/master by this push:
new 63d2735 update universal transition import in minimal bundle
63d2735 is described below
commit 63d2735fcfb16febfabeb7f2846d2154758bd30e
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Sep 10 13:09:02 2021 +0800
update universal transition import in minimal bundle
---
contents/en/basics/import.md | 9 ++++++++-
contents/en/basics/release-note/5-2-0.md | 7 +++++++
contents/zh/basics/import.md | 7 +++++++
contents/zh/basics/release-note/5-2-0.md | 7 +++++++
layouts/default.vue | 4 ++++
5 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/contents/en/basics/import.md b/contents/en/basics/import.md
index c888ef3..25d497a 100644
--- a/contents/en/basics/import.md
+++ b/contents/en/basics/import.md
@@ -10,7 +10,7 @@ You can install ECharts via npm using the following command
npm install echarts --save
```
-## Introduce ECharts
+## Import ECharts
```js
import * as echarts from 'echarts';
@@ -52,6 +52,8 @@ import {
TooltipComponent,
GridComponent
} from 'echarts/components';
+// Features like Universal Transition and Label Layout
+import { LabelLayout, UniversalTransition } from 'echarts/features';
// Import the Canvas renderer, note that introducing the CanvasRenderer or SVGRenderer is a required step
import { CanvasRenderer } from 'echarts/renderers';
@@ -61,6 +63,8 @@ echarts.use([
TooltipComponent,
GridComponent,
BarChart,
+ LabelLayout,
+ UniversalTransition,
CanvasRenderer
]);
@@ -95,6 +99,7 @@ import {
GridComponent,
GridComponentOption
} from 'echarts/components';
+import { LabelLayout, UniversalTransition } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';
// Combine an Option type with only required components and charts via ComposeOption
@@ -111,6 +116,8 @@ echarts.use([
TooltipComponent,
GridComponent,
BarChart,
+ LabelLayout,
+ UniversalTransition,
CanvasRenderer
]);
diff --git a/contents/en/basics/release-note/5-2-0.md b/contents/en/basics/release-note/5-2-0.md
index 3af0156..74bc550 100644
--- a/contents/en/basics/release-note/5-2-0.md
+++ b/contents/en/basics/release-note/5-2-0.md
@@ -122,6 +122,13 @@ or between Sunburst and Treemap, or even between very flexible custom series can
> Note that you need to configure the series ids to ensure that there is a one-to-one correspondence between the series that need to be animated for the transition.
+> Minimal bundle needs to import this feature manually.
+>
+> ```ts
+> import { UniversalTransition } from 'echarts/features';
+> echarts.use([UniversalTransition]);
+> ```
+
### Data split and merge animations
In addition to the common update of data values, sometimes we also encounter data aggregation, drill-down and other updates after interactions, when we can not directly apply one-to-one transitions, but need to use more animation effects like splitting and merging to express the transformation of data.
diff --git a/contents/zh/basics/import.md b/contents/zh/basics/import.md
index 5bb7297..b4d16e2 100644
--- a/contents/zh/basics/import.md
+++ b/contents/zh/basics/import.md
@@ -52,6 +52,8 @@ import {
TooltipComponent,
GridComponent
} from 'echarts/components';
+// 标签自动布局,全局过渡动画等特性
+import { LabelLayout, UniversalTransition } from 'echarts/features';
// 引入 Canvas 渲染器,注意引入 CanvasRenderer 或者 SVGRenderer 是必须的一步
import { CanvasRenderer } from 'echarts/renderers';
@@ -61,6 +63,8 @@ echarts.use([
TooltipComponent,
GridComponent,
BarChart,
+ LabelLayout,
+ UniversalTransition,
CanvasRenderer
]);
@@ -95,6 +99,7 @@ import {
GridComponent,
GridComponentOption
} from 'echarts/components';
+import { LabelLayout, UniversalTransition } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';
// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
@@ -111,6 +116,8 @@ echarts.use([
TooltipComponent,
GridComponent,
BarChart,
+ LabelLayout,
+ UniversalTransition,
CanvasRenderer
]);
diff --git a/contents/zh/basics/release-note/5-2-0.md b/contents/zh/basics/release-note/5-2-0.md
index 9918056..eb0d772 100644
--- a/contents/zh/basics/release-note/5-2-0.md
+++ b/contents/zh/basics/release-note/5-2-0.md
@@ -122,6 +122,13 @@ setInterval(() => {
> 注意需要配置系列的 id 来保证需要动画过渡的系列之间能够一一对应。
+> 按需引入的代码需要单独引入该特性
+>
+> ```ts
+> import { UniversalTransition } from 'echarts/features';
+> echarts.use([UniversalTransition]);
+> ```
+
### 数据的分裂和合并动画
除了常见的数据值的更新,有时候我们还会碰到数据的聚合、下钻等交互后的更新,这个时候我们就不能直接应用一对一的动画过渡,而需要使用更多像分裂、合并这样的动画效果,来通过正确的图形动画表达出数据的变换。
diff --git a/layouts/default.vue b/layouts/default.vue
index 127a59d..4783f26 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -157,6 +157,10 @@ body {
:last-child {
margin-bottom: 0;
}
+
+ pre {
+ padding: 0.5em;
+ }
}
pre {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org