snapshot
This commit is contained in:
parent
3cb33d48d3
commit
26eaa1d898
76 changed files with 1076 additions and 1717 deletions
6
value.go
6
value.go
|
|
@ -1,7 +1,5 @@
|
|||
package chart
|
||||
|
||||
import util "github.com/wcharczuk/go-chart/util"
|
||||
|
||||
// Value is a chart value.
|
||||
type Value struct {
|
||||
Style Style
|
||||
|
|
@ -23,7 +21,7 @@ func (vs Values) Values() []float64 {
|
|||
|
||||
// ValuesNormalized returns normalized values.
|
||||
func (vs Values) ValuesNormalized() []float64 {
|
||||
return util.Math.Normalize(vs.Values()...)
|
||||
return Normalize(vs.Values()...)
|
||||
}
|
||||
|
||||
// Normalize returns the values normalized.
|
||||
|
|
@ -40,7 +38,7 @@ func (vs Values) Normalize() []Value {
|
|||
output = append(output, Value{
|
||||
Style: v.Style,
|
||||
Label: v.Label,
|
||||
Value: util.Math.RoundDown(v.Value/total, 0.0001),
|
||||
Value: RoundDown(v.Value/total, 0.0001),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue