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

Performance issue when Stripline changes size and position while scrolling

Thread ID:





143455 Mar 20,2019 05:56 PM UTC Mar 22,2019 08:35 AM UTC WPF 3
Tags: SfChart
Asked On March 20, 2019 05:56 PM UTC

Hi, There is an issue with the performance of the sfChart when one or more chartrows contains a stripline which changes size and position as the user scrolls the chart. There is no problem however, if the stripline has a constant size and position.

Attached is a sample. Run the sample, press the Zoom 3 Days button and drag the scrollbar (quite small) to scroll the chart back and forth the whole range. The two red striplines for the volume1 and volume2 chartrows constantly update themselves to fill the range from 0 to 50 on their yaxis. The performance is quite sluggish. Now, turn off the Update Striplines checkmark and scroll again. The striplines do not update, so they will move beyond their chartrows some times. The performance however is now better, about twice as responsive. 

The reason for this is because when the striplines change size and position via the SetStriplinesPosition sub, the CalculateVisibleRange sub in the CustomDateTimeCategoryXAxis class is called twice for no apparent reason. More important, the Update sub in the CustomFastStepLineBitmapSegment class is also called twice whereas when the checkmark is off, it's only called once. There should be no reason for it to be called twice.

How can the performance be improved while having the striplines update properly while scrolling?

Thank you.

Attachment: sfChartStriplinePerformance_b75cb8d1.rar

Muneesh Kumar G [Syncfusion]
Replied On March 22, 2019 07:04 AM UTC

Hi Tom, 
Greetings from Syncfusion.  
We have analyzed your query with provided sample and we were able to reproduce the reported problem with our end.  
However,  the stripline performance during scrolling has been improved by setting the dispatcher thread true when striplines are updated implicitly in axis range calculation. 
Note: This is set True when Stripline’s range is set in chart extensions implicitly but when set explicitly (Updating only Stripline's position) this should not be set True. 
Code Snippet 
    Sub SetStriplinesPosition() 
        GetType(ChartAxisBase2D).GetField("isUpdateStripDispatched", BindingFlags.GetField OrElse BindingFlags.Instance OrElse BindingFlags.NonPublic).SetValue(Me, True) 
    End Sub 
Please let us know if you have any queries.  
Muneesh Kumar G.  

Replied On March 22, 2019 08:30 AM UTC

Fantastic, thank you so much Muneesh.

Muneesh Kumar G [Syncfusion]
Replied On March 22, 2019 08:35 AM UTC

Hi Tom, 
Thanks for the update. 
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
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