market hours tweaks.

This commit is contained in:
Will Charczuk 2016-08-01 00:50:32 -07:00
parent c3a066aecd
commit b1cd8bd2e3
8 changed files with 253 additions and 39 deletions

View file

@ -72,7 +72,7 @@ func (xa XAxis) Measure(r Renderer, canvasBox Box, ra Range, defaults Style, tic
tp := xa.GetTickPosition()
var left, right, top, bottom = math.MaxInt32, 0, math.MaxInt32, 0
var left, right, bottom = math.MaxInt32, 0, 0
for index, t := range ticks {
v := t.Value
tickStyle.GetTextOptions().WriteToRenderer(r)
@ -94,14 +94,13 @@ func (xa XAxis) Measure(r Renderer, canvasBox Box, ra Range, defaults Style, tic
break
}
top = Math.MinInt(top, canvasBox.Bottom)
left = Math.MinInt(left, ltx)
right = Math.MaxInt(right, rtx)
bottom = Math.MaxInt(bottom, ty)
}
return Box{
Top: top,
Top: canvasBox.Bottom,
Left: left,
Right: right,
Bottom: bottom,