mwouts/itables

[question] Downsampling config options

fredguth opened this issue · 3 comments

I have a working example with shiny using 1M rows: https://github.com/fredguth/shinyduck/blob/main/express-itables-mwe.py
It works.

The only problem is that it shows that it is downsampling..... I wish it was smart enough to downsample and keep downloading while the user hasn't changed the query. Besides, I wanted the number of rows of the table be the full table size.... and the downsampling be less "verbose".

I couldn't find anything about downsampling in the jquery library. I did find some interesting "defer" utility that I don't know how to use in itables. How can I customize the message from downsampling options? Can I should the actual millions of rows even if the component is downsampling? should I?

BTW, is it possible to change this warning message via options?

            link,
            org_rows,
            org_columns,
            len(df),
            len(df.columns),
            " and ".join(reasons),
        )```

Hi @fredguth , you can deactivate the downsampling by setting e.g. maxBytes=0, see the documentation, but then if you display very large tables your web page might become unresponsive.

You're correct, the downsampling part is taken care of by ITables, it's not a feature of DataTables.

I want to keep the downsampling ... just need a way to also change its ui.
My idea is to pretending I am showing a 3M row table.. but actually only taking the 500 rows each time.. .if the user click in next or last page, it will probably be among the rows already downloaded... if she chooses a page far from current position, it will take some time loading, but not much, as it will load only 500 rows.

I was wondering if there was already an example of such implementation. I am using ITable inside a shinelive app that embeds duckdb wasm.