-
Notifications
You must be signed in to change notification settings - Fork 633
Copy extras over from plotly.js, if necessary #411
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
Conversation
TODO: why does this warning occur? > plot_ly()
Warning message:
In file(con, "r") :
file("") only supports open = "w+" and open = "w+b": using the former |
Also, injecting |
I am not sure of precedent here with other packages, so I will look for other examples of similar functionality. There is this script in
Here is how |
Thanks @timelyportfolio. I think I'd prefer to grab assets from the relevant plotly.js release via GitHub's API, sort of like the |
@cpsievert, can you explain why? This would require downloading the whole repo for a couple of files. I am looking now to see what is included in the release zip file. It is 24mb compressed. Note, this function pulls directly from the plotly.js github repo. |
I didn't follow the discussion in the different issues about making geo plots available... But if size is an issue, why not offering the offline content in another package like "plotlyOffline", comparable to "shinythemes" and "shiny". Plotly could then stay the same and gaining an "asset"-config with values "auto", "offline" or "online". Auto could check if the required assets are available and use them if yes and download otherwise. Different asset versions could be managed like normal package version dependencies. I think this would keep plotly small but available "offline" if necessary. And As far as I can tell the implementation shouldn't be too difficult? |
What is the current status of this development? I like the idea of @fabiangehring as this practice is indeed used for many other R packages. The usage of online VS offline could be handled with an argument in the function or an option. Specifically for the use case of #302, it is annoying that the maps are not shown in Rstudio. This has been an issue since late 2015. |
@danielsjf at this point, I would like have to rethink this PR and probably create a helper package, say Unfortunately, at the moment, we don't fund have the time/funding. Please get in touch if you're interesting in helping out |
Closing in favor of #1283 |
This addresses #375 and #356 by leveraging a new environment variable which should point to the plotly.js source. In other words, you can render MathJax and/or maps without an internet connection by doing something like: