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,9 +163,13 @@ func (c Chart) initRanges(canvasBox Box) (xrange Range, yrange Range) {
didSetFirstValues = true didSetFirstValues = true
} }
} }
if xrange.Formatter == nil {
xrange.Formatter = s.GetXFormatter() xrange.Formatter = s.GetXFormatter()
}
if yrange.Format == nil {
yrange.Formatter = s.GetYFormatter() yrange.Formatter = s.GetYFormatter()
} }
}
if c.XRange.IsZero() { if c.XRange.IsZero() {
xrange.Min = globalMinX xrange.Min = globalMinX