question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make link_selection interact with tables

See original GitHub issue

Description of problem

I want to be able to have a table that interacts with link_selection. E.g. if I have a plot over some cars, and I Box Select the ones with a max speed above 60 km/h, I want the table to highlight those cars in the same way the scatter plot does. Currently when I use a link_selection on a table the Box Select stops working, which might be a bug.

Down below I’ve made an exaggerated simple example of the code which is not working


import pandas as pd
import holoviews as hv
from holoviews.selection import link_selections
hv.extension('bokeh')

data = {"x": [1,2,3,4,5], "y": [2,4,5,7,10]}
df = pd.DataFrame(data)
dataset = hv.Dataset(df)
dataset

bars = hv.Bars(dataset, "x", "y")
bars

scatter = hv.Scatter(dataset, "x", "y")
scatter

table = hv.Table(dataset)
table

If I only plot the scatter plot and bars, I can Box Select them properly linked: image

However, if I add the table to the cocktail, Box Select draws the markup but doesn’t mark anything: image

Solution

The most useful way to solve this would be to make the selected data points go to the top of the table. And then give the cells a different color, so you’d be able to separate them from the remaining data points.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
MarcSkovMadsencommented, Jul 2, 2020

Potential Solution

I have potential solution here https://discourse.holoviz.org/t/how-do-i-link-plots-and-tables/925

linked-brushing

2reactions
jlstevenscommented, Jul 6, 2020

@MarcSkovMadsen Thanks for posting the workaround on discourse!

From what I can tell, this is a bug in holoviews as you shouldn’t have to resort to using panel here. I don’t see why the original code posted above shouldn’t work. Do you agree @philippjfr ?

I’ve assigned it to the next milestone as I think we would all like to ensure linked selections is working for users as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make your table rows clickable (with a link) - YouTube
As you cannot make an entire table row (tr) clickable (or linkable) using plain HTML, we need to resort to JavaScript in order...
Read more >
How to make a table row a link - Robert Cooper
Solution 1: Use JavaScript. JavaScript can be used to programmatically navigate a user to another page when a table row is clicked. There...
Read more >
Add hyperlinks (URLs) to a table or matrix - Power BI
Format the link text · With the table selected, select the Format icon to open the Formatting tab. · Under Visual, expand Cell...
Read more >
how to make a whole row in a table clickable as a link?
A linked table row is possible, but not with the standard <table> elements. You can do it using the display: table style properties....
Read more >
How to Create a Linked List of Tables - Statistics Solutions
The first step to inserting a linked List of Tables is to go to the first table in the document. Next, copy the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found