Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data passed to multiple charts #101

Open
xgebi opened this issue May 23, 2023 · 1 comment
Open

Data passed to multiple charts #101

xgebi opened this issue May 23, 2023 · 1 comment

Comments

@xgebi
Copy link

xgebi commented May 23, 2023

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)

@asadow
Copy link

asadow commented Jul 31, 2023

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")
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants