1
0
Fork 0

Adding upstream version 2.1.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-18 07:17:02 +02:00
parent c8c64afc61
commit 41a2f19f12
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
220 changed files with 19814 additions and 0 deletions

24
grid_line_test.go Normal file
View file

@ -0,0 +1,24 @@
package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
)
func TestGenerateGridLines(t *testing.T) {
// replaced new assertions helper
ticks := []Tick{
{Value: 1.0, Label: "1.0"},
{Value: 2.0, Label: "2.0"},
{Value: 3.0, Label: "3.0"},
{Value: 4.0, Label: "4.0"},
}
gl := GenerateGridLines(ticks, Style{}, Style{})
testutil.AssertLen(t, gl, 2)
testutil.AssertEqual(t, 2.0, gl[0].Value)
testutil.AssertEqual(t, 3.0, gl[1].Value)
}