Skip to content

Convenience Functions

Ali Almossawi edited this page Jan 6, 2015 · 5 revisions

HomeConvenience Functions

# MG.convert.date(data, accessor[, format])

Converts a data object's values from strings to date objects that can then be plotted. 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 a data object's values from strings to numbers.

Clone this wiki locally