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
5
votes
1 answer

forceNetwork is not zero indexed

I am trying to create a simple forceNetwork, but the plot won't render. I keep getting the following warning: Warning message: It looks like Source/Target is not zero-indexed. This is required in JavaScript and so your plot may not render. How do…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
5
votes
1 answer

Own colour range for Sankey Diagram with networkD3 package in R

I am trying to plot Sankey diagrams using sankeyNetwork() in networkD3 package. sankeyNetwork(Links = Flow_data, Nodes = Nodes_data, Source = "Source_ID", Target = "Target", Value = "value", NodeID = "Nodes_name", width = 1000,…
AEdiger
  • 51
  • 1
  • 2
4
votes
1 answer

Sorting with NA using datatable function in DT package

I am trying to create an html table using the datatable function in the DT package so that when I sort the data in R markdown, missing rows are sorted after the highest number. For example, in the following table, when I sort by "age" in the…
eycramer
  • 75
  • 3
4
votes
1 answer

Multi level dropdown hover R shiny

I am looking for a solution for a multi level dropdown in R shiny I have browsed most of the packages here, https://github.com/nanxstats/awesome-shiny-extensions Wasn't able to find a solution in any of the available packages A close solution is …
Arkadi w
  • 129
  • 22
4
votes
2 answers

How to subset data in networkD3 on Shiny?

Here is a reproducible example: library(networkD3) MyNodes<-data.frame(name= c("A", "B", "C", "D", "E", "F"), size= c("1","1","1","1","1","1"), Team= c("Team1", "Team1", "Team1", "Team1", "Team2", "Team2"), …
FatihSarigol
  • 647
  • 7
  • 14
4
votes
1 answer

Unselected entries displayed on axis - Crosstalk+Plotly bar-chart

EDIT This seems to be an issue already known to the plotly community github plotly issue #689 and there is an analogous question here on SO. Unfortunately, it seems no solution is available yet. Any advice would be greatly appreciated. I am trying…
dgdi
  • 320
  • 2
  • 10
4
votes
1 answer

Is it possible to select a graphviz node in a shiny app (renderGrViz) and then link to other information?

I would like to add a feature (a popover, or some other function?) to the central graphviz nodes in my shiny app that, when selected by mouse click, they display information (e.g. the info column in the centre_nodes file). Given that there's a…
rob99985
  • 157
  • 9
4
votes
1 answer

R: tr(), th() and thead() - what package do they belong to?

I built a DT table with a custom container, similar to the one here (point 2.6 - 2.6 Custom Table Container). I'm packaging the shiny app that uses this table and I want to find out what package th(), tr() and thead() functions, that are used to…
Kasia Kulma
  • 1,683
  • 1
  • 14
  • 39
4
votes
2 answers

Displaying html file using includeHTML in shiny is not working with renderUI()

I have a saved html widget (from leaflet) that I want to display in a shiny app. Using includeHTML() works when it is given in ui.R, but not when dynamically called using renderUI(). I have many .html files that I would like a user to choose from…
Adam Birenbaum
  • 940
  • 9
  • 23
4
votes
2 answers

R networkD3: click action to show information from node data frame

I have this code: library(networkD3) # Load data data(MisLinks) data(MisNodes) new.nodes <- MisNodes new.nodes$var1 <- runif(nrow(MisNodes),1,2) new.nodes$var2 <- runif(nrow(MisNodes),1,2) # Some script to show the node index in the new.nodes…
CodeNoob
  • 1,988
  • 1
  • 11
  • 33
4
votes
1 answer

Subgroups in R timevis

Utilizing the grouping feature in the excellent R timevis package is well documented and examples are provided in the help page of timevis::timevis(). The documentation also says that it is possible to define subgroups, which "Groups all items…
4
votes
0 answers

Using timevis in R presentations

I'm trying to include an HTML widget created by timevis in an R presentation (.Rpres). I'm using: library(timevis) data <- data.frame(id = 1:4, content = c("Item one", "Item two","Ranged item", "Item four"), start = c("2016-01-10",…
4
votes
1 answer

Interactive Treemap with d3treeR not rendering in Shiny

I am a newbie to Shiny and I am trying to use the d3TreeR HTML Widget to display an interactive treemap I used the following code and it ran perfectly in R: library(readxl) budget_map <- read_excel(path = 'Trader Dashboard Data Prep…
Rahul Anand
  • 43
  • 1
  • 6
4
votes
2 answers

using leaflet-side-by-side plugin in R

I tried to implement leaflet-side-by-side plugin using example codes from Using arbitrary Leaflet JS plugins with Leaflet for R. Appears simple, no success so far. I could not figured out what I'm doing wrong. Greatly, appreciate your…
SatishR
  • 230
  • 3
  • 13
4
votes
1 answer

How to arrange html widget plots in a grid for export as pdf?

I would like to combine the richness of html widgets (mainly plotly and networkD3), with the possibility of arranging them as plots in a grid in R, to export them as pdf graphic for a publication. However, if I create some html widget objects in R…
Nino
  • 366
  • 2
  • 12