Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Downsampling config options #305

Open
fredguth opened this issue Jul 17, 2024 · 3 comments
Open

[question] Downsampling config options #305

fredguth opened this issue Jul 17, 2024 · 3 comments

Comments

@fredguth
Copy link

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?

@fredguth
Copy link
Author

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

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

@mwouts
Copy link
Owner

mwouts commented Jul 20, 2024

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.

@fredguth
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants