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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamic chart series with ngFor does not re-render.

Thread ID:





146324 Jul 31,2019 12:08 PM UTC Sep 16,2019 05:56 AM UTC Angular - EJ 2 5
Tags: Chart
Akshay Rana
Asked On July 31, 2019 12:18 PM UTC

I have some data like :

chartData = [
{... , values: [{x: 'x', y: 'y', value: '10'}, {x: 'x', y: 'y', value: '20'} .....] },
{... , values: [{x: 'x', y: 'y', value: '10'}, {x: 'x', y: 'y', value: '20'} .....] },

I want to create a stackingColumn chart with each element in the array as a series.
It works fine, but on ngOnChanges, when I re-assign to chart data, chart does not update. I tried manually calling changeDetectorRef.markForCheck(), 
doesn't help.

One way I am able to do it by calling removeSeries() and then addseries() whenever data is updated.
Is there any better way to achieve this? And why is the data not re-rendering?

<ejs-chart #chart id="chart-container"         ...>
<e-series *ngFor="let chart of chartData; let i = index"
[name]="chart.name" [marker]="marker">

Kalaimathi Chellaiah [Syncfusion]
Replied On August 1, 2019 12:22 PM UTC

Hi Akshay, 
Greetings from Syncfusion. 
We have analyzed your query. We have prepared a sample based on your requirement. In that we have tried to replicate the reported scenario at our end. Unfortunately, we are unable to reproduce the reported issue. We have changed the chart data source using button click. In that data is updated properly. Please find below sample and screenshot, 
Initial Rendering 
After Button Click 
Since we are not aware of your exact scenario which the issue is reproduced. So Please share the following information which will be more helpful for further analysis and provide you the solution sooner. 

  • Try to reproduce the reported scenario in the above sample
  • Please share your sample (or) code snippet with full configurations.

  • Share the details if you have done any other customization in your sample.
  • Share your dataSource file


Akshay Rana
Replied On August 1, 2019 12:34 PM UTC


Thanks for your response.

It doesn't work if I re assign to chartData.


Kalaimathi Chellaiah [Syncfusion]
Replied On August 2, 2019 09:43 AM UTC

Hi Akshay, 
Sorry for the inconvenience. 
We were able to reproduce the issue Dynamic chart series with ngFor does not re-render and we confirm this as a bug and logged a defect report .You can keep track of the bug from the feedback portal below.  
The fix will be available in our upcoming weekly patch release which scheduled to be rolled out August 13th , 2019.  
If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.  

Kalaimathi Chellaiah [Syncfusion]
Replied On August 29, 2019 05:22 AM UTC

Hi Akshay, 
Sorry for the inconvenience. 
Due to some technical issues, we couldn’t include the fix on specified time. So we will move this fix our next patch release which is scheduled to be rolled out on or before September 3rd, 2019. We appreciate your patience until then. 
Let me know, if you have any concerns. 

Kalaimathi Chellaiah [Syncfusion]
Replied On September 16, 2019 05:56 AM UTC

Hi Akshay,  
Thanks for being patience. 
We are glad to announce that our v17.2.49  patch release is rolled out, we have added the fix for the reported issue and is available for download under the following link.  
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  


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

Live Chat Icon For mobile
Live Chat Icon