R/plotly.R

Defines functions plotly_handler

Documented in plotly_handler

library(base64enc)

#' Handle 'plot.ly' Charts
plotly_handler <- function() {
  return(function (plot, description, params) {
    buf <- charToRaw(plotly::plotly_json(plot, FALSE))
    return(list(data = base64encode(buf), type = "plotly", description = description, params = params))
  })
}

Try the dstack package in your browser

Any scripts or data that you put into this service are public.

dstack documentation built on Aug. 12, 2020, 5:08 p.m.