* Add stacked bar chart value labels (#60)
* Add horizontal render option to stacked bar chart (#39)
* Pulling 100% inside the canvasBox to remain visible.
* Use correct margins for YAxis.TextHorizontalAlign: chart.TextHorizontalAlignRight
* Fixed Show to Hidden due to 5f42a580a9
This commit is contained in:
parent
3a7bc55431
commit
962b9abdec
7 changed files with 688 additions and 8 deletions
6
draw.go
6
draw.go
|
|
@ -296,8 +296,10 @@ func (d draw) TextWithin(r Renderer, text string, box Box, style Style) {
|
|||
switch style.GetTextVerticalAlign() {
|
||||
case TextVerticalAlignBottom, TextVerticalAlignBaseline: // i have to build better baseline handling into measure text
|
||||
y = y - linesBox.Height()
|
||||
case TextVerticalAlignMiddle, TextVerticalAlignMiddleBaseline:
|
||||
y = (y - linesBox.Height()) >> 1
|
||||
case TextVerticalAlignMiddle:
|
||||
y = y + (box.Height() >> 1) - (linesBox.Height() >> 1)
|
||||
case TextVerticalAlignMiddleBaseline:
|
||||
y = y + (box.Height() >> 1) - linesBox.Height()
|
||||
}
|
||||
|
||||
var tx, ty int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue