Make sparkline to use last N datapoints

This commit is contained in:
Ivan Daniluk 2015-04-26 17:35:57 +03:00
parent 0863691428
commit ce454da792

View File

@ -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 != "" {