This is a migrated thread and some comments may be shown as answers.

Dynamic Data Loading

7 Answers 75 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 22 May 2015, 01:37 PM

I am trying to chart data in real-time from an external source -- in this case, a Bluetooth device -- that is streaming values to me.

Is this possible? I can't seem to figure out how to do this. I'd like to add a new datapoint to the end of a datasource, and remove the first datapoint, etc.

 

 

7 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 22 May 2015, 02:52 PM
Hi David,

Assuming that you have the data flowing from the bluetooth device and change it at a given interval, the Telerik Chart can cover your scenario. For more information, please refer to the Chart >> Live Data example of the Demo app that ships with the Telerik UI for iOS suite. You can also check the Building a Seismograph App with CoreMotion, Swift and Telerik UI for iOS blog article which covers a similar scenario where the data is taken from the device accelerometer.

I hope this helps.

Regards,
Nikolay
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 22 May 2015, 04:46 PM

While that example does show live data loading, the requirement to call removeAllData() and then re-build the chart is problematic when the data comes in slowly, as over Bluetooth. The device only sends updates every second or so, which means that the re-draw is awful looking. because it is re-drawing the entire chart, rather slowly, every few seconds. Not a smooth look at all. 

 

 

0
Jack
Telerik team
answered on 25 May 2015, 09:59 AM
Hi David,

Currently the only option to update TKChart in this scenario is by calling removeAllData method. However, this should not cause issues when your data is updated every few seconds. Could you, please prepare a sample application. We will analyse it in detail and we will try to find a proper solution.

There is an issue logged in our feedback portal related with this scenario. Use the following link to track its status and vote/comment on it.

Looking forward to your reply.

Regards,
Jack
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 26 May 2015, 03:29 PM

Crude app that shows the problem. Data is simply inserted after a timer fires every 2.5 seconds ... 

 

You can download the Xcode project at https://davidgs.com/TelerikTest.zip

 Best regards,

dg

0
Jack
Telerik team
answered on 27 May 2015, 10:02 AM
Hi David,

I am not able to open the link. Could you, please upload the file again? Looking forward to your reply.

Regards,
Jack
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 27 May 2015, 01:44 PM
Sorry, I have fixed the link ... 
0
Jack
Telerik team
answered on 01 Jun 2015, 08:47 AM
Hello David,

The link works now. I checked your code. The redraw issue is caused by the animations in TKChart. You can improve chart appearance in this scenario by disabling animations:
myChart.allowAnimations = false

As I said, the issue is logged in our feedback portal and we will consider implementing partial updates for TKChart in one of our upcoming releases.

Should you have other questions, do not hesitate to ask.

Regards,
Jack
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
David
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
David
Top achievements
Rank 1
Jack
Telerik team
Share this question
or