All Products
Search
Document Center

DataV:The Area Chart widget

Last Updated:Nov 29, 2024

This topic describes the area chart chart style and configuration panel.

Chart Style

A area chart is a line chart that uses a combination of lines and areas to intelligently display the trends of multi-dimensional real-time data. You can customize the y-axis interval, configure multiple series data, and display the ticker board of a series.

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 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: Click the 开关图标icon to specify the custom margins. The distance between the area chart area and the four boundaries of the widget. Default value: px.

    • Area Style: The style of the area part within the area chart.

      Parameter

      Description

      Curve Smoothing

      If you turn on the switch, the area chart inner polyline is turned on to smooth curve style; if you turn off the switch, the area chart polyline is turned on to normal polyline style.

      Fill Opacity

      The fill transparency value of the area. Valid values: 0 to 1.

    • Line Style: the width of the line. You can click the 开关图标icon to display the line style.

    • Data Point Mark: the marker style of a data point in the area chart. You can click the 开关图标icon to control whether the marker style is visible or hidden.

      Parameter

      Description

      Mark Shape

      The shape of the data point. Valid values: Dot, Square, Triangle, and Diamond.

      Mark Size

      The size of the data point. Unit: px.

    • Value Label: the style of the value label of each data point on a polyline. You can click the 开关图标icon to control whether the value label appears or not.

      Parameter

      Description

      Position

      The position of the value label text. Valid values: Data Point, End of Line, and Adaptive to Area.

      Text Style

      The font style, text weight, font size, and color of the value label text.

      Note

      If the value label position is End of Line or Adaptive to Area, the value label text color is the same as the series.

      Offset

      The offset value of the value label in the horizontal and vertical directions.

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

      Parameter

      Description

      Paging Allowed

      If the switch is turned on, page turning can be allowed when the number of legends is too large to be arranged. If the switch is turned off, page turning cannot be allowed.

      Layout

      The position of the legend in relation to the start coordinates of the widget. You can select Top Left, Top Center, Top Right, Bottom Left, Bottom Center, or Bottom Right.

      Legend Mark

      The style of the legend tag, including the shape style and size of the legend.

      Legend Text

      The style of the legend text, including the font style, text weight, font size, and color of the legend.

  • Coordinate Axes: You can specify two axes: X Axis and Y Axis.

    • X Axisimage..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 data on the x-axis.

        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.

      • Axis Label: the style of the area chart 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 YYYY/MM/DD HH:mm:ss time, integer reference d and floating point reference .1f.

        Text Style

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

        Quantity

        The number value displayed by the x-axis label. You can click 开关图标the icon to specify the number of x-axis labels.

      • Axis Title: the style of the area chart x-axis title. You can click the 开关图标icon to display or hide the x-axis title.

        Parameter

        Description

        Title

        The text content of the x-axis title.

        Offset

        The offset value of the x-axis title. Unit: px.

        Text Style

        The font style, text weight, font size, and color of the x-axis title text.

      • Axis Line: the style of the x-axis. You can click the 开关图标icon to display or hide 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 image..png

      • Show Axis: 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 minimum value range of the y-axis. You can enter or select custom values. You can click the 开关图标icon to specify a custom range for the minimum value of the y-axis.

        • 0: By default, the minimum value of the y-axis range is 0.

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

        Note

        After you enable the custom data range for the y-axis, some minimum data may become invalid. We recommend that you disable the custom data range.

      • Data Format: the display format of the y-axis label value. Valid values: Default, 11 (Integer), 11.1 (Float), 11.11 (Float), 11%, 11.1%, and 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 Style

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

        Quantity

        The y-axis label displays the quantity value. You can click the 开关图标icon to specify the number of y-axis labels.

      • Axis Title: the style of the y-axis title. You can click the 开关图标icon to display or hide the y-axis title.

        Parameter

        Description

        Title

        The text content of the y-axis title.

        Offset

        The offset value of the title on the y-axis. Unit: px.

        Text Style

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

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

        Color: the color of the y-axis.

      • Grid Lines: 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..png

    • CSV Data: If you turn on the switch, you can directly use the columns in the CSV data file to map to values and data series. If you turn off the switch, the Series Mapping configuration items take effect. You can click the 开关图标icon to display or hide the CSV data switch.

      Parameter

      Description

      Auto Extract

      If you turn on the switch, the widget uses CSV data to automatically parse and display the fields. If you turn off the switch, the fields are not automatically parsed.

      Numeric Field Only

      If you turn on the switch, CSV data is parsed only for fields of the data type. If you turn off the switch, CSV data is automatically parsed for all fields.

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

      Parameter

      Description

      Field Mapping

      Column/Field and Series configuration items. This parameter takes effect only when you turn on CSV Data and turn off Auto Extract configuration items.

      • Column/Field the data series field value. You can customize the field value. If the field is empty, the system displays s field values in the widget data as series field values. If this parameter is not empty, you must ensure the order in which data is returned.

      • Series: the display name of the data series series, which can be customized.

      Mapping Between

      s Field Value and Series Name configuration items take effect only when CSV Data is hidden and the Series Mapping configuration items switch is turned on.

      • s Field Value: the data series mapping value, which can be customized. If you leave this parameter empty, the system displays s field values in the component data as series field mapping values. If this parameter is not empty, you must ensure the order in which data is returned.

      • Series Name: the display name of the data series, which can be customized.

      Area Style

      The fill color of the area of the map under this series.

      Data Point Mark

      The color of the area map data marker point stroke in this series.

      Note

      When a data point marker is displayed, the marker stroke color takes effect.

    • Series Mapping: If you turn on the switch, this parameter takes effect when the data contains series s values. You can set the color and name of a specific series by using the Mapping Between parameter. If you turn off the switch, the Field Mapping configuration items is disabled.

  • Other

    • Auxiliary Line: area chart auxiliary line style. You can click the 开关图标icon to enable or disable the auxiliary line. image..png

      Parameter

      Description

      Type

      The type of the auxiliary line. You can select Min Value, Max Value, Average Value, or Median Value.

      Style

      The style of the auxiliary line, including the color, line thickness, and line style of the auxiliary line.

      Auxiliary Description

      The style of the secondary description, including the following:

      • Description: the auxiliary description text.

      • Position: the position of the text on the guide line.

      • Offset: The horizontal or vertical offset of the location of the description text

      • Text Style: the style of the text, including the font style, weight, font size, and color.

    • Interaction Enhancement for Huge Amounts of Data: If too much data is area chart, you can set the data interaction enhancement style. You can click the 开关图标icon to enable or disable the interaction enhancement effect. image..png

      Parameter

      Description

      Interaction Mode

      The data interaction mode. Valid values: Slider and Scroll Bar.

      Note

      The time data type. You cannot use the thumbnail axis to exchange large amounts of data.

      Default Range

      The range of data displayed on the thumbnail axis. The range can be from 0 to 1. This option is available only when the Slider style is enabled.

      Style

      The thumbnail axis foreground and background colors. This option is available only when the Slider style is enabled.

      Direction

      The direction of the scroll bar. Valid values: Horizontal and Vertical. This option is available only when the Scroll Bar style is enabled.

      Width

      The width of the data category column. This option is available only when the Scroll Bar style is enabled.

    • Tooltip: the style of the dialog box that appears when you move the pointer over or click a data point on a polyline on the preview or publish page. You can click the 开关图标icon to turn the dialog box on or off. image..png

      Parameter

      Description

      Text Style

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

      Indicator

      The style of the prompt indicator, including the width, line type, and color of the indicator. Click on 开关图标the icon to turn the indicator on or off.

      Background Box

      The background box style of the dialog box.

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

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

      • Border

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

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

Data Panel

image..png

Configuration field description

Parameter

Description

x

The category of each data point in the line chart, which 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 data point in the line chart, that is, the value of the y-axis.

s

Optional. The series value. If series mapping is enabled configuration items, the mapping field in the data series matches the s.

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

Interaction description

Interaction Event

Description

On Click of Data Item

Select Enable to enable the widget interaction feature. When you click area chart data points on a polyline, a data request is triggered and a callback value is thrown to dynamically load the data of different polyline data points. By default, the x, y, and s values are returned. For more information, see Configure the callback ID of a ticker board.

On Click of Legend

Select Enable to enable the widget interaction feature. When you click the area chart legend, a data request is triggered, a callback value is thrown, and different data is dynamically loaded. For more information, see How to configure the callback ID of a card flip widget.

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 Area Chart in the Imported Nodes pane. You can view the area 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 area chart data point is clicked, along with the data item corresponding to the dot.

      On Click of Legend

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

    • 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, area chart the API data source is configured as http://api.test and the data transferred to the Request Data Interface is { id: '1'}, the final request interface is http://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

      A widget text is cleared without the need to specify parameters.

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

      Show

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

      Hide/Show

      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

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