Merge branch 'master' of github.com:wcharczuk/go-chart

This commit is contained in:
Will Charczuk 2017-01-13 14:07:47 -08:00
commit fc9b6a6d55
2 changed files with 2 additions and 2 deletions

View file

@ -362,7 +362,7 @@ func (bc BarChart) getAdjustedCanvasBox(r Renderer, canvasBox Box, yrange Range,
lines := Text.WrapFit(r, bar.Label, barLabelBox.Width(), axisStyle) lines := Text.WrapFit(r, bar.Label, barLabelBox.Width(), axisStyle)
linesBox := Text.MeasureLines(r, lines, axisStyle) linesBox := Text.MeasureLines(r, lines, axisStyle)
xaxisHeight = Math.MaxInt(linesBox.Height()+(2*DefaultXAxisMargin), xaxisHeight) xaxisHeight = Math.MinInt(linesBox.Height()+(2*DefaultXAxisMargin), xaxisHeight)
} }
} }

View file

@ -288,7 +288,7 @@ func (d draw) TextWithin(r Renderer, text string, box Box, style Style) {
ty = y ty = y
} }
d.Text(r, line, tx, ty, style) r.Text(line, tx, ty)
y += lineBox.Height() + style.GetTextLineSpacing() y += lineBox.Height() + style.GetTextLineSpacing()
} }
} }