text rotation works, ish.

This commit is contained in:
Will Charczuk 2016-10-21 12:44:37 -07:00
parent 53280b9258
commit f800bc387b
15 changed files with 281 additions and 131 deletions

View file

@ -54,9 +54,7 @@ func Legend(c *Chart, userDefaults ...Style) Renderable {
Bottom: legend.Top + legendPadding.Top,
}
r.SetFont(legendStyle.GetFont())
r.SetFontColor(legendStyle.GetFontColor())
r.SetFontSize(legendStyle.GetFontSize())
legendStyle.GetTextOptions().WriteToRenderer(r)
// measure
labelCount := 0
@ -79,6 +77,8 @@ func Legend(c *Chart, userDefaults ...Style) Renderable {
Draw.Box(r, legend, legendStyle)
legendStyle.GetTextOptions().WriteToRenderer(r)
ycursor := legendContent.Top
tx := legendContent.Left
legendCount := 0