snapshot.

This commit is contained in:
Will Charczuk 2016-07-10 01:11:47 -07:00
parent 7bb82ae691
commit e9a36274ac
23 changed files with 551 additions and 445 deletions

25
tick.go Normal file
View file

@ -0,0 +1,25 @@
package chart
// Tick represents a label on an axis.
type Tick struct {
Value float64
Label string
}
// Ticks is an array of ticks.
type Ticks []Tick
// Len returns the length of the ticks set.
func (t Ticks) Len() int {
return len(t)
}
// Swap swaps two elements.
func (t Ticks) Swap(i, j int) {
t[i], t[j] = t[j], t[i]
}
// Less returns if i's value is less than j's value.
func (t Ticks) Less(i, j int) bool {
return t[i].Value < t[j].Value
}