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

Function wrapTreePathInfo

src/chart/helper/treeHelper.ts:73–89  ·  view source on GitHub ↗
(node: TreeNode, seriesModel: SeriesModel)

Source from the content-addressed store, hash-verified

71
72// From root to the input node (the input node will be included).
73export function wrapTreePathInfo<T = unknown>(node: TreeNode, seriesModel: SeriesModel) {
74 const treePathInfo = [];
75
76 while (node) {
77 const nodeDataIndex = node.dataIndex;
78 treePathInfo.push({
79 name: node.name,
80 dataIndex: nodeDataIndex,
81 value: seriesModel.getRawValue(nodeDataIndex) as T
82 });
83 node = node.parentNode;
84 }
85
86 treePathInfo.reverse();
87
88 return treePathInfo;
89}

Callers 4

getDataParamsMethod · 0.90
getDataParamsMethod · 0.90
packEventDataFunction · 0.90
getDataParamsMethod · 0.90

Calls 1

getRawValueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…