From 4206a8cbf7a41117fcccd85eb6fcc6b2fe77dda2 Mon Sep 17 00:00:00 2001 From: sqshq Date: Mon, 8 Apr 2019 22:43:29 -0400 Subject: [PATCH] barchart visualisation improvements --- component/barchart/barchart.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/barchart/barchart.go b/component/barchart/barchart.go index 5916b7e..12d9080 100644 --- a/component/barchart/barchart.go +++ b/component/barchart/barchart.go @@ -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)