apexchart | R Documentation |
Create an ApexCharts widget
apexchart(
ax_opts = list(),
auto_update = TRUE,
width = NULL,
height = NULL,
elementId = NULL
)
ax_opts |
A |
auto_update |
In Shiny application, update existing chart
rather than generating new one. Can be |
width , height |
A numeric input in pixels. |
elementId |
Use an explicit element ID for the widget. |
An apexchart()
htmlwidget
object.
For quickly create a chart, see apex()
.
library(apexcharter)
# Use raw API by passing a list of
# parameters to the function
apexchart(ax_opts = list(
chart = list(
type = "bar"
),
series = list(list(
name = "Example",
data = sample(1:100, 5)
)),
xaxis = list(
categories = LETTERS[1:5]
)
))
# Or use apexchart() to initialize the chart
# before passing parameters
apexchart() %>%
ax_chart(type = "bar") %>%
ax_series(
list(
name = "Example",
data = sample(1:100, 5)
)
) %>%
ax_xaxis(
categories = LETTERS[1:5]
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.