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

Generating and Saving Multiple Charts In Quick Succession -- i.e Working around rendering lag when saving SfCharts

Thread ID:





142547 Feb 8,2019 07:42 PM UTC Feb 12,2019 08:55 AM UTC WPF 3
Tags: SfChart
Matt Carroll
Asked On February 8, 2019 07:42 PM UTC

Hello everyone. I'm wondering if any of you have had success saving charts immediately/near immediately after rendering them. I've tried several different methods, but no matter what I encounter an exception of some kind (usually an ArrayOutOfBounds from inside the SfChart when Save is called) and thus I have had to scrap an entire feature of our company's software.

Things I've tried:
1. Issuing a save in the OnLoaded callback for each chart.
2. Rendering and saving the charts using the Hwnd / RootVisual method for a clone of each chart.
3. Doing both of those while called in the main WPF UI thread (Application.Dispatcher.)
4. Putting manual waits (Task.Delay.Wait) after each attempted render.

Theories on what's wrong:
1. SyncFusion bug of some kind (such as waiting on some other update to properly render itself.)
2. I didn't properly put everything on the UI thread.
3. The callbacks preempted each other thus only the last chart was actually saved.

That's pretty much what I've figured out about this issue. If anyone else has tried or, better yet, succeeded in this task then please let me know what you did. If you have any other possible workarounds I'm all ears.

Thank you!

Muneesh Kumar G [Syncfusion]
Replied On February 11, 2019 08:56 AM UTC

Hi Joe, 
Greetings from Syncfusion. 
We have prepared a sample to replicate the issue based on the provided procedure, but we are afraid, that we are not able to reproduce the issue at our end. The sample we tried can be downloaded from the below location. 
Since we are not aware of your exact application scenario we were not able to reproduce this at our end, can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to provide you better solution at the earliest.   
Muneesh Kumar G. 

Matt Carroll
Replied On February 11, 2019 02:42 PM UTC

The difference is that I need a new Loaded callback for each chart generated, and I'm not certain how many charts there will be. I'll try using reflection to create a new callback for each chart and bump this thread if it doesn't work out.

Muneesh Kumar G [Syncfusion]
Replied On February 12, 2019 08:55 AM UTC

Hi Joe 
Thanks for your update and we will wait to hear from you. 
Muneesh Kumar G. 


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