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

How to print HTML interactive plotly graphs within a lapply loop using knitr render from a .R source file ?

Within Rstudio, I try to dynamically render plotly plots into an HTML report using knitr render from a .R source file. knitr renders the plotly plots as long as they are not within a lapply loop. But once I try to output them from within a lapply…
pokyah
  • 163
  • 1
  • 9
2
votes
2 answers

rpivotTable: remove unnecessary aggregators

I create a interactive pivot table by using rpivotTable package. However, I found that some of aggregators and renderName are unnecessary for my users. I would like to remove them. For example, I want to remove "Average" from aggregator dropdown…
Joanna
  • 663
  • 7
  • 21
2
votes
2 answers

Plot density function with 2 or 3 colored areas?

I just started learning javascript and d3.js by taking a couple of lynda.com courses. My objective is to create a function that takes an array of numbers and a cutoff and produces a plot like this one: I was able to write javascript code that…
Ignacio
  • 7,646
  • 16
  • 60
  • 113
2
votes
1 answer

Shiny observeEvent duplicating output

I'm trying to build fullcalendar htmlwidget into my shiny app. However when I try to filter out underlying dataframe(with events) and output the calendar again using observeEvent, then the calendars are stacking up in main panel - example . How I…
John Snow
  • 153
  • 7
2
votes
3 answers

Overlay Static Images on R Leaflet htmlwidget

It it possible to overlay an image to R leaflet maps - or perhaps in the leaflet html - that would stay fixed overtop the map itself? That is, the image wouldn't be rendered on the map itself, but fixed in the viewport of the browser, so that when…
HGupta
  • 127
  • 8
2
votes
1 answer

sankeyNetwork ordered nodes in r

I am trying to build sankey plot in R using networkD3 library. I have following data print(nodes1) name 1 as 2 sdf 3 wer 4 xc 5 sd 6 er print(links) source target value 1 0 5 112 2 0 4 848 3 0 4…
Kush Patel
  • 3,685
  • 5
  • 42
  • 65
2
votes
0 answers

Need to add info/tooltip points on streamgraph in R

I have a streamgraph similar to this, library(dplyr) library(babynames) library(streamgraph) babynames %>% filter(grepl("^Kr", name)) %>% group_by(year, name) %>% tally(wt=n) -> baby_names head(baby_names) streamgraph(baby_names,…
Droid-Bird
  • 1,417
  • 5
  • 19
  • 43
2
votes
1 answer

ColourScale ForceNetwork (NetworkD3) in R Shiny

In forcenetwork, i found group and colourscale to colour the node in a network. I would like to have 2 different groups(colour is applied to the node based on user input between 2 different variables). Is it possible to have it? If yes,…
2
votes
1 answer

Embedding R htmlwidgets in existing webpage through jQuery?

Actually i am following this question of stackoverflow Embedding an R htmlwidget into existing webpage The above question shows two methods to embedd a graph Php Jquery Currently i am using jQuery ajax method to embed the json it works but on…
Qaiser iqbal
  • 306
  • 1
  • 14
2
votes
2 answers

Replace existing R shiny htmlwidget data with new data

I have created a htmlwidget for ony of my R shiny application. In my widget I am unable to replace the existing data with new data, whenever the widget render function is called multiple times, this resulted in a bug and the old data was not removed…
radhikesh93
  • 870
  • 9
  • 25
2
votes
1 answer

Using 2 HTML widgets in 1 r shiny application

This question is already asked here, (Using 2 htmlwidgets in 1 R-Shiny Application). I am facing the same problem and couldn't find the solution for this, so posting it as a new question with reproducible example. I have created two htmlwidgets…
radhikesh93
  • 870
  • 9
  • 25
2
votes
2 answers

R Shiny - Rotating tabPanel & onclick function

I am using networkD3 and shiny to visualize some data. I have a diagonalNetwork created by networkD3. However, I want the tree to be displayed vertically. networkD3 doesn't seem to have an option to rotate diagonal networks. Can I rotate a tabPanel…
Daniel Cole
  • 177
  • 2
  • 8
2
votes
1 answer

ggplotly error in rmarkdown

I have the following dataset: ## 'data.frame': 2 obs. of 3 variables: ## $ Var1 : Factor w/ 2 levels "correct","incorrect": 1 2 ## $ Freq : num 84 16 ## $ text_bars: chr "84%" "16%" Then I create a ggplot object. z <-…
Prometheus
  • 1,977
  • 3
  • 30
  • 57
2
votes
1 answer

Representing time series data based on multiple classifications in R

So here goes my first ever post in SO. I have a data set which looks something as shown below. But it is for many more buckets and for a higher duration of time period. I am looking to get some kind of an interactive plot that would be ideal to…
Priyanka Basu
  • 397
  • 1
  • 9
2
votes
2 answers

Using Shiny actionButton() function in onRender() function of htmlWidgets

I have a Shiny application in which a user can select black points in a Plotly scatterplot using the Plotly "box select" icon. The points the user selects will be highlighted in red. I have a MWE of this application…
user2808302