- Home
- Forum
- Xamarin.Forms
- Is it possible to scroll horizontally or load more on LineSeries?
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.
SIGN IN To post a reply.
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
Ug : https://help.syncfusion.com/xamarin/sfchart/axis?cs-save-lang=1&cs-lang=csharp#autoscrollingdelta
Thanks,
Michael
EM
Emil
November 20, 2018 04:45 PM UTC
Hi Michael,
Attachment: AutoScrolling726564432_b521cb93.zip
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.
Sample: Chart_GettingStarted
Hope this helps.
Thanks,
Michael
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
EM Emil
- Nov 19, 2018 06:36 PM UTC
- Nov 22, 2018 06:36 AM UTC