A vertically stacked column chart is a type of column chart that intelligently displays multi-dimensional data differences in a small visualization application space. Supports custom y-axis intervals, multi-series data configurations, and stacked data display. This topic describes the meaning of each configuration items of a vertically stacked column chart.

Vertical Stacked Histogram

Settings

  • 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.
  • ChartChart panel
    • Margins: the distance between the column chart area and the four boundaries of the widget. Unit: px. Default value: px. Click the Switch icon icon to control the visibility and concealment of custom margins.
    • Column Width: the width of the column. If the width is too large, different columns in the same group will overlap. Exercise caution when you set the width. Click the Switch icon icon to control the visibility and concealment of the custom column width.
    • Areas Between Columns: the style of the connected area between different categories and the same series of data. You can click the Switch icon icon to control the display and concealment of the connected area.
      Parameter Description
      Trigger Mode The trigger mode that is displayed in the region. Valid values: Always Show, Hover, and Click.
      Stroke Color The color of the stroke in the connected area.
      Fill Color The fill color in the connected area.
    • Value Label: the style of each column value label. You can click the Switch icon icon to control the value label display and concealment.
      Parameter Description
      Position The position where the value tag text is displayed. Valid values: Top, Middle, and Bottom.
      Text Style The font style, text weight, font size, and color of the value label text.
      Offset The offset value of the value label in the horizontal and vertical directions.
    • Legend: the legend style of the column chart. You can click the Switch icon icon to control the appearance and concealment of the legend.
      Parameter Description
      Paging Allowed Turn on the switch, when the number of legends cannot be arranged, page turning can be allowed; turn off the switch, page turning is not allowed.
      Layout The position of the legend relative to the start coordinate of the widget. Valid values: Top Left, Top Center, Top Right, Bottom Left, Bottom Center, and Bottom Right.
      Legend mark The style of the legend marker, including setting the shape style of the legend marker and the size value of the legend marker.
      Legend text Style the text in the legend, including setting the font style /character weight /font size and color of the text.
  • Axis: the X Axis and Y Axis axes.
    • X AxisX-axis 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.
      • Data Type: the type of the x-axis data.
        Parameter Description
        Numeric Supports numeric data such as integers and floating-point numbers.
        Category Data of such categories as characters and strings is supported.
        Time For data of the time type, you need to configure the data format.
      • Axis Label: the style of the column chart x-axis label. You can click the Switch icon icon to control the display and concealment of the x-axis label.
        Parameter Description
        Text Style The font style, text weight, font size, and color of the x-axis label text.
        Quantity The quantity value displayed by the x-axis label. You can click the Switch icon icon to control the number of x-axis labels.
      • Axis Title: the style of the column chart x-axis title. You can click the Switch icon icon to control the display and concealment of the x-axis title.
        Parameter Description
        Title The text content of the x-axis title.
        Offset The offset value of the x-axis header. Unit: px.
        Text Style The font style, text weight, font size, and color of the x-axis title text.
      • Axis Line: the axis style of the x-axis of the column chart. You can click the Eye Switch icon icon to control the axis style 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: specifies the minimum value of the Y-axis. You can click the Switch icon icon to control the display and concealment of the custom range on the y-axis.
        • 0: By default, the minimum value of the Y-axis range is 0.
        • Min Data Value: the minimum value in the data.
        Note If you enable custom data ranges for the y-axis, some minimum data may become invalid. We recommend that you disable custom ranges.
      • Data 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%.
      • Axis Label: the style of the column chart y-axis label. You can click the Switch icon icon to display and hide the y-axis label style.
        Parameter Description
        Text Style The font style, text weight, font size, and color of the y-axis label text.
        Quantity The quantity value displayed on the y-axis label. You can click the Switch icon icon to control the number of custom y-axis labels.
      • Axis Title: the column chart Y-axis title style. You can click the Switch icon icon to display the Y-axis title style.
        Parameter Description
        Title The text content of the Y axis title.
        Offset The offset value of the Y axis title. Unit: px.
        Text Style The font style, text weight, font size, and color of the Y-axis title text.
      • Axis Line: the axis style of the column chart y-axis. You can click the Switch icon icon to display the axis of 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
    • CSV data: If you turn on the switch, you can use columns in the CSV data file to map to values and data series. If you turn off the switch, the series mapping takes effect configuration items. You can click the Switch icon icon to control the display and concealment of the CSV data switch.
      Parameter Description
      Auto Extract If you turn on the switch, the widget uses CSV data to automatically parse fields and display them. If you turn off the switch, the fields are not automatically parsed.
      Numeric Field Only If you turn on the switch, CSV data only parses fields of the data type. If you turn off the switch, CSV data automatically parses all fields.
    • 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.
      Parameter Description
      Fill color The fill color of the column chart under this series.
  • Other
    • Auxiliary Line: the auxiliary line style of the bar chart. You can click the Switch icon icon to enable or disable the auxiliary line. Auxiliary line style
      Parameter Description
      Type The type of the auxiliary line. Valid values: Min Value, Max Value, Average Value, and Median Value.
      Style The style of the auxiliary line, including the color, line thickness, and line style of the auxiliary line.
      Auxiliary Description The style of the auxiliary description, including the following:
      • Description: the description text.
      • Position: the relative position of the description on the auxiliary line.
      • Offset: the horizontal or vertical offset of the description text.
      • Text Style: the style of the text, including the font style, text weight, font size, and color.
    • Interaction Enhancement for Huge Amounts of Data: You can set the style of data interaction enhancement when there is too much data in the bar chart. You can click the Switch icon icon to enable or disable the interaction enhancement.
      Parameter Description
      Interaction Mode The data interaction mode. Valid values: Slider and Scroll Bar.
      Default Range The range of data displayed on the thumbnail axis. Valid values: 0 to 1. This configuration items takes effect only when the Auxiliary Line style is enabled.
      Style The foreground color and background color of the thumbnail axis. This configuration items takes effect only when the Auxiliary Line style is enabled.
      Direction The direction in which the scrollbars are arranged. Valid values: Horizontal and Vertical. This configuration items takes effect only when the Scroll Bar style is enabled.
      Width The width of the data category column. This configuration items takes effect only when the Scroll Bar style is enabled.
    • 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.
      Figure 1. Tooltip Panel
      tooltip
      Parameter Description
      Text Style The style of the text in the dialog box, including the character font style, character weight, font size, and color.
      Indicator The style of the prompt indicator, including the width, line type and color of the indicator. Click the Switch icon icon to turn the indicator on or off.
      Background Box The background box of the dialog box.
      • Background Color: the background color of the dialog box.
      • Padding: The inner margin of the dialog box. 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 tab
Sample code in the preceding figure:
[
  {
    "x": "Zhejiang",
    "y": "200",
    "s": "Series 1"
  },
  {
    "x": "Zhejiang",
    "y": "100",
    "s": "Series 2"
  },
  {
    "x": "Zhejiang",
    "y": "200",
    "s": "Series 3"
  },
  {
    "x": "Liaoning",
    "y": "25",
    "s": "Series 1"
  },
  {
    "x": "Liaoning",
    "y": "125",
    "s": "Series 2"
  },
  {
    "x": "Liaoning",
    "y": "100",
    "s": "Series 3"
  },
  {
    "x": "Jilin",
    "y": "190",
    "s": "Series 1"
  },
  {
    "x": "Jilin",
    "y": "110",
    "s": "Series 2"
  },
  {
    "x": "Jilin",
    "y": "170",
    "s": "Series 3"
  },
  {
    "x": "Heilongjiang",
    "y": "90",
    "s": "Series 1"
  },
  {
    "x": "Heilongjiang",
    "y": "60",
    "s": "Series 2"
  },
  {
    "x": "Heilongjiang",
    "y": "70",
    "s": "Series 3"
  },
  {
    "x": "Anhui",
    "y": "240",
    "s": "Series 1"
  },
  {
    "x": "Anhui",
    "y": "170",
    "s": "Series 2"
  },
  {
    "x": "Anhui",
    "y": "280",
    "s": "Series 3"
  },
  {
    "x": "Fujian",
    "y": "420",
    "s": "Series 1"
  },
  {
    "x": "Fujian",
    "y": "190",
    "s": "Series 2"
  },
  {
    "x": "Fujian",
    "y": "390",
    "s": "Series 3"
  }
]
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

Interaction event Description
On Click of Data Item Select the Enable check box to enable interactions between widgets. When you click a column of a vertically stacked column chart, a data request is triggered and a callback value is thrown to dynamically load data of different columns. By default, the x, y, and s values in the data are thrown. For more information, see Component callback ID configuration.
On Click of Legend Select the Enable check box to enable interactions between widgets. When you click the legend of a vertically stacked column chart, a data request is triggered and a callback value is thrown to dynamically load data of different columns. The value value in the data is thrown by default. For more information about the configuration, 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 configuration page, click the Stacked Column Chart widget in the Import Nodes panel. On the canvas, you can view the parameters of the vertical stacked histogram in the blueprint editor as shown in the following figure. Vertical Stacked Histogram Blueprint 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 vertically stacked histogram is clicked, and the data item corresponding to the column is also thrown.
      On Click of Legend The event that is thrown when the legend of the vertically stacked histogram is clicked, and the corresponding data item of the legend 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 for a vertical stacking histogram as http://api.test and the data passed to the Request Data Interface action 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"
            }
          }