3 ms·
Yes it's theoretically possible. I created an example of linking a table to a scatter plot brush selection. That said, I have never been able to get altair/vega
by sterlinm 6y ago
Yes it's theoretically possible. I created an example of linking a table to a scatter plot brush selection. That said, I have never been able to get altair/vega-lite to generate a nicely formatted table to my satisfaction. I mostly end up connecting a simpler altair chart without interactions to a dataframe and hook them together using something like ipywidgets, Panel, or streamlit. It would be really nice though to be able to get the table linked to native altair interactions like selection and brushing.
https://altair-viz.github.io/gallery/scatter_linked_table.html https://altair-viz.github.io/gallery/scatter_linked_table.ht...
- boromi 6y agoThanks. Yeah that's not quite what I was hoping for, I was actually thinking something closer like the following: https://www.m43lenses.com/ https://www.m43lenses.com/
- sterlinm 6y agoipywidgets + altair could mimic that pretty easily I think since with that example you just want to filter with a bunch of checkmarks/radios/dropdowns on a sidebar and then display a chart and table based on those filters. The place where you start to run into problems is if you want to filter the table based on interactions with the chart. If you're going to use dropdowns and checkboxes to filter the dataframe and the chart then you have a lot of good options.
- boromi 6y agoThanks, I'll check out ipywidgets. So basically use ipwidgets to create the checkmarks/radio/dropdowns. Then hook the database up to altair. I'll play tommorow with altair and ipywidgets and see how I can cook this up. "filter the table based on interactions with the chart" For me all I'd need is a the corresponding datapoint selected to highlight the row.