admin 管理员组文章数量: 1086019
First of all, I have no idea of Javascript's capability on this. But would like to know if it is possible:
- To read from a text file and display a very large table (a couple dozens of columns and a few hundred thousands of rows), in sections;
- Not all columns will displayed in the same time. columns are in groups. a group of columns needs to toggle between hidden or show;
- rows can be filtered based on certain columns.
The reason to do this is to make a report that displays data analysis results and also provides basic filter, sorting functions for the user. They most likely to have some sort of web browser. So HTML would be an ideal format.
Is it possible with Javascript?
Thanks!
First of all, I have no idea of Javascript's capability on this. But would like to know if it is possible:
- To read from a text file and display a very large table (a couple dozens of columns and a few hundred thousands of rows), in sections;
- Not all columns will displayed in the same time. columns are in groups. a group of columns needs to toggle between hidden or show;
- rows can be filtered based on certain columns.
The reason to do this is to make a report that displays data analysis results and also provides basic filter, sorting functions for the user. They most likely to have some sort of web browser. So HTML would be an ideal format.
Is it possible with Javascript?
Thanks!
Share Improve this question edited Sep 22, 2017 at 17:44 CommunityBot 11 silver badge asked Sep 21, 2012 at 14:52 xyliu00xyliu00 7461 gold badge9 silver badges25 bronze badges 2- HTML5 provides the File API which can be used to read local files through drag-and-drop. Can't say anything specific about the filter/render performance, but DOM manipulation on that scale is not likely to be very fast. – user1233508 Commented Sep 21, 2012 at 14:57
- Javascript can do this, yes. It should be mentioned that some browsers cough IE cough are known to get extremely slow with more than a 100 table rows or so. – Jeremy J Starcher Commented Sep 21, 2012 at 15:24
3 Answers
Reset to default 4You might be able to do this by using a grid plugin. For example, have at look at the answers to this question: JavaScript data grid for millions of rows
I would remend a javascript table library such as DataTables. It includes sorting, filtering and pagination options.
Also it has functionality to hand off all the paging, filtering, sorting etc. that DataTables does to a server. The javascript lib DataTables then is just an events and display module. In this case, any number of rows can be handled.
So you would have all the functionality you need, with the ajax-y quick performance of the data loaded in javascript with the scale to handle any number of rows.
Server-side data processing with DataTables
Absolutely yes. Ext.JS shows how to do this very effectively. When done correctly, it is a performance optimization that reduces round trips to server. And improves UX responsiveness.
ExtJS Rich Grid Example. (there are many)
ExtJS Examples. (look at grid section)
Hope that helps.
本文标签: sortingCan javascript sort filter and render a very large tableStack Overflow
版权声明:本文标题:sorting - Can javascript sort, filter, and render a very large table? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1743846206a2489717.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论