R/aggs.R

Defines functions d3plusAggs

Documented in d3plusAggs

#' Adds .aggs() method to the chart
#'
#' Defines how specific variables should be aggregated.
#' See options: \href{https://github.com/alexandersimoes/d3plus/wiki/Visualizations#aggs}{d3plus wiki page}.
#'
#' @import htmlwidgets
#'
#' @export
#' 

d3plusAggs <- function(d3plus, ...){
  x <- c(list(...))
  
  d3plus$x$d3plusAggs <- toJSON(x,
                                 auto_unbox = T,
                                 force = T,
                                 json_verbatim = T)
  d3plus
}
paulofelipe/D3plusR documentation built on Jan. 2, 2020, 11:41 p.m.