% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render.R
\name{render}
\alias{render}
\title{Render a ggnext plot}
\usage{
render(plot, ...)
}
\arguments{
\item{plot}{A \link{GgnextPlot} object.}

\item{...}{Method arguments. The \link{GgnextPlot} method takes \code{target}
(\code{"static"} for SVG, \code{"interactive"} for HTML/canvas; defaults to
\code{"static"} unless the plot carries an \code{\link[=interact]{interact()}} spec) and \code{file}
(optional path to write the output to — use \code{.svg} for the static
target and \code{.html} for the interactive one).}
}
\value{
The rendered document as a length-1 character vector of class
\code{ggnext_render} (printed as a short summary, not the full source),
invisibly when \code{file} is given.
}
\description{
Computes the plot geometry once and serializes it to the chosen render
target: a standalone SVG document (\code{"static"}) or a self-contained
interactive HTML page with a \verb{<canvas>} element, hover tooltips, and
scroll-to-zoom (\code{"interactive"}).
}
\examples{
p <- ggnext(cars, aes(speed, dist)) + geom_point()
svg <- render(p)                          # static SVG (the default)
html <- render(p + interact())            # interactive HTML/canvas
}
