All Products
Search
Document Center

DataV:The Column Chart widget

Last Updated:Apr 28, 2023

This topic describes the chart style and configuration panel of a basic column chart.

Chart Style

A basic bar chart is a type of bar chart. Compared with an arc column chart, the basic bar chart widget supports custom y-axis intervals and data configurations of multiple series. This widget can display multi-dimensional data differences more intelligently. However, it occupies a large amount of space in visualization applications.

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 asset 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: You can specify the maximum number of input data records to be loaded. The system loads the maximum number of input data records for layout, drawing, and computing. This ensures the visual application.

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

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

    • 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, the value tag data is still displayed in the widget column. If you turn off the switch, the value tag data is not displayed in the widget column.

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

      • 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 x-axis label.

        Parameter

        Description

        Text

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

        Label Display

        • Angle: the angle of the x-axis label. Valid values: Horizontal, Incline, and Vertical.

        • Quantity: the number of labels on the x-axis.

        • Axis Unit: the unit of the x-axis label.

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

        Color: the color of the x-axis line.

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

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

        Parameter

        Description

        Min Value

        The minimum value of the y-axis. You can customize the value or select the value.

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

        • Data Min: the minimum value in the data.

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

        Max Value

        The maximum value of the y-axis. You can customize the value or select the value.

        • Data Max: the maximum value in the data.

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

      • Axis Label: the axis label style of the column chart y-axis. You can click the 开关图标icon to display or hide the y-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 y-axis labels show the quantity and units.

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

  • Series image..png

    • Series to Type

      • Turn on the switch to change the data series mode to type mode. It needs to be used with s fields in the data. s fields define the type of columns and correspond to data series. The style displayed for each column must be one of multiple types, and a category can represent only one type. 开启系列转类型样式

      • The switch is turned off and the data series mode is displayed. It needs to be used with s fields in the data. s fields define the type of columns and correspond to 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. 关闭系列转类型样式

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

      Color: The color of the columns under the 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: 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.

      Entrance Animation

      The duration of the first animation rendered by the component. Unit: ms.

      Update Animation

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

      • Start From Previous Position: If you turn on this switch, the animation starts from the position of the previous data when the widget data is updated. If you turn off this switch, the animation starts from the initial position when the widget data is updated.

    • 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

      Fade Delay

      When the trigger condition is not met, the dialog box will disappear. This configuration items sets the delay time before the dialog box disappears, in ms.

      Trigger Mode

      • Trigger Item Type: dialog box the type of the target to be triggered. This field is optional, including Item and Axis.

      • Trigger Action: dialog box the action to be triggered. This field is optional, including Hover and Click.

      Text Style

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

      Background Box

      The background box style of the dialog box.

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

      • Dimensions: the width and height of the dialog box. Unit: pixels. Click the 开关图标icon to turn custom dialog box on or off.

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

      • Offset

        • 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

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

y

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

s

(Optional) data series a 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 Panelimage..png

Select the Enable check box to enable interactions between widgets. When a column of a 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 in the data are returned. For more information, see How do I configure the callback ID of a card flip 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 蓝图图标icon in the upper-left corner.

  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. 基本柱状图蓝图v3.0以上版本参数

    • 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 basic column chart is clicked, and the data item corresponding to the column 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

      Clear component data. No parameters are required.

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