go-chart/range.go

42 lines
703 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
}
// 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-12 03:48:51 +02:00
// Translate the range to the domain.
Translate(value float64) int
2016-07-07 03:54:00 +02:00
}