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
0
votes
0 answers

save high resolution images from htmlwidget in r

I created an interactive worldmap with the threejs package and while the map is fantastic I need images from it for a presentation. The final object is a htmlwidget, I can save a very low res image with webshot, but I would like one with a higher…
H.Stevens
  • 391
  • 3
  • 16
0
votes
1 answer

R forceNetwork - how do I keep the legend in the top left corner when zooming is enabled?

Hoping there is a solution to this. I would like to enable the zoom options in the forceNetwork function of the networkD3 package, and force the legend to remain in the top left corner when zooming in and out. In the example below, if you zoom in…
AyeTown
  • 831
  • 1
  • 5
  • 20
0
votes
1 answer

How to print a htmlwidgets::onRender() title added to a Sankey diagram Network D3 in rmarkdown pdf

I have crated this Sankey diagram based on the networkD3::sankeyNetwork() package. I have added the column names based on this post How to add columnn titles in a Sankey chart networkD3 . However, when I knit it into a pdf file, it does not capture…
0
votes
1 answer

Combine several chorddiag/htmlwidget plots to a single plot in R

I'm generating several chorddiag plots in R and would like to combine them together to a single plot. Here's an example list of 3 chorddiag plots: library(chorddiag) m <- matrix(c(11975, 5871, 8916, 2868, 1951, 10048, 2060, 6171, …
dan
  • 6,048
  • 10
  • 57
  • 125
0
votes
1 answer

RMarkdown HTML document isn't showing Tmap widget while printing with for cycle

Not able to make RMarkdown html output showing interective Tmap views (tmap_mode set to "view") while printed inside for cycle. Any tips? This works properly: ```{r interactive maps, echo=FALSE, message=FALSE, warning=FALSE,…
emaoca
  • 47
  • 3
0
votes
1 answer

Text shadow on networkD3 using HTMLWidget

I built a Sankey diagram in R using networkD3 package and I wanted to add text-shadow to the node labels. Actually, what I need is for the text to be in some way outlined because my original data is very complex and some of the text gets confused…
0
votes
1 answer

R networkD3 sankey - change the colors for all links to blue

Here is example code that I use to make a Sankey chart using networkD3::sankeyNetwork() library("networkD3") a <- read.csv(header = TRUE, text = " date,Data Center,Customer,companyID,source,target,value ") node_names <-…
peace
  • 299
  • 2
  • 16
0
votes
0 answers

Decompress JSON data in Javascript

The R rgl package exports an HTML widget with the rglwidget() function, built using the htmlwidgets package. Often the data for this widget is quite large, and Pandoc and webshot2 choke on it. I would like to try compressing the data when the HTML…
user2554330
  • 37,248
  • 4
  • 43
  • 90
0
votes
1 answer

Best way to enhance a widget in another package?

The rgl package exports a couple of htmlwidgets: the one produced by rgl::rglwidget() and the one produced by rgl::playwidget(). In a separate package, I'd like to export some Javascript code that will work with these. (It will be a new control…
user2554330
  • 37,248
  • 4
  • 43
  • 90
0
votes
0 answers

Crosstalk Output Variables R

Looking for some specific help with Crosstalk without use of Shiny. Two things; First is get a slider select with one value instead of a range. Second is how to extract a selection from a filter_ object as a output variable. Below is some code for…
0
votes
1 answer

Sankey diagram in R; replacing log-scale value with normal value in "hover-box"

I am creating some sankey diagrams in R which shows the relationships between antecedent and consequent events, with the frequency of the relationships being plotted on the sankey diagram. I have been trying to make the results a bit more…
metaltoaster
  • 380
  • 2
  • 15
0
votes
2 answers

rgl plot displays incorrectly once sent to rglwidget

I'm trying to make some nice rgl 3d scatterplots I can include in an HTML document. They look fine when I display them in the rgl pane in RStudio - here: good output. But as soon as they're captured with scene3d() things go wrong. If I call the…
blex-max
  • 45
  • 4
0
votes
1 answer

How can I change the font size of link labels to a Sankey Diagram built with networkd3 in R?

I was trying to add link labels to a sankey diagram as described by CJ Yetman in: In R, how to display value on the links/paths of Sankey Graph? library(htmlwidgets) library(networkD3) nodes <- data.frame(name = c("Node A", "Node B", "Node C",…
0
votes
1 answer

how to make sankyplots with no color for source and target node and how to do legend to show the different colors of linkgroup

I am working on network data and want to visualize it using sankeyNetwork() from the networkd3 package in r. In my data frame, I have a source node and a target node, value, and a grouping column group. How can I make the sankey plot without…
adR
  • 305
  • 4
  • 14
0
votes
1 answer

R ggiraph dynamically setting tooltip text without Shiny

What: Dynamically set the contents of ggiraph tooltips in rmarkdown knitted to html on page load. Why: Using embedded png's tooltips can be made to be graphics which is valuable for certain biological structures where text is insufficient. Here is a…