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

Function TestLineChartRelative

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

Source from the content-addressed store, hash-verified

68}
69
70func TestLineChartRelative(t *testing.T) {
71 fmt.Print("Relative chart\n\n")
72
73 chart := NewLineChart(100, 20)
74 chart.Flags = DRAW_RELATIVE
75
76 data := new(DataTable)
77 data.AddColumn("X")
78 data.AddColumn("Sin(x)")
79 data.AddColumn("Cos(x+1)")
80
81 // data.AddColumn("x*x")
82
83 for i := 0.1; i < 10; i += 0.1 {
84 data.AddRow(i, math.Sin(i), math.Cos(i+1))
85 }
86
87 fmt.Println(chart.Draw(data))
88}
89
90func TestLineChart(t *testing.T) {
91 fmt.Print("Simple chart\n\n")

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…