0

I'm new to d3 and JSON, but have managed to get hierarchical data from MySQL into JSON and into one of Mike Bostock's fantastic collapsible force networks. I want to check which branches are collapsed and then write the results back to MySQL effectively making the user selections persistent data by using the collapsed branches to trim the hidden child nodes. I can find which branches are visible, but then don't know how to proceed. I presume I post data pairs back to an asp script to update the database, but am stumped at this point. Can anyone give me pointers how to go about this, I.e. which route to research.

So far: Asp opens MySQL connection and writes JSON into a file (will make this dynamic later) D3 opens JSON, displays collapsible force network. User collapses network to desired results D3 iterates visible nodes and posts to asp page on button press (stuck on this) Asp page updates MySQL (I hope should be easy if data is actually sent.)

I'm hoping to make the visualisation an easy to see and use editor, but I am reluctant to learn Ajax or other technologies unless I have hope they might do the trick

4

1 回答 1

0

Looks like serialisation is the answer, so now practising getting data in and out of mysql and to and back from json arrays.

于 2013-08-10T09:51:34.463 回答