chartjs-plugin-streaming icon indicating copy to clipboard operation
chartjs-plugin-streaming copied to clipboard

Continue drawing line from most recent data to chart edge?

Open swemoney opened this issue 3 years ago • 0 comments

If I have data that isn't updated in regular intervals (a heart rate for instance), is there a way to make the chart continue to draw a straight line to the edge of the graph and then replace it when new data arrives? Right now, if I try this I just have a huge gap from the last point on the graph until a new piece of data comes through. If my heart rate stays fairly stable, it could be 5-20 seconds before my watch sends an update. Currently, the way I'm working around it is just pushing the old heart rate into the data at each 1 second interval onRefresh but then when the rate moves, the line jumps from the 1 seconds ago point straight to the new heart rate. I think it looks better when you have the line sloping from the last different data point that was different instead.

swemoney avatar Mar 04 '22 07:03 swemoney