The Striped Column Chart widget

更新时间:
复制 MD 格式

Learn about the chart style and settings panel of the Striped Column Chart widget.

Chart Style

A Striped Column Chart is a type of column chart. Unlike a basic column chart, a Striped Column Chart uses discontinuous, configurable lines to form each column. This style highlights multi-dimensional data differences more visually, but takes up more space in visualization applications.

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 four boundaries of the widget. Default value: px.

    • Data Limit: The maximum number of input data records. The system loads up to this number of records for layout, drawing, and computing to ensure application performance.

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

      Stripe: The thickness of each small horizontal line (zebra stripe) and the distance between the lines.

    • 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

      Text

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

      Position

      The position of the value label text. Valid values: Top, Middle, and Bottom.

      Empty Data

      If you turn on the switch, value labels are displayed even when data is empty. If you turn off the switch, value labels for empty data are hidden.

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

      Parameter

      Description

      Text

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

      Layout

      The layout of the legends, including spacing and position.

      • Padding

        • Horizontal Padding: The horizontal distance between adjacent legends. This parameter takes effect only when multiple series exist.

        • Vertical Padding: the distance between the legend and the upper and lower boundaries of the widget and column chart.

      • 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 Axes: You can select X Axis or Y Axis.

    • X Axis image..png

      • Show Axis: If you turn on the switch, the x-axis is displayed. If you turn off the switch, the x-axis is hidden.

      • Left and Right Margins: the distance between the left and right sides of the x-axis. Valid values: 0 to 1.

      • Interval: the distance between columns on the x-axis. The larger the value, the thinner the column and the larger the interval. The value range is 0~0.95.

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

        Parameter

        Description

        Text

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

        Label Display

        The angle of the x-axis label. Valid values: Horizontal, Incline, and Vertical. The number and units of the x-axis labels.

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

      • 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 is displayed. If you turn off the switch, the y-axis is hidden.

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

        Parameter

        Description

        Max Value

        The maximum value of the y-axis. You can enter a custom value or select a preset option.

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

        • Data Max: the maximum value in the data.

        Min Value

        The minimum value of the y-axis. You can enter a custom value or select a preset option.

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

        • Data Min: the minimum value in the data.

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

      • Axis Label: the axis label style of the column chart y-axis. You can click the 开关图标icon to control the display of the axis label.

        Parameter

        Description

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

        Text

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

        Label Display

        The number and units of the y-axis labels.

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

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

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

    Series Name

    The name of the data series. You can set a custom name. If left empty, the value of the s field in the component data is used as the series name. If a custom name is specified, make sure data is returned in the correct order.

    Color

    The color of columns in this series.

  • Other

    • Easing Animation: the animation effect style of the bar 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. Multiple common easing effects are available.

      • Animations of All Series In Sequence of each series: If the switch is turned on, each data series plays the animation in sequence. If the switch is turned off, all columns play the animation simultaneously.

      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 widget data is updated. If you turn off the switch, the animation starts from the initial position.

    • Tooltip: The tooltip that appears when you hover over or click a column on the preview or publish page. Click 开关图标the icon to enable or disable the tooltip. image..png

      Parameter

      Description

      Fade Delay

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

      Trigger Mode

      • Trigger Item Type: The type of target that triggers the tooltip. Valid values: Item and Axis.

      • Trigger Action: The action that triggers the tooltip. Valid values: Hover and Click.

      Text Style

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

      Coordinate Indicator

      The style of the axis indicator displayed when the trigger type is Axis.

      • Type: the type of the axis indicator. Only Coordinate Indicator is supported.

      • Line Style: The line color, width, and type. Valid line types: Solid Line, Dashed Line, and Dotted Line.

      Background Box

      The background style of the tooltip.

      • Background Color: The background color of the tooltip.

      • Dimensions: The width and height of the tooltip. Unit: pixels. Click the 开关图标icon to enable or disable custom dimensions.

      • Padding: The inner margin of the tooltip. Unit: pixels.

      • Offset

        • Horizontal Offset: The horizontal offset of the tooltip relative to the pointer. Unit: px.

        • Vertical Offset: The vertical offset of the tooltip relative to the pointer. Unit: px.

      • Border

        • Border Width: The border thickness of the tooltip. Unit: pixels.

        • Border Color: The border color of the tooltip.

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.

y

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

s

Optional. The corresponding series of data values.

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 you click a column of the zebra column chart, a data request is triggered, a callback value is thrown, and data of different columns is dynamically loaded. By default, the x, y, and s values 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 Striped Column Chart widget in the Added Nodes pane. The following figure shows the configuration parameters of the Zebra Bar chart on the canvas. 斑马柱状图蓝图参数

    • Event

      Event

      Description

      On Completion of Data Interface Request

      Triggered after a data interface request succeeds and is processed by a filter. The processed JSON data is returned. For 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

      Triggered when a data interface request fails due to network issues or interface errors. The processed JSON data is returned after passing through the filter. For 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

      Triggered when a column is clicked. The corresponding data item is returned.

    • Action

      Action

      Description

      Request Data Interface

      Requests server data again. Data from an upstream data processing node or layer node is used as a parameter. For example, if the API data source is https://api.test and the data passed to the Request Data Interface action is { id: '1'}, the final request URL is https://api.test?id=1.

      Import Data Interface

      Imports data that has been processed according to the widget's drawing format for redrawing, without requesting server data again. For specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      Highlight

      Highlights 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

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

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

      Clear Widget

      Clears the widget data. No parameters are required.

      Update Widget Configurations

      Dynamically updates widget style configurations. To use this action, click the widget in Canvas Editor, click the Settings tab in the right-side panel, and click Copy Configurations to... to obtain the widget configurations. Then modify the style field in the data processing node in Blueprint Editor.

      Show

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

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

      Hide

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

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

      Hide/Show

      Toggles the visibility of a widget. The following example shows the reference data.

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

      Move

      Moves the widget to a specified position. 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"
            }
          }