knitr::opts_chunk$set(echo = TRUE) library(ggplot2) library(apexcharter) library(grillade) library(htmltools)
a1 <- apex( data = tail(economics, 350), mapping = aes(x = date, y = uempmed), type = "line", height = "400px" ) a2 <- apex( data = tail(economics, 350), mapping = aes(x = date, y = psavert), type = "line" ) grillade(a1, a2)
grillade( a1, tags$div( "Here some text, displayed into a column on the side of the chart.", tags$br(), "You can write text using", tags$b("HTML tags") ), n_col = 8, cols_width = c(6, 2) )
a3 <- apex( data = tail(economics, 150), mapping = aes(x = date, y = unemploy), type = "area" ) grillade(a1, a2, a3, n_col = 2, cols_width = c(NA, NA, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.