plotly_build_light {shinyHugePlot} | R Documentation |
Build plotly
data with low computation cost
Description
Before illustrating data using plotly
, it must be built
(figure$x$data
are need to be made using figure$x$attrs
).
However, because a lot of procedures are necessary,
the computation cost is relatively high.
With this function, the data is built in quite short time by omitting
several procedures for high-frequency data.
Note that this function is not universally applicable to all plotly
objects but made for high-frequency scatter data.
plotly::plotly_build
function may return better results in
specific cases although it takes more time.
Usage
plotly_build_light(fig, vars_hf = c("x", "y", "text", "hovertext"))
Arguments
fig |
|
vars_hf |
Character, optional.
Variable names where high frequency data is included.
It must include |
Value
built plotly
object
Examples
data(noise_fluct)
plotly_build_light(
plotly::plot_ly(
x = noise_fluct$time,
y = noise_fluct$f500,
name = "level",
type = "scatter"
)
)
plotly_build_light(
plotly::plot_ly(
data = noise_fluct,
x = ~time,
y = ~f500,
name = "level",
type = "scatter"
)
)