toJSON digits parameterization. See danielkrizian/rChartsDygraphs#14