Bar chart
The bar chart component displays trends across multiple data series in a bar format, helping you analyze and compare changes in your data. This topic explains how to configure the bar chart component.
Step 1: Add the component
-
Create a mobile application. For more information, see Create a mobile application.
-
In the mobile application editor, click the Components icon
on the far left. -
(Optional) Add column components to set up the layout of your application page. For more information, see Horizontal and vertical columns.
-
In the component list on the left side of the canvas, enter Bar Chart in the search box. Then, drag the component to the canvas.
For more information about adding components, see Add components.
Step 2: Configure a data source
-
In the right-side panel of the mobile application editor, go to the style tab and click Configure Data Source next to Data Display.
-
On the Data Source Configuration page, select a data source type and configure it.
You can choose from the following types: API, static data, or application push.
-
Click OK.
On the Data Display tab, the name of your configured data source appears under Data Source. The system automatically parses fields from your data source and lists them under dimension and measure.
NoteData source attribute matching rules:
-
dimension: Boolean, string, and time fields.
-
measure: Numeric fields.
-
-
(Optional) Click Data Table in the upper-left corner to view all data from the configured data source.
Step 3: Configure the data display
On the Data Display tab, configure the bar chart's data and style.
-
Drag a field from the dimension section to the Horizontal axis box and one or more fields from the measure section to the Vertical axis box.
NoteYou can change the default chart colors on the property or style tab in the right-side panel.
-
In the horizontal axis and vertical axis boxes, click the triangle icon next to a field to set its display name.
-
On the right side of the Data Display tab, click Style to configure the style of the component.
Parameter
Description
Global Style
Sets the global font for the chart.
Legend
Shows or hides the legend. If you choose to show it, you can configure its style.
X-axis
Shows or hides the tick marks on the X-axis or Y-axis. If you choose to show them, you can customize their style.
NoteThe axis tick count starts from the tick mark where the minimum value is located. For example, if the minimum value is 0, the maximum value is 500, and the interval is 50, the tick count is 11.
Y-axis
Horizontal Gridline
Shows or hides this item. If you choose to show it, you can customize its display style.
Background
Border
No Data Message
-
Click Finish Configuration to return to the mobile application editor and view the data in the configured component.
-
Adjust the position of the component on the page. For more information, see General Styles.
Step 4: Configure interactions
-
In the right-side panel, go to the interaction tab and click Add Interaction to set an event and an action.
The click and double-click events are supported. For example, you can set a click event on the component to trigger the Refresh Component action, which refreshes the content of a specified component.
For more information, see Interaction configuration.
-
Preview and debug the component's data and style. For more information, see Preview and debug.