Helper API refactor (#40)

* api cleaup

* updates

* wtf

* updates

* snapshot.

* tweaks

* snapshot

* api tweaks.

* updates

* updates

* updates

* changes.

* updates

* updates

* sequence => seq

* dont need to use curl, just using wget

* fixing examples
This commit is contained in:
Will Charczuk 2017-05-12 17:12:23 -07:00 committed by GitHub
parent 43212f871f
commit 03708a90ef
100 changed files with 1687 additions and 1055 deletions

View file

@ -4,6 +4,7 @@ import (
"testing"
assert "github.com/blendlabs/go-assert"
"github.com/wcharczuk/go-chart/seq"
)
func TestHistogramSeries(t *testing.T) {
@ -11,8 +12,8 @@ func TestHistogramSeries(t *testing.T) {
cs := ContinuousSeries{
Name: "Test Series",
XValues: Sequence.Float64(1.0, 20.0),
YValues: Sequence.Float64(10.0, -10.0),
XValues: seq.Range(1.0, 20.0),
YValues: seq.Range(10.0, -10.0),
}
hs := HistogramSeries{
@ -20,8 +21,8 @@ func TestHistogramSeries(t *testing.T) {
}
for x := 0; x < hs.Len(); x++ {
csx, csy := cs.GetValue(0)
hsx, hsy1, hsy2 := hs.GetBoundedValue(0)
csx, csy := cs.GetValues(0)
hsx, hsy1, hsy2 := hs.GetBoundedValues(0)
assert.Equal(csx, hsx)
assert.True(hsy1 > 0)
assert.True(hsy2 <= 0)