minor refactoring
This commit is contained in:
parent
dd2be52339
commit
38128270b2
|
@ -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
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue