Permalink
Browse files

Merge pull request #449 from danielkrizian/master

toJSON digits parameterization. See danielkrizian/rChartsDygraphs#14
  • Loading branch information...
2 parents 47e2c06 + 6b1a2aa commit f6eb944c2bf6e98197caa785ca94a45b7336ef61 @ramnathv committed Aug 4, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 R/rChartsClass.R
View
@@ -56,7 +56,11 @@ rCharts = setRefClass('rCharts', list(params = 'list', lib = 'character',
params <<- modifyList(params, list(...))
},
getPayload = function(chartId){
- list(chartParams = toJSON(params), chartId = chartId, lib = basename(lib), liburl = LIB$url)
+ if(!is.null(params$digits))
+ JSONized = toJSON(params, digits=params$digits)
+ else
+ JSONized = toJSON(params)
+ list(chartParams = JSONized, chartId = chartId, lib = basename(lib), liburl = LIB$url)
},
html = function(chartId = NULL){
params$dom <<- chartId %||% params$dom

0 comments on commit f6eb944

Please sign in to comment.