This topic describes the chart style and configuration panel of an Echarts stacked bar chart.
Chart style
An Echarts stacked bar chart is a type of bar chart. It supports custom x-axis intervals, multi-series data configuration, and stacked data display. It can intelligently display multi-dimensional data differences in a small visualization application space.

Configuration Panel 
- 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
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
icon. - Click the
icon to horizontally flip a widget. - Click the
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.
Render Engine: the rendering engine for the bar chart. Including canvas and svg.
Global Column Style

Column Width: Click the + or-sign or enter a value to adjust the width of the column. Unit: pixels.
Maximum Column Width: Click the + or-sign or enter a value to adjust the maximum width of the column. Unit: pixels.
Minimum Height of a Histogram: Click the + sign or the-sign or enter a value to adjust the minimum height of the histogram. Unit: pixels.
Interval in Category: Specify the distance between columns of different series. The content is a percentage.
Spacing between categories: Specify the distance between columns in the same series. The value is a percentage.
Legend: Click the Eye icon on the right to display the legend style.

Horizontal Position: Click the drop-down list and select an alignment method for the legend and text.
Auto: By default, Auto is determined based on the position and orientation of the widget.
Left Align: If the graphic is on the left side of the text, it is left-aligned.
Align to Center: Align to Center if the legend graphic overlaps the text.
Right Align: If the graphic is on the right side of the text, it is right-aligned.
Vertical Position: Click the drop-down list and select an alignment method for the legend and text.
Auto: By default, Auto is determined based on the position and orientation of the widget.
Top Align: Top Align when the graphic is above the window.
Center: Center when the graphic is in the middle of the window.
Bottom Alignment: Bottom alignment when the graphic is below the window.
Orientation: Select the orientation of the legend from the drop-down list.
Horizontal: the horizontal distribution of the legend.
Vertical: The legend is distributed vertically.
Pin: Click the + or-sign or enter a number to adjust the inner margin of the legend. Unit: pixels. The default inner margin is 5.
Element Spacing: Click the + or-sign or enter a number to adjust the distance between each item in the legend. Horizontal spacing for horizontal layout, vertical spacing for vertical layout.
Text Style
Color: Modify the color of the legend text. For more information, see color picker description.
Font Style: the font style of the legend text.
Font weight: the font weight of the legend text.
Font: the font family of the legend text.
Font Size: Click + or-, or enter a value to change the font size of the legend.
Grid: Click the
icon to display the grid style. Left Margin: Click the + or-sign or enter a value to adjust the left margin of the grid. Unit: pixels.
Upper Margin: Click + or-, or enter a value to adjust the upper margin of the grid. Unit: pixels.
Right Margin: Click the + or-sign or enter a value to adjust the right margin of the grid. Unit: pixels.
Lower Margin: Click the + or-sign or enter a value to adjust the lower margin of the grid. Unit: pixels.
Self-adaptive Layout: If you select this check box, the bar chart is self-adaptive. If you remove this check box, the bar chart is laid out based on the style that you have configured.
X Axis: Click the Eye icon to display the X axis.

Position: specifies the position of the window on the x-axis.
Bottom: The position of the x-axis at the bottom of the window.
Top: The position of the x-axis on the top of the window.
Name: the name of the x-axis node.
Position: the position of the name on the x-axis. You can select Start, End, or Center. Default value: End.
Name Style
Color: Modify the color of the name text on the x-axis. For more information, see color picker description.
Font Style: the font style of the name on the x-axis.
Font weight: the font weight of the name on the x-axis.
Font: the font family of the name on the x-axis.
Font Size: Click + or-, or enter a value to modify the font size of the name on the x-axis.
Name Interval: Click the + or-sign or enter a value to change the distance between the axis and the axis.
Rotate Name: Click the + or-sign or enter a value to change the rotation angle of the axis name.
Reverse: If you select this check box, the axes are displayed in the reverse direction. If you clear this check box, the axes are displayed in the forward direction.
Minimum Value: the minimum value of the axis scale. The default value is Auto, which indicates that the minimum value of data on the axis is used as the minimum scale. If you do not set this parameter, the minimum value is automatically calculated to ensure the even distribution of the scale of the axis.
Max: the maximum value of the scale on an axis. Default value: Auto. This value indicates that the maximum value of the data on the axis is used as the maximum scale. If you do not set this value, the maximum value is automatically calculated to ensure the even distribution of the axis scale.
auto scaling: When selected, the coordinate scale does not forcibly include a zero scale. This parameter is valid only in the value axis. This configuration items is invalid after the maximum and minimum values are set.
segments: Click the + or-sign, or enter a value to set the segments of the axis. If you do not set this parameter, the minimum value is automatically calculated to ensure the even distribution of the scale of the axis. It should be noted that this segments is only an estimated value, and the number of segments actually displayed will be adjusted on this basis according to the legisibility of the axis scale display after segmentation. Invalid in category axis.
Minimum Interval Size: Click + or-, or enter a value to specify the minimum interval between axes. For example, it can be set to 1 ensure that the coordinate axis division scale is displayed as an integer. Valid only in the value axis or time axis.
Maximum Interval Size: Click + or-, or enter a value to specify the maximum interval between axes. For example, it can be set to 500 ensure that the coordinate axis division scale is displayed as an integer. Valid only in the value axis or time axis.
Static: If you select this option, you cannot interact with the axes if they are static.
Axis: Click the eye icon on the right to display the x-axis.
On Zero: indicates whether the axis of the x-axis or y-axis is on the zero scale of the other axis. This field is valid only when the other axis is a value axis and contains the zero scale.
Line Style
Color: Click the drop-down list and select a fill style for the axis color, including Color Fill and Gradient Fill. Modify the color of the x-axis by referring to the color picker description.
Width: Click + or-, or enter a value to modify the width of the x-axis.
Type: the type of the axis. Optional. The value can be Solid Line, Dashed Line, or Dotted Line.
Opacity: Click the + or-sign or enter a value to modify the transparency of the x-axis. The range is [0,1].
Tick mark: Click the eye icon on the right to display the scale on the x-axis.
Internal: If you select this check box, the axis scale faces inward. If you remove this check box, the axis scale faces outward.
Length: Click the + or-sign or enter a number to modify the length of the scale.
Line Style
Color: Select a color fill style from the drop-down list, including Color Fill and Gradient Fill. Modify the color of tick marks by referring to the color picker description.
Width: Click the + or-sign or enter a value to modify the width of the tick mark.
Type: the type of the axis. Optional. The value can be Solid Line, Dashed Line, or Dotted Line.
Transparency: Click the + or-sign or enter a value to modify the transparency of the tick marks. The range is [0,1].
Scale Labels: Click the Eye icon on the right to display the scale labels on the x-axis.
Internal: If you select this check box, the axis labels face inward. If you clear this check box, the axis labels face outward.
Rotate: the rotation angle of the scale labels. If the category labels on the category axis cannot be displayed, you can rotate the scale labels to prevent them from overlapping. The angle of rotation ranges from -90 degrees to 90 degrees.
Outer Spacing: the distance between the scale label and the axis.
Formatter: the format of the scale labels. The value can be an integer, 1 decimal place, or 2 decimal places. Default value: Integer.
Show Minimum Label: If you select this option, the smallest scale label is displayed. By default, it is automatically determined that if the labels overlap, the smallest scale label will not be displayed.
Show Max Labels: If you select this option, the largest scale label is displayed. By default, it is automatically determined that if the labels overlap, the largest scale label will not be displayed.
Color: Modify the color of the scale labels for the axes. For more information, see color picker description.
Font Style: the font style of the axis labels.
Font weight: the font weight of the axis label text.
Font: the font family of the axis label text.
Font Size: the font size of the axis scale label text.
line separator: Click the eye icon on the right to display the line separator.
Line Style
Color: Modify the color of the x-axis line separator by referring to the color picker description.
Width: Click the + or-sign or enter a value to modify the width of the line in the x-axis line separator.
Type: the type of the x-axis line separator. Optional. The value can be Solid Line, Dashed Line, or Dotted Line.
Transparency: Click the + or-sign or enter a value to modify the transparency of the line separator on the x-axis. The value ranges from 0 to 1.
Y Axis: For more information, see X Axis.
dialog box: Click the eye icon on the right to display the dialog box.

Trigger Type: the type of the trigger. This parameter is optional. Default value: Axes.
Data Item: the data item graph trigger. It is used in charts that do not have a category axis, such as scatter charts and pie charts.
Axis: the axis trigger, which is used in column charts, line charts, and other charts that use category axes.
Do Not Trigger: Nothing is triggered.
Axis Indicator: Click the Eye icon to display the axis indicator.
Type: the type of the indicator. Valid values: Line Indicator, Shadow Indicator, and Cross Indicator.
Automatic Adsorption: If you select this check box, the axis indicator is automatically adsorbed to the point. This function is more meaningful on the numerical axis and the time axis, and can automatically find small numerical points.
Line Style
Color: Modify the color of the indicator line by referring to the color picker description.
Width: Click the + or-sign or enter a value to modify the line width.
Type: indicates the type of the line. Optional. The value can be Solid Line, Dashed Line, or Dotted Line.
Opacity: Click the + or-sign or enter a value to modify the opacity of the indicator line. The value ranges from 0 to 1.
Indicates the shadow style
Color: Modify the color of the shadow by referring to the color picker description.
Transparency: Click the + or-sign or enter a value to modify the transparency of the shadow. The value ranges from 0 to 1.
Indicates the cross style
Color: Modify the cross color by referring to the color picker description.
Width: Click the + or-sign or enter a value to modify the width of the line that indicates the intersection.
Type: indicates the type of intersection. Optional. Valid values: Solid, Dashed, and Dotted.
Transparency: Click the + or-sign or enter a value to modify the transparency of the intersection. The value ranges from 0 to 1.
Background Color: dialog box the background color of the text label.
Text Style
Color: Modify the color of the dialog box label text. For more information, see color picker description.
Font Style: dialog box the font style of the text.
Font weight: dialog box the font weight of the label text.
Font: dialog box the font family of the label text.
Font Size: dialog box the font size of the label text.
Series: Click the
or
icon to add or delete a conditional style. Click the
or
icon to configure the arrangement style of multiple conditional styles. Click the
icon to copy the selected conditional style configuration and add a conditional style with the same configuration. 
Name: the name of the custom series. It must be used together with the s field value in the data.
Legend Interaction Highlight: If you select this check box, the interaction is highlighted when the legend hover is started.
Label: Click the Eye icon to display the label style.
Position: Set the position of the label corresponding to the bar chart, including but not limited to top, left, and inside.
Positioning Distance: Set the distance between the labels and the border of the bar chart.
Rotate: the angle by which the labels are rotated. If the category labels on the category axis cannot be displayed, you can rotate the labels to prevent them from overlapping. The angle of rotation ranges from -90 degrees to 90 degrees.
Color: Modify the color of the label text. For more information, see color picker description.
Font Style: the font style of the label text.
Font weight: the font weight of the label text.
Font: the font family of the label text.
Font Size: the font size of the label text.
Element Style
Color: Modify the color of the element style by referring to the color picker description.
Bar Chart Fillet: Click the + or-sign or enter a value to modify the fillet.
Transparency: Click the + or-sign or enter a value to modify the transparency of the intersection. The value ranges from 0 to 1.
Stacked chart: Data is stacked. The same stack values on the same category axis can be stacked. Example: Total.
Large-scale Optimization: Click the Eye icon to enable or disable the large-scale optimization mode.
Animation: Select this check box to enable animation.
Animation Duration: Click the + or-sign or enter a value to modify the duration of the initial animation. Unit: milliseconds.
Easement Effect: Select an easing effect for the data update animation from the drop-down list. The default value is cubicOut.
Data tab

Configuration field description
Parameter | Description |
| Used to configure the category of each column in the bar chart, that is, the value of the x-axis. |
| Used to configure the value of each bar in a bar chart. |
| (Optional) The series value, used in conjunction with the series configuration items in the Style panel. |
| 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 asset 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 |
Interaction tab

Interaction description
Interaction | Description |
When a data item is clicked | Select the Enable check box to enable interactions between widgets. The stacked bar chart widget has interactive configurations. When a data item is selected, a callback value is returned. By default, the x and y fields in the data are returned. For more information, see How do I configure the callback ID of a tick board component? |
When the legend is clicked | Select the Enable check box to enable interactions between widgets. The stacked bar chart widget has interactive configurations. When a legend is clicked, a callback value is returned. By default, selected fields in the data are returned. For more information, see How do I configure the callback ID of a tick board component? |
Configure interactions in Blueprint Editor
In Canvas Editor, right-click a widget in the Layer panel and select Add to Blueprint Editor.
Click the
icon in the upper-left corner. In Blueprint Editor, click the Stacked Bar Chart widget in the Import Nodes pane. You can view the parameters of the stacked bar chart in the canvas, as shown in the following figure.

Event
Event
Description
When the data interface request is completed
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.
When a data interface request fails
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.
When a data item is clicked
The event that is raised when a column of a stacked bar chart is clicked, along with the data item corresponding to that column.
When the legend is clicked
The event that is raised when the legend of a stacked bar chart is clicked, along with the data item corresponding to the column.
Action
Policy 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
https://api.testand the data passed to the request data interface is{ id: '1'}, the final request interface ishttps://api.test?id=1.Import data
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.
Display dialog box
The input data of the action is of the object type. The parameters include
dataindex(data index),name(data name),x(x-axis position), andy(y-axis position). Sample data:{ "dataIndex": 1, "name": "", "x": 1, "y": 1 }Hide dialog box
Hide dialog box, no parameters required.
Legend control
The input data of the action is of the object type. The parameters include
type(legend action type) andname(legend name). Sample data:{ "type": "legendToggleSelect", "name": "" }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
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" }Switch to the implicit state
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" } }