How do I Chart only the data currently visible in the table, including pagination, filters and sorting?


I would like my Chart to reflect the data that is currently visible in the table underneath it. I have found how to do pagination with paginationOffset and pageSize. I have found how to handle filters with displayedData. I can see the sort order with sortedColumn and sortedDesc, but I have not found any way to apply that to the dataset taking into consideration filters and pagination. I have tried to manually sort with the JS .sort function but the resulting data does not always match the data in the table, I assume due to tie breaking.

Could you please point me in the right direction here? If what I am doing is better done with the upcoming new table component then I am happy to switch to that as my application is still under development, but I will need to be given access to it.

Thank you!

Hey @ffaubert!

Being able to easily access displayed data is something the dev team is working on but there currently isn't a timetable and they're considering a number of different implementations based on people's requests.

It may also be possible to build out a better workaround with the new table's API, especially as more features get added to it, but for the moment the best I know of is to use a manual JS sort. What discrepancies were you seeing when you tried to do so?

A similar question of being able to access sorted data in a filtered table came up here.