Bar Chart¶
Note
This widget already supports the new configuration panel, and this topic describes the new panel by default. You can switch panels at any time in the upper right corner of the chart configuration panel without affecting your configuration.
A bar chart uses vertical or horizontal bars to show the quantity, frequency, or comparison of data, and can be combined with line, area, and other series types to show trends and composition.
This topic describes the configuration items specific to the bar chart. For the items common to all charts, such as the Filter tab and the Others tab, see Common Configurations for Charts.
Types of Bar Chart¶
When adding a bar chart, you can choose from the following presets:
Bar chart preset |
Style |
Description |
Recommended scenario |
|---|---|---|---|
Basic Bar |
|
Uses bar series to compare a measurement across dimension values, and can stack several series. |
Comparing categorical data such as monthly generation or conforming products per production line. |
With Target Line |
|
Overlays a target line on the bar series, showing the gap between the actual and target values at a glance. |
When both the progress of a metric and its target baseline need to be shown. |
Stacked Bar |
|
Stacks several bar series by category, showing each part and the total at the same time. |
When the parts and their total need to be shown, such as the composition of total generation by energy type. |
Waterfall |
|
Uses floating bars to show the cumulative increase and decrease of a value. |
When the sources of a change in the total need to be broken down, such as cost composition or attribution of output changes. |
Box Plot |
|
Uses boxes and whiskers to show the maximum, minimum, upper and lower quartiles, and median of a data set. |
When the distribution and dispersion of data need to be observed, such as the temperature fluctuation range of each unit. |
Note
For the data and style items specific to the Waterfall Chart and the Box Plot, see Waterfall Chart and Box Plot.
Data of Bar Chart¶
The bar chart centers on measurements, uses dimensions to define categories, and can use a comparison field to produce several groups of series. For data sources, data fields, aggregation, and sorting, see Common Configurations for Charts > Configuring Data.
Dimension¶
Dimension defines the labels on the category axis. A bar chart accepts up to 2 dimension fields, but the chart only uses the first dimension as the category axis; the second has no effect on the display. In the vertical layout the categories appear on the X-axis; in the horizontal layout they appear on the Y-axis.
Comparison¶
Comparison is optional and accepts up to 1 field. Once Comparison is selected in a series, each comparison value produces its own series, which can be displayed side by side or stacked.
Measurement¶
Measurement determines the height or length of the bars. At least 1 measurement is required, with no upper limit. Each series binds one measurement, and a single chart can mix bar, line, area, and other series types.
Extension¶
Extension fields are not drawn on the bar chart directly. There is no limit on the number, and they have two uses:
Data source of a highlight area: The Data Field of a highlight area lists only the extension fields you have added, and the chart determines the range to highlight from the value of that field. To highlight certain category ranges, such as marking an abnormal batch, add the field to Extension first and then reference it in Highlight Area.
Bubble size: When the series type is Bubble, select an extension field in Data Field of the series, and the chart scales the bubble size by the value of that field.
Note
The tooltip of the bar chart does not show extension fields. Adding extension fields without referencing them in a Highlight Area or a Bubble series changes nothing in the chart.
Style of Bar Chart¶
The style items are organized into six sections: Title, Widget, Series, Coordinate Axis, Legend, and Mark. For the items common to all charts, see Common Configurations for Charts > Configuring Style.
Series¶
In addition to the common items, the Bar series provides Rounded Corners: when selected, the top of each bar uses rounded corners. Cleared by default.
Bar Spacing and Stacked Bar Chart in the Series section are shown only when at least one series has the Type Bar, so they are usually visible in a bar chart; Maximum Bar Width is always shown. For descriptions of all three, see Common Configurations for Charts > Series.
Interactions at Runtime¶
The bar chart behaves as follows at runtime. The bar chart, line chart, scatter chart, and box plot share the same widget, so these behaviors are identical for all four.
Tooltip: Requires Show Tooltip on the Others tab (selected by default). Moving the mouse into the plot area highlights the whole column of a category, and the tooltip lists the name, color, and value with unit of every series in that category. A box plot series expands into five rows for Maximum Value, Minimum Value, Median Value, Upper Quartile Value, and Lower Quartile Value; a row with no value shows
--.Legend filtering: Requires the legend to be visible. Selecting a legend item hides or shows the corresponding series, and the value axis range is recalculated. Hiding a series only affects the display; it does not refetch data and does not affect exported data.
Scalar bar zooming: Requires Show Scalar Bar to be selected for the relevant axis in Coordinate Axis. Drag the scalar bar to focus on part of the range, down to a single category.
Selection zooming: Requires Enable Selection Zooming on the Others tab. The Zoom, Undo, and Reset icons appear on the chart, and dragging a rectangle zooms into that area.
Widget linkage: Configured on the Filter tab. It can be triggered by selecting a bar, a data point, or the whole column area of that category; the mouse pointer over a series that can trigger linkage becomes a hand, and the selected category is marked with a translucent band. The chart provides no entry for clearing the linkage value. For the configuration method, see Link Other Widgets.
Zoom synchronization: Once you enter the same Link Group ID on several charts on the Others tab, zooming and resetting on one chart is synchronized to the others. For the widgets that respond to Link Group ID, see Common Configurations for Charts > Link Group ID.