All Products
Search
Document Center

DataV:The Network Diagram widget

Last Updated:Jun 13, 2023

This topic describes the chart style and configuration panel of the relationship network.

Chart Style

A relationship network is a widget that represents the relationships between objects in the form of dots and lines. You can customize the styles of points, lines, and labels, configure multiple series of nodes, and display complex network relationships in visual applications in the form of dots and lines.

image..png

Settings Panel image..png

  • Search for Configurations: In the right-side panel of Canvas Editor, click the Settings tab, and click Search for Configurations in the upper-right corner. Enter the required configuration item in the search box, and click the search icon to quickly locate the configuration item. Fuzzy match is supported. For more information, see Search for asset configurations.
  • Size: indicates the size of a widget, including its pixel width and height. You can click the Proportional resizing icon to proportionally adjust the width and height of a widget. After you click this icon again, you can adjust the width and height as needed.
  • Position: the position of a widget, which is indicated by pixel X and Y coordinates. X-coordinate indicates the pixel distance between the upper-left corner of the widget and the left border of the canvas. Y-coordinate indicates the pixel distance between the upper-left corner of the widget and the upper border of the canvas.
  • Rotation Angle: the angle of a rotation that uses the center point of a widget as the rotation point. The unit is degrees (°). You can use one of the following methods to control the rotation angle of a widget:
    • Directly enter the degrees in the Rotation Angle spin box or click the plus sign (+) or minus sign (-) to increase or decrease the value in the Rotation Angle spin box.
    • Drag the black dot in the Rotation control icon icon.
    • Click the Horizontal flip icon to horizontally flip a widget.
    • Click the Vertical flip icon to vertically flip a widget.
  • Opacity: the opacity of a widget. Valid values: 0 and 1. If this parameter is set to 0, the widget is hidden. If this parameter is set to 1, the widget is completely displayed. Default value: 1.
  • Background Color: the background color of the widget. For more information, see color picker description.

  • force-directed map image..png

    Parameter

    Description

    Margins

    The distance between the force-directed map and each edge of the widget. Unit: pixels.

    Charge strength, attraction /repulsion

    The attraction or repulsion between the charges, the larger the value, the more dense the charge.

    charge distance

    The distance between the charges.

    Gravity

    The gravity of each charge. The greater the gravity, the denser the charge.

    friction factor

    The friction factor between the charges ranges from 0 to 1.

  • Text Label Configuration

    Parameter

    Description

    Font Color

    The color of the text label.

    Font Size

    The font size of the text label.

    Font weight

    The font weight of the text label.

    Centered Font

    Turn on the switch and the text label is centered relative to the charge node.

  • Connection line configuration

    Parameter

    Description

    Connection line color

    The color of the connector.

    Connection line thickness

    The thickness of the connector.

    Connection Line Length

    The length of the connection line.

    Minimum Connection Line

    The minimum value of the connection line.

    Connection Line Maximum Value

    The maximum value of the connection line.

  • Node default configuration

    Parameter

    Description

    Label Category Name

    The name of the label category.

    Node Radius

    The default radius size of the node.

    Node Fill Color

    The default fill color of the node.

    Node Stroke Color

    The default outline color of the node.

    Node Stroke weight

    The default stroke weight of the node.

  • Custom Node Attributes: Click the 加号图标or 垃圾桶图标icon to add or remove a node. Click the 横排列图标or 竖排列图标icon to configure the arrangement styles of multiple custom node series. Click the 复制图标icon to copy the configurations of the selected node series and add a node series with the same configurations.

    Parameter

    Description

    Label Category Name

    You can manually enter a label name. If the label name does not exist in the type field value of the widget data, the default configuration of the node is used.

    Node Radius

    The radius size of the nodes under this category.

    Fill Color

    The fill color of nodes under this category.

    Stroke Color

    The outline color of the nodes under this category.

    Stroke weight

    The stroke weight of the nodes under this category.

Data Panel image..png

Configuration field description

Parameter

Description

nodes

Specify the node. Each element in a JSON array is a JSON struct that contains the following fields:

  • imgPath: If the node needs to use an image, set this parameter to the URL of the image. If the value of this parameter is empty, the node is displayed as a default circle.

  • name: the name of the node.

  • type: the type of the node. You can set this parameter in the Label Category Name section of the configuration panel. The node whose type value is group1 in the preceding figure is configured by using the label category name group1 in the following figure. image..png

links

Set the connection line. Contains the following fields: links字段

  • source: specifies the source node of the connector. The value is the name value of the source node.

  • target: specifies the destination node of the connector. The value is the name value of the destination node.

  • value: Sets the length of the connection line.

Table 1. Parameters
ParameterDescription
Controlled ModeIf you turn on the switch, data is not requested when a widget is initialized. Data requests are triggered only based on callback IDs or the method configured in Blueprint Editor. If you turn off the switch, data requests are automatically triggered. By default, the switch is turned off.
Auto Data RequestAfter you select the Auto Data Request check box, you can enable dynamic polling, and manually specify the polling interval. If you do not select this check box, data is not automatically requested. You must manually refresh the page to request data or use Blueprint Editor or callback ID events to trigger data requests.
Data SourceIn the right-side panel of Canvas Editor, click the Data tab. Click Set next to Static Data. In the Configure Datasource panel, select a data source from the Data Source Type drop-down list. Enter code for data query in the code editor, click Preview Data Response to preview the response of the data source, and then view the response. For more information, see Configure asset data.
Data FilterIf you select the Data Filter check box, you can convert the data structure, filter data, and perform simple calculations. If you click the plus sign (+) next to Add Filter, you can configure the script for the data filter in the editor that appears. For more information, see Use the data filter.
Data Response ResultThe response to a data request. If the data source changes, you can click the Refresh icon icon next to Data Response Result to view the data response in real time.

Interaction Panel

This widget does not support interaction events.

Configure interactions in Blueprint Editor

  1. In Canvas Editor, right-click a widget in the Layer panel and select Add to Blueprint Editor.
  2. Click the Blueprint Editor icon icon in the upper-left corner of the page.
  3. In Blueprint Editor, click Network Diagram in the Added Nodes pane. You can view the relationship network parameters in the canvas, as shown in the following figure. 关系网络蓝图参数

    • Event

      Event

      Description

      When the data interface request is completed

      The event is triggered with the processed JSON data after a data interface request is responded and processed by a filter. For more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      When a data interface request fails

      The event that is returned when a data interface request fails (the request may be due to network problems or interface errors) and is processed by the filter. The event also throws the processed JSON data. For more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

    • Action

      Policy Action

      Description

      Request Data Interface

      This action is performed to request the server data again. The data sent by an upstream data processing node or layer node is used as a parameter. For example, relationship network the API data source is https://api.test and the data transferred to the request data interface is { id: '1'}, the final request interface is https://api.test?id=1.

      Import data

      After data of a widget is processed in accordance with its drawing format, the widget is imported for redrawing. You do not need to request server data again. For more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      Update component configurations

      Style configurations of widgets are dynamically updated. In the Configuration panel, click Copy Configuration to Clipboard to obtain the configuration data of the component. After that, change the style field for the data processing node in Blueprint Editor.

      Display

      The following example shows the widget.

      return{
        "animationType": "",
        "animationDuration": 1000,
        "animationEasing": "linear"
      }

      Hide

      The following example shows how to hide a widget:

      return{
        "animationType": "",
        "animationDuration": 1000,
        "animationEasing": "linear"
      }

      Switch to the implicit state

      The following example shows whether to show or hide a widget.

      return {
        "animationIn": {
          "animationType": "",
          "animationDuration": 1000,
          "animationEasing": "linear"
        },
        "animationOut": {
          "animationType": "",
          "animationDuration": 1000,
          "animationEasing": "linear"
        }
      }

      Move

      A widget is moved to a specified location. Examples of reference data are as follows.

          return{      
            // The positioning type. to indicates absolute positioning, whereas by indicates relative positioning. The default value is to. 
              "positionType": "to",
            // The location, which is indicated by the x and y coordinates. 
            "attr": {
              "x": 0,
              "y": 0
            },
            // The animation type. 
            "animation": {
              "enable": false,
              // The duration in which animation is displayed. 
              "animationDuration": 1000,
              // The animation curve, which can be set to linear|easeInOutQuad|easeInOutExpo. 
              "animationEasing": "linear"
            }
          }