Fomatted integer values

Solved issue #29
This commit is contained in:
Tomas Zulberti 2013-04-17 15:53:55 -03:00
parent d8667c72dd
commit 143a9dbb77

View File

@ -111,6 +111,7 @@ class Morris.Grid extends Morris.EventEmitter
@data = for row, index in data
ret = {}
ret.label = row[@options.xkey]
if @options.parseTime
ret.x = Morris.parseDate(ret.label)
@ -120,6 +121,8 @@ class Morris.Grid extends Morris.EventEmitter
ret.label = new Date(ret.label).toString()
else
ret.x = index
if @options.xLabelFormat
ret.label = @options.xLabelFormat ret
total = 0
ret.y = for ykey, idx in @options.ykeys
yval = row[ykey]