snapshot.

This commit is contained in:
Will Charczuk 2016-09-05 13:26:12 -07:00
parent b78f2327aa
commit 8f56e5939b
10 changed files with 105 additions and 44 deletions

View file

@ -7,13 +7,15 @@ import (
// XAxis represents the horizontal axis.
type XAxis struct {
Name string
NameStyle Style
Name string
NameStyle Style
Style Style
ValueFormatter ValueFormatter
Range Range
Ticks []Tick
TickStyle Style
Ticks []Tick
TickPosition TickPosition
GridLines []GridLine
@ -139,7 +141,7 @@ func (xa XAxis) Render(r Renderer, canvasBox Box, ra Range, defaults Style, tick
r.LineTo(tx, canvasBox.Bottom+DefaultVerticalTickHeight)
r.Stroke()
tickStyle.GetTextOptions().WriteToRenderer(r)
xa.TickStyle.InheritFrom(xa.Style.InheritFrom(defaults)).WriteToRenderer(r)
tb := r.MeasureText(t.Label)
switch tp {