This commit is contained in:
Will Charczuk 2016-07-27 12:34:15 -07:00
parent 4f381fa4dc
commit 6533e951e7
8 changed files with 309 additions and 16 deletions

View file

@ -35,8 +35,11 @@ func (ya YAxis) GetStyle() Style {
return ya.Style
}
// GetTicks returns the ticks for a series. It coalesces between user provided ticks and
// generated ticks.
// GetTicks returns the ticks for a series.
// The coalesce priority is:
// - User Supplied Ticks (i.e. Ticks array on the axis itself).
// - Range ticks (i.e. if the range provides ticks).
// - Generating continuous ticks based on minimum spacing and canvas width.
func (ya YAxis) GetTicks(r Renderer, ra Range, defaults Style, vf ValueFormatter) []Tick {
if len(ya.Ticks) > 0 {
return ya.Ticks