MCPcopy
hub / github.com/apache/echarts / clone

Method clone

src/data/Graph.ts:301–313  ·  view source on GitHub ↗

* @return {module:echarts/data/Graph}

()

Source from the content-addressed store, hash-verified

299 * @return {module:echarts/data/Graph}
300 */
301 clone() {
302 const graph = new Graph(this._directed);
303 const nodes = this.nodes;
304 const edges = this.edges;
305 for (let i = 0; i < nodes.length; i++) {
306 graph.addNode(nodes[i].id, nodes[i].dataIndex);
307 }
308 for (let i = 0; i < edges.length; i++) {
309 const e = edges[i];
310 graph.addEdge(e.node1.id, e.node2.id, e.dataIndex);
311 }
312 return graph;
313 };
314
315
316}

Callers 15

jquery.min.jsFile · 0.45
_renderOnGeoMethod · 0.45
_updateGroupTransformMethod · 0.45
adjustEdgeFunction · 0.45
forceLayoutFunction · 0.45
simpleLayoutEdgeFunction · 0.45
circularLayoutFunction · 0.45
renderMethod · 0.45
manuallyShowTipMethod · 0.45
_updatePositionMethod · 0.45
layoutInnerMethod · 0.45
_positionMethod · 0.45

Calls 2

addNodeMethod · 0.95
addEdgeMethod · 0.95

Tested by

no test coverage detected