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

@ -1,5 +1,7 @@
package chart
import util "github.com/blendlabs/go-util"
// Value is a chart value.
type Value struct {
Style Style
@ -21,7 +23,7 @@ func (vs Values) Values() []float64 {
// ValuesNormalized returns normalized values.
func (vs Values) ValuesNormalized() []float64 {
return Math.Normalize(vs.Values()...)
return util.Math.Normalize(vs.Values()...)
}
// Normalize returns the values normalized.
@ -38,7 +40,7 @@ func (vs Values) Normalize() []Value {
output = append(output, Value{
Style: v.Style,
Label: v.Label,
Value: Math.RoundDown(v.Value/total, 0.0001),
Value: util.Math.RoundDown(v.Value/total, 0.0001),
})
}
}