Questions tagged [htmlwidgets]

Use the this tag for questions regarding the htmlwidgets for R JavaScript visualization library. For questions regarding generic HTML widgets, use the html and widget tags.

422 questions
2
votes
1 answer

Use htmlwidgets with revealjs in rmarkdown

I am working in Rmarkdown with the revealjs_presentation format and I want to include an html widget created by leaflet. I tried naively to just include it in a slide, knowing that there would probably have a conflict between reveal.js css and…
J.P. Le Cavalier
  • 1,315
  • 7
  • 16
2
votes
2 answers

Converting htmlwidget to ggplot object in R

I'm wondering if it's possible to convert a plotly object to a ggplot2 object in R? I have a plot object of class plotly htmlwidget. I've tried the as.ggplot() function from the ggplotify package, but get the following error Error in…
Tim Williams
  • 183
  • 1
  • 10
2
votes
0 answers

Heatmap in rmarkdown flexdashboard

I’m having a very specific problem with a plotly heatmap object inserted in a two tabbed flexdashboard rmarkdown. The MRE below, when rendered, displays an uncaught axis resizing javascript error. The error causes the datatable and heatmap to not…
Ryan Haunfelder
  • 766
  • 3
  • 11
2
votes
1 answer

How to resolve undefined columns error for a Sankey in R?

I'm building a sankey diagram using networkD3 in R but I'm getting an error message: Error in `[.data.frame`(Links, , Source) : undefined columns selected The code that I have is the following: library(networkD3) library(magrittr) # Data…
Selrac
  • 2,203
  • 9
  • 41
  • 84
2
votes
2 answers

Sankey Network (within R blogdown) won't render properly on Firefox

My blogdown sites (including plots, markdown, etc.) typically render fine on both Chrome and Firefox. Incidentally they usually work fine on IE as well, although I don't care as much about that browser. I'll include it in the discussion for…
Display name
  • 4,153
  • 5
  • 27
  • 75
2
votes
1 answer

R sankeynetwork force nodes to flow left to right

I am using the networkd3 package in r to create a sankeynetwork diagram based on this example: https://christophergandrud.github.io/networkD3/ Here is my code: # Load Packages library(dplyr) library(networkD3) # Read data a0 <- …
P5C768
  • 152
  • 10
2
votes
2 answers

Trouble creating lists in R for the networkD3 package

I'd like to create the radial network above utilizing the R package networkD3. I read the guide here which utilizes lists to create radial networks. Unfortunately my R skills with lists are lacking. They're actually non-existent. Fortunately…
Display name
  • 4,153
  • 5
  • 27
  • 75
2
votes
2 answers

How to remove fade when hovering in networkD3 graph in R

I have been looking at the examples for using networkd3 in r I wanted to know if it would be possible to remove the hover effect where when you hover over a certain node in the graph everything else fades? See "Interacting with igraph" in…
Tillie
  • 33
  • 4
2
votes
1 answer

networkD3 doesn't draw the expected interactive network

I have the following data: links <- read.table(header = T, as.is = T, text = ' from to type p13 p1 hyperlink p13 p2 hyperlink p13 p3 hyperlink p13 p4 hyperlink p13 p5 hyperlink p13 p11 hyperlink p12 p10 hyperlink p12 p8 hyperlink p12 p9…
C.J
  • 169
  • 1
  • 12
2
votes
1 answer

How to skip writing dependencies in htmlwidgets::saveWidget()?

When visualizing data with plotly, i want to write widgets as html-documents without htmlwidgets::saveWidget writing dependencies every time, assuming that these already are in place, to save processing time. The widgets need to be self-contained to…
Comfort Eagle
  • 2,112
  • 2
  • 22
  • 44
2
votes
1 answer

How to disable the mouseover effect in networkD3 / d3Network network diagrams (GNU R package)

I would like to disable the mouseover effect in network diagrams as provided on http://christophergandrud.github.io/d3Network/ (search for 'enlarge'). Even if there is no native option I guess it is possible by using htmltools or htmlwidget…
Pindar
  • 51
  • 6
2
votes
0 answers

rbokeh, add legend to histogram plot

I'd like to make a chart with rbokeh that includes three overlapping histograms. I can do this, but no legend appears: library(rbokeh) figure(tools=c(), legend_location="top_right", padding_factor = 0.01) %>% ly_hist(rnorm(10000, mean=0), …
Bob
  • 1,274
  • 1
  • 13
  • 26
2
votes
2 answers

R: Possible to create a leaflet map and a rendering table without shiny?

I am trying to create a leaflet map with a rendering table (depending on where you click on the map) to upload it to our company's confluence page. The first thing that came to my mind was to use Shiny to create a small web app but my company does…
Patrick Balada
  • 1,330
  • 1
  • 18
  • 37
2
votes
0 answers

Resolving promises in rendering htmlwidgets

I was wondering if anyone could help with how the htmlwidgets and associated render functions work with promises (i.e promises and future packages) in shiny. I have been reading up and learning on how to integrate these things based on Joe Chengs…
jamieRowen
  • 1,509
  • 9
  • 14
2
votes
1 answer

How to keep colorBy fixed for each class across charts for canvasxpress Scatter3D?

How would I specify a fixed colorBy so that the class is the same across charts? For example, if I have two charts on a page and I want setosa red, versicolor blue and virginica to green, how would I fix that in advance? I have multiple charts so…
calycolor
  • 726
  • 1
  • 7
  • 19