go-chart/range.go

44 lines
765 B
Go
Raw Permalink Normal View History

2016-07-07 03:54:00 +02:00
package chart
// NameProvider is a type that returns a name.
type NameProvider interface {
GetName() string
2016-07-07 03:54:00 +02:00
}
// StyleProvider is a type that returns a style.
type StyleProvider interface {
GetStyle() Style
2016-07-07 03:54:00 +02:00
}
// IsZeroable is a type that returns if it's been set or not.
type IsZeroable interface {
IsZero() bool
2016-07-07 03:54:00 +02:00
}
// Stringable is a type that has a string representation.
type Stringable interface {
String() string
2016-07-07 03:54:00 +02:00
}
2017-01-10 02:57:45 +01: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-12 03:48:51 +02:00
2017-01-10 22:50:17 +01:00
IsDescending() bool
// Translate the range to the domain.
Translate(value float64) int
2016-07-07 03:54:00 +02:00
}