Line Chart Data handle issue

60 Views Asked by At

what is the best way to handle Line Chart data to send in API? enter image description here we have chart like this It has Hours, Days, Weeks, Months Data so how Will I manage with easy way?

I tired normal X,Y values but there is bulk data in every category so it is hard to handle.

my question about what data should I get from the server so I will show these bulk data easily.

1

There are 1 best solutions below

0
On

As i can figure out, you are facing data processing issue while converting all seconds data to Hour, Month and other required formats every second.

If this is the issue then you can follow these steps to overcome processing data every second.

  1. Process all data only once when you receive data for the first time
  2. Next second when you receive data, do not process all data. Just get latest data and show in Heart Rate.
  3. You can process all data again after sometime, based on your requirements. (this can take time)

Because as per my knowledge you are receiving all data every second, but your chart's minimum time parameter is in hours, so you have to process same data every second, which can consume little more time and results in delay.

If this is not an exact issue you are facing then please update your question with exact issue you are facing.