let users specify formatters.

This commit is contained in:
Will Charczuk 2016-07-08 00:04:39 -07:00
parent c42d624892
commit 5e5ff104d2

View File

@ -163,8 +163,12 @@ func (c Chart) initRanges(canvasBox Box) (xrange Range, yrange Range) {
didSetFirstValues = true didSetFirstValues = true
} }
} }
xrange.Formatter = s.GetXFormatter() if xrange.Formatter == nil {
yrange.Formatter = s.GetYFormatter() xrange.Formatter = s.GetXFormatter()
}
if yrange.Format == nil {
yrange.Formatter = s.GetYFormatter()
}
} }
if c.XRange.IsZero() { if c.XRange.IsZero() {