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

Is it possible to scroll horizontally or load more on LineSeries?

when i populate a lot of data on LineSeries, it looks quite squeezed? If i have large date range, will it possible like pulling and showing more and further data on LineSeries?

So for example, result shows on LineSeries date between 19.11.2018 - 12.11.2018, if user pulls the chart on left direction, it shows before 12.11.2018.


3 Replies

MP Michael Prabhu M Syncfusion Team November 20, 2018 12:00 PM UTC

Hi Emil, 

Greetings from Syncfusion. We have achieved your requirement by using AutoScrollingDelta in ChartAxis. Please refer below code snippet. 

Code snippet [XAML]:   
<chart:SfChart.PrimaryAxis> 
                <chart:DateTimeAxis  AutoScrollingDeltaType="Days" AutoScrollingDelta="7" AutoScrollingMode="Start"> 
</chart:SfChart.PrimaryAxis> 
 
  
Code snippet [C#]:    
chart.PrimaryAxis = new DateTimeAxis() 
{                
         AutoScrollingDeltaType = DateTimeDeltaType.Days, 
         AutoScrollingDelta = 7, 
         AutoScrollingMode= ChartAutoScrollingMode.Start 
}; 
 

And we have prepared a sample for your requirement and you can download the sample from the below link. 

Sample: AutoScrolling 

Please refer below link to know about more details on AutoScrollingDelta 


Thanks, 
Michael 



EM Emil November 20, 2018 04:45 PM UTC

Hi Michael,

Your sample isnt working if i load the data using OnAppearing method. I have to load it asynchronously and i am reloading the data with some filters. So your sample only works inside the constructor. please find the attached project to see yAxis with date is totally strange.


thanks,

Emil


Attachment: AutoScrolling726564432_b521cb93.zip


MP Michael Prabhu M Syncfusion Team November 22, 2018 06:36 AM UTC

Hi Emil, 
 
We have analyzed your sample and we like to let you know that the auto-scrolling feature works with both static and dynamic data. We have investigated the example project you have provided and identified that the data is not bound to ItemsSource property of the chart, since you are setting the value for Data property at run-time without notifying the property change. Whenever you are changing a property at run-time, the parent class should be implemented the INotifyPropertyChanged interface in order to make the data binding works properly.  
We have modified your example project and attached in the following link. 
Hope this helps. 
Thanks, 
Michael 
 
 


Loader.
Up arrow icon