Overview
Version
Report Server Version |
---|
11.0 |
Application Scenario
Stacked bar charts indicate the quantity of available data using the height or length of bars of the same width, and distinguish the proportion of each category by colors of the bars.
You can use stacked bar charts to compare the cumulative volumes of different categories, especially when presenting cumulative data over time or data in multiple dimensions.
Chart Feature
Advantage: The column shows the data sizes by the lengths of the columns, making it easier for you to compare the differences among various groups of data.
Disadvantage: The column chart is unsuitable for the large dataset display.
Example
Data Preparation
Choose File > New General Report in the upper left corner of the designer, and create a dataset ds1. The database query statement is as follows:
SELECT Category_Name, Inventory_Quantity, Order_Quantity, Reorder_Quantity FROM Product, Category
WHERE p.CategoryID = c.CategoryID AND Category_Name != 'Daily necessities'
ORDER BY Category_Name.
Chart Insertion
Merge required cells, click Insert Chart icon on the upper toolbar, and choose Bar Chart > Stacked Bar Chart, as shown in the following figure.
Chart Design
Select the chart, click the Cell Element icon on the right property panel, and set the properties (Type, Data, Style, and Special Effect) for the chart.
Chart Type
Select the cell where the chart is located and choose Cell Element > Type to view and select the chart type.
Data Binding
1. Select the chart and choose Cell Element > Data on the right property panel.
2. Bind the data in the Dataset. Select ds1 for Dataset, Category_Name for Category, Field Name for Series Name (Inventory_Quantity and Order_Quantity fields), and Sum for Summary.
Chart Style Setting
Select the chart, choose Cell Element > Style > Title, enter Stacked Bar Chart in the Text, and set the rest by default, as shown in the following figure.
Effect Display
PC
Save the template and click Pagination Preview. The effect is the same as that shown in section "Application Scenario".
Mobile Terminal
The report can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the display effect.
Template Download
For details, you can click to download the template Stacked Bar Chart.cpt