Skip to content

Commit

Permalink
Merge pull request #449 from danielkrizian/master
Browse files Browse the repository at this point in the history
toJSON digits parameterization. See danielkrizian/rChartsDygraphs#14
  • Loading branch information
ramnathv committed Aug 4, 2014
2 parents 47e2c06 + 6b1a2aa commit f6eb944
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/rChartsClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6eb944

Please sign in to comment.