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

Settings

Basic column chart
  • 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 widget configuration items.
  • 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.
  • Global StyleChart panel
    • Margin: the distance between the column chart area and the four boundaries of the widget. The default unit is px.
    • Data Limit: You can specify the maximum number of input data to be loaded. The system can load the maximum number of input data records for layout, drawing, and calculation to ensure the display effect of visual application.
    • Column: The style of each column in the column chart.

      Background Color: The background color of the column. See the color picker description to modify the color.

    • Value Label: the style of each column value label. You can click the Switch icon icon to control the value label display and concealment. Value Label
      Parameter Description
      Text The font style, text weight, font size, and color of the value label text.
      Position The position where the value tag text is displayed. Valid values: Top, Middle, and Bottom.
      Empty Data If you turn on the switch, the value label data is still displayed in the component column when it is empty. If you turn off the switch, the value label data is not displayed in the component column when it is empty.
  • Coordinate Axes: the X Axis and Y Axis axes.
    • X AxisAxis panel
      • 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 ranges from 0 to 0.95.
      • Axis Label: the axis label style of the column chart x-axis. You can click the Switch icon icon to control the visibility and concealment of x-axis labels.
        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 x-axis tags.
        • Axis Unit: the unit of the x-axis label.
      • Axis Line: the style of the x-axis of the column chart. You can click the Switch icon icon to control the appearance and concealment of 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 Switch icon icon to control the display and concealment of the x-axis gridlines.

        Color: the color of the x-axis grid lines.

    • Y AxisY-axis panel
      • 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 on the y-axis.
        Parameter Description
        Min Value The minimum value of the y-axis. Custom input and system selection are supported.
        • 0: By default, the minimum value of the Y-axis range is 0.
        • Auto: The system automatically calculates the maximum value, minimum value, and the number of points in the data.
        • Data Min: the minimum value in the data.
        Max Value The maximum value of the y-axis. Custom input is supported. System selection is also supported:
        • Auto: The system automatically calculates the maximum value, minimum value, and the number of points in the data.
        • Data Max: Select the maximum value in the data.
      • Axis Label: the axis label style of the column chart y-axis. You can click the Switch icon icon to control the visibility and concealment of y-axis labels.
        Parameter Description
        Display Format The format of the y-axis label value. Valid values: Default, 11 (integer), 11.1 (floating-point number), 11.11 (floating-point number), 11%, 11.1%, and 11.11%.
        Text The font style, text weight, font size, and color of the y-axis label text.
        Label Display The quantity and unit of the y-axis label display.
      • Axis Line: the style of the column chart y-axis. You can click the Switch icon icon to display the y-axis.

        Color: the color of the y-axis.

      • Grid Lines: the style of the column chart y-axis grid lines. You can click the Switch icon icon to control the display and concealment of the y-axis grid lines.

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

  • SeriesSeries panel
    • Series to Type
      • Turn on the switch to switch the data series mode to the 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 by each column must be one of multiple types, and a category can represent only one type. Open Series to Type Style
      • Turn off the switch 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, the styles of two columns will be displayed under each category. Even if the value of a column is 0, it will occupy the position of one column. Disable Series to Type Style
    • Data Series: Click the Plus icon or Trash bin icon icon on the right to add or delete a data series. Click the Horizontal or Vertical icon to configure the arrangement style of multiple data series. Click the Copy icon icon to copy the configurations of the selected data series and add a data series with the same configuration.

      Background Color: the color of the columns.

  • Other
    • Easing Animation: the animation effect style of the histogram. You can click the Switch icon icon to enable or disable the animation effect. Slow motion animation
      Parameter Description
      Animation Settings
      • Easing Effect: the slow motion effect of the animation. The system provides a variety of common animation slow motion effects for you to choose from.
      • Animations of All Series In Sequence: Turn on the switch, and each series of column chart play the animation in sequence; Turn off the switch, and all columns play the animation together.
      Entrance Animation The duration for which the widget first renders the animation. 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 enable this feature, the animation starts from the previous position when the widget is updated. If you disable this feature, the animation starts from the initial position when the widget 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. You can click the Switch icon icon to enable or disable the dialog box. Tip panel
      Figure 1. Tool Example
      dialog box example
      Parameter Description
      Fade Delay If the trigger condition is not met, the dialog box disappears. This configuration items sets the time to delay before the dialog box disappears. Unit: ms.
      Trigger Mode
      • Trigger Item Type: dialog box the type of the target to be triggered. Valid values: Item and Axis.
      • Trigger Action: dialog box the triggered action. Valid values: Hover and Click.
      Text Style The style of the text in the dialog box, including the character font style, character weight, font size, and color.
      Background Box The background box of the dialog box.
      • Background Color: the background color of the dialog box.
      • Dimensions: the width and height of the dialog box. Unit: px. Click the Switch icon icon to enable or disable the custom dialog box.
      • Padding: The inner margin of the dialog box. Unit: px.
      • Offset
        • Horizontal Offset: the horizontal offset of the dialog box relative to the position of the mouse arrow. Unit: px.
        • Vertical Offset: the vertical offset of the dialog box relative to the position of the mouse arrow. Unit: px.
      • Border
        • Border Width: the width of the dialog box border. Unit: px.
        • Border Color: The border color of the dialog box.

Data

Data panel styleSample code in the preceding figure:
[
  {
    "x": "Shanghai",
    "y": 100
  },
  {
    "x": "Shenzhen",
    "y": 75
  },
  {
    "x": "Hefei",
    "y": 30
  },
  {
    "x": "Chengdu",
    "y": 65
  },
  {
    "x": "Anhui",
    "y": 50
  },
  {
    "x": "Beijing",
    "y": 70
  },
  {
    "x": "Hangzhou",
    "y": 40
  },
  {
    "x": "Changsha",
    "y": 60
  }
]
Table 1. Parameters
Log field Description
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. The data series value.
Table 2. 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 widget 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

Select the Enable check box to enable interactions between widgets. When a column of a basic bar 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 thrown. For more information, see Component callback ID configuration.

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. On the Blueprint Editor page, click the Column Chart component in the Import Nodes section. You can view the parameters of the basic column chart on the canvas, as shown in the following figure. Basic histogram blueprint v3.0 or later parameters
    • 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 on the Data tab of the canvas editor.
      On Failure of Data Interface Request When a data interface request fails (the request may be caused by network problems or interface errors, etc.), the event is returned and processed by the filter, and the processed JSON-formatted data is also thrown. For more information about specific data examples, see the Data Response Result section on the Data tab of the canvas editor.
      On Click of Data Item The event that is thrown when the column of the basic histogram is clicked, and the data item corresponding to the column is also thrown.
    • 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 configured as http://api.test in the basic histogram, and the data passed to the action of Request Data Interface is { id: '1'}, the final request interface is http://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 on the Data tab of the canvas editor.
      Highlight Highlight the element corresponding to the data item. The following example shows the reference data.
      {
        data: {
          x: 'Shanghai' // You can list multiple highlighting conditions, similar to filter. 
        },
        options: {
          style: {
            fill: 'red'
          },
          selectMode: 'single',
          cancelHighlightFirst: true
        }
      }
      Cancel Highlight Unhighlights the corresponding element of the data item. The following example shows the reference data.
      {
        data: {
          x: 'Shanghai'
        },
        options: {
          mode: 'single' // If this parameter is set to single, only one highlight is canceled if multiple data items are hit. If this parameter is set to multiple, all highlights are canceled if multiple data items are hit. 
        }
      }
      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 A widget is shown without the need to specify parameters.
      Hide A widget is hidden without the need to specify parameters.
      Hide/Show A widget is hidden or shown.
      Move A widget is moved to a specified location. The following example shows the reference data.
          {      
            // 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"
            }
          }