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.
Unfortunately, activation email could not send to your email. Please try again.

Column Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

103419 Apr 30,2012 09:39 AM May 8,2012 01:43 AM WPF 3
loading
Tags: Chart
Salih
Asked On April 30, 2012 09:39 AM

Hi,

My only question is Can I add 3 or more columns in Column Chart and How?

Regards.


Michael Prabhu M [Syncfusion]
Replied On May 2, 2012 05:36 AM

Hi Salih,

Thanks for using Syncfusion product,

You requirement can be achieved by adding multiple chart series to our chart area, as in below code snippet.

Code Snippet[Xaml]:








Based on your requirement we have created a simple sample, Please find the attached sample below.

Please let us know if you have any queries.

Thank,
Michael Prabhu.



CS_a7fe84cf.zip

Salih
Replied On May 3, 2012 03:26 AM

Hi,

Thanks for your answer. But I want to add these columns by variables. For example, I use columnCount variable (int columnCount). I want to change these colums depends on this columnCount variable.

Thank you so much for your help.

Best Regards.


Michael Prabhu M [Syncfusion]
Replied On May 8, 2012 01:43 AM

Hi Salih,

Thanks for using Syncfusion Products.

We have analyzed your requirement and it can be achieved by adding Column Series to the chart area with respect to the number of columnCount variable as in below code snippet.

Code Snippet [C#]:
public void ADDColumns(int columnCount)
{
for (int i = 0; i < columnCount; i++)
{
ChartSeries newseries= new ChartSeries();
newseries.Type = ChartTypes.Column;
newseries.BindingPathX= "Prodname";
newseries.BindingPathsY= new string[]{"Price200"+i.ToString()};
newseries.DataSource = ab.Products;
Chart1.Areas[0].Series.Add(newseries);
}
}

Based on your requirement we have created a simple sample which you can download from the link below.

Sample: ColumnChart.zip

Please let us know if you have any queries.

Thanks,
Michael Prabhu.


CONFIRMATION

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.

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.

;