# Stacked Groups

## Content



FlexChart supports stacking and grouping of data items in column and bar charts. Stacking provides capabilities for stacking data items one on top of the other (in column chart) or side-by-side (in bar chart). Whereas, grouping enables clustering of the stacked data items in bar and column charts.

Stacked groups allow you to compare items across categories in a group. In addition, you can visualize relative difference between items in each group.

The following image displays stacked groups in FlexChart.

![](https://cdn.mescius.io/document-site-files/images/8ba28e07-1633-4a6a-9114-13b9f1f04eed/images/stackedgroups.png)

To stack specific series in a specific stacked group, set the index value of that stacked group in the **StackingGroup** property for the series. Note that Stacked groups in FlexChart are implementable when the **Stacking** property for FlexChart is set to either **Stacked** or **Stacked100pc**, which specifies how the data values of chart will be stacked.

The following code compares fruit data for three consecutive months and shows how to implement stacked groups in FlexChart.

**xml**

```xml
<Chart:C1FlexChart x:Name="flexChart"
                   Stacking="Stacked"
                   ItemsSource="{Binding DataContext.Data}"
                   BindingX="Fruit">
    <Chart:Series SeriesName="March" Binding="March"
                  StackingGroup="0"/>
    <Chart:Series SeriesName="April" Binding="April"
                  StackingGroup="0"/>
    <Chart:Series SeriesName="May" Binding="May"
                  StackingGroup="1"/>
</Chart:C1FlexChart>
```

## See Also

[Creating and Adding Series](/componentone/docs/wpf/online-flexchart/FlexChart/WorkingwithFlexChart/FlexChartElements/FlexChartSeries/CreatingandAddingSeries)

[Adding Data to Series](/componentone/docs/wpf/online-flexchart/FlexChart/WorkingwithFlexChart/FlexChartElements/FlexChartSeries/AddingDatatoSeries)

[Emphasizing Different Types of Data](/componentone/docs/wpf/online-flexchart/FlexChart/WorkingwithFlexChart/FlexChartElements/FlexChartSeries/EmphasizingDifferentTypesofData)

[Customizing Series](/componentone/docs/wpf/online-flexchart/FlexChart/WorkingwithFlexChart/FlexChartElements/FlexChartSeries/CustomizingSeries)

[Box-and-Whisker](/componentone/docs/wpf/online-flexchart/FlexChart/WorkingwithFlexChart/FlexChartElements/FlexChartSeries/Box-and-Whisker)

[Error Bar](/componentone/docs/wpf/online-flexchart/FlexChart/WorkingwithFlexChart/FlexChartElements/FlexChartSeries/Error-bar)

[Waterfall Series](/componentone/docs/wpf/online-flexchart/FlexChart/WorkingwithFlexChart/FlexChartElements/FlexChartSeries/WaterfallSeries)