SFChart library

I observed that loading of the Content page is at least 2s  if the entire procedure for drawing the SfChart graph is written in Xaml code. I will appreciate for advice on how to avoid or at least reduce this time.

Best regards
Samo from Slovenia

3 Replies 1 reply marked as answer

SM Saravanan Madheswaran Syncfusion Team March 11, 2021 04:54 PM UTC

Hi Samo, 
 
Greetings from Syncfusion support.  
 
Please let us know that the mentioned delay was faced at the time of application launching or while navigate to the page that contain chart. Also check some below factor that will help you to increase chart performance when chart loaded with bulk amount of data points.  
 
1-      Use FastLine or FastScatter series  
2-      Disable the antialiasing of line by using the EnableAntiAliasing property. 
3-      Disable the default chart axis LabelStyles.  
 
-        //Remove the axis label styles    
-        Chart.PrimaryAxis.LabelStyle = null;    
-        Chart.SecondaryAxis.LabelStyle = null;    
-        foreach (var axes in Chart.Axes)    
-        {    
-        axes.LabelStyle = null;    
-        }    
4-       Suspend the update of the chart using SuspendSeriesNotification method when adding bulk data points and refresh the chart with newly added data points using ResumeSeriesNotification method.   
 
 
And check below blog to increase performance of Xamarin.Forms application.  
 
Regards, 
Saravanan. 



SS Samo Simoncic March 11, 2021 05:55 PM UTC

Hi Saravanan

This delay occurs during the navigation to the page that contains the chart. I figure out the cause of the problem. I tested the Android application in Debug mode which significantly increase the launching time of the page that contain chart. If I do the same in Release mode this delay is not present anymore.

Thanks for help.


SM Saravanan Madheswaran Syncfusion Team March 12, 2021 06:09 AM UTC

 Hi Samo 
 
In debug mode, the compiler emits debug symbols for all variables and compiles the code as is; however, in release mode, certain optimizations are included: 
 
·       Variables that aren't being used were not compiled at all.  
·       The code written in response to the #debug directive is not included.  
·       If the compiler determines that any loop variables are invariants, they are excluded from the loop.  
 
As a result, the delay is absent in release mode. If you still expect the same results while debugging, please do post your application scenario along with chart-related code snippets, it will help us to validate and provide any possible suggestion.  
 
Regards, 
Saravanan 


Marked as answer
Loader.
Up arrow icon