knitr::opts_chunk$set(fig.width = 9, fig.height = 3)
library(dplyr) library(rfrappe) data <- list( labels = c("12am-3am", "3am-6pm", "6am-9am", "9am-12am", "12pm-3pm", "3pm-6pm", "6pm-9pm", "9am-12am"), datasets = list( list( title = "Some Data", color = "light-blue", values = c(25, 40, 30, 35, 8, 52, 17, -4) ), list( title = "Another Set", color = "violet", values = c(25, 50, -10, 15, 18, 32, 27, 14) ) ) ) rfrappe(list( data = data, type = "bar", # some optional arguments height = 250, title = "My Awesome Bar Chart" ))
rfrappe(list( data = data, type = "line", # optional arguments title = "My Awesome Line Chart", show_dots = 0, # 0 for not show, or 1 for show; default 0 region_fill = 1, # fill area under the line; default 0 heatline = 1 # show a value-wise line gradient; default 0 ))
rfrappe(list( title = "My Awesome Pie Chart", data = data, type = "pie" ))
rfrappe(list( title = "My Awesome Scatter Chart", data = data, type = "scatter" ))
rfrappe(list( title = "My Awesome Percentage Chart", data = data, type = "percentage" ))
heatmap_data <- rpois(365, 3) %>% as.list() time_stamp <- Sys.time() %>% as.numeric() %>% round(0) # chnage time to midnight of current day time_stamp <- time_stamp - (time_stamp %% 86400) # 1 year of days time_stamps <- seq(from = time_stamp, by = -86400, length.out = 365) names(heatmap_data) <- time_stamps rfrappe(list( data = heatmap_data, type = "heatmap", # optional arguments height = 115, discrete_domains = 1 ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.