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

Function simpleLayout

src/chart/graph/simpleLayoutHelper.ts:27–40  ·  view source on GitHub ↗
(seriesModel: GraphSeriesModel)

Source from the content-addressed store, hash-verified

25
26
27export 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
42export function simpleLayoutEdge(graph: Graph, seriesModel: GraphSeriesModel) {
43 graph.eachEdge(function (edge, index) {

Callers 2

graphForceLayoutFunction · 0.90
graphSimpleLayoutFunction · 0.90

Calls 6

simpleLayoutEdgeFunction · 0.85
setLayoutMethod · 0.65
getGraphMethod · 0.45
eachNodeMethod · 0.45
getModelMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…