Convenience Functions - metricsgraphics/metrics-graphics GitHub Wiki
# MG.convert.date(data, accessor[, format])
Converts the values in an array of objects, whose key is specified by accessor
, from string to javascript Date object. The function parses %Y-%m-%d
-styled timestamps by default. An optional third argument allows one to specify an alternative style, per the formats defined here: https://github.com/mbostock/d3/wiki/Time-Formatting.
# MG.convert.number(data, accessor)
Converts the values in an array of objects, whose key is specified by accessor
, into numbers.