Skip to content

Commit 9d3e419

Browse files
committed
Merge branch 'pr/2539'
2 parents 0c55af1 + a9a26db commit 9d3e419

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

backend/chart.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,13 @@ func (backend *Backend) ChartData() (*Chart, error) {
282282
FormattedValue: coin.FormatAsCurrency(currentTotal, isFiatBtc, formatBtcAsSat),
283283
})
284284
}
285-
286-
// Truncate leading zeroes.
285+
// Truncate leading zeroes, if there are any keep the first one to start the chart with 0
287286
for i, e := range result {
288287
if e.Value > 0 {
289-
return result[i:]
288+
if i == 0 {
289+
return result
290+
}
291+
return result[i-1:]
290292
}
291293
}
292294
// Everything was zeroes.

0 commit comments

Comments
 (0)