You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2022/07/28 08:27:54 UTC

[echarts-doc] 01/01: doc: add doc for graphroam, georoam, and treeroam

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

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

commit fa4d5a494eb32f746b1de191268dd624e98d7b3f
Author: Ovilia <zw...@gmail.com>
AuthorDate: Thu Jul 28 16:27:31 2022 +0800

    doc: add doc for graphroam, georoam, and treeroam
---
 en/api/events.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 zh/api/events.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 106 insertions(+), 2 deletions(-)

diff --git a/en/api/events.md b/en/api/events.md
index f7a497b4..1ef9c41b 100644
--- a/en/api/events.md
+++ b/en/api/events.md
@@ -235,6 +235,59 @@ Event emitted after range is changed in visualMap.
 }
 ```
 
+## graphroam(Event)
+Event emitted after [series-graph](option.html#series-graph) is roamed.
+
+```ts
+{
+    type: 'graphroam',
+    seriesId: string,
+    zoom: number, // zoom ratio of roaming once
+    originX: number,
+    originY: number
+}
+```
+
+## georoam(Event)
+Event emitted after [geo](option.html#geo) is roamed.
+
+```ts
+{
+    type: 'georoam',
+    componentType: 'geo' | 'series',
+    seriesId: string,
+    zoom: number, // zoom ratio of roaming once
+    originX: number,
+    originY: number
+}
+```
+
+## treeroam(Event)
+Event emitted after [series-tree](option.html#series-tree) is roamed.
+
+`treeroam` events include two types. One is triggered by panning and the parameters are:
+
+```ts
+{
+    type: 'treeroam',
+    seriesId: string,
+    dx: number,
+    dy: number
+}
+```
+
+The other type is triggered by zooming and the parameters are:
+
+```ts
+{
+    type: 'treeroam',
+    seriesId: string,
+    zoom: number, // zoom ratio of roaming once
+    originX: number,
+    originY: number
+}
+```
+
 ## timelinechanged(Event)
 **ACTION:** [timelineChange](~action.timeline.timelineChange)
 Event emitted after time point in timeline is changed.
@@ -540,4 +593,3 @@ Use `dispatchAction` will trigger this event, but user clicking won't trigger it
     }
 }
 ```
-
diff --git a/zh/api/events.md b/zh/api/events.md
index a91c5f35..4f79f611 100644
--- a/zh/api/events.md
+++ b/zh/api/events.md
@@ -233,6 +233,59 @@ chart.on('mouseover', {seriesIndex: 1, name: 'xx'}, function (params) {
 }
 ```
 
+## graphroam(Event)
+关系图 [series-graph](option.html#series-graph) 的缩放和平移漫游事件。
+
+```ts
+{
+    type: 'graphroam',
+    seriesId: string,
+    zoom: number, // 单次缩放倍数
+    originX: number,
+    originY: number
+}
+```
+
+## georoam(Event)
+地理坐标系 [geo](option.html#geo) 的缩放和平移漫游事件。
+
+```ts
+{
+    type: 'georoam',
+    componentType: 'geo' | 'series',
+    seriesId: string,
+    zoom: number, // 单次缩放倍数
+    originX: number,
+    originY: number
+}
+```
+
+## treeroam(Event)
+树图 [series-tree](option.html#series-tree) 的缩放和平移漫游事件。
+
+`treeroam` 事件包括两种,其中一种是平移,事件参数为:
+
+```ts
+{
+    type: 'treeroam',
+    seriesId: string,
+    dx: number,
+    dy: number
+}
+```
+
+另一种是缩放,参数为:
+
+```ts
+{
+    type: 'treeroam',
+    seriesId: string,
+    zoom: number, // 单次缩放倍数
+    originX: number,
+    originY: number
+}
+```
+
 ## timelinechanged(Event)
 **ACTION:** [timelineChange](~action.timeline.timelineChange)
 时间轴中的时间点改变后的事件。
@@ -526,4 +579,3 @@ chart.on('finished', function () {
     }
 }
 ```
-


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