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

R HTMLwidgets to generate interactive plot without Shiny R

I have been looking around for a while now and can not seem to find the answer to this question: Can we produce interactive plots (meaning the user provides x and y fields of a dataset to be graphed) without having R running in the users console. I…
Anika
  • 103
  • 1
  • 8
0
votes
1 answer

plotly: exposing the "config" object in the stored JSON string, for easier use with Plotly.JS functions

I don't know whether this is a plotly question or an htmlwidgets question. Maybe it's both. I am using R to make plotly widgets, which are -- when made from R -- also htmlwidgets. When making plotly widgets in this way, the resulting HTML contains a…
user697473
  • 2,165
  • 1
  • 20
  • 47
0
votes
1 answer

DataLabels in R highcharter cannot be seen after print as png or jpg

I'm trying to print my highchartrer chart. library(highcharter) webshot::install_phantomjs() colors_ <- colorize(1:6, c("#FFA500", "#000000")) df <- data.frame(y = round(rnorm(5, 10, 2), digits = 1), name = paste0("Name", c(1:5)), …
Shen
  • 183
  • 1
  • 10
0
votes
1 answer

Pushing left labels to the left of the nodes in Sankey diagram

Here is the code for the Sankey diagram presented here in their 'Definition' section (you can also click their CODE button in the far right of the diagram. https://www.data-to-viz.com/graph/sankey.html How do we make the countries in left Africa,…
user2167741
  • 277
  • 1
  • 10
0
votes
1 answer

Sankey chart is not displayed in RStudio Viewer using networkD3 in R

Based on the example below: # Load package library(networkD3) # Load energy projection data URL <- "https://cdn.rawgit.com/christophergandrud/networkD3/master/JSONdata/energy.json" Energy <- jsonlite::fromJSON(URL) # Now we have 2 data frames: a…
firmo23
  • 7,490
  • 2
  • 38
  • 114
0
votes
1 answer

Rendering fusionchartsR htmlwidgets in rmarkdown

I am building a new htmlwidget package called fusionchartsR (https://github.com/alexym1). I tried to embed a little piece of code to my rmarkdown report however, it doesn't work and I don't know why. I tried differents strategies without any…
0
votes
1 answer

How to create a sankey diagram with networkD3 if source and target nodes have the same names

I'm trying to build a Sankey diagram using the networkd3 package in r. I think I've set up the dataset in the correct way, starting from a table. Here is my code: M <- data.frame(as.matrix( table(as.character(df$q4.1),as.character(df$q4.2)))) M <-…
Michela
  • 5
  • 2
0
votes
1 answer

Networkd3 Sankey Diagram Won't Print to HTML

I am trying to create a Sankey Network for energy flow from data imported from excel sheets. I don't need it to be interactive and I think I have the code right. However, when I run the code in R Markdown it just creates a blank space - no diagram.…
0
votes
1 answer

networkD3: How to assign color in sankey chart to the node without output

In my example I would like to assign dark color (not green) to the node with the session end. But I find out that the color for nodes without any output is not properly assigned. For some reason for such group is used next color from table with…
iomedee
  • 381
  • 1
  • 14
0
votes
0 answers

Is there a way to styling (e.g. fonts) when using widgetframe to embed a plotly chart in R?

I've created a chart in R using plotly, and I'm attempting to embed it in my Hugo blog. I was unable to actually embed the chart until I found the widgetframe package (using the framewidget() function, however I now realized that widgetframe strips…
acsj
  • 1
0
votes
1 answer

border each node in a network created using networkD3::forceNetwork() with a specific color

Consider the following network, can nodes be bordered with colors based on a column from the MisNodes data frame using the forceNetwork function in networkd3. It has an option to color the edges but not the node borders. library(networkD3) # Load…
Wasim Aftab
  • 638
  • 1
  • 8
  • 16
0
votes
1 answer

UI widgets for visualize large image

Is there any good tool/UI widgets to visualize a large image/pdf document. Hopefully a tool that behaves like how google map is being visualize, where you have the zoom functionality and can drag to different parts of the image
YDao
  • 325
  • 2
  • 15
0
votes
1 answer

Specify point radius using Java Script htmlwidget in R leaflet

I am working from (very helpful) code provided here https://github.com/timelyportfolio/leaftime/blob/master/inst/examples/example_leaftime.R to build a timeseries map using leaflet in R. I can't seem to figure out how to define the radius of each…
nrcombs
  • 503
  • 3
  • 17
0
votes
1 answer

Interactive Treemap d3tree in RStudio - no legend when savewidget() is used

need some help and would be grateful for any advice. I want to create an interactive treemap in R. So far, so good, so bad. I managed that and was able to create an HTML widget, but when I open it, the legend isn't there anymore. In the original…
0
votes
1 answer

sankeyNetwork through renderUI disappears when applying JScode to remove viewbox with htmlwidgets::onRender()

I have a Shiny app that creates a sankeyNetwork from the networkD3 package which accepts inputs to update the data used for the network and also resizes itself based on the number of nodes present. I posted a question last week and got the help I…
cparmstrong
  • 799
  • 6
  • 23