snapshot
This commit is contained in:
parent
3cb33d48d3
commit
26eaa1d898
76 changed files with 1076 additions and 1717 deletions
14
yaxis.go
14
yaxis.go
|
|
@ -2,8 +2,6 @@ package chart
|
|||
|
||||
import (
|
||||
"math"
|
||||
|
||||
util "github.com/wcharczuk/go-chart/util"
|
||||
)
|
||||
|
||||
// YAxis is a veritcal rule of the range.
|
||||
|
|
@ -105,18 +103,18 @@ func (ya YAxis) Measure(r Renderer, canvasBox Box, ra Range, defaults Style, tic
|
|||
finalTextX = tx - tb.Width()
|
||||
}
|
||||
|
||||
maxTextHeight = util.Math.MaxInt(tb.Height(), maxTextHeight)
|
||||
maxTextHeight = MaxInt(tb.Height(), maxTextHeight)
|
||||
|
||||
if ya.AxisType == YAxisPrimary {
|
||||
minx = canvasBox.Right
|
||||
maxx = util.Math.MaxInt(maxx, tx+tb.Width())
|
||||
maxx = MaxInt(maxx, tx+tb.Width())
|
||||
} else if ya.AxisType == YAxisSecondary {
|
||||
minx = util.Math.MinInt(minx, finalTextX)
|
||||
maxx = util.Math.MaxInt(maxx, tx)
|
||||
minx = MinInt(minx, finalTextX)
|
||||
maxx = MaxInt(maxx, tx)
|
||||
}
|
||||
|
||||
miny = util.Math.MinInt(miny, ly-tbh2)
|
||||
maxy = util.Math.MaxInt(maxy, ly+tbh2)
|
||||
miny = MinInt(miny, ly-tbh2)
|
||||
maxy = MaxInt(maxy, ly+tbh2)
|
||||
}
|
||||
|
||||
if ya.NameStyle.Show && len(ya.Name) > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue