Skip to content

Instantly share code, notes, and snippets.

@addiversitas
addiversitas / finalChart.R
Created September 7, 2020 18:21
end result after improving the plotly output
library("shiny")
library("plotly")
library("data.table")
dates <- seq(as.Date("2019-02-01"),length=12,by="months") - 1
books <- c(17,3,3,18,20,19,15,12,17,4,18,7)
laptops <- c(13,5,8,12,27,32,31,9,22,11,12,30)
tvs <- c(30,41,22,11,4,33,16,17,8,49,14,50)
data <- data.frame(dates = dates,
@addiversitas
addiversitas / basicChart.R
Last active September 7, 2020 14:10
basic plotly chart in a shiny app
library("shiny")
library("plotly")
library("data.table")
dates <- seq(as.Date("2019-02-01"),length=12,by="months") - 1
books <- c(17,3,3,18,20,19,15,12,17,4,18,7)
laptops <- c(13,5,8,12,27,32,31,9,22,11,12,30)
tvs <- c(30,41,22,11,4,33,16,17,8,49,14,50)
data <- data.frame(dates = dates,