MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

How to remove range of data from Realtime LineChart

Open Tufan21 opened this issue 6 years ago • 3 comments

Summary

Hi i am developing realtime ECG Graph using line chart My Scenario is after 4 second i have to remove the old record , within 4 second i got 1440 record now whenever YVals reached to 1440 i have to remove first 50 data For Android we have 5 methods

  1. dataSet.removeFirst() // remove only one record 2.removeEntryByXValue() 3.removeEntry(index) 3.removeEntry(entry) 4.removeLast()

How to remove data in range Expected Behavior

For IOS we have same library https://github.com/danielgindi/Charts where one method is there lineChartDataSet1.values.removeFirst(50) //it will remove first 50 data

is there anything same in android also Possible Solution

Device (please complete the following information):

  • Device: [e.g. Google Pixel]
  • Android Version [e.g. 7.0]
  • Library Version (e.g. 3.0.3)

Additional Context

Tufan21 avatar Sep 20 '18 18:09 Tufan21

good feature request, adding to the list.

almic avatar Oct 29 '18 19:10 almic

Hi @almic Is this issue open?

ghost avatar Jan 29 '19 19:01 ghost

I Have a suggestion you can use this method

dataSet.removeFirst() // remove only one record

and using loop remove first 50 from the Starting

RobinKumar5986 avatar Oct 03 '23 21:10 RobinKumar5986