???
This commit is contained in:
parent
01983f4e86
commit
9a5138b21d
17 changed files with 477 additions and 308 deletions
3
tick.go
3
tick.go
|
|
@ -3,7 +3,8 @@ package chart
|
|||
// GenerateTicksWithStep generates a set of ticks.
|
||||
func GenerateTicksWithStep(ra Range, step float64, vf ValueFormatter) []Tick {
|
||||
var ticks []Tick
|
||||
for cursor := ra.Min; cursor < ra.Max; cursor += step {
|
||||
min, max := ra.GetRoundedRangeBounds()
|
||||
for cursor := min; cursor <= max; cursor += step {
|
||||
ticks = append(ticks, Tick{
|
||||
Value: cursor,
|
||||
Label: vf(cursor),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue