Pie chart is flickering while the data changes quickly
Hello Syncfusion Team,
I am facing a flickering issue on the pie chart in .Net Maui on Windows platform. The issue arises when the items source is changing too quickly. I have prepared a demo using a timer with a 500 milliseconds interval. In the timer elapsed handler, first I clear the item source. Then shuffle the data and add to the items source from a private collection.
Note that this issue also exists on the column chart also. I am looking for a fix for the issues from you guys as quickly as possible. Thanks everyone.
Attachment: Pie_Chart__Demo_Video_bc77ea50.zip
Hi Rashidul,
Thank you for reaching out to us.
We have investigated your query and reviewed the sample and output video you provided. During our initial validation, we observed that the flickering issue occurs due to rapid updates to the ItemsSource. Running the sample continuously also led to a noticeable slowdown in the application. Further analysis with diagnostic tools indicated a gradual increase in memory usage, suggesting memory leaks, likely due to bindable property objects not being released properly.
We suspect that these memory leaks might be contributing to the flickering issue. To fully address this, we will need to create a separate sample and conduct further validation.
We appreciate your patience and will provide you with more detailed findings and a potential solution within two business days (12th August, 2024).
Thank you for your understanding.
Regards,
Dhanaraj Rajendran.
Hi Rashidul,
We would like to inform you that the issue you’re experiencing may be related to the framework's canvas rendering used for legend icons and data labels, which holds memory on your case. We believe this might be contributing to the problem you're facing. However, we need an additional day to thoroughly investigate and confirm this. We will validate and provide further details on or before tomorrow (13/08/2024).
Thank you for your patience and understanding.
Regards,
Dhanaraj Rajendran.
Hi Rashidul,
We suggest disabling animations in the chart, as they may be contributing to the flickering issue. Additionally, we noticed that each time the items source is updated, the legend items are recreated, leading to frequent layout updates. If your case involves only updating the X and Y values without changing the items source, we recommend the ListenPropertyChange property, has not yet been implemented in .NET MAUI. We have created a feedback request and added it to our feature request list. You can track the status and progress of this feature request through the following feedback portal link:
Feedback Link: Provide support for the chart series data points business model dynamic update.
We will prioritize the features in every release based on the demands, and we do not have an immediate plan to implement this since we committed to already planned work. So, this feature will be available for any of our upcoming releases.
Please cast your vote to make it count, and if you have any more specifications or suggestions for the feature request, you can add them as a comment in the feedback portal.
Thank you for your understanding.
Regards,
Dhanaraj Rajendran.
Is there anything else I can do currently to reduce the flicking?
Hi Rashidul,
Yes,
you can improve the performance of chart rendering by using Task.Delay instead of Timer
and updating the ItemsSource
on the MainThread.
Additionally, we suggest manually invoking garbage collection after each ItemsSource update to help manage memory more
effectively.
Please
note that when updating the ItemsSource,
the chart's legend and segments are re-rendered. The frequent clearing and
re-creation of items every 500 milliseconds might appear as flickering, but
this is actually the chart re-rendering.
We’ve attached a modified sample for your reference that incorporates these suggestions.
Thank you for your understanding.
Regards,
Dhanaraj Rajendran.
Attachment: SF_F192978_e3f524da.zip
- 6 Replies
- 2 Participants
-
MR Md. Rashidul Hasan
- Aug 7, 2024 02:07 PM UTC
- Aug 14, 2024 01:24 PM UTC