-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Huge Data Table #101
Comments
Pagination will be nice indeed. Will put it in the backlog. |
How difficult would it be to use a third-party grid (e.g. Datatables, Slickgrid, handsontable) for the data table and still have it respond to the crossfiltering? Naively, I'm assuming that as long as the grid has access to the data object and can re-render its grid as needed, it should work. Is there a gotcha I'm not thinking of? |
This might be possible as long as you take care of the rerender and redraw events. Have your object implement render() and redraw() methods then register it as a dc chart through dc.registerChart(). This way whenever dc renders your function will be invoked. |
Neverfox, were you able to use a third party grid like Datatables ? Currently developing a project for my internship and need to have the functionalities from datatables within my dc.js dashboard. Thank you in advance. |
Nick, Pagination would be very nice indeed and im willing to contribute i found some jquery pagination tool but i don't really know how to implement this in the library. I noticed that the entries shows the ammount of records based on the size.
But is their a way to define a starting position for example:
then it would give all records starting from the beginning to the _size. Also i would like to thank you already for helping me out so much really appreciate it my project is going well :) |
Unfortunately dimension top method in crossfilter does not allow you to set the offset. Have you tried rendering the entire table by setting the size to Infinite and then use something like JQuery datatable to enhance the table. Of course this will only work when your data set is small and you will need to reenhance the table everytime you change the filter if you want the table to be refreshed. |
We may want to address this with at the same time as issue #5 Data Table map interactive sorting. |
First of all thanks for building this fantastic library. I started using dc.js recently for charts in my product that I am currently building at www.sentiks.com. I am trying to get around 3000 rows loaded in the dc.js datatable. However, it slows down the filters. I see there has been a request for enhancement for building a pagination feature. Is there any work in progress which I can use in near future? |
@kafechew is there any demo for currently developing one? |
Well, I subscribed already and clicked the link in the email. Now, how can I see grid? |
For those that are interested, it is possible to piggyback onto the jQuery dataTable plugin here for pagination. On your dc.dataTable object(s), add these callbacks:
to the following functions clears the datatables, and redraws it whenever a filter is applied
Note: by default, dataTables will make a search box, but this will only filter the data in the table, and won't update the other crossfiltered samples, which could confuse users. To restore this behaviour, remove {bFilter: false}. Tada! Free pagination and column sorting of your table :) Note: This is rather hacky, and if your table is larger than a few hundred records it gets very laggy, so caveat emptor. |
"Unfortunately dimension top method in crossfilter does not allow you to set the offset. "
|
How to remove .group from dc.datatable after removing it throws exception. |
@Arpanjainson, I don't think anyone here is suggesting removing the crossfilter group from the chart object. There is code above removing some "group" object from the DOM..? but that's unrelated. |
Porting the Since the dataTable is only is supposed to support basic table support, I think this is almost enough. As noted above, it's still going to be slow if there is lots and lots of data, but there doesn't seem to be a way around it with crossfilter and usually slowness comes from the DOM rather than the data. It might be nice to add basic UI support as well - I'll open a separate issue for that. |
Adding example http://dc-js.github.io/dc.js/examples/table-pagination.html |
Hello,
In case a Data Table contains a lot of data. Would it be possible that it automatically split the data on different pages? Similar like ebay does it with search results:
Page 1 of 20 | < Previous 1 2 3 4 5 6 7 Next > | Items per page 25 | 50 | 100 | 200
Thank you in advance.
The text was updated successfully, but these errors were encountered: