We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to create separate columns' StackedGroup in stacking series?

Platform: UWP |
Control: SfChart |
Published Date: March 7, 2016 |
Last Revised Date: June 27, 2019 |
.NET Framework: 4.5

Description

Stacking series can be rendered like a pile of coins that are stacked. SfChart allows you to group the stacking series and render it accordingly. This article describes how the stacking series can be grouped together.

Solution

The GroupingLabel property in stacking series is used to achieve this scenario. Giving same name to the GroupingLabel makes a single group into multiple stacking series. In the following example, four StackingColumnSeries are used to the stacking group and splitting it into two separate groups by setting the GroupingLabel as Group1 and Group2. After setting this property, four series can be stacked together into two columns by label.

 XAML

<!--Here stacking group is done by the GroupingLabel property->
<Syncfusion:StackingColumnSeries ItemsSource="{Binding TemperatureData}"  
       XBindingPath="Year" YBindingPath="Autumn"
       GroupingLabel="Group1" Label="Autumn" LegendIcon="Circle"   >
</Syncfusion:StackingColumnSeries>
<Syncfusion:StackingColumnSeries ItemsSource="{Binding TemperatureData}"  
       XBindingPath="Year" YBindingPath="Spring"
       GroupingLabel="Group1" Label="Spring" LegendIcon="Circle"   >
</Syncfusion:StackingColumnSeries>
<Syncfusion:StackingColumnSeries ItemsSource="{Binding TemperatureData}"  
       XBindingPath="Year" YBindingPath="Summer"
       GroupingLabel="Group2" Label="Summer" LegendIcon="Circle"   >
</Syncfusion:StackingColumnSeries>
<Syncfusion:StackingColumnSeries ItemsSource="{Binding TemperatureData}"  
       XBindingPath="Year" YBindingPath="Winter"
       GroupingLabel="Group2" Label="Winter" LegendIcon="Circle"   >
</Syncfusion:StackingColumnSeries>

Output

The following screenshot illustrates grouping of stacking series.

Stacking chart grouped togetther based on the grouping labels in WPF

Figure 1: Stacking series grouped together based on their labels.

2X faster development

The ultimate UWP UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon