tweaks.
This commit is contained in:
parent
c173dcadd3
commit
29ffceeec0
2 changed files with 7 additions and 8 deletions
4
xaxis.go
4
xaxis.go
|
|
@ -80,16 +80,14 @@ func (xa XAxis) Render(r Renderer, canvasBox Box, ra Range, ticks []Tick) {
|
|||
|
||||
sort.Sort(Ticks(ticks))
|
||||
|
||||
textHeight := 0
|
||||
var textHeight int
|
||||
for _, t := range ticks {
|
||||
_, th := r.MeasureText(t.Label)
|
||||
if th > textHeight {
|
||||
textHeight = th
|
||||
}
|
||||
}
|
||||
|
||||
ty := canvasBox.Bottom + DefaultXAxisMargin + int(textHeight)
|
||||
|
||||
for _, t := range ticks {
|
||||
v := t.Value
|
||||
x := ra.Translate(v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue