Updated on 2023-03-03 GMT+08:00

Analyzing Graphs on the Canvas

Scenario

The canvas intuitively displays the graph data. You can also edit and analyze data in this area.

For details about the shortcut keys and interface elements on the canvas, see Table 3.

Procedure

  1. Log in to the GES graph editor. For details, see Accessing the GES Graph Editor.
  2. On the canvas, right-click a vertex or an edge, and perform the following operations:

    • View Property

      Select View Property to view the property information about the selected vertex or edge on the Property tab page.

    • Search by Association
      You can select OUT, IN, and ALL to expand vertices related to the current vertex.
      • OUT: Query the vertices using this vertex as the source vertex.
      • IN: Query the vertices using this vertex as the target vertex.
      • ALL: Query all vertices of OUT and IN.
    • Export

      Export the graph displayed on the canvas.

    • Search by Path

      Query paths between two vertices. All possible paths are listed.

      Procedure: Hold down Ctrl and click two vertices. The first is the source vertex and the second is the target vertex. Then, Right-click and choose Search by Path from the shortcut menu.

      This option is valid only when two vertices are selected. Otherwise, it is dimmed.

      After this function is executed, the canvas is cleared, and then the queried vertex and edge data is returned and rendered in the canvas. A path is formed based on the selected two vertices.

    • Shortest Path of the Vertex Sets
      1. Hold down Shift and box-select a group of vertices (a single vertex or multiple vertices).
      2. Hold down Shift and box-select another group of vertices (a single vertex or multiple vertices).
      3. Right-click in the selection box and choose Shortest Path of the Vertex Sets from the shortcut menu.
      4. In the dialog box that is displayed, you can edit the selected two sets of vertices and click + to quickly add vertices.
      5. Click Run. The shortest paths between two vertex sets are returned.
    • Common Neighbors of Vertex Sets
      • Function

        By box-selecting the common neighbors of two vertex sets, you can intuitively discover the objects associated with the two sets.

      • Procedure
        1. Hold down Shift and box-select two vertex sets.
        2. Right-click a vertex set and choose Common Neighbors of Vertex Sets from the shortcut menu.
        3. In the displayed dialog box, confirm the vertices in the vertex set. You can add or delete vertices and determine whether to carry additional parameters. Then, click Run.

          The Carrying additional constraints option allows you to limit the result set:

          • If this option is not selected, the found common neighbors are the intersection of the neighbors corresponding to the source vertex set and target vertex set.
          • If this option is selected, the found common neighbors are not only the intersection of the neighbors corresponding to the source vertex set and target vertex set, but each vertex in the common neighbor set has at least two neighboring vertices in the source vertex set and target vertex set.
        4. Display the result.
    • Sub Graph: Press and hold Ctrl and select some vertices. The edges between those vertices and the selected vertices form a new graph.
    • Add Edge: You can add an edge using either of the following methods:
      1. Hold down Ctrl, select any two vertices on the canvas, right-click the selected vertices, and choose Add Edge from the shortcut menu to add an edge between the vertices. By default, the vertex selected first is the source vertex, and that selected later is the target vertex. After the edge is added, you can select the label of the edge and set the edge properties.
      2. Select a vertex, press Alt+A, drag the cursor to the target vertex, and left-click to add an edge.
    • Hide: Hide the selected vertex.
    • Delete: Delete a vertex, an edge, multiple vertices, and multiple edges, or delete edges and vertices in batches.
      • To delete a vertex /edge, select the vertex/edge and delete it.
      • To delete multiple vertices/edges, press Ctrl to select the vertices/edges and delete them.
      • To delete vertices and edges in batches, hold down Shift and drag the left key of the mouse to select multiple vertices and edges and delete them.
      After you click Delete, a confirmation dialog box is displayed. Confirm information about the vertices and edges you want to delete and click OK.

      The vertices and edges will be permanently deleted and cannot be restored. Exercise caution when performing this operation.

  3. View the details about a vertex.

    Move the cursor to a non-virtualized vertex. The ID, label, and properties of this vertex are displayed.

    A maximum of six properties of a vertex can be displayed in the pop-up window. When the number of properties is greater than six, you can view all of them in the filter and property tab as shown in Editor page.