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

r2d3.onRender doesn't seem to work #67

Closed
cmtso opened this issue May 17, 2019 · 3 comments
Closed

r2d3.onRender doesn't seem to work #67

cmtso opened this issue May 17, 2019 · 3 comments

Comments

@cmtso
Copy link

cmtso commented May 17, 2019

I have been trying out the r2d3 examples. But it seems any examples that have the r2d3.onRender is the .js file does not show any colour above the base layer.

For example, in the calendar example, all I get is the calendar but no colour. Please provide some pointers. Thanks!

@cmtso
Copy link
Author

cmtso commented Jun 5, 2019

UDPATE:

I think the issue is with reading in the data using r2d3(data=...). Basically, I can run all the examples that do not require reading data from R perfectly. But for the ones requiring data from R, the data does not show up.

I am running it on Windows in Rstudio 1.2 and using servr package as the browser. Please help. Thanks.

@javierluraschi
Copy link
Contributor

The bubbles examples makes use of onRender() but happens to work just fine for me using Windows 10, does the code bellow work for you? Could you share the exact error?

download.file("https://raw.githubusercontent.com/rstudio/r2d3/master/vignettes/gallery/bubbles/bubbles.js", "bubbles.js")

r2d3::r2d3("bubbles.js", data = read.csv("https://raw.githubusercontent.com/rstudio/r2d3/master/vignettes/gallery/bubbles/flare.csv"), d3_version = 4)

Screen Shot 2019-07-02 at 4 17 53 PM

Screen Shot 2019-07-02 at 4 19 51 PM

@cmtso
Copy link
Author

cmtso commented Aug 15, 2019

Great. I get it done now. Thanks!

@cmtso cmtso closed this as completed Aug 15, 2019
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