MCPcopy Index your code
hub / github.com/buger/goterm / DrawLine

Method DrawLine

plot.go:235–243  ·  view source on GitHub ↗
(x0, y0, x1, y1 int, symbol string)

Source from the content-addressed store, hash-verified

233}
234
235func (c *LineChart) DrawLine(x0, y0, x1, y1 int, symbol string) {
236 drawLine(x0, y0, x1, y1, func(x, y int) {
237 coord := y*c.Width + x
238
239 if coord > 0 && coord < len(c.Buf) {
240 c.Buf[coord] = symbol
241 }
242 })
243}
244
245func getBoundaryValues(data *DataTable, index int) (maxX, minX, maxY, minY float64) {
246 maxX = math.Inf(-1)

Callers 2

DrawAxesMethod · 0.95
DrawMethod · 0.95

Calls 1

drawLineFunction · 0.85

Tested by

no test coverage detected