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.

Create StackingColumnSeries dynamically

Thread ID:

Created:

Updated:

Platform:

Replies:

106302 Dec 26,2012 06:02 AM Mar 1,2013 08:52 AM WinRT 3
loading
Tags: Chart
Petr
Asked On December 26, 2012 06:02 AM

Hi team,

I am trying to create StackingColumnSeries dynamically. I have a number of categories for which I want to show Column Chart where on X axis is time (months) and Y shows some amount of data. So there should be stacked columns for each month. In each column I want to display stacked columns for each available category. However the number of categories it not known before runtime.

Is there a way how to dynamically add StackingColumnSeries for each category in code, instead of XAML markup?

I have tried to add it like this, based on your demo:

var temp = new StackingColumnSeries
{
  ItemsSource = ColumnViewModel.MedalDetails2,
  XBindingPath = "CountryName", 
  YBindingPath = "GoldMedals",
  AdornmentsInfo = new ChartAdornmentInfo
  {
    ShowMarker = false,
    ShowLabel = true,
    HorizontalAlignment = HorizontalAlignment.Center,
    VerticalAlignment = VerticalAlignment.Bottom,
  }
  ,
  Label = "asdsd"
};
stColumnChart.Series.Add(temp);

However this does not seam to work. I have also pointed the DataContext of the whole chart to the ColumnViewModel. Nothing is displayed on the chart.

Thank you for your help!

 

Petr


Ganesan [Syncfusion]
Replied On December 27, 2012 12:57 AM

Hi Peter,

We would like to inform you that the reported scenario is unable to reproduce. We have also prepared a simple sample based on the requirement reported. Kindly download the sample from the following link.

StackingColumnChart.zip

If you have any further difficulties in achieving the requirement, please revert to us with some more details such as with a complete sample demonstrating the scenario.

Regards,

Ganesan


Cawood Ian
Replied On March 1, 2013 03:42 AM

Hi,

Your sample is perfect.
Does it possible to do this without binding to gain performance?
How create datapoint and initialize dataserie ?

thanks

Sheik Syed Abthaheer M [Syncfusion]
Replied On March 1, 2013 08:52 AM

Hi Pieter,

Thanks for your update.

Query 1

We would like to inform you that, we need to bind the underlying Data collection for initializing the Chart Series and also like to inform you that, it does not cause any performance issue.

Query 2

Create Data Points and initialize ChartSeries procedure is available in our online documentation. Please find our online documentation as given below:

Link: http://help.syncfusion.com/UG/winrt/Documents/creatingasimplechart.htm

Please let us know if you have any concerns.

Regards,

M. Sheik Syed Abthaheer

 


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.

;