Vertical Capsule Column Chart (v3.0 and later)

更新时间:
复制 MD 格式

This topic describes the style options and the configuration panel for the rounded column chart.

Important

This topic describes the configuration items for the rounded column chart v3.0 and later. For versions earlier than v3.0, see Rounded column chart (earlier than v3.0).

Chart style

The rounded column chart is a type of column chart. Unlike a basic column chart, the rounded column chart widget supports stacking to display multiple data series. This feature lets you effectively display multi-dimensional data differences within a smaller visualization space.

image

Configuration panel

image

  • 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

    • Margin: The distance between the column chart area and the top, bottom, left, and right borders of the widget, in pixels (px).

    • Maximum Load: Specifies the maximum number of data records loaded for layout, rendering, and calculation to ensure the display performance of the visualization application.

    • Column Style: The style of each column in the chart.

      Parameter

      Description

      In-Column Pitch

      The distance from the inner column to the outer capsule shell. The value ranges from 0 to 10. The unit is px.

      Outline Color

      The outline color of the capsule column.

      Border Color

      The color of the outer border of the capsule. For more information, see Color picker.

      Border Weight

      The thickness of the outer border of the capsule.

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

      Parameter

      Description

      Text

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

      Position

      The display position of the value label text. Options are Top, Center, and Bottom.

      Empty Value Data

      Turn on this switch to show value labels in the column even if the data is empty. Turn off this switch to hide value labels if the data is empty.

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

      Parameter

      Description

      Text

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

      Layout

      The positional relationship between legend items.

      • Spacing

        • Horizontal Spacing: The horizontal distance between adjacent legend items. This setting is effective only when there are multiple series.

        • Vertical Spacing: The vertical distance between the legend and the top and bottom borders of the widget and chart.

      • Position: The position of the legend relative to the widget's starting coordinate. Options are Top Left, Top Center, Top Right, Bottom Left, Bottom Center, and Bottom Right.

  • Axes: The x-axis and y-axis of the widget.

    • x-axisimage

      • Show x-axis: Turn on this switch to show the x-axis, or turn it off to hide the x-axis.

      • Padding: The amount of blank space on the left and right sides of the x-axis. The value can range from 0 to 1.

      • Interval: The distance between columns on the x-axis. A larger value results in thinner columns and a wider interval. The value can range from 0 to 0.95.

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

        Parameter

        Description

        Text

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

        Axis Label Display

        • Angle: The angle of the x-axis labels. Options are Horizontal, Slanted, and Vertical.

        • Quantity: The number of x-axis labels.

        • Axis Unit: The unit for the x-axis labels.

      • Axis Line: The style of the x-axis line. You can click the 开关图标 icon to show or hide the x-axis line.

        Color: The color of the x-axis line.

      • Gridline: The style of the x-axis gridlines. You can click the 开关图标 icon to show or hide the x-axis gridlines.

        Color: The color of the x-axis gridlines.

    • y-axisimage

      • Show y-axis: Turn on this switch to show the y-axis, or turn it off to hide the y-axis.

      • Range: The range for the y-axis.

        Maximum: The maximum value for the y-axis. You can enter a custom value or select one of the following system options:

        • Data Max: Uses the maximum value from the data source.

        • Auto Round: The system automatically calculates the value based on the maximum and minimum data values and the number of data points.

      • Axis Label: The style of the y-axis labels. You can click the 开关图标 icon to show or hide the y-axis labels.

        Parameter

        Description

        Display Format

        The display format for the y-axis label values. Options are Default, 11 (Integer), 11.1 (Float), 11.11 (Float), 11%, 11.1%, and 11.11%.

        Text

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

        Axis Label Display

        The number and unit of the y-axis labels.

      • Axis Line: The style of the y-axis line. You can click the 开关图标 icon to show or hide the y-axis line.

        Color: The color of the y-axis line.

      • Gridline: The style of the y-axis gridlines. You can click the 开关图标 icon to show or hide the y-axis gridlines.

        Color: The color of the y-axis gridlines.

  • Seriesimage

    Data Series: You can click the 加号图标 or 垃圾桶图标 icon on the right to add or delete a data series. You can click the 横排列图标 or 竖排列图标 icon to configure the arrangement of multiple data series. You can click the 复制图标 icon to copy the current data series configuration and create a new series with the same settings.

    Parameter

    Description

    Series Name

    The name of the data series. You can customize the name. If left empty, the system uses the value of the s field from the widget data as the series name. If you enter a name, ensure the data is returned in the correct order.

    Color

    The color of the columns in this series.

  • Other

    • Easing Animation: The animation effect for the column chart. You can click the 开关图标 icon to enable or disable the animation effect.image

      Parameter

      Description

      Animation Settings

      • Easing Effect: The easing effect for the animation. The system provides several common animation easing effects.

      • Animate Series Sequentially: Turn on this switch to play animations for each series in sequence. Turn off this switch to play animations for all columns simultaneously.

      Entrance Animation

      The duration of the animation when the widget first renders. The unit is ms.

      Update Animation

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

      • Start from Previous Position: Turn on this switch to start the animation from the previous data position when the widget data is updated. Turn off this switch to start the animation from the initial position.

    • Tooltip: The style of the tooltip that appears when you hover over or click a column in Preview or Publish mode. You can click the 开关图标 icon to enable or disable the tooltip.image

      Parameter

      Description

      Disappear Delay

      The delay before the tooltip disappears after the trigger condition is no longer met. The unit is ms.

      Trigger Methods

      • Trigger Type: The target type that triggers the tooltip. Options include Data Item and Axis.

      • Trigger Action: The action that triggers the tooltip. Options include Hover and Click.

      Text Style

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

      Background Box Style

      The style of the tooltip's background box.

      • Background Color: The background color of the tooltip.

      • Custom: The width and height of the tooltip in pixels. Click the 开关图标 icon to enable or disable a custom tooltip.

      • Padding: The internal padding of the tooltip in pixels.

      • Offset

        • Horizontal Offset: The horizontal offset of the tooltip relative to the mouse pointer position. The unit is px.

        • Vertical Offset: The vertical offset of the tooltip relative to the mouse pointer position. The unit is px.

      • Border

        • Border Weight: The thickness of the tooltip border in pixels.

        • Border Color: The color of the tooltip border.

Data panel

image

Field descriptions

Field

Description

x

The category of each column in the chart, which is the x-axis value.

y

The value of each column in the chart, which is the y-axis value.

s

(Optional) The corresponding data series 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

You can select Enable to turn on the widget's interaction features. When you click a column in the rounded column chart, a data request is triggered and a callback value is returned. This can be used to dynamically load data for other components. By default, the x, y, and s values from the data are returned. For more information about specific configurations, see Configure a callback ID for a ticker board.

Blueprint editor interaction configuration

  1. In the canvas editor, right-click the widget and select Export to Blueprint Editor.

  2. You can click the 蓝图图标 icon in the upper-left corner of the page.

  3. On the blueprint editor configuration page, click the Rounded Column Chart widget in the Imported Nodes pane. The configuration parameters for the chart appear on the canvas, as shown in the following figure.垂直胶囊柱状图蓝图参数V3.0以上版本

    • Events

      Event

      Description

      When Rounded Column Chart API Request is Completed

      This event is triggered when the response from a data API request is processed by the filter. The event returns the processed data in JSON format. For a sample of the response data, see the Data Response section on the Data tab of the widget's configuration panel in the canvas editor.

      Vertical Capsule Column Chart API Request Failures

      This event is triggered when a data API request fails due to issues such as network problems or API errors. The filter then processes the data from the failed request and returns the result in JSON format. For a data example, see the Data Response section on the Data tab of the widget's configuration panel in the canvas editor.

      When a Data Item is Clicked

      This event is triggered when you click a column in the rounded column chart. The event returns the data item that corresponds to the clicked column.

    • Actions

      Action

      Description

      Request vertical capsule column chart API

      Sends a new request to the server for data. Data from an input data processing node or a layer node is used as a parameter. For example, if the API data source for the vertical capsule column chart is set to https://api.test and the data passed to the Request vertical capsule column chart API action is { id: '1'}, the final API request is https://api.test?id=1.

      Import vertical capsule column chart API

      Processes data that is in the component's drawing format and imports it to redraw the component. This action does not require a new request to the server. For a data example, see the Data Response area on the Data tab in the component's configuration panel in the canvas editor.

      Highlight

      Highlights the element corresponding to a data item. The following is a reference data example.

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

      Cancel highlight

      Removes the highlight from the element corresponding to a data item. The following is a reference data example.

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

      Clear component

      Clears the component data. No parameters are required.

      Update component configuration

      Dynamically updates the style configuration of the component. In the component's Configuration panel, click Copy configuration to clipboard to obtain the component configuration data. Then, in the data processing node on the blueprint editor's configuration page, modify the field values for the corresponding styles.

      Show

      Shows the component. The following is a reference data example.

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

      Hide

      Hides the component. The following is a reference data example.

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

      Toggle visibility

      Toggles the visibility of the component. The following is a reference data example.

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

      Move

      Moves the component to a specified position. The following is a reference data example.

          return{      
            // The movement method. 'to' specifies absolute positioning and 'by' specifies relative positioning. The default is 'to'.
              "positionType": "to",
            // The target position, defined by x and y coordinates.
            "attr": {
              "x": 0,
              "y": 0
            },
            // The animation settings.
            "animation": {
              "enable": false,
              // The animation duration.
              "animationDuration": 1000,
              // The animation easing curve. Valid values are linear, easeInOutQuad, and easeInOutExpo.
              "animationEasing": "linear"
            }
          }