I need to show live (real-time) data on xamdatachart. The problem is, chart should show data only for 30 seconds (configurable) interval. Since my application would be running for hours (may be 6 or more) so I want to know which approach (adjusting WindowRect or Axis Minimum/Maximum value or binding new list of data every second) is the best approach from performance point of view. I will have N number of charts like these, at the least 20).
Any sample to show a working prototype would be a great help.
We have a sample in our WPF Sample Browser that demonstrates real-time data feeds like this. This will be the recommended way for doing this. I believe the sample just sticks with one data source and it constantly adds and removes data points from it. The sample is called Binding Real-Time Data.
I am not able to download it. Please provide the download link.
There's no direct download for that sample. This sample is included in the WPF sample browser which you can install when you install the actual product. There's a download option for it in the platform installer actually. If you go here and click on the Download Free Trial button it will give you the 15.2 platform installer.
I prepared a sample myself. PFA.
In this sample, after 30 seconds, the series doesn't refresh every second but two. Please let me know what's wrong in this.
I have attached the updated sample. It works fine if I don't comment the line #139 in BindingRealTimeData.xaml.cs.
The line of code deletes the data point past 30 seconds, which I dont want. The chart should be binded to the complete list and the WindowRect should shift to the last 30 seconds.The issue is, if you comment that line and run the app, try adding new series from the buttons on top, it will add the series in code but not on UI.
If you uncomment this line, the app works just fine.
Looking forward to your response.
PS: Don't you have any team to reply in JST zone? I tweeted sometime back and someone from Infragistics responded 'yes', but never got any reply in the same timezone, to resolve issues at the earliest.