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

@ -30,6 +30,14 @@ func (xa XAxis) GetStyle() Style {
return xa.Style
}
// GetValueFormatter returns the value formatter for the axis.
func (xa XAxis) GetValueFormatter() ValueFormatter {
if xa.ValueFormatter != nil {
return xa.ValueFormatter
}
return FloatValueFormatter
}
// GetTickPosition returns the tick position option for the axis.
func (xa XAxis) GetTickPosition(defaults ...TickPosition) TickPosition {
if xa.TickPosition == TickPositionUnset {