minor refactoring

This commit is contained in:
sqshq 2019-01-29 09:34:15 -05:00
parent dd2be52339
commit 38128270b2
2 changed files with 8 additions and 11 deletions

View File

@ -12,11 +12,11 @@ line-charts:
style: dots/lines style: dots/lines
scale: log scale: log
position: position:
x: 10 x: 0
y: 20 y: 0
size: size:
x: 100 x: 3
y: 50 y: 2
- title: mongo-count - title: mongo-count
data: data:
- label: posts - label: posts

View File

@ -97,13 +97,10 @@ func (self *TimePlot) Draw(buf *Buffer) {
self.plotAxes(buf) self.plotAxes(buf)
} }
drawArea := self.Inner drawArea := image.Rect(
if self.ShowAxes {
drawArea = image.Rect(
self.Inner.Min.X+yAxisLabelsWidth+1, self.Inner.Min.Y, self.Inner.Min.X+yAxisLabelsWidth+1, self.Inner.Min.Y,
self.Inner.Max.X, self.Inner.Max.Y-xAxisLabelsHeight-1, self.Inner.Max.X, self.Inner.Max.Y-xAxisLabelsHeight-1,
) )
}
self.renderBraille(buf, drawArea) self.renderBraille(buf, drawArea)
self.dataMutex.Unlock() self.dataMutex.Unlock()