MCPcopy
hub / github.com/g3n/engine / AddLineGraph

Method AddLineGraph

gui/chart.go:296–304  ·  view source on GitHub ↗

AddLineGraph adds a line graph to the chart

(color *math32.Color, data []float32)

Source from the content-addressed store, hash-verified

294
295// AddLineGraph adds a line graph to the chart
296func (ch *Chart) AddLineGraph(color *math32.Color, data []float32) *Graph {
297
298 graph := newGraph(ch, color, data)
299 ch.graphs = append(ch.graphs, graph)
300 ch.Add(graph)
301 ch.recalc()
302 ch.updateGraphs()
303 return graph
304}
305
306// RemoveGraph removes and disposes of the specified graph from the chart
307func (ch *Chart) RemoveGraph(g *Graph) {

Callers

nothing calls this directly

Calls 4

recalcMethod · 0.95
updateGraphsMethod · 0.95
newGraphFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected