gizak / termui

Golang terminal dashboard
MIT License
13.07k stars 783 forks source link

Add Plot option to draw datapoints by starting from the end of the slice #212

Open cjbassi opened 5 years ago

cjbassi commented 5 years ago

This would draw datapoints from right to left, starting at the right end of the Plot. This would be useful for drawing continuously growing data sources that we basically need to show a tail -f of in Plot form.

keithknott26 commented 5 years ago

This would be incredibly helpful! I'm currently trying to make the linegraph scroll as new data is added to plot.Data[x] similar to the way termeter works with streaming data, I believe I need to implement a circular ring buffer and figure out how to redraw the linegraph and move it to the left infinitely until the data stream ends. Do you happen to have an example of this?

Also I noticed that the datalabels aren't populating, is that something that is still under development? Edit: No worries I got things working