From 8c31245a928f12e5065359e123f509629e478afd Mon Sep 17 00:00:00 2001
From: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com>
Date: Thu, 15 Sep 2022 15:54:16 +0800
Subject: [PATCH] explorer add edge aggregation (#1626)
* explorer add edge aggregation
* Update visualization-mode.md
* Update property-calculation.md
* Update property-calculation.md
---
.../canvas-operations/visualization-mode.md | 13 ++++++-
.../nebula-explorer/ex-ug-page-overview.md | 3 +-
.../graph-explorer/property-calculation.md | 37 +++++++++++++++++++
mkdocs.yml | 1 +
4 files changed, 51 insertions(+), 3 deletions(-)
create mode 100644 docs-2.0/nebula-explorer/graph-explorer/property-calculation.md
diff --git a/docs-2.0/nebula-explorer/canvas-operations/visualization-mode.md b/docs-2.0/nebula-explorer/canvas-operations/visualization-mode.md
index 9056974207a..02530ce87f9 100644
--- a/docs-2.0/nebula-explorer/canvas-operations/visualization-mode.md
+++ b/docs-2.0/nebula-explorer/canvas-operations/visualization-mode.md
@@ -16,12 +16,21 @@ Exploration of the data on a canvas is possible in 2D mode.
| Parameter | Description |
| ---------- | ------------------------------------------------------------ |
-| Weight Degree | Weight Degree:Automatically resizes vertices according to the number of outgoing and incoming edges of all the vertices on the canvas.
Reset Degree:Resets the vertices on the canvas to their original size. |
-| Detection | Outlier: Detects the vertices that connect no edges on a canvas.
Hang Edge: Detects edges associated with vertices of one degree in the canvas (associated vertices are included).
Loop Detection: Detects the paths that connect a vertex to itself.
N-Step Vertex Detection: Starting from the selected vertex, the vertexes in the outbound direction are displayed on the canvas hop by hop.|
+| Auto | Weight Degree:Automatically resizes vertices according to the number of outgoing and incoming edges of all the vertices on the canvas.
Reset Degree:Resets the vertices on the canvas to their original size.
Edge Aggregation: Automatically aggregate all edges on the canvas that match the aggregation rules.
Edge Disaggregate: Resets the aggregated edges on the canvas. |
+| Detection | Outlier: Detects the vertices that connect no edges on a canvas.
Hang Edge: Detects edges associated with vertices of one degree in the canvas (associated vertices are included).
Loop Detection: Detects the paths that connect a vertex to itself.
N-Step Vertex Detection: Starting from the selected vertex, the vertices in the outbound direction are displayed on the canvas hop by hop.|
+| Aggregation| Aggregate the edges between the vertices: Aggregate the edges between the selected vertices on the canvas.
Cancels aggregation of edges between vertices: Resets the aggregated edges between the selected vertices on the canvas. |
| Edit | Dismiss: Hide the selected vertices and edges on the canvas.
Dismiss Others: Hide the unselected vertices and edges on the canvas.
Undo: Undo the action in the previous step.
Redo: Restore the action that was previously undone. |
For more information about the operations available in 2D mode, see [Canvas](canvas-overview.md).
+### Edge aggregation description
+
+When there are a large number of vertices in the canvas, to enhance the readability and analyzability of the graph, edges with the same start vertex, end vertex and edge type can be aggregated to make the relationship between vertices clearer.
+
+- Edge aggregation automatically displays the number of aggregated edges.
+- Edge aggregation supports the calculation of properties in it. For details, see [Property calculation](../graph-explorer/property-calculation.md).
+- Hovering over the aggregated edge displays the edge type, the number of aggregated edges, edge properties, and property values. If the property calculation was performed, the result is also displayed.
+- In addition to canceling edge aggregation in the upper bar, you can also double-click the aggregated edge or right-click the aggregated edge and select **disaggregate**.
## 3D mode
diff --git a/docs-2.0/nebula-explorer/ex-ug-page-overview.md b/docs-2.0/nebula-explorer/ex-ug-page-overview.md
index 515c297cfc8..85ef8ff780c 100644
--- a/docs-2.0/nebula-explorer/ex-ug-page-overview.md
+++ b/docs-2.0/nebula-explorer/ex-ug-page-overview.md
@@ -36,7 +36,8 @@ Click the icons in the left-side navigation bar to import, analyze, and explore
| ![commonNeighbor](https://docs-cdn.nebula-graph.com.cn/figures/nav-commonNeighbor.png) | Select at least two vertices on the canvas to search for their common neighbors. For more information, see [Graph exploration](graph-explorer/ex-ug-graph-exploration.md). |
| ![findPath](https://docs-cdn.nebula-graph.com.cn/figures/nav-findPath.png) | Find all paths, the shortest path, and the non-loop paths from the source to the destination vertex. For more information, see [Graph exploration](graph-explorer/ex-ug-graph-exploration.md). |
| ![propertyView](https://docs-cdn.nebula-graph.com.cn/figures/nav-propertyView.png) | Choose whether to display the properties of vertices or edges on the canvas. For more information, see [Graph exploration](graph-explorer/ex-ug-graph-exploration.md). |
-| ![graph-algorithm](https://docs-cdn.nebula-graph.com.cn/figures/rightclickmenu-graphCalculation.png)| Perform graph computing based on the vertexes and edges in the canvas. For more Information see [Graph computing](graph-explorer/ex-ug-graph-exploration.md). |
+| ![graph-algorithm](https://docs-cdn.nebula-graph.com.cn/figures/rightclickmenu-graphCalculation.png)| Perform graph computing based on the vertexes and edges on the canvas. For more Information see [Graph computing](graph-explorer/ex-ug-graph-exploration.md). |
+| ![propertyCalculation](https://docs-cdn.nebula-graph.com.cn/figures/icon-nav-propertyCalculation.png)| Perform property calculation based on the aggregated edges on the canvas. For more Information see [Property calculation](graph-explorer/property-calculation.md)。 |
| ![snapshot](https://docs-cdn.nebula-graph.com.cn/figures/snapshot-history.png) | View historical snapshots. For more information, see [Canvas snapshots](canvas-operations/canvas-snapshot.md). |
| ![graphSpace](https://docs-cdn.nebula-graph.com.cn/figures/nav-graphSpace.png) | View all graph spaces. Click a graph space to create a canvas corresponding to it. For more information, see [Choose graph spaces](graph-explorer/13.choose-graphspace.md). |
| ![Help](https://docs-cdn.nebula-graph.com.cn/figures/nav-help.png) | View Explorer documents and NebulaGraph forum. |
diff --git a/docs-2.0/nebula-explorer/graph-explorer/property-calculation.md b/docs-2.0/nebula-explorer/graph-explorer/property-calculation.md
new file mode 100644
index 00000000000..4653c64bb12
--- /dev/null
+++ b/docs-2.0/nebula-explorer/graph-explorer/property-calculation.md
@@ -0,0 +1,37 @@
+# Property calculation
+
+When there are a large number of vertices in the canvas, to enhance the readability and analyzability of the graph, edges with the same start vertex, end vertex and edge type can be aggregated. The aggregated edges can be computed and displayed based on their properties.
+
+## Prerequisites
+
+There were [aggregated edges](../canvas-operations/visualization-mode.md) on the canvas.
+
+## Precautions
+
+- Currently, only summation is supported.
+- Only properties of type INT can be aggregated.
+- Users can select multiple Edge types for aggregation separately.
+- Users can select multiple properties for aggregation separately.
+- An edge can display only one aggregation result. You can hover over the aggregated edge to see all the results.
+
+## Steps
+
+### Method 1
+
+1. In the left navigation bar, click ![propertyCalculation](https://docs-cdn.nebula-graph.com.cn/figures/icon-nav-propertyCalculation.png) to open the **Property Calculation** panel.
+
+2. Click **+** and set the edge type, properties and calculation. You can select multiple attributes to be aggregated separately.
+
+3. Click **Confirm**。
+
+Click **+** to add more edge types for property calculation.
+
+![propertycalculation](https://docs-cdn.nebula-graph.com.cn/figures/propertycalculation-220913-en.png)
+
+### Method 2
+
+1. Right-click the aggregated edge on the canvas and select **Property Calculation**.
+
+2. Set the properties and calculation.
+
+3. Click **Confirm**.
diff --git a/mkdocs.yml b/mkdocs.yml
index 678de4cd337..d3eb505d7bb 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -607,6 +607,7 @@ nav:
- Vertex Filter: nebula-explorer/graph-explorer/node-filtering.md
- Graph exploration: nebula-explorer/graph-explorer/ex-ug-graph-exploration.md
- Graph computing: nebula-explorer/graph-explorer/graph-algorithm.md
+ - Property calculation: nebula-explorer/graph-explorer/property-calculation.md
- Visual query: nebula-explorer/12.query-visually.md
- Canvas:
- Canvas overview: nebula-explorer/canvas-operations/canvas-overview.md