All Products
Search
Document Center

DataV:The Dual Axis Line Chart

Last Updated:May 10, 2023

This topic describes the chart style and configuration panel of dual axis line chart.

Chart Style

A dual axis line chart chart is a type of line chart. Compared with a line chart chart, a dual axis line chart category corresponds to two values. It supports only two series of data configurations. It can intelligently display the two-dimensional data change trend by using a combination of lines and areas. 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.
  • Chart image..png

    • Margins: the distance between the area of the line chart and the upper, lower, left, and right borders of the widget. Unit: pixels. Default value: pixels.

    • Empty Data: If you turn on the switch, the line passes through the point whose y-axis value is 0.

    • Data Limit: You can specify a maximum number of input data records. The system loads the maximum number of input data records for layout, drawing, and computing. This ensures the visual application.

    • Legend: the style of the legend. You can click the 开关图标icon to display or hide the legend.

      Parameter

      Description

      Text

      Set the style of the legend text, including the text font style, font size, font color, and font weight. For more information, see color picker instructions.

      Layout

      The positional relationship between the legends.

      • Padding

        • Horizontal Padding: The distance between the left and right sides of adjacent legends. This configuration items is only valid when there are multiple series.

        • Vetrtical Padding: the distance between the legend and the upper and lower boundaries of the widget.

      • Position: the position of the legend relative to the start coordinates of the widget. Valid values: Top Left, Top Center, Top Right, Bottom Left, Bottom Center, and Bottom Right.

  • Coordinate Axis: The component coordinate axes include the X Axis, Y Axis, and Z Axis.

    • X Axis image..png

      • Show Axis: If you turn on the switch, the x-axis style in the widget is visible. If you turn off the switch, the x-axis style in the widget is invisible.

      • Data Type: the type of the x-axis label data. This field is optional.

        Parameter

        Description

        Numeric

        Supports numeric data such as integers and floating-point numbers.

        Category

        Data of category types such as character and string is supported.

        Time

        The data of the time type needs to be configured data format.

      • Left and Right Margins: the distance between the two ends of the space. Valid values: 0 to 1.

      • Range: the range of the maximum and minimum values of the data on the x-axis. This parameter is available only when the Data Type parameter is set to Numeric or Time.

        • Max Value: the maximum value of the x-axis. You can specify a custom value. The default value is auto. The system automatically calculates the match based on the maximum value, minimum value, and number of tags.

        • Min Value: the minimum value of the x-axis. You can specify a custom value. The default value is auto. The system automatically calculates the match based on the maximum value, minimum value, and number of tags.

      • Interval: the percentage of the interval between two categories on the x-axis. A larger value indicates a larger percentage. Valid values: 0 to 1. This parameter is available only when the Data Type parameter is set to Category.

      • Data Format: data display format, valid only for time data, please configure by referring to the %Y/%m/%d %H:%M:%S format. This parameter is available only when the Data Type parameter is set to Time.

      • Axis Label: the style of the x-axis label. You can click the 开关图标icon to display or hide the x-axis label.

        Note

        If the data format and setting formats are not uniform, the widget will be displayed abnormally.

        Parameter

        Description

        Data Format

        The data format you want to display. This parameter is valid only for time-based and numeric data. Please refer to %m/%d%Y%H:%M:%S time, integer reference d and floating point reference .1f.

        Text

        The text of the x-axis label, including the font style, font size, font color, and font weight. For more information, see the color picker description. Modify the text color.

        Label Display

        The display style of the x-axis label, including:

        • Offset: the distance between the labels on the x-axis. Unit: pixels.

        • Angle: the angle of the label on the x-axis, which can be Horizontal, Incline, or Vertical.

        • Quantity: the number of labels on the x-axis.

        • Axis Unit: the unit of the x-axis label.

      • Axis Line: the style of the x-axis. You can click the 开关图标icon to display the x-axis.

        Color: the color of the x-axis.

      • Grid Lines: the style of the x-axis gridlines. You can click the 开关图标icon to display or hide the x-axis gridlines.

        Color: the color of the x-axis grid lines.

    • Y Axis

      The configuration of the left vertical axis is similar to that of the x-axis. For details, see the x-axis section.

    • Z axis

      The right vertical axis. The configuration is similar to that of the x-axis. For details, see the x-axis section.

  • Series: You can select Series Y or Series Z.

    Note

    By default, dual axis line chart are divided into two series, which are used to configure the data and style of the y-axis and z-axis respectively. Includes series names, polyline styles, dot styles, and area styles.

    image..png
    • Series Name: the name of the series.

    • Line: the style of the line in the series.

      Parameter

      Description

      Width

      The thickness of the line.

      Curve Type

      The type of the line. You can select Smooth Curve or Polyline.

      Style

      The type of the line. You can select Solid Line, Dotted Line, or Dashed Line.

      Color

      The color of the line.

    • Point: the style of the dot on the broken line. You can click the 开关图标icon to control the appearance and concealment of the dot.

      Parameter

      Description

      Radius

      The radius of the dot. Unit: pixels.

      Color

      The color of the dots.

    • Area: the style of the area covered by the line. You can click the 开关图标icon to display or hide the area.

      Color: the color style of the area. Color and Gradient Fill are supported.

    • Value Label: the value label style of the line in this series, including the font style, weight, font size, and color of the label text. Click the 开关图标icon to control the display of value labels.

  • Other

    • Easing Animation: the animation effect style of the chart. You can click the 开关图标icon to enable or disable the animation effect. image..png

      Parameter

      Description

      Animation Settings

      • Easing Effect: the easing effect of the animation. The system provides a variety of common easing effects for you to choose from.

      • Animations of All Series In Sequence: If you turn on the switch, the animation of each series is played in sequence. If you turn off the switch, the animation of all series is played together.

      Entrance Animation

      The duration of the first animation rendered by the component. Unit: ms.

      Update Animation

      • Duration for Data Update: the duration of the animation when the widget data is updated. Unit: ms.

      • Update from Latest Status: If you turn on the switch, the animation starts from the previous position when the widget data is updated. If you turn off the switch, the animation starts from the initial position when the widget data is updated.

    • Tooltip: The style of the dialog box that appears when you mouse over or click a polyline dot on a preview or publish page. Click the 开关图标icon to control the display of the dialog box. image..png

      Parameter

      Description

      Trigger Mode

      • Trigger Item Type: dialog box the type of the target to be triggered. This parameter is optional, including Item and Axis.

      • Trigger Action: dialog box the action to be triggered. This parameter is optional, including Hover and Click.

      Text Style

      The style of the text in the dialog box, including the font style, weight, font size, and color.

      Fade Delay

      When the trigger condition is not met, the dialog box will disappear. This configuration items sets the delay time before the dialog box disappears, in ms.

      Background Box

      The background box style of the dialog box.

      • Background Color: the background color of the dialog box.

      • Dimensions: the width and height of the dialog box. Unit: pixels. Click the 开关图标icon to turn custom dialog box on or off.

      • Padding: the inner margin of the dialog box. Unit: pixels.

      • Offset

        • Horizontal Offset: the horizontal offset of the dialog box relative to the mouse arrow. Unit: px.

        • Vertical Offset: the vertical offset of the dialog box relative to the mouse arrow. Unit: px.

      • Border

        • Border Width: the border size of the dialog box. Unit: pixels.

        • Border Color: The border color of the dialog box.

Data Panel image..png

The dual axis line chart has a special data format and is divided into three fields: x, y, and z. The y field value and the z field value respectively represent the corresponding points of the two polylines on their axes.

Configuration field description

Parameter

Description

x

The category of each dot in the line chart, that is, the value of the x-axis. The field type and format must be consistent with the label data type and format on the x-axis in the configuration items.

y

The value of the left y-axis of each dot in the line chart.

z

The value of the right z-axis of each dot in the line chart.

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 Panelimage..png

Select the Enable check box to enable interactions between widgets. When a dual axis line chart dot is clicked, a data request is triggered and a callback value is thrown to dynamically load the data of different dots. By default, the x, y, and z values are returned. For more information, see Configure the callback ID of a ticker board.

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 Dual Axis Line Chart in the Added Nodes pane. You can view the dual axis line chart parameters in the canvas, as shown in the following figure. 双轴折线图蓝图参数

    • Event

      Event

      Description

      On Completion of Data Interface Request

      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.

      On Failure of Data Interface Request

      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.

      On Click of Data Item

      The event that is raised when the dual axis line chart dot is clicked, along with the data item corresponding to the dot.

    • Action

      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, dual axis line chart the API data source is configured as 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 Interface

      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.

      Highlight

      Highlight the element corresponding to the data item. The following example shows the reference data.

      return {
        "data": {},
        "options": {
          "style": {
            "stroke": "#f00",
            "fill": ""
          },
          "selectMode": "single",
          "cancelHighlightFirst": false
        }
      }

      Cancel Highlight

      Cancel the highlighting of the element corresponding to the data item. The following example shows the reference data.

      return {
        "data": {},
        "options": {
          "mode": "single"
        }
      }

      Clear Widget

      Clear component data. No parameters are required.

      Update Widget Configurations

      Style configurations of widgets are dynamically updated. Before this action is executed, you must click the widget in Canvas Editor, click the Settings tab in the right-side panel, and click Copy Configurations to... to obtain widget configurations. After that, change the style field for the data processing node in Blueprint Editor.

      Show

      Displays the widget. The following example shows the reference data.

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

      Hide

      Displays the widget. The following example shows the reference data.

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

      Hide/Show

      A widget is hidden or shown. Examples of reference data are as follows.

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

      Move

      Move a widget to a specified location. The following example shows the reference data.

          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"
            }
          }