sane default handling

This commit is contained in:
Will Charczuk 2017-04-25 23:35:07 -07:00
parent b244fd675c
commit 39e9977724
4 changed files with 20 additions and 4 deletions

View file

@ -47,7 +47,7 @@ func (t Ticks) String() string {
// GenerateContinuousTicks generates a set of ticks.
func GenerateContinuousTicks(r Renderer, ra Range, isVertical bool, style Style, vf ValueFormatter) []Tick {
if vf == nil {
panic("vf is nil; did you remember to set a default value formatter?")
vf = FloatValueFormatter
}
var ticks []Tick