Questions tagged [crosstalk]

Use this tag for asking question concerning the Crosstalk R package and cross-widget interactions with htmlwidgets.

Crosstalk

Crosstalk is a package for R that enhances the htmlwidgets package. It extends htmlwidgets with a set of classes, functions, and conventions for implementing cross-widget interactions.

Ressources

91 questions
7
votes
1 answer

R: crosstalk::SharedData linked data with different format (wide/long), when tidyverse verbs don't work

Edit TL;DR Using crosstalk package, I am searching for a way to link a graph that utilizes long format data (a line plot) with an interactive table with data in wide format so that each row in table corresponds to a line in the plot. I am trying to…
Claudiu Papasteri
  • 2,469
  • 1
  • 17
  • 30
6
votes
1 answer

How can I filter pre-aggregated data in Rmarkdown without Shiny?

Original Question (See update with partial solution below.) I have an RMarkdown document which summarizes how many records (rows) have various attributes by group. I would like to be able to manipulate which records are included in the table by…
Rob Creel
  • 563
  • 2
  • 13
6
votes
2 answers

Use lasso instead Rectangle for select reign in Leaflet

I am trying to show a leaflet map using R(I can not use Shiny package). I use a 'DT', 'crosstalk' and 'leaflet' packages to calculate the mean of a column for selected data in map. In the map, it select the points only by Rectangle shape. Is it…
Masoud
  • 535
  • 3
  • 19
6
votes
2 answers

How to set default values in filter_select() in Crosstalk() in R - Plotly

I'm developing a rmarkdown HTML with plotly based interactive charts. While I could accomplish everything I want to have in the chart, the filter_select() from crosstalk() is not letting me to set default values in it. So my charts during initial…
6
votes
2 answers

Create interactive bar chart with shared data filtered by time range

I want to create an interactive bar chart that lets users filter observations based on a range of values, and then renders counts per class for the selected time period dynamically. Since the filtered data needs to be available for numerous such…
fdetsch
  • 5,239
  • 3
  • 30
  • 58
5
votes
1 answer

Ampersand (&) in a string becomes "&" in crosstalk filter_select() function

I am using NFL Stadium names in a crosstalk filter_select() function for my r shiny app using a reactable table. However, when I go to select "M&T Bank Stadium", it displays as "M&[amp;]T Bank Stadium" (I have added the brackets so you see what it…
5
votes
1 answer

how to dynamically change plotly axis based on crosstalk conditions

This question has been asked before, but didn't get an answer since it didn't have a reprex, so let me give it a go. Lets say I have two datasets that span different date ranges. I want to control the visualization of each using a slider. The…
Amit Kohli
  • 2,860
  • 2
  • 24
  • 44
5
votes
1 answer

How to filter rows in both parent and nested tables, using reactable?

How to filter rows with a specific Type, which are either in the parent or in any of the nested tables of a reactable, using crosstalk::filter_checkbox, as shown here ? dat <- structure(list(Manufacturer = c( "Acura", "Acura", "Audi", "Audi", …
gd047
  • 29,749
  • 18
  • 107
  • 146
4
votes
0 answers

Using crosstalk filter_select() in r for line plot but doesn't display lines in the graph

I am trying to get interactivity in the rmarkdown document by using crosstalk. Issue: When I plot using cross talk it doesn't display lines in the graph but it gives values on hovering over the plot. And is there a way to have default option in…
ViSa
  • 1,563
  • 8
  • 30
3
votes
1 answer

Passing variable name to user-defined function that makes a plotly chart

I'm having trouble with passing a variable name from a shared data set to a function I've defined. I've seen documentation for similar R issues and have tried to implement some of the solutions to no avail. In the reprex below, I encounter an error…
bbroxler
  • 145
  • 7
3
votes
1 answer

In package `crosstalk`, are there have function `bsrows()` and `rows+cols` mixed?

In package crosstalk, there is function bscols() make plots align in a row. But I cant't find function bsrows() and rows+cols mixed , is any package have such function? Thanks! library(plotly) library(tidyr) library(crosstalk) m <- gather(mtcars,…
anderwyang
  • 1,801
  • 4
  • 18
3
votes
1 answer

My 'recent' line is being hidden and the chart is not reverting to the original state. Is this a bug with bscol?

I'm trying to add some interactivity to my plotly charts using crosstalk (specifically using filter_checkbox and filter_select) and I've run into a bit of snag. I produce my plots firstly through ggplot then I convert it to plotly using ggplot…
alec22
  • 735
  • 2
  • 12
3
votes
1 answer

How to remove (All) from crosstalk's filter_select in R?

I was following Figure 16.7's example from https://plotly-r.com/client-side-linking.html and cannot figure out why there is a selection called "(All)" or how to remove it. Code I was using is below library(plotly) library(crosstalk) data(txhousing,…
Daniel L
  • 158
  • 1
  • 8
3
votes
1 answer

plotly crosstalk filter is filtering wrong, leaking values from other categories from variable

When using filter_select for categorical variables, crosstalk is not filtering properly, taking values from other categories. Reproducible example: df <- structure(list(weight = c(0.349, 0.336, 0.329, 0.331, 0.329, 0.329, 0.321, 0.317, 0.317,…
Forge
  • 1,587
  • 1
  • 15
  • 36
3
votes
1 answer

Can plotly use a datatable as source data?

If I have a datatable (DT) that contains values, can I have a plotly(a barplot) in blue area based on those values in datatable? For example for variable "Value2", we have a barplot. I saw this post and I hope it can be done by add some JavaScript…
Masoud
  • 535
  • 3
  • 19
1
2 3 4 5 6 7