mirror of https://github.com/gizak/termui.git
Make sparkline to use last N datapoints
This commit is contained in:
parent
0863691428
commit
ce454da792
|
@ -106,7 +106,7 @@ func (sl *Sparklines) Buffer() []Point {
|
|||
data := l.Data
|
||||
|
||||
if len(data) > sl.innerWidth {
|
||||
data = data[:sl.innerWidth]
|
||||
data = data[len(data)-sl.innerWidth:]
|
||||
}
|
||||
|
||||
if l.Title != "" {
|
||||
|
|
Loading…
Reference in New Issue