library(knitr) library(webshot) knitr::opts_chunk$set(echo = TRUE)
Simple D3 Horizon Chart widget based on http://kmandov.github.io/d3-horizon-chart/.
library(D3Horizon) n = 1500 data = cos(1:n / 100) + (rnorm(n) - 0.5) / 10
D3Horizon(data, title = 'Testing', horizon_height = 120)
d2 <- data.frame(a = data, b = data * 2) D3Horizon(d2, title = 'Testing', horizon_height = 120)
d2 <- data.frame(a = data, b = data * 2) axis <- sort(seq(as.Date('2018-06-30'), as.Date('2013-01-01'), length.out = 1500)) D3Horizon(d2, title = 'Testing', horizon_height = 120)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.