The Range Column Chart widget

更新时间:
复制 MD 格式

This topic describes the chart style and configuration panel of a range bar chart.

Chart Style

A range bar chart is a type of bar chart, which can more clearly show the differences in the range distribution of various mesh data. You can obtain the range between the minimum and maximum values of data to display the data styles of column chart in different categories.

image..png

Settings Panelimage..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: the distance between the column chart area and the upper, lower, left, and right borders of the widget. Unit: pixels. Default value: pixels. Click the 开关图标icon to control the display of custom margins.

    • Column Width: the width of the column. If the custom width is too large, different columns in the same group overlap. Set the width value with caution. Click the 开关图标icon to control the display of the custom column width.

    • Value Label: the style of the value label of each column. You can click the 开关图标icon to display or hide the value label.

      Parameter

      Description

      Top Label

      The style of the value label text above the column, including the font, text weight, font size, and color of the upper label text.

      Bottom Label

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

    • Legend: the legend style of the column chart. The legend style takes effect when the data panel contains s series of field data. 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 relative to the start coordinate of the widget. Valid values: Top Left, Top Center, Top Right, Bottom Left, Bottom Center, and Bottom Right.

  • Coordinate Axes: You can select X Axis or Y 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 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 column chart x-axis label. You can click the 开关图标icon to display or hide the x-axis label.

        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.

        Label Display

        The offset of the x-axis label in the x-axis and y-axis directions and the angle at which the labels are arranged. Valid values: Horizontal, Oblique, and Vertical.

        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 column 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 column chart x-axis. You can click 开关图标the icon to display the x-axis.

        Color: the color of the x-axis.

      • Axis Ticks: the style of the column chart x-axis tick mark. You can click 开关图标the icon to display or hide the tick mark on the x-axis.

        Parameter

        Description

        Color

        The color of the x-axis tick marks.

        Length

        The length of the x-axis tick mark.

      • Grid Lines: the style of the column chart 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.

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

      • Axis Label: the style of the column chart 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.

        Label Display

        The offset of the y-axis label in the x-axis and y-axis directions and the angle at which the labels are arranged. Valids: Horizontal, Oblique, and Vertical.

        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 column chart 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 of the column chart. You can click 开关图标the icon to display the y-axis.

        Color: the color of the y-axis.

      • Axis Ticks: the style of the column chart y-axis tick mark. You can click the 开关图标icon to display or hide the tick mark on the y-axis.

        Parameter

        Description

        Color

        The color of the tick marks on the y-axis.

        Length

        The length of the y-axis tick mark.

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

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

  • Series image..png

    • 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

      Mapping Between

      • s Field Value: data series mapping value, which can be customized. If the field is 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.

      Note

      This parameter takes effect only when you select Enable configuration items Series Mapping.

      Fill Color

      The fill color of the column chart under this series.

    • 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 Mapping Between configuration items is disabled.

  • Other

    Tooltip: The style of the dialog box that appears when you move the pointer over or click the column chart on the preview or publish page. 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 the 开关图标icon to turn the indicator style 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 size 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 column in the column chart, that is, the value of the x-axis.

y1

The minimum value in the range of y-axis data for each bar in the bar graph.

y2

The maximum value in the range of y-axis data for each bar in the bar graph.

s

(Optional) data series a value.

Table 1. Parameters
Parameter Description
Controlled Mode If 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 Request After 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 Source In 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 Filter If 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 Result The 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

Interaction Event

Description

On Click of Data Item

Select the Enable check box to enable interactions between widgets. When a column of an interval range histogram is clicked, a data request is triggered, a callback value is thrown, and data of different columns is dynamically loaded. By default, the x, y1, y2, s, and values values are returned. For more information, see Configure the callback ID of a ticker board.

On Click of Legend

Select the Enable check box to enable interactions between widgets. When you click the legend of an interval range bar chart, a data request is triggered, a callback value is thrown, and data of different bars is dynamically loaded. By default, the value and checked values in the data are returned. For more information, see Configure the callback ID of a ticker board component.

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 the Column Chart widget in the Added Nodes pane. You can view the parameters of the column chart on 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 a column of the interval range histogram is clicked, and the data item corresponding to the column is also raised.

      On Click of Legend

      The event that is raised when the legend of an interval range histogram is clicked, and the data item corresponding to the legend is also raised.

    • 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, if the API data source is set to https://api.test and the data passed to the Request Data Interface is set to { 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. Examples of reference data are as follows.

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

      Cancel Highlight

      Cancels the highlighting of the element corresponding to the data item. Examples of reference data are as follows.

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

      The following example shows how to hide a widget.

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

      Hide/Show

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

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