go-chart/range.go

42 lines
743 B
Go
Raw Normal View History

2016-07-06 21:54:00 -04:00
package chart
// NameProvider is a type that returns a name.
type NameProvider interface {
GetName() string
2016-07-06 21:54:00 -04:00
}
// StyleProvider is a type that returns a style.
type StyleProvider interface {
GetStyle() Style
2016-07-06 21:54:00 -04:00
}
// IsZeroable is a type that returns if it's been set or not.
type IsZeroable interface {
IsZero() bool
2016-07-06 21:54:00 -04:00
}
// Stringable is a type that has a string representation.
type Stringable interface {
String() string
2016-07-06 21:54:00 -04:00
}
2017-01-09 20:57:45 -05:00
// Range is a common interface for a range of values.
type Range interface {
Stringable
IsZeroable
GetMin() float64
SetMin(min float64)
GetMax() float64
SetMax(max float64)
GetDelta() float64
GetDomain() int
SetDomain(domain int)
2016-07-11 21:48:51 -04:00
// Translate the range to the domain.
Translate(value float64) int
2016-07-06 21:54:00 -04:00
}