barchart.go
func (b *BarChart) Draw() {
	if b.hidden {
		return
	}

	b.mtx.RLock()
	defer b.mtx.RUnlock()

	PushAttributes()
	defer PopAttributes()

	fg, bg := RealColor(b.fg, b.Style(), ColorBarChartText), RealColor(b.bg, b.Style(), ColorBarChartBack)
	SetTextColor(fg)
	SetBackColor(bg)

	FillRect(b.x, b.y, b.width, b.height, ' ')

	if len(b.data) == 0 {
		return
	}

	b.drawRulers()
	b.drawValues()
	b.drawLegend()
	b.drawBars()
}
func (b *BarChart) Draw() {
	if b.hidden {
		return
	}

	b.mtx.RLock()
	defer b.mtx.RUnlock()

	PushAttributes()
	defer PopAttributes()

	fg, bg := RealColor(b.fg, b.Style(), ColorBarChartText), RealColor(b.bg, b.Style(), ColorBarChartBack)
	SetTextColor(fg)
	SetBackColor(bg)

	FillRect(b.x, b.y, b.width, b.height, ' ')

	if len(b.data) == 0 {
		return
	}

	b.drawRulers()
	b.drawValues()
	b.drawLegend()
	b.drawBars()
}
func ( b * BarChart ) Draw ( ) { if b . hidden { return } b . mtx . RLock ( ) defer b . mtx . RUnlock ( ) PushAttributes ( ) defer PopAttributes ( ) fg , bg := RealColor ( b . fg , b . Style ( ) , ColorBarChartText ) , RealColor ( b . bg , b . Style ( ) , ColorBarChartBack ) SetTextColor ( fg ) SetBackColor ( bg ) FillRect ( b . x , b . y , b . width , b . height , ' ' ) if len ( b . data ) == 0 { return } b . drawRulers ( ) b . drawValues ( ) b . drawLegend ( ) b . drawBars ( ) }
// Repaint draws the control on its View surface
Repaint draws the control on its View surface