The Line Chart

Updated at:

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

Chart style

A line chart chart is a type of line chart. Compared with a dual axis line chart chart, a line chart category corresponds to only one value. It mainly displays the changes of different data in the same category by configuring multiple series of data. It can intelligently display the multi-dimensional data change trend by combining lines and regions.

image

Configuration Panel image

  • Search Configuration: Click Search Configuration in the upper-right corner of the Configuration panel. In the Search Configuration panel, enter the name of the configuration items that you want to search for to quickly locate the configuration items. 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 锁定长宽比按键icon to lock the aspect ratio of the widget and modify the width and height of the widget in equal proportion. Click again to unlock. The aspect ratio is not limited after unlocking.

  • 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 icon to control the rotation angle of the widget.

    • Click the 左右翻转图标icon to flip the widget style.

    • Click the 上下翻转图标icon to flip the widget style.

  • Opacity: Valid values: 0 to 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

    • Margin: the distance between the four directions of the chart and the border of the widget. Unit: pixels.

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

    • Maximum Load: You can specify the maximum number of input data records to be loaded. 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 about how to modify the text color, see color picker instructions.

      Layout

      The positional relationship between the legends.

      • Spacing

        • Left and Right Spacing: The distance between adjacent legends. This configuration items is only valid when there are multiple series.

        • Distance: 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.

  • Axis: You can select x-axis or y-axis.

    • x axis image

      • X Axis Visible: 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 labeled data.

        Parameter

        description

        Data type

        The type of the x-axis label data. Optional:

        • Numeric: numeric data such as integers and floating-point numbers is supported.

        • Category Type: Data of the character or string type is supported.

        • Time Type: the data of the time type, which needs to be data format.

        Leave blank at both ends

        The distance between the two ends of the x-axis. Valid values: 0 to 1.

        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 valid only for category data.

        Data format

        Display format of data, valid only for time data, please configure by referring to %Y/%m/%d %H:%M:%S format.

        Valid value

        The range of the minimum and maximum values on the x-axis. This parameter is valid only for numeric and time data.

        • Maximum 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.

        • Minimum 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.

      • 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

        Display 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 color picker description. Modify the text color.

        Axis Label Display

        The display style of the x-axis label. Valid values:

        • Offset: the offset of the labels on the x-axis. Unit: pixels.

        • Angle: the angle of the x-axis label. Valid values: Horizontal, Oblique, and Vertical.

        • Quantity: the number of x-axis labels.

        • Axis Unit: the unit of the axis label.

      • Axis: the style of the x-axis. You can click the 眼睛图标icon to display the x-axis.

        Color: the color of the x-axis.

      • Gridlines: 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 image

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

      • Range: the range of the minimum and maximum values of the y-axis.

        Parameter

        description

        Minimum

        The minimum value of the y-axis. You can customize the value or select the value.

        • 0: The default minimum value is 0.

        • Minimum Data Value: the minimum value in the data.

        • Automatic Rounding: The system automatically calculates the maximum value, minimum value, and the number of metric points in the data.

        Upper limit

        The maximum value of the y-axis. You can customize the value or select the value.

        • Maximum Data Value: the maximum value in the data.

        • Automatic Rounding: The system automatically calculates the maximum value, minimum value, and the number of metric points in the data.

      • Display Format: the display format of the y-axis label value. You can select Default, 11 (integer), 11.1 (floating point), 11.11 (floating point), 11%, 11.1%, or 11.11%.

      • Axis Label: the style of the y-axis label. You can click the 眼睛图标icon to display or hide the y-axis label.

        Parameter

        description

        Text

        The font style, text weight, font size, and color of the y-axis label text.

        Axis Label Display

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

        • Angle: the angle style of the y-axis label. You can select Horizontal, Tilt, or Vertical.

        • Quantity: the number of y-axis labels.

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

      • Axis: the style of the y-axis. You can click the 眼睛图标icon to display the y-axis.

        Color: the color of the y-axis.

      • Gridlines: the style of the y-axis gridlines. You can click the 眼睛图标icon to display or hide the gridlines.

        Color: the color of the grid lines on the y-axis.

  • Series image

    data series: Click the 加号图标or 垃圾桶图标icon on the right to add or delete a data series. Click the 横排列图标or 竖排列图标icon to configure the arrangement style of multiple data series. Click the 复制图标icon to copy the selected data series configurations and add a data series with the same configurations.

    • Series Name: the name of the data series, which can be customized. If this parameter is empty, the system displays s field values in the component data as series names. If this parameter is not empty, you must ensure the order in which data is returned.

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

      Parameter

      description

      thickness

      The thickness of the line.

      Curvature

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

      Line

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

      Color

      The color of the line.

    • Dot: 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 Color: the color of the area. You can click the 眼睛图标icon to display or hide the area.

    • Value Label: the value label style of the line in the series, including the font style, weight, font size, and color of the label text. You can click the 眼睛图标icon to control whether the value label appears or not.

  • Remarks

    • Easing Animation: the animation effect style of the widget. You can click the 眼睛图标icon to enable or disable the animation effect. image

      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.

      • Sequential animation of each series: If the switch is turned on, each series of column chart will play the animation in sequence; if the switch is turned off, all columns will play the animation together.

      Admission Animation

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

      Update Animation

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

      • Start From Previous Position: 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.

    • dialog box: the style of the dialog box that appears when you move the pointer over or click the polyline dot on the preview or publish page. you can click 眼睛图标the icon to control the visualization and concealment of the dialog box effect. image

      Parameter

      description

      Trigger Mode

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

      • Trigger Action: dialog box the action to be triggered. This field 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.

      Disappearing Delay Time

      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 Style

      The background box style of the dialog box.

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

      • Custom: the width and height of the dialog box. Unit: pixels. Click the 眼睛图标icon to turn custom dialog box on or off.

      • Pin: 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.

      • Borders

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

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

Data Panel image

Configuration field description

Column

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 each dot in the line chart, that is, the value of the y-axis.

s

Optional. The series value. This field value is used when the series name in the configuration items data series is empty.

Interactive Panel image

Select the Enable check box to enable interactions between widgets. When a 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 s 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 蓝图图标icon in the upper-left corner.

  3. In Blueprint Editor, click line chart in the Imported Nodes pane. You can view the line chart parameters in the canvas, as shown in the following figure. 基本折线图蓝图参数

    • Events

      Events

      Description

      When the line chart 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 the line chart interface request fails

      The event that is returned when a data interface request fails (such as 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.

      When a data item is clicked

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

    • Action

      Action

      Description

      Request line chart 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, line chart the API data source is configured as https://api.test and the data transferred to the request line chart interface is { id: '1'}, the final request interface is https://api.test?id=1.

      Import line chart 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
        }
      }

      Unhighlight

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

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

      Clear components

      Clear component data. No parameters are required.

      Update component 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.

      Display

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

      Switch to the implicit state

      Specifies whether to show or hide a widget. The following example shows the reference data.

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

      China Mobile

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