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

Sample Data for Stacking Bar/Column series

Thread ID:





124687 Jun 22,2016 08:12 PM UTC Jun 24,2016 05:25 AM UTC Xamarin.Forms 3
Tags: SfChart
Drew Wilson
Asked On June 22, 2016 08:12 PM UTC

Can someone please provide sample data for stacking bar/column series? Something like the following will suffice:
SampleData = new ObservableCollection();
SampleData.Add(new ChartDataPoint("YValue", x1, x2));
The issue with this data is that it only displays the x1 value - x2 is not stack in a different color.

Saravana Pandian Murugan [Syncfusion]
Replied On June 23, 2016 10:31 AM UTC

Hi Drew,

We have prepared a sample based on your requirement which can be downloaded from the below location.

Sample: http://www.syncfusion.com/downloads/support/forum/124687/ze/StackedBarSample-2059730491  

Saravana Pandian M. 

Drew Wilson
Replied On June 23, 2016 05:10 PM UTC

This worked perfectly.

Just to further clarify for those interested it the addition of a second data set that stacks the values:

            series1Data = new ObservableCollection<ChartDataPoint>();
            series2Data = new ObservableCollection<ChartDataPoint>();

            series1Data.Add(new ChartDataPoint("John", 25));

            series2Data.Add(new ChartDataPoint("John", 45));

will create a stacked bar for John

Saravana Pandian Murugan [Syncfusion]
Replied On June 24, 2016 05:25 AM UTC

Hi Drew,

Thanks for the update.

Yes. The bar will be stacked for John.

Saravana Pandian M.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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