AdeelK93 / collapsibleTree

Create Interactive Collapsible Tree Diagrams in R using D3.js
https://adeelk93.github.io/collapsibleTree/
158 stars 41 forks source link

Load data dynamically? #46

Closed danboh closed 5 years ago

danboh commented 5 years ago

Hi! This looks like a great tool, so thank you!

But is there a way I could load the data dynamically instead of using a file? I'm trying to avoid the CORS issue when running the solution locally without a server.

Is this possible?

Thanks!

AdeelK93 commented 5 years ago

CORS? On a Shiny? I’m not sure I understand your use case

danboh commented 5 years ago

Yes. Chrome throws out a CORS error when loading the data from a file when you run the HTML locally, without a web server. I was able to bypass this by injecting the data directly into a variable in the script section.

AdeelK93 commented 5 years ago

What do you mean “run the HTML locally”? Like as a self-standing htmlwidget or an RMarkdown?

danboh commented 5 years ago

Just run the html, no server

On Tue, Jan 8, 2019, 5:58 PM Adeel Khan <notifications@github.com wrote:

What do you mean “run the HTML locally”? Like as a self-standing htmlwidget or an RMarkdown?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/AdeelK93/collapsibleTree/issues/46#issuecomment-452482452, or mute the thread https://github.com/notifications/unsubscribe-auth/AKRExBkMYjhbuZCtBWtOmqCQGmVXXYNzks5vBSKJgaJpZM4ZoaM- .