Hello @tommyg,
If you want to base your chart data on a filtered table you might want to try to use the function getDisplayedData(), like so:
table1.getDisplayedData();
This will retrieve the data in the table after filters and sorts.
Let me know if this helps!