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

bound ChartSeries not updating

Thread ID:

Created:

Updated:

Platform:

Replies:

90103 Sep 16,2009 04:08 PM UTC Sep 18,2009 06:02 AM UTC WPF 3
loading
Tags: Chart
Bill Swartz
Asked On September 16, 2009 04:08 PM UTC

I have a ChartSeries bound to the Rows collection of a DataTable. Rows are being added to the DataTable in real time. The new data does not get added to the ChartSeries. The Syncfusion documentation led me to believe that it would get added. The ChartSeries gets the data in the table at the time of binding. After that, new data added to the table does not get added to the ChartSeries. I need the new data to get added to the ChartSeries. How can I do this?

Bill

Poorani Idhaya Bala M.A [Syncfusion]
Replied On September 17, 2009 01:08 PM UTC

Hi ,

Currently we do not have this support to add data dynamically using data table. This has been confirmed as a Feature Request. We will implement this feature in our forthcoming new version releases or service pack releases.

As a work around you can achieve this.

CollectionViewSource source = new CollectionViewSource();
DataTable table = new DataTable();

source.Source = table.DefaultView;

ChartSeries series1 = new ChartSeries();
series1.DataSource = source.View;

Please find the attached sample for more information.

Let us know if you have any questions.

Thanks for choosing Syncfusion Products.

Thanks,
Poorani



ChartWithDataTable_8d550ad6.zip

Bill Swartz
Replied On September 17, 2009 04:39 PM UTC

Poorani,

Thanks for the sample. In the testing I have done so far, it appears to do what we need it to do. I did make some changes. First, to the constructor I added

series1.IsIndexed = false;

We need to plot xy data. The significance of the IsIndexed property is not made clear in the Syncfusion documentation. After adding the above line, I was able to comment out these 2 lines in the button click event handler.

//chart1.Areas[0].Series[0].BindingPathX = "ID";
//chart1.Areas[0].Series[0].BindingPathsY = new string[] { "Price" };

As far as I am concerned, your sample demonstrates "support to add data dynamically using data table". If further testing shows problems, I will let you know.

Bill

Poorani Idhaya Bala M.A [Syncfusion]
Replied On September 18, 2009 06:02 AM UTC

Hi Bill,

Sorry for the inconvenience caused. We will update the documentation as soon as possible.

When a chart series is set to be indexed, the x values are treated as categories rather than values. All the points are simply plotted at an equal x distance, irrespective of the actual x value of the points. When a chart series is not set to be indexed,the x values are treated as values.

For more information please refer the "Indexed Chart Demo" sample under "Chart Series" in our sample browser.

Thanks for choosing Syncfusion products.

Let me know if you have any questions.

Thanks,
Poorani

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.

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

;