Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(toastui) library(ggplot2) library(dplyr)
Interactive charts with tui-chart library. Currently support is minimal since there's a lot of htmlwidgets for creating charts.
count(mpg, class) %>% chart(aes(class, n), type = "column") %>% chart_options(legend = list(visible = FALSE))
count(mpg, class, year) %>% chart(aes(class, n, fill = year), type = "column") %>% chart_options(legend = list(align = "bottom"))
chart(mpg, aes(displ, hwy), type = "scatter")
chart(economics, aes(date, psavert), type = "line")
economics_long %>% filter(variable %in% c("psavert", "uempmed")) %>% chart(caes(date, value, color = variable), type = "line")
txhousing %>% filter(city == "Houston") %>% chart(aes(month, year, fill = sales), type = "heatmap")
chart(mpg, aes(manufacturer, model), "treemap") %>% chart_options( series = list( dataLabels = list(visible = TRUE) ) )
txhousing %>% filter(year == 2015) %>% group_by(city) %>% summarise(sales = sum(sales)) %>% chart(aes(city, value = sales, colorValue = sales), type = "treemap")
chart(list(Speed = 80), type = "gauge", height = "500px") %>% chart_options( circularAxis = list(scale = list(min = 0, max = 90), title = "km/h"), series = list(angleRange = list(start = 225, end = 135)), plot = list( bands = list( list(range = c(0, 20), color = "#55bf3b"), list(range = c(20, 50), color = "#dddf0d"), list(range = c(50, 90), color = "#df5353") ) ), theme = list(plot = list(bands = list(barWidth = 40))) )
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.