1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dev.R
\name{plotly_json}
\alias{plotly_json}
\title{Inspect JSON sent to plotly.js}
\usage{
plotly_json(p = last_plot(), jsonedit = interactive(), pretty = TRUE, ...)
}
\arguments{
\item{p}{a plotly or ggplot object.}
\item{jsonedit}{use \link[listviewer:jsonedit]{listviewer::jsonedit} to view the JSON?}
\item{pretty}{adds indentation whitespace to JSON output. Can be TRUE/FALSE
or a number specifying the number of spaces to indent. See \link[jsonlite:prettify]{jsonlite::prettify}.}
\item{...}{other options passed onto \link[listviewer:jsonedit]{listviewer::jsonedit}}
}
\description{
This function is useful for obtaining/viewing/debugging JSON
sent to plotly.js.
}
\examples{
\dontshow{if (interactive() || !identical(.Platform$OS.type, "windows")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
plotly_json(plot_ly())
plotly_json(plot_ly(), FALSE)
\dontshow{\}) # examplesIf}
}
|