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.
427
questions
0
votes
0
answers
20
views
embedding excel files in wordpress page as iframe with elementor triggers a download and does not actuall display the file in the frame
I'm trying to embed an excel file into a wordpress page and allow users to interact with it. I'm doing this via an iframe using elementor's html widget. The file does not display in the frame and ...
2
votes
0
answers
79
views
Mapbox interactivity where values change in information window based on hover using R mapboxapi and mapboxer
I'm trying to get a mapbox, which changes layers on different zooms, to change values in an information window on mouse hover (like this example) using R's mapboxapi, mapboxer, and htmlwidgets. Kyle ...
0
votes
0
answers
51
views
How to convert a text into clickable link using a networkD3 widget in shiny?
I have created a Forcenetwork and I want when I click on any node it should provide its description along with a hyperlink on the same page. So that anyone can click that link and get more information ...
0
votes
1
answer
25
views
Is it possible to change the link names in sankey plots from networkD3 R package
I have plotted this sankey plot using the networkD3 package in R but want to change the link names so that in each node the #number is removed. So essentially, I only want BV in each node without ...
0
votes
0
answers
36
views
pkgdown::build_article() fails with large chunk sizes using sf and leaflet, no errors reported when setting quiet=FALSE
pkgdown::build_articles() fails with large chunk sizes
rmarkdown::render() works fine
article fails to render any code or text beyond the failed chunk
no errors are reported with build_article(quiet=...
0
votes
0
answers
31
views
Plumber + leaflet don't render in angular
I am finding a lot issue to render a leaflet htmlwidget generated by a plumber endpoint in angular.
The angular app is quite simple, cause is making the post request and response will be render.
This ...
1
vote
1
answer
94
views
Move labels to the outside of the Sankey Diagram and order from biggest to smallest in both sides
it's the first time I'm using R so sorry for stupid mistakes. I need to do a Sankey Chart to display flows between cities in a Metropolitan Area, but I am not satisfyied with the how the graph looks. ...
1
vote
0
answers
32
views
In R, how to fit a plot made with plot_ly into an html page
I'm building an html page with a plot made with plot_ly and under it I have some buttons connected to the data of the plot.
Here is the layout so far.
I would like to fit the plot fully in the box.
...
0
votes
0
answers
167
views
Plotly rotation animation and changing camera eye in R
I am having trouble changing the camera eye in my rotating animation of a plotly "scatter3d" plot.
I can specify the camera eye using the layout function in the plotly R package.
fig %>%
...
0
votes
0
answers
76
views
Nested/ cascading crosstalk filters in flexdashboard
I am trying to create "nested" (or cascading) filters using Flexdash and crosstalk. I would like to have two filters, "State", and "City", where the options for City are ...
0
votes
0
answers
74
views
Resize html in saveWidget in R
I would like to save in html a plot that I create using the iheatmapr R package and the iheatmap function. I convert the heatmap plot into widget using the to_widget of the iheatmapr R package and ...
0
votes
0
answers
63
views
Resize width and height of heatmap saved as html in iheatmapr
I would like to save in html a plot that I create using the iheatmapr R package and the iheatmap function. I use the save_iheatmap R function to save a *.html file with a dynamic plot which is ...
0
votes
0
answers
34
views
How I can use my own style in mapboxe using r (mapboxer package)?
Hi and thanks for reading me. Im trying to use my own style using the mapboxer package in R but it doesn't work and I don't know why, the code im using is the following:
library(mapboxer)
style <-&...
0
votes
1
answer
47
views
R plumber on DigitalOcean and HTMLWidgets producing "exception" errors
I have deployed my plumber.r API file on DigitalOcean using plumberDeploy::do_deploy_api and I get the resulting Swagger documentation with all the functions contained. The majority of functions work ...
0
votes
0
answers
40
views
Sparkline returns empty column
The sparkline is working fine on tbl.spk1 but not in tbl.spk2 in the example below. I would like to make it work in the second tbl.spk2. Could anyone help me with that?
tbl <- as.data.frame(matrix(...
0
votes
1
answer
226
views
How to add a download button for html format on a plotly modebar in R shiny
it is a newby question
I'm making a Shiny app in R and I use Plotly to make my plots interactive.
On the modebar of plotly, there is a button to download on png, and we can change parameter to ...
0
votes
1
answer
52
views
R is not rendering graph in forceDirect
Followed all the suggestions in Stackoverflow and YouTube but still cannot render graphs in networkD3 using R Studio.
Produced Nodes and Links csv files and uploaded same, simpleDirect is rendering ...
0
votes
0
answers
26
views
R html widget: annoying return symbols
I'm converting an R DT table to an html widget.
The widgets have the annoying carriage return symbols. Example of carriage return issue:
The dataframe is all_p_22
My code:
library(htmlwidgets)
...
0
votes
0
answers
315
views
I'm using Flutter HtmlWidget for displaying Vimeo video but the issue is for android devices i'm not getting fullscreen button
-------------- Original With issue --------------
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: HtmlWidget('<p> <iframe src="https://player.vimeo.com/...
0
votes
0
answers
182
views
How can my rendered RMarkdown/Quarto document with html widgets be linked to a live csv?
Correct me if I'm wrong: The examples online are generally for a static data set. The executed R code reads data into an R data frame and creates the html widgets to plot it. Upon rendering the .Rmd ...
0
votes
1
answer
301
views
How to move Sankey first node text to left
I am creating a sankey plot (migration form):
library(tidyverse)
library(networkD3)
library(htmlwidgets)
links <- data.frame(source = c("a","b","a","a",&...
10
votes
2
answers
3k
views
Argument "selfcontained" deprecated in htmlwidgets::saveWidget()
I keep getting [WARNING] Deprecated: --self-contained. use --embed-resources --standalone when saving a plotly plot as a self-contained html widget, using htmlwidgets::saveWidget(..., selfcontained = ...
2
votes
0
answers
170
views
Add Sparklines to Multiple Columns of R Data Table using Sparkline package
I am trying to add sparklines to multiple columns of a Data Table in R. I am able to get a single Sparkline column to render correctly, but when I try to render a sparkline in a second column based ...
1
vote
0
answers
204
views
Making Power Bi - R (HTMLwidgets pbiviz based) custom visuals interactive with other Power BI visuals
I have made a pbiviz custom visual using developer tools of Normal distribution curve over a Histogram plot with R - ggplot2 and plotly libraries in a pbiviz.package
The visual works fine. Now I want ...
2
votes
1
answer
113
views
How to copy screenshot to png from a html_widget
Follow-up question to this R Shiny: Vtree plot not rendering with Shiny
With this code I generate a vtree htmlwidget. I would like to take a screenshot and save it in png.
For this I use ...
0
votes
1
answer
60
views
How to simplify the JS code in this R shiny code?
The below code I found at How to display a scaled up image in an popup window on mouse hover or on click event on an image displayed in a rhandsontable cell in RShiny? (but wrapped in Shiny) almost ...
2
votes
1
answer
58
views
'rAmCharts4' graphics perturbed with 'flexdashboard'
I'm doing a 'flexdashboard' containing some graphics constructed with the rAmCharts4 package. These are 'HTML widgets' implemented with 'React'. On the first page, the graphics are nice:
but not on ...
1
vote
0
answers
75
views
Is there a way to reset click event data from a htmlwidget inside of a shiny application?
I have a custom htmlwidget embedded in a Shiny application that sends data about a position on the widget whenever the user clicks on a region in the widget. I want to add a "reset"-style ...
0
votes
0
answers
333
views
Align nodes horizontally based on group with networkD3 sankeyNetwork in R
I think the answer to this question is "it's not currently supported", which is fine, but I'm hoping to build a sankey diagram with the nodes aligned horizontally based on their group. I ...
0
votes
1
answer
747
views
How to include a leaflet map (html widget) into a Word or PowerPoint document?
I teach Leaflet to my students to map and analyze spatial data.
I would like them to present some of their work in PowerPoint, Word, and/or PDF while maintaining the interactive features of the ...
2
votes
1
answer
454
views
I used htmlwidgets::onRender to add numbers to a sankey network, but the numbers do not seem to be appear after saving the plot as png
I was following this guide and tried using htmlwidgets::onRender to add numbers next to node labels. It displays the change in an html file with no problem, but then when I tried saving it as png, the ...
1
vote
2
answers
178
views
networkD3 package: forceNetwork() - setting the linkDistance
I was trying to use the forceNetwork() function for my node plots. However, I can't seem to set the linkDistance. For example, in the attached image, I want to set all the green nodes equidistant from ...
0
votes
1
answer
61
views
How to stop html widget from moving to the bottom of the shiny app following input
I am trying to embed a custom html widget (ideogram) into a box in a shiny-dashboard which receives an input file and draws a plot. However, when I upload a file the widget moves from the intended box ...
1
vote
2
answers
398
views
How to export DT table to html and preserve all functionality?
I'm able to export a DT table generated in R/RStudio to HTML using the htmlWidget:saveWidget method. However, the FixedColumns feature is not preserved and becomes very narrow when a term is entered ...
0
votes
1
answer
230
views
How to show the timeline at the top of a timevis
Is it possible to show the time/date at the top of a timevis (and not at the bottom) ?
timevis(
data.frame(id = 1:2,
content = c("one", "two"),
start = c(&...
1
vote
1
answer
404
views
Adding a color legend with JavaScript to a networkD3 sankeyNetwork() in R
I am currently working on an Shiny-App which displays Sankey-Plots. In order to create the Network I use the networkD3::sankeyNetwork() function which has no attribute to show a legend of the ...
0
votes
1
answer
185
views
R: Align and center text using foreignObject and Sankeynetwork
I created this sankey network:
library(networkD3)
library(htmlwidgets)
library(data.table)
set.seed(1999)
links <- data.table(
src = rep(0:4, times=c(1,1,2,3,5)),
target = sample(1:11, 12, ...
0
votes
1
answer
98
views
How to visualize simple network in R? With or without D3
I need to visualize the connections between developers in repo1 and repo2.
In particular, I need to show:
How some (not all) devs are active in both repos.
Some devs are more active than others (the ...
2
votes
2
answers
585
views
Export manually edited htmlwidget to SVG or similar
I often create Sankey-diagrams in R via {sankeyD3}, because it seems to be the package with the most options/features to do so. However, one feature that is missing is the ability to set the order of ...
2
votes
2
answers
194
views
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 (...
1
vote
1
answer
83
views
Select Specific Node NetworkD3
Is there a way to select an specific node using NetworkD3 in order to change its color?
Here is my code. I would like to use the customJS to achieve that!
p <- forceNetwork(Links = links,
...
1
vote
0
answers
629
views
R crosstalk: how to set default values in filter_slider() in order to filter date column
My question is similar to this question, which asks how to set default filter selection in crosstalk::filter_select in R. However, I need to do the default select for crosstalk::filter_slider for a ...
2
votes
1
answer
266
views
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 ...
0
votes
1
answer
270
views
How I can configure TinyMCE HTMLFIELD to allow users to browse their file explorer/finder and upload an image or paste url
I am working on Django app and I have downloaded tinymce to help me build a html widget, then I created HTMLFIELD in my model.
(as the screenshot show). it seems by default, the add image tab only has ...
1
vote
1
answer
207
views
How to use htmltools::attachDependencies?
Here is an example of how I "manually" add a HTML dependency to a datatable. This works fine. When I try with attachDependencies, the dependency is not attached.
library(DT)
library(...
0
votes
1
answer
123
views
NetworkD3 sankey plot gives the wrong colors (user-defined colors)
I created a Sankey diagram with the function sankeyNetwork() from the package networkD3. I defined the colors for each node manually with the argument "colourScale" but the plot shows the ...
0
votes
1
answer
218
views
R - networkD3 issues
I am using networkD3 in R to display my data (sankeyNetwork function). I ran into several issues that do not seem to have solutions available.
Issue 1:
If node names similar, the same color is used, ...
1
vote
1
answer
298
views
Add specific hovering behaviour to R plotly graphic
I am having troubles defining a specific behaviour when hovering an R Plotly graphic. Here is what I would like to do : I would like the full arrow to be responsive, here it is just the tip of the ...
1
vote
1
answer
311
views
Print HTML formatted text in Jupyter with R from the list of citations of loaded packages
I have a R variable containing some html content inside, for exemple :
myvar = "<h3>Section Title</h3>"
I would like to print it not as <h3>Section Title</h3> but as ...
2
votes
1
answer
117
views
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 ...