| 25 | |
| 26 | |
| 27 | export function simpleLayout(seriesModel: GraphSeriesModel) { |
| 28 | const coordSys = seriesModel.coordinateSystem; |
| 29 | if (coordSys && coordSys.type !== 'view') { |
| 30 | return; |
| 31 | } |
| 32 | const graph = seriesModel.getGraph(); |
| 33 | |
| 34 | graph.eachNode(function (node) { |
| 35 | const model = node.getModel<GraphNodeItemOption>(); |
| 36 | node.setLayout([+model.get('x'), +model.get('y')]); |
| 37 | }); |
| 38 | |
| 39 | simpleLayoutEdge(graph, seriesModel); |
| 40 | } |
| 41 | |
| 42 | export function simpleLayoutEdge(graph: Graph, seriesModel: GraphSeriesModel) { |
| 43 | graph.eachEdge(function (edge, index) { |