httpgd
httpgd copied to clipboard
Question: does httpgd works for javascript libraries like plotly
I have a very noob question, would httpgd works for javascript libs like plotly ? I cannot seem to have the plotly graphs rendered in the httpgd "window"
library(httpgd)
hgd()
plot(1:10) # fine
library(plotly)
x <- c(1:100)
random_y <- rnorm(100, mean = 0)
data <- data.frame(x, random_y)
fig <- plot_ly(data, x = ~x, y = ~random_y, type = 'scatter', mode = 'lines')
fig # not fine
Many thanks for your package
Thank you for opening the issue.
httpgd (currently) only works with the internal graphics engine of R.
I have however been wondering for a while if the viewer could be expanded to include other (web) content in iFrames in the plot list.
This feature won't land soon but I will keep this issue open for discussion and to gauge interest.
+1 for this. While the output of htmlwidgets doesn't necessarily fit in with the "graphics device" theme of httpgd, the idea of any visualizations, including htmlwidgets, showing up in the viewer history and not opening in a separate location would be very nice.
Many of the modern table-making packages fall under this category as well, I believe. gt being the most prominent.
I came here to see whether httpgd could also support HTML tables like reactable or gt. Would be fantastic if you would add this feature!