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

(SfChart) Column Chart with 2 series code behind version(not xaml)

Thread ID:





121451 Dec 16,2015 05:35 AM UTC Dec 16,2015 04:54 PM UTC WPF 1
Tags: SfChart
Asked On December 16, 2015 05:35 AM UTC

Hi can you give me a sample project about the sf chart specifically Column-series that has 2 series and showing 2 legends
but the legends shows 2 dates example year 2014 and year 2015 using code behind not xaml and using the grid to call the chart example code "grid.Children.Add(samplechart)".

Santhiya Arulsamy [Syncfusion]
Replied On December 16, 2015 04:54 PM UTC

Hi Ven,

Thanks for contacting Syncfusion support.

In SfChart, we are maintaining the ChartSeries in a ChartSeriesCollection, if you want to add a ChartSeries to SfChart, just create a ChartSeries instance and add it in the collection.

For example:  If you want to add a ColumnSeries , create a new instance for it and add it in the Series property in SfChart.


ColumnSeries columnSeries = new ColumnSeries();

columnSeries.ItemsSource = view.SneakersDetail;

columnSeries.XBindingPath = "Brand";

columnSeries.YBindingPath = "Year2014";


For legends, just create new instance of ChartLegend type and assign it to the Legend property in the SfChart.

We have prepared the sample based on your requirement. Please find the sample from the following location.

Sample: ColumnChart

Please refer to the following UG documentation for your reference.



Santhiya A.


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