dc datatable without grouping the rows

僤鯓⒐⒋嵵緔 提交于 2019-12-05 04:25:28

It doesn't look like there is currently a way to do this. Sounds like a reasonable request! You might submit an enhancement request, or even better, a PR.

Here is the relevant code, in renderGroups:

https://github.com/dc-js/dc.js/blob/master/src/data-table.js#L121

It is nesting the data by key and then adding a table row for each group. It would be trivial to disable this, but the problem is that later, renderRows selects those "group rows" in order to add data under them:

https://github.com/dc-js/dc.js/blob/master/src/data-table.js#L156

EDIT: it's an option, .showGroups(), as of 2.0 beta 16

A simple workaround:

You can override the corresponding css class to avoid display of that row, by using:

<style>
  .dc-table-group{display:none}
</style>

in your html.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!