func (c *CPUTableChart) Draw(buf *ui.Buffer) {
	c.Block.Draw(buf)
	w := c.Inner.Dx()
	h := c.Inner.Dy()
	numCols := int(w / (2 * c.CellSize))
	numRows := int(h / c.CellSize)
	c.NumCols = numCols
	c.NumRows = numRows
	xCoord := c.Inner.Min.X
	yCoord := c.Inner.Min.Y
	k := numCols * c.TopRow
	for i := 0; i < numRows && k < len(c.Data); i++ {
		for j := 0; j < numCols && k < len(c.Data); j++ {
			buf.Fill(
				ui.NewCell(' ', ui.NewStyle(ui.ColorClear, c.StatusColor[int(c.Data[k]/10)])),
				image.Rect(xCoord, yCoord, xCoord+2*c.CellSize, yCoord+c.CellSize),
			)
			buf.SetString(
				fmt.Sprintf("CPU%d", k),
				ui.NewStyle(c.StatusColor[int(c.Data[k]/10)], ui.ColorClear, ui.ModifierReverse),
				image.Pt(xCoord+2, yCoord+1),
			)
			buf.SetString(
				fmt.Sprintf("%.1f", c.Data[k]),
				ui.NewStyle(c.StatusColor[int(c.Data[k]/10)], ui.ColorClear, ui.ModifierReverse),
				image.Pt(xCoord+2, yCoord+2),
			)
			k++
			xCoord += 2 * c.CellSize
		}
		yCoord += c.CellSize
		xCoord = c.Inner.Min.X
	}
}
Draw helps draw the CPU table Chart widget onto the UI buffer
package utils
import (
	"fmt"
	"image"
	ui "github.com/gizak/termui/v3"
)
type CPUTableChart struct {
	*ui.Block
	Data               []float64
	NumCores           int
	CellSize           int
	TopRow             int
	StatusColor        []ui.Color
	NumRows            int
	NumCols            int
	DefaultBorderColor ui.Color  
	ActiveBorderColor  ui.Color  
}
func NewCPUTableChart() *CPUTableChart {
	return &CPUTableChart{
		Block:    ui.NewBlock(),
		Data:     []float64{0},
		NumCores: 0,
		CellSize: 4,
		TopRow:   0,
		NumRows:  0,
		NumCols:  0,
		StatusColor: []ui.Color{
			ui.Color(46),
			ui.Color(82),
			ui.Color(154),
			ui.Color(191),
			ui.Color(190),
			ui.Color(226),
			ui.Color(220),
			ui.Color(214),
			ui.Color(202),
			ui.Color(196),
			ui.Color(160),
		},
		DefaultBorderColor: ui.ColorCyan,
		ActiveBorderColor:  ui.ColorWhite,
	}
}