r2d3
r2d3 copied to clipboard
Data passed to multiple charts
May ask what is the best way to pass two different sets of data to two different charts?
From all the examples I've encountered there's only one variable with name data. Is there a way how to influence/change the name?
When I try to pass two dataset to two different charts they should not be sharing it.
(I am aware of #55 but that solution didn't work for me)
You can use two separate .js files, and send your two data frames to them. For example:
output$plot1<- renderD3({
r2d3(df1(), "plot1.js")
})
output$plot2<- renderD3({
r2d3(df2(), "plot2.js")
})