Add Filters to Chart

Hello,

I am trying to add date filters to one of my charts (show all data from x date forward) in addition to a filter where a specific column, rescheduled_booking_id is empty. I have a table where I can put these filters on, but when I set the data in mychart to be table1.data, it comes through as the unfiltered data. I can filter the query and then set mychart to be query1.data, but I know this isn't an elegant solution because I have multiple charts I want to make and would therefore need multiple queries. How should I best write code to handle multiple chart filters? Thanks.

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!

1 Like