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

Function TestLineChart

plot_test.go:90–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

88}
89
90func TestLineChart(t *testing.T) {
91 fmt.Print("Simple chart\n\n")
92
93 chart := NewLineChart(100, 20)
94 // chart.Flags = /*DRAW_INDEPENDENT // | */// DRAW_RELATIVE
95
96 data := new(DataTable)
97 data.AddColumn("x")
98 data.AddColumn("fx1")
99 data.AddColumn("fx2")
100
101 for i := -5.0; i < 5; i += 0.1 {
102 data.AddRow(i, 3*math.Sin(i)+3*i+30, i*i+5)
103 }
104
105 fmt.Println(chart.Draw(data))
106}

Callers

nothing calls this directly

Calls 4

DrawMethod · 0.95
NewLineChartFunction · 0.85
AddColumnMethod · 0.80
AddRowMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…