introduces the Range interface (instead of a concrete type).

This commit is contained in:
Will Charczuk 2016-07-21 14:11:27 -07:00
parent 8af50213c3
commit b0934ee2e3
27 changed files with 331 additions and 172 deletions

View file

@ -3,7 +3,7 @@ package chart
// GenerateTicksWithStep generates a set of ticks.
func GenerateTicksWithStep(ra Range, step float64, vf ValueFormatter) []Tick {
var ticks []Tick
min, max := ra.Min, ra.Max
min, max := ra.GetMin(), ra.GetMax()
for cursor := min; cursor <= max; cursor += step {
ticks = append(ticks, Tick{
Value: cursor,