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
2 answers

Sankey Diagram with multiple colums and weight column - using NetworkD3 package

I am trying to make an interactive Sankey with the networkd3 package. I have a dataset with eight columns. df <- read.csv(header = TRUE, as.is = TRUE, text = ' clientcode,year1,year2,year3,year4,year5,year6,year7 1,DBC,DBBC,DBBC,DBC,DBC,"Not in…
SuGer
  • 11
  • 4
0
votes
1 answer

enable horizontal movement of nodes in networkD3's sankeyNetwork plots

I found this image from the Internet (link) and I think it was draw in R. I tried to reproduce this Figure and make it more or less similar with one from the above link. The code I used is as following: ID <- 0:24 NodeGroup <-…
0
votes
1 answer

display a visNetwork object with opencpu

I'm trying to embed a visNetwork object returned from a function, into an html div but so far I have no success. Let's say that there is an R function that returns a visNetwork object. In its simplest form could look like: get_plot <-function() { …
J. Doe
  • 619
  • 4
  • 16
0
votes
1 answer

controlling plot size in Firefox when knitting a markdown with multiple sankeyNetwork (NetworkD3)

This is a follow up to a similar post. I have the same issue, but when knitting to HTML from R Markdown. With the solution kindly posted by @CJYetman, I was able to get the correct size for my sankey but only for the first one. I tried adding the…
chrisjacques
  • 635
  • 1
  • 5
  • 17
0
votes
1 answer

JSON tree in rmarkdown plotly

I'd like to include a JSON tree in my rmarkdown result. Here's a reproducible example: library(plotly) p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() + geom_smooth() plotly_json(p) The object created by calling plotly_json(p) is…
balkon16
  • 1,338
  • 4
  • 20
  • 40
0
votes
1 answer

sankeyD3 > sankeyNetwork implementation of 'NodePosX'

I have been using the sankeyD3 package to create SankeyNetworks and the 'NodePosX' feature isn't working for me yet. The 'NodePosX' feature is not in the 'networkD3' package but it is in the 'sankeyD3' package. To help illustrate the problem that I…
Nevil
  • 161
  • 1
  • 11
0
votes
1 answer

Network graph R - joining

Looking for some help on joining in order to make a forceNetwork() graph using networkd3. I just can't figure out what's wrong with the code below as I'm getting the following error/warning message. I used this code before and I got it to work back…
BJSP
  • 67
  • 7
0
votes
0 answers

R-convert plotly object to list

plotly_3.6.0 had function plotly_build() which would convert the plotly object to 'plotly_built' class which was similar to a list. After updating to plotly_4.7.1 it appears that this function no longer returns a 'plotly_built' object. The built…
user98180
  • 149
  • 1
  • 4
  • 12
0
votes
1 answer

Leaflet in R. Trying to add tracksymbol plugin to map. Example data included

I am trying to add the leaflet-tracksymbol plugin, https://github.com/lethexa/leaflet-tracksymbol, to a map I am making inside of R. So far I have tried…
nate
  • 1,172
  • 1
  • 11
  • 26
0
votes
1 answer

R - JS array in diagonalnetwork

My question is with regards to: R networkD3 color node stroke for radialNetwork() Whenever I create and use a colour vector (context given in link's answer), the diagonalNetwork() distributes the node colours incorrectly. Is there any way to know…
Cam K
  • 127
  • 2
  • 2
  • 13
0
votes
1 answer

forceNetwork networkD3 - Arrow issue

I'm working with the networkd3 package and I've plotted this graph: forceNetwork(Links = links, Nodes = nodes, Source = "source", Target = "target", NodeID =…
Lucca Ramalho
  • 573
  • 1
  • 6
  • 16
0
votes
1 answer

Network Analysis - networkD3 - How to put Weight

I've read the documentation in https://christophergandrud.github.io/networkD3/ and managed to do the forceNetwork() graph. But how could i set "weight" on the circles? For example, if someone has more links, it's circle would be bigger. The graph i…
Lucca Ramalho
  • 573
  • 1
  • 6
  • 16
0
votes
1 answer

hw_grid widget function not working in flexdashboard

Because of this issue want to put 6 highcharter graphs in one row like do they over here. It seems to work fine outside of flexdashboard data(diamonds, package = "ggplot2") diamonds <- diamonds[-6] map(names(diamonds), function(x){ diamonds[[x]]…
Tim_Utrecht
  • 1,459
  • 6
  • 24
  • 44
0
votes
1 answer

When to create crosstalk.SelectionHandle

The authoring page https://rstudio.github.io/crosstalk/authoring.html says to create sel_handle at factory scope, before returning renderValue and resize. Is this necessary (e.g. because it needs to be created before renderValue is called), or…
user2554330
  • 37,248
  • 4
  • 43
  • 90
0
votes
0 answers

Fail to resize htmlwidget?

I'm trying to figure out how to write the resize method for my htmlwidget. I read the instructions, but i'm not sure how to implement the force.size([width, height]).resume(); part. I tried a few different things but none is working. This is what I…
Ignacio
  • 7,646
  • 16
  • 60
  • 113