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.
Questions tagged [htmlwidgets]
422 questions
2
votes
2 answers
vtree object is renderred in Rmarkdown but not in quarto
I use updated quarto and Rmarkdown and vtree ‘5.4.6’:
In the same project and same session:
Rmarkdown does what quarto does not:
Rmarkdown renders vtree(iris, "Species") and quarto not (allthough quarto renders inline)
What could be the problem for…

TarJae
- 72,363
- 6
- 19
- 66
2
votes
1 answer
NetworkD3 sankey chart in R creating really messy links, even though my code should be good. What is wrong?
I am trying to create a sankey diagram but the connections turn out all messed up. Here is my data:
#> A tibble: 61 x 3
#> # Groups: id_2 [55]
#> id_2 origin target
#> …

Andy
- 109
- 5
2
votes
1 answer
Package build/check removes htmlwidget-derived files
I'm having trouble building a package that uses plotly figures as htmlwidgets. It appears that the supporting files containing the figures and related resources are either never created or are deleted at some point in the build/check process.
I…

Bryan Hanson
- 6,055
- 4
- 41
- 78
2
votes
1 answer
saveWidget works interactively, but no file saved when using buildVignette
When I run the following code interactively, the expected testFig.html is produced and functions correctly.
suppressPackageStartupMessages(library("plotly"))
suppressPackageStartupMessages(library("htmlwidgets"))
DF <- data.frame(
x <-…

Bryan Hanson
- 6,055
- 4
- 41
- 78
2
votes
2 answers
Why use tagQuery() in shiny apps?
I have read this article on tagQuery and was left wondering what could be the practical use in a shiny app.
Is it to modify a tag on the server side in a way similar to shinyjs::addClass()?

tic-toc-choc
- 815
- 11
- 26
2
votes
1 answer
Hide index column (row numbers) in excelR widget of Shiny app
I make making a Shiny app in R that shows the user an Excel-like grid. The excelR package is a wrapper for a JS package JSpreadsheet. This package automatically puts row numbers in the left-most column. I do not want them.
By digging into the…

Michael Dewar
- 2,553
- 1
- 6
- 22
2
votes
1 answer
R networkD3 sankey - add value to node label
example code to create a Sankey chart with networkD3::sankeyNetwork()...
library("networkD3")
a = read.csv(header = TRUE, text = "
date,Data Center,Customer,companyID,source,target,value
")
node_names <- unique(c(as.character(a$source),…

peace
- 299
- 2
- 16
2
votes
0 answers
Add an interactive Check Box to a Flexdashboard in R
I'm building a flexdashboard out in an RMarkdown document, but I've run into issues with interactivity. So I've gotten a solution in shiny up and running, but the issue is that at my place of work we don't have any shiny server options out there to…

obewanjacobi
- 458
- 2
- 12
2
votes
1 answer
How do I force saveWidget to create a single file outside of RStudio?
In RStudio I can save my html widget to a single file with:
htmlwidgets::saveWidget(x,"filename.html",selfcontained=TRUE)
When running an R script with the above line through windows Task Scheduler (which calls Rscript.exe) this would generate a…

Rainfall.NZ
- 197
- 1
- 12
2
votes
1 answer
Incorporating DT tables into Rmd Markdown document
I am using lists to collect a number of QC plots and tables generated by functions that should be included in a final Rmd markdown html document. The code, as far as I can see, works as expected. All plots and tables are generated and collected. And…

Mario Niepel
- 1,095
- 4
- 19
2
votes
1 answer
height of stringr::str_view output in Rmarkdown
When the output of the stringr::str_view() is printed in a slidy presentation it pushes the subsequent text down. I would like to have the text just after the output of the stringr::str_view() call. I can make the text come right after the…

Benlien
- 43
- 5
2
votes
1 answer
Trigger mouse click event with user input in shiny
I am writing a shiny app with a plotly sunburst chart.
After I supply the appropriately formatted dataframe, I have to click on the sunburst chart to "drill-down."
Is is possible to mimic this mouse "click" event to control the "drill-down" from a…

mdb_ftl
- 423
- 2
- 14
2
votes
1 answer
How can I avoid links not fully or properly connecting to nodes in sankeyNetwork?
I have a Sankey network from networkd3 rendering inside a Shiny app showing transitions within a year, with various options for users to filter data. I encountered an issue with the links not connecting fully with the nodes and running into other…

Josh C
- 43
- 7
2
votes
1 answer
Crosstalk makes scroll bar not visible in flexdashboard when combined with reactable
I use the excelent crosstalk r package to make filters for my reactable htmlwidget. I show the reactable in flexdashboard. When using the groupBy feature of reactable, I noticed that there was no scroll bar when I make the table larger than the area…

rdatasculptor
- 8,112
- 14
- 56
- 81
2
votes
2 answers
Why does shiny App add a spurious widget to a Plotly graph using highlight function and selectize=TRUE?
I produced a graph with ggplotly to display the results that 10 participants achieved in three tests. The graph shows both a scatter plot (individual participants) and summary statistics (boxplot) grouped by experiment. I added a highlight function…

Iqbal Adjali
- 23
- 3