All Products
Search
Document Center

DataV:Basic column chart (v3.0 or later)

Last Updated:May 17, 2023

The basic column chart component is a type of bar chart. Compared with the arc column chart, the basic column chart component supports custom y-axis intervals and data configurations of multiple series. It can display the basic column chart of multi-dimensional data differences more intelligently, but it occupies a large space in visualization applications. This article describes the meaning of each configuration items of the basic column chart.

Parameter

  • 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 asset configurations.
  • Global Style 全局样式面板3.0以下版本

    • Font: the font family of all text in the column chart. Default value: Microsoft Yahei.

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

      • Spacing Between Columns: the distance between columns. Valid values: 0 to 1.

      • Spacing: the distance between the left and right columns and the left and right borders of the widget. Valid values: 0 to 1.

      • Background Color: the background color of the column. For more information, see color picker instructions.

    • Margin: the distance between the column chart area and the upper, lower, left, and right borders of the widget.

      • Top Edge: the distance between the top end of the column and the upper edge of the component.

      • Bottom Margin: the distance between the bottom of the column and the bottom edge of the component.

      • Left Margin: the distance between the leftmost column and the left boundary of the component.

      • Right Margin: the distance between the rightmost column and the right border of the widget.

    • Value Label: the style of the value label of each column. You can click the 眼睛图标icon to display or hide the value label. 值标签样式面板3.0以下版本

      • Text Style

        • Font Size: the font size of the label text.

        • Color: the color of the value label text.

        • Font weight: the font weight of the value tag text.

      • Y Offset: the offset of the value label from the top of the column. If the value is negative, the value is offset upward. If the value is positive, the value is offset downward.

      • X Offset: the offset of the value label from the left side of the column. If the value is negative, the value is shifted to the left. If the value is positive, the value is shifted to the right.

    • Maximum Load: The system loads the maximum number of data records that you enter for layout, drawing, and computing. This ensures that the visualized application is effective.

  • X Axis: the column chart x-axis style. You can click 眼睛图标the icon to display or hide the x-axis. x轴面板样式3.0以下版本

    • Text Style

      • Color: the color of the text on the x-axis.

      • Font Size: the font size of the text on the x-axis. Valid values: 10 to 100.

      • Font weight: the font weight of the text on the x-axis.

    • Indicator Length: the length of the indicator points on the x-axis. Valid values: 0 to 40.

    • Distance from Text to Secondary Line: the distance between the text and the secondary line on the x-axis. Valid values: -40 to 40.

    • Auxiliary Line: If you turn on this switch, the x-axis auxiliary line is displayed.

  • Y Axis: the column chart y-axis style. You can click the 眼睛图标icon to display or hide the y-axis. y轴面板样式3.0以下版本

    • Text Style

      • Color: the color of the text on the y-axis.

      • Font Size: the font size of the text in the y-axis. Valid values: 10 to 100.

      • Font weight: the font weight of the text in the y-axis.

    • Unit: the unit of the value on the y-axis.

    • Minimum Value: the minimum value of the y-axis. You can enter a value that you want to specify or select.

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

    • Maximum Value: the maximum value of the y-axis. You can specify a value that you want to specify or select.

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

    • Quantity: the number of points on the axis.

    • Distance from Text to Secondary Line: the distance between the text and the secondary line. Valid values: -40 to 40.

    • Auxiliary Line: Turn on the switch to display the y-axis auxiliary line.

  • dialog box: The style of the dialog box that appears when you move over or click a column chart on a preview or publish page.

    Figure 1. dialog box panel 提示框面板

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

    • Disappearing Delay Time: If the trigger condition is not met, the dialog box disappears. This configuration items sets the delay time before the dialog box disappears. Unit: ms.

    • Background Box Style: The background box style of the dialog box.

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

      • Custom Background Box Size: The width and height of the dialog box, in px.

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

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

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

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

    • Text Style: The style of the text in the dialog box.

      • Color: dialog box the color of the text.

      • Font: dialog box the font family of the text.

      • Font Size: dialog box the size of the text.

      • Font weight: dialog box the font weight of the text.

    • Axis Indicator: the style of the axis indicator displayed when the trigger type of the dialog box is Axis and the trigger action is executed.

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

      • Line Style: indicates the line color, width, and line type. The line type is optional. Valid values: Solid Line, Dotted Line, and Dotted Line.

  • data series: Click the 加号图标or 垃圾桶图标icon on the right to add or delete a data series.

    • Series Color: the color of the column in the series.

    • Series to Type

      • When enabled, the data series mode changes to the type mode. It must be used with the s field in the data. The s field defines the type of the column and corresponds to the data series. The style displayed for each column must be one of multiple types, and a category can represent only one type. 开启系列转类型样式

      • When closed, the display is in data series mode. It must be used with the s field in the data. The s field defines the type of the column and corresponds to the data series. For example, if you configure two series, two columns are displayed in each category. Even if the value of a column is 0, the column occupies the position of one column. 关闭系列转类型样式

  • Animation: the animation effect style of the column chart. You can click the 眼睛图标icon to enable or disable the animation effect. 动画面板3.0以下版本

    • Initial Animation Duration: the duration of the first animation rendered by the component. Unit: ms.

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

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

The metadata of the filtering table.

数据面板样式The sample JSON code in the preceding figure is as follows.

[
  {
    "x": "Shanghai",
    "y": 23
  },
  {
    "x": "Shenzhen",
    "y": 13
  },
  {
    "x": "Hefei",
    "y": 2
  },
  {
    "x": "Chengdu",
    "y": 9
  },
  {
    "x": "Anhui",
    "y": 5
  },
  {
    "x": "Beijing",
    "y": 10
  },
  {
    "x": "Hangzhou",
    "y": 14
  },
  {
    "x": "Changsha",
    "y": 24
  }
]
  • x: the category of each column in the column chart, that is, the value of the x-axis.

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

  • s :(Optional) data series value.

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

Select the Enable check box to enable interactions between widgets. When a column of the basic column chart is clicked, 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 callback IDs.

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 Basic column chart in the Added Nodes pane. On the canvas, you can view the basic column chart parameters in Blueprint Editor, as shown in the following figure. 节点编程配置样式

    • Event

      Event

      Description

      When the basic column chart interface request completes

      The event is triggered with the processed JSON data after a data interface request is responded and processed by a filter. For specific data, see Data.

      When a data item is clicked

      The event that is raised when a column of the base column chart is clicked, along with the data item corresponding to that column.

    • Policy Action

      Policy Action

      Description

      Request basic column 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, if the basic column chart is configured with the API data source as http://api.test and the data passed to the request basic column chart interface as { id: '1'}, the final request interface is http://api.test?id=1.

      Import Basic column 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 specific data, see Data.

      Highlight

      Highlight the element corresponding to the data item. Example:

      {
        data: {
          x: 'Shanghai' // You can list multiple highlight conditions, similar to filter. 
        },
        options: {
          style: {
            fill: 'red'
          },
          selectMode: 'single',
          cancelHighlightFirst: true
        }
      }

      Unhighlight

      Cancels the highlighting of the element corresponding to the data item. Example:

      {
        data: {
          x: 'Shanghai'
        },
        options: {
          mode: 'single' // If the value is single, only one highlight is canceled when multiple data items are hit. If the value is multiple, all highlights are canceled when multiple data items are hit. 
        }
      }

      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

      A widget is shown without the need to specify parameters.

      Hide

      A widget is hidden without the need to specify parameters.

      Switch to the implicit state

      A widget is hidden or shown.

      Move

      A widget is moved to a specified location.

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