Create a d3.js
horizon chart using the d3-horizon-chart
plugin from d3-horizon-chart with
flexibility and convenience of htmlwidgets
.
d3horizon(data = NULL, options = d3horizonOptions(), width = NULL, height = "auto", elementId = NULL)
#devtools::install_github("timelyportfolio/d3horizonR") library(d3horizonR) d3horizon( lapply(1:10, function(x){cumprod(1+runif(1000,-0.02,0.02))-1}) )#> Warning: file("") only supports open = "w+" and open = "w+b": using the former#> Error in dirname(to): a character vector argument expected# demonstrate options d3horizon( lapply(1:10, function(x){cumprod(1+runif(1000,-0.02,0.02))-1}), d3horizonOptions(height=30, colors = strtrim(cm.colors(4),7)) )#> Warning: file("") only supports open = "w+" and open = "w+b": using the former#> Error in dirname(to): a character vector argument expected