D3 data table query

别等时光非礼了梦想. 提交于 2019-12-04 05:20:37

问题


I want to create an expandable table. Suppose I have following records in table:

Sr.No   Type
1   Planets
1.1 Mercury
1.2 Earth
1.3 Venus
2   Colors
2.1 Yellow
2.2 Green

Default view should be :
Sr.No   Type
1       Planets
2       Colors

and when one clicks on Planet row, it should expand as:

Sr.No   Type
1   Planets
1.1 Mercury
1.2 Earth
1.3 Venus
2   Colors

and on clicking once again it should rollback to original state.

Kindly guide me or point me to some reference. Also,if this is not possible, is there anything close to this possible in d3. Thanks.

来源:https://stackoverflow.com/questions/23831411/d3-data-table-query

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