Filtering Tables Using Charts

One of my favorite little Retool hacks is filtering tables using different plotly charts.

Shared with Zight

To do this, you just need to make use of Retool's Query JSON with SQL feature:

select * from {{}}
where ({{_.isEmpty(chart1.selectedPoints)}} or region = ANY({{>d.label)}}))

Set your table's data input field equal to the query above, and when a user selects a point in the chart it will filter the table according to the selected point in the chart :slight_smile:


Hi @JoeyKarczewski - this is great. Do you know how to do this similarly with bar charts while selecting via the legend? I don't see any changes to the component inspector while changing legend selections.