Skip to Main Content

Demo Data

Your Data

We use here the graph API to set the data with two dynamic actions for the button clicks - the graph function
is set up by the plugin with this naming convention: d3_force_YOUR_REGION_STATIC_ID - in our case the region
static ID is emp. For more infos see the getting started section in the API reference.

// get data
$s('P13_DATA',JSON.stringify(d3_force_emp.data(),null,2));

// set data
d3_force_emp.start($v('P13_DATA'));

Input data to the graph function can be a JSON object, a JSON string or a XML string.
JSON and XML parsing is done automatically by the graph function. Since we use here
a textarea and I don't know what type of data you will paste I simply put the textstring
to the graph function. Also see the API reference for the differences between the start,
render and resume function or for a JSON or XML notation example.

Please note that the data() function is getting all data from the currently running graph and some
attributes are calculated by the graph and you don't have to set it by yourself. As an example: The radius
is calculated with the SIZEVALUE attribute between the given min and max configuration option values -
see also the node and link attributes in the API reference.