Use correct margins for YAxis.TextHorizontalAlign: chart.TextHorizontalAlignRight

This commit is contained in:
Jamie Isaacs 2019-03-12 20:01:24 -07:00 committed by Jamie Isaacs
parent 9235c2e7ab
commit 14773ce69c
2 changed files with 1 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -373,7 +373,7 @@ func (sbc StackedBarChart) drawHorizontalYAxis(r Renderer, canvasBox Box) {
barLabelBox := Box{ barLabelBox := Box{
Top: cursor, Top: cursor,
Left: 0, Left: 0,
Right: canvasBox.Left + DefaultYAxisMargin, Right: canvasBox.Left - DefaultYAxisMargin,
Bottom: cursor + bar.GetWidth() + sbc.GetBarSpacing(), Bottom: cursor + bar.GetWidth() + sbc.GetBarSpacing(),
} }
if len(bar.Name) > 0 { if len(bar.Name) > 0 {