barchart visualisation improvements

This commit is contained in:
sqshq 2019-04-08 22:43:29 -04:00
parent a4506cd44a
commit 4206a8cbf7
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ func (b *BarChart) reselectMaxValue() {
func (b *BarChart) Draw(buffer *ui.Buffer) {
b.Block.Draw(buffer)
barWidth := int(math.Ceil(float64(b.Inner.Dx()-2*barIndent-len(b.bars)*barIndent) / float64(len(b.bars))))
barWidth := int(math.Floor(float64(b.Inner.Dx()-len(b.bars)*barIndent) / float64(len(b.bars))))
barXCoordinate := b.Inner.Min.X + barIndent
labelStyle := ui.NewStyle(b.palette.BaseColor)