This topic describes the configuration items of a percentage bar chart.
Chart style
A percentage bar chart is a type of column chart. You can use the percentage chart to display the percentage of data in multiple data categories. This way, you can more clearly and intelligently display the differences in the percentage of each data category.
Configuration Panel 
Search Configuration: Click Search Configuration in the upper-right corner of the Configuration panel. In the Search Configuration panel, enter the name of the configuration items that you want to search for to quickly locate the configuration items. 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
icon to lock the aspect ratio of the widget and modify the width and height of the widget in equal proportion. Click again to unlock. The aspect ratio is not limited after unlocking.
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 to control the rotation angle of the widget.
Click the
icon to flip the widget style.
Click the
icon to flip the widget style.
Opacity: Valid values: 0 to 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 name
Custom Margins: Click the
icon to specify the custom margins. The distance between the chart area and the four boundaries of the widget. Default unit: px.
Custom Column Width: the width of the column. If the custom width is too large, different columns in the same group overlap. Set the width value with caution. Click the
icon to control the display of the custom column width.
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
Position
The position of the value label text. You can select Left, Middle, or Right.
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.
Decimal Places
The value of the decimal places of the data in the value label.
Legend: the legend style of the column chart. If the data panel contains s series of field data, the legend style takes effect. You can click
the icon to display or hide the legend.
Parameter
Description
Allow Page Turning
If the switch is turned on, page turning can be allowed when the number of legends is too large to be arranged. If the switch is turned off, page turning cannot be allowed.
Layout
The position of the legend relative to the start coordinate of the widget. Valides: Top Left, Top Center, Top Right, Bottom Left, Bottom Center, and Bottom Right.
Legend Tags
The style of the legend tag, including the shape style and size of the legend.
Legend Text
The style of the legend text, including the font style, text weight, font size, and color of the legend.
Axis: You can select x-axis or y-axis.
X Axis
X Axis Visible: 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.
Axis Label: The style of the column chart x-axis label. You can click the
icon to display or hide the x-axis labels.
Parameter
Description
Text Style
The font style, weight, font size, and color of the x-axis label text.
Custom Quantity
The number value displayed by the x-axis label. You can click
the icon to specify the number of labels on the x-axis.
Axis Title: the style of the column chart x-axis title. You can click the
icon to display or hide the x-axis title.
Parameter
Description
Title Content
The text content of the x-axis title.
Offset
The offset value of the x-axis title. Unit: px.
Text Style
The font style, text weight, font size, and color of the x-axis title text.
Axis: the style of the column chart x-axis. You can click
the icon to display the x-axis.
Color: the color of the x-axis.
Tick mark: the x-axis tick mark style of the column chart, including the length, thickness, and color of the tick mark. You can click
the icon to control whether to x-axis tick mark style.
Gridlines: 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
Y Axis Visible: 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.
Data Type: the type of the y-axis data.
Parameter
Description
Numerical Type
Supports numeric data such as integers and floating-point numbers.
Category Type
Data of category types such as character and string is supported.
Time Type
The data of the time type needs to be configured data format.
Axis Label: the style of the column chart y-axis label. You can click the
icon to display or hide the y-axis label.
Parameter
Description
Display Format
The data format you want to display. This parameter is valid only for time-based and numeric data. Please refer to
YYYY/MM/DD HH:mm:ss
time, integer referenced
and floating point reference.1f
.Text Style
The font style, text weight, font size, and color of the y-axis label text.
Custom Quantity
The y-axis label displays the quantity value. You can click the
icon to specify the number of y-axis labels.
Axis Title: the style of the column chart y-axis title. You can click the
icon to display or hide the y-axis title.
Parameter
Description
Title Content
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 title text on the y-axis.
Axis: the style of the y-axis of the column chart. You can click
the icon to display the y-axis.
Color: the color of the y-axis.
Tick mark: the style of the column chart y-axis tick mark. You can click the
icon to display or hide the tick mark on the y-axis.
Color: the color of the tick mark on the y-axis.
Gridlines: 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.
RDS edition
CSV Data: If you turn on the switch, you can directly use the column mapping and data series in the CSV data file. If you turn off the switch, the series mapping configuration items take effect. You can click the
icon to display or hide the CSV data switch.
Parameter
Description
Automatic field parsing
If you turn on the switch, the widget uses CSV data to automatically parse and display the fields. If you turn off the switch, the fields are not automatically parsed.
Only numeric fields
If you turn on the switch, CSV data is parsed only for fields of the data type. If you turn off the switch, CSV data is automatically parsed for all fields.
data 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.
Parameter
Description
Mapping Field
Column Name /Field Name and Series Name configuration items. This parameter takes effect only when you turn on CSV Data and turn off Auto Parse Field configuration items.
Column Name /Field Name: the data series field value. You can customize the field value. If the field is empty, the system displays s field values in the widget data as series field values.
Series Name: the display name of the data series series, which can be customized.
Series S Value and Series Display configuration items take effect only when CSV Data is hidden and the Series Mapping configuration items switch is turned on.
Series s Value: the data series mapping value, which can be customized. If you do not specify this parameter, the system displays s field values in the component data as series field mapping values.
Series Display: the display name of the data series, which can be customized.
Fill Color
The fill color of the column chart under this series.
Series Mapping: If you turn on the switch, this parameter takes effect when the data contains series s values. You can set the color and name of a specific series by using the Mapping Field parameter. If you turn off the switch, the Mapping Field configuration items is disabled.
Remarks
Interaction Enhancement for Massive Data: If the column chart contains too much data, you can set the data interaction enhancement style. You can click the
icon to enable or disable the interaction enhancement effect.
Parameter
Description
How to run the commands
The method of data interaction. The default value is Scroll Bar.
Direction
The direction in which the scroll bar is arranged, including Horizontal and Vertical.
Type Width
The width of the data category column.
dialog box: 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.
Figure 1. The dialog box panel
Figure 2. dialog box example
Parameter
Description
Text Style
The style of the text in the dialog box, including the font style, weight, font size, and color.
Indicator
The style of the prompt indicator, including the width, line type, and color of the indicator. Click on
the icon to turn the indicator on or off.
Background Box Style
The background box style of the dialog box.
Background Color: the background color of the dialog box.
Padding: the inner margin of the dialog box. Unit: pixels.
Borders
Border Width: the border thickness of the dialog box. Unit: pixels.
Border Color: The border color of the dialog box.
Data Panel 
Configuration field description
Field | Description |
x | The category of each column in the column chart. |
y | The value of each column in the column chart. |
s | Optional. The data of the corresponding series. |
Configuration item | Section |
Controlled Mode | If you turn on the switch, data is not requested when the asset is initialized. Data is requested only by using the callback ID or the method configured in Blueprint Editor. If you turn off the switch, you can use automatic update to request data. 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 clear the check box, the data is not automatically updated. You must manually refresh the page or use the Blueprint Editor and callback ID events to trigger a request to update the data. |
Data Source | Click Configure Data Source. In the Configure Data Source panel, modify the data source type and query code, preview the response of the data source, and view the response results. 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. Click Add Filter. In the Set Data Source panel, configure a data filter script. For more information, see How to use. |
Data Response Result | The response to a data request. If the data source changes, you can click the |
Interactive Panel 
Interaction Event | Description |
When a data item is clicked | Select the Enable check box to enable interactions between widgets. When you click a bar of a percentage bar chart, a data request is triggered, a callback value is thrown, and data of different bars is dynamically loaded. By default, the x, y, and s values in the data are returned. For more information, see How to Configure the Callback ID of a Digital Flip Component. |
When you click the legend | Select the Enable check box to enable interactions between widgets. When you click the legend of a percentage bar chart, a data request is triggered, a callback value is thrown, and data of different bars is dynamically loaded. By default, the x, y, and s values are returned. For more information, see How to Configure the Callback ID of a Digital Flip 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 Percentage Bar Chart widget in the Added Nodes pane. On the canvas, you can configure the parameters for the percentage bar chart, as shown in the following figure.
Event
Event
Description
When the percentage bar chart 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 the percentage bar chart interface request fails
The event that is returned when a data interface request fails (such as 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 bar of a percentage bar chart is clicked, along with the data item corresponding to the bar.
When you click the legend
The event that is raised when the legend of a percentage bar chart is clicked, along with the data item corresponding to the legend.
Action
Action
Description
Request percentage bar 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 API data source is set to
https://api.test
and the data transferred to the Request Percentage Bar Chart interface is set to{ id: '1'}
, the final request interface ishttps://api.test?id=1
.Import Percentage Bar Chart
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.
{ 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. Examples of reference data are as follows.
{ 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. } }
Clear components
Clear component data. No parameters are required.
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. Examples of reference data are as follows.
{ //true indicates that a widget is shown, whereas false indicates that a widget is hidden. "status": true, // Animation is displayed. "animationIn": { // The animation type, which can be set to fade. If it is not specified, no animation is displayed. "animationType": "fade", // The duration in which animation is displayed. It is in the unit of milliseconds. "animationDuration": 1000, // The function that is used to display animation. You can set this parameter to linear|easeInOutQuad|easeInOutExpo. "animationEasing": "linear" }, // Animation is hidden. "animationOut": { // The animation type, which can be set to fade. If it is not specified, no animation is displayed. "animationType": "fade", // The duration in which animation is hidden. It is in the unit of milliseconds. "animationDuration": 1000, // The function that is used to hide animation. You can set this parameter to linear|easeInOutQuad|easeInOutExpo. "animationEasing": "linear" } }
Move
A widget is moved to a specified location. Examples of reference data are as follows.
{ // 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" } }