MCPcopy Create free account
hub / github.com/buger/goterm / getChartData

Function getChartData

plot.go:281–287  ·  view source on GitHub ↗

DataTable can contain data for multiple graphs, we need to extract only 1

(data *DataTable, index int)

Source from the content-addressed store, hash-verified

279
280// DataTable can contain data for multiple graphs, we need to extract only 1
281func getChartData(data *DataTable, index int) (out [][]float64) {
282 for _, r := range data.rows {
283 out = append(out, []float64{r[0], r[index]})
284 }
285
286 return
287}
288
289// Algorithm for drawing line between two points
290//

Callers 1

DrawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…