realtime data graph in a listview

I'm trying to create charts in a listview which can update realtime.
I am able to display these charts but I have no idea how they should animate and update with new data without scrolling in my listview.
Can you provide an example of how this is done?

I'm using MvvmCross and would like to update from the viewmodel.

3 Replies

PS Parthiban Sundaram Syncfusion Team November 2, 2017 12:38 PM UTC

Hi Hans, 
 
Thanks for using Syncfusion products. 
 
You can use Animate method in ChartSeries to animate the chart without scrolling the list view or updating the data. Please refer the following code snippet for more details. 
 
Code Snippet: 
 
 
  series.Animate(); 
 
 
If your requirement is different from this, please update us modified sample or chart related code snippet to provide the further solution on this.   
 
Please let us know, if you need further assistance on this. 
 
Regards, 
Parthiban S 



HB Hans-Jurgen Bakkenes November 7, 2017 11:41 AM UTC

When I have the following code:

Series = new LineSeries

            {

                ItemsSource = Data,

                XBindingPath = "EventEnqueuedUtcTime",

                YBindingPath = "Temperature",

                ListenPropertyChange = true,

                EnableAnimation = true,

                AnimationDuration = 50

};

The chart does not animate itself as I would expect. When my MvxObservableCollection changes it sometimes instantly draws the line and sometimes animates it.
How do I get the chart to animate correctly. This should be when my data collection changes and it then updates the chart in 1 second with an animation. How do I do this?

EDIT:

In addition, your live update example also doesnt use the animate properties. Your liveupdate example updates the data very often so it seems the chart animates. It makes me wonder if your library can animate in a different way. Your examples of AnimationDuration often use TimeSpan too, not a double value.



PS Parthiban Sundaram Syncfusion Team November 9, 2017 01:01 PM UTC

Hi Hans, 
 
Thanks for the update. 
 
Regarding the query about Animation is not working in live update example 
 
Currently, we don’t have support for animating the live update example (dynamic update). However, we have logged this as feature request and this will be expected to available on any of our upcoming release.  
 
 
Regarding the query about Animation duration use timespan instead of double value 
 
We would like to inform you that most often we could use animation duration in double value i.e. seconds. However, if you need to use in time span, we recommend you convert the timespan into seconds. please refer the following code snippet for more details. 
 
Code snippet: 
 
 
TimeSpan timeSpan = TimeSpan.FromSeconds(10); 
columnSeries.AnimationDuration = timeSpan.TotalSeconds; 
 
Please let us know, if you need further assistance on this. 
 
Regards, 
Parthiban S. 


Loader.
Up arrow icon