introduces the Range interface (instead of a concrete type).
This commit is contained in:
parent
8af50213c3
commit
b0934ee2e3
27 changed files with 331 additions and 172 deletions
2
tick.go
2
tick.go
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue