Yields a string of Javascript code that loads the nodes and edges into variable g, which is a Javascript Graph object (see graph.js). This can be the response of an XMLHttpRequest, after wich you move g into your own variable.
(self)
| 1199 | |
| 1200 | @property |
| 1201 | def data(self): |
| 1202 | """ Yields a string of Javascript code that loads the nodes and edges into variable g, |
| 1203 | which is a Javascript Graph object (see graph.js). |
| 1204 | This can be the response of an XMLHttpRequest, after wich you move g into your own variable. |
| 1205 | """ |
| 1206 | return "".join(self._data()) |
| 1207 | |
| 1208 | def _data(self): |
| 1209 | if self.graph.nodes and isinstance(self.weight, (list, tuple)): |