MCPcopy Index your code
hub / github.com/apache/echarts / installTreeAction

Function installTreeAction

src/chart/tree/treeAction.ts:29–47  ·  view source on GitHub ↗
(registers: EChartsExtensionInstallRegisters)

Source from the content-addressed store, hash-verified

27}
28
29export function installTreeAction(registers: EChartsExtensionInstallRegisters) {
30 registers.registerAction({
31 type: 'treeExpandAndCollapse',
32 event: 'treeExpandAndCollapse',
33 update: 'update'
34 }, function (payload: TreeExpandAndCollapsePayload, ecModel) {
35 ecModel.eachComponent({
36 mainType: COMPONENT_MAIN_TYPE_SERIES, subType: SERIES_TYPE_TREE, query: payload
37 }, function (seriesModel: TreeSeriesModel) {
38 const dataIndex = payload.dataIndex;
39 const tree = seriesModel.getData().tree;
40 const node = tree.getNodeByDataIndex(dataIndex);
41 node.isExpand = !node.isExpand;
42 });
43 });
44
45 registerRoamActionSimply(registers, COMPONENT_MAIN_TYPE_SERIES, SERIES_TYPE_TREE);
46
47}

Callers 1

installFunction · 0.90

Calls 4

registerRoamActionSimplyFunction · 0.90
eachComponentMethod · 0.80
getNodeByDataIndexMethod · 0.80
getDataMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…