ropensci / iheatmapr

Complex, interactive heatmaps in R
https://docs.ropensci.org/iheatmapr
Other
267 stars 35 forks source link

Feature request: Interactions with htmlwidgets using 'crosstalk' #53

Open rfenouil opened 4 years ago

rfenouil commented 4 years ago

Hello and thank you for the great work.

As I am planning to integrate a heatmap in a webpage with other htmlwidgets, I am wondering if it would be possible to take advatage of 'crosstalk' for triggering selection of elements (rows or columns) when clicking on cells, or the other way round (showing/hiding/highlighting rows/columns when selected from another widget).

To my knowledge none of the heatmap APIs allow that yet (correct me if I'm wrong), and that would be a killer feature for many applications.

Is that something that could be done easily (I have no idea what it really implies internally) ?

Thank you for your help.

lawremi commented 4 years ago

Dynamically showing and hiding rows seems like it would be difficult to implement client side, particularly when clustering is involved.

AliciaSchep commented 4 years ago

I looked into crosstalk integration at some point, and it seemed like it would be hard to make it work for this package as it is currently set up. I think crosstalk works best when the data underlying the graph is in a single tidy data frame, and this package is not really based on data organized that way (a re-imagining of this package with a different data model would be an interesting idea).

rfenouil commented 4 years ago

@lawremi @AliciaSchep Thank you very much for your opinion on that. I understand that a restructuration of such a complete tool can be challenging.

I'll try to evaluate other options and report here in case someone is interested by crosstalk with heatmaps.

In the meatime, I'll stick to iheatmapr as your implementation is far superior to anything else I've seen so far. Thank you again for the great work.

lawremi commented 4 years ago

I wonder though if the key-based linking defined by crosstalk::highlight_key() might provide a way to propagate events across multiple tables in a way that makes sense. We're exploring a project to create server-less reports of analysis results that might benefit from this capability. The current plan is to automatically select an interesting subset of features to show in the heatmap, but it would be great to make it dynamic.