问题
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