fixing xaxis measure bug leading to too much left padding.
This commit is contained in:
parent
a846d2f4e8
commit
a74c8710df
1 changed files with 1 additions and 1 deletions
2
xaxis.go
2
xaxis.go
|
@ -80,7 +80,7 @@ func (xa XAxis) Measure(r Renderer, canvasBox Box, ra Range, defaults Style, tic
|
||||||
tb := r.MeasureText(t.Label)
|
tb := r.MeasureText(t.Label)
|
||||||
|
|
||||||
var ltx, rtx int
|
var ltx, rtx int
|
||||||
tx := ra.Translate(v)
|
tx := canvasBox.Left + ra.Translate(v)
|
||||||
ty := canvasBox.Bottom + DefaultXAxisMargin + tb.Height()
|
ty := canvasBox.Bottom + DefaultXAxisMargin + tb.Height()
|
||||||
switch tp {
|
switch tp {
|
||||||
case TickPositionUnderTick, TickPositionUnset:
|
case TickPositionUnderTick, TickPositionUnset:
|
||||||
|
|
Loading…
Reference in a new issue