MCPcopy Index your code
hub / github.com/pterm/pterm / computeAxisData

Method computeAxisData

heatmap_printer.go:301–321  ·  view source on GitHub ↗
(data string, xAmount, yAmount int)

Source from the content-addressed store, hash-verified

299}
300
301func (p HeatmapPrinter) computeAxisData(data string, xAmount, yAmount int) (string, int, int) {
302 var header string
303 for _, h := range p.Axis.XAxis {
304 header += h + "\n"
305 }
306 for _, h := range p.Axis.YAxis {
307 header += h + "\n"
308 }
309
310 if p.OnlyColoredCells {
311 data = header
312 } else {
313 data += header
314 }
315 xAmount++
316 yAmount++
317
318 p.Axis.YAxis = append(p.Axis.YAxis, "")
319
320 return data, xAmount, yAmount
321}
322
323func (p HeatmapPrinter) renderSeparatorRow(buffer *bytes.Buffer, colWidth, xAmount int, top bool) {
324 tSep := p.TReverseSeparator

Callers 1

SrenderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected