Adding upstream version 2.1.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
c8c64afc61
commit
41a2f19f12
220 changed files with 19814 additions and 0 deletions
22
first_value_annotation_test.go
Normal file
22
first_value_annotation_test.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package chart
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestFirstValueAnnotation(t *testing.T) {
|
||||
// replaced new assertions helper
|
||||
|
||||
series := ContinuousSeries{
|
||||
XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0},
|
||||
YValues: []float64{5.0, 3.0, 3.0, 2.0, 1.0},
|
||||
}
|
||||
|
||||
fva := FirstValueAnnotation(series)
|
||||
testutil.AssertNotEmpty(t, fva.Annotations)
|
||||
fvaa := fva.Annotations[0]
|
||||
testutil.AssertEqual(t, 1, fvaa.XValue)
|
||||
testutil.AssertEqual(t, 5, fvaa.YValue)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue