2016-07-06 21:54:00 -04:00
|
|
|
package chart
|
|
|
|
|
2016-07-21 17:11:27 -04:00
|
|
|
// NameProvider is a type that returns a name.
|
|
|
|
type NameProvider interface {
|
|
|
|
GetName() string
|
2016-07-06 21:54:00 -04:00
|
|
|
}
|
|
|
|
|
2016-07-21 17:11:27 -04:00
|
|
|
// StyleProvider is a type that returns a style.
|
|
|
|
type StyleProvider interface {
|
|
|
|
GetStyle() Style
|
2016-07-06 21:54:00 -04:00
|
|
|
}
|
|
|
|
|
2016-07-21 17:11:27 -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
|
|
|
}
|
|
|
|
|
2016-07-21 17:11:27 -04:00
|
|
|
// Stringable is a type that has a string representation.
|
|
|
|
type Stringable interface {
|
|
|
|
String() string
|
2016-07-06 21:54:00 -04:00
|
|
|
}
|
|
|
|
|
2016-07-21 17:11:27 -04:00
|
|
|
// Range is a
|
|
|
|
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
|
|
|
|
2016-07-21 17:11:27 -04:00
|
|
|
// Translate the range to the domain.
|
|
|
|
Translate(value float64) int
|
2016-07-06 21:54:00 -04:00
|
|
|
}
|