removing these.
This commit is contained in:
parent
149bc3ad5d
commit
18a6e3eed1
2 changed files with 0 additions and 35 deletions
|
@ -3,44 +3,11 @@ package chart
|
|||
import (
|
||||
"image/color"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/blendlabs/go-assert"
|
||||
"github.com/wcharczuk/go-chart/drawing"
|
||||
)
|
||||
|
||||
func TestCreateContinuousSeriesLastValueLabel(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
as := CreateContinuousSeriesLastValueLabel("test", []float64{1, 2, 3}, []float64{4, 5, 6}, FloatValueFormatter)
|
||||
assert.Equal("test", as.GetName())
|
||||
assert.False(as.GetStyle().IsZero())
|
||||
assert.True(as.GetStyle().Show)
|
||||
assert.NotEmpty(as.Annotations)
|
||||
assert.Equal(3.0, as.Annotations[0].X)
|
||||
assert.Equal(6.0, as.Annotations[0].Y)
|
||||
assert.Equal("6.00", as.Annotations[0].Label)
|
||||
}
|
||||
|
||||
func TestCreateTimeSeriesLastValueLabel(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
d := time.Now().AddDate(0, 0, -1)
|
||||
|
||||
as := CreateTimeSeriesLastValueLabel("test", []time.Time{
|
||||
time.Now().AddDate(0, 0, -3),
|
||||
time.Now().AddDate(0, 0, -2),
|
||||
d,
|
||||
}, []float64{4, 5, 6}, FloatValueFormatter)
|
||||
assert.Equal("test", as.GetName())
|
||||
assert.False(as.GetStyle().IsZero())
|
||||
assert.True(as.GetStyle().Show)
|
||||
assert.NotEmpty(as.Annotations)
|
||||
assert.Equal(float64(d.Unix()), as.Annotations[0].X)
|
||||
assert.Equal(6.0, as.Annotations[0].Y)
|
||||
assert.Equal("6.00", as.Annotations[0].Label)
|
||||
}
|
||||
|
||||
func TestAnnotationSeriesMeasure(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
|
|
|
@ -69,8 +69,6 @@ func chartHandler(rc *web.RequestContext) web.ControllerResult {
|
|||
YValues: s2y,
|
||||
},
|
||||
},
|
||||
CreateContinuousSeriesLastValueLabel("a - last value", s1x, s1y, chart.FloatValueFormatter),
|
||||
CreateContinuousSeriesLastValueLabel("b - last value", s2, s2y, chart.FloatValueFormatter),
|
||||
}
|
||||
|
||||
if format == "png" {
|
||||
|
|
Loading…
Reference in a new issue