MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / createDataSelectAction

Function createDataSelectAction

libs/echarts/echarts-en.simple.js:43741–43776  ·  view source on GitHub ↗
(seriesType, actionInfos)

Source from the content-addressed store, hash-verified

43739*/
43740
43741var createDataSelectAction = function (seriesType, actionInfos) {
43742 each$1(actionInfos, function (actionInfo) {
43743 actionInfo.update = 'updateView';
43744 /**
43745 * @payload
43746 * @property {string} seriesName
43747 * @property {string} name
43748 */
43749 registerAction(actionInfo, function (payload, ecModel) {
43750 var selected = {};
43751 ecModel.eachComponent(
43752 {mainType: 'series', subType: seriesType, query: payload},
43753 function (seriesModel) {
43754 if (seriesModel[actionInfo.method]) {
43755 seriesModel[actionInfo.method](
43756 payload.name,
43757 payload.dataIndex
43758 );
43759 }
43760 var data = seriesModel.getData();
43761 // Create selected map
43762 data.each(function (idx) {
43763 var name = data.getName(idx);
43764 selected[name] = seriesModel.isSelected(name)
43765 || false;
43766 });
43767 }
43768 );
43769 return {
43770 name: payload.name,
43771 selected: selected,
43772 seriesId: payload.seriesId
43773 };
43774 });
43775 });
43776};
43777
43778/*
43779* Licensed to the Apache Software Foundation (ASF) under one

Callers 1

Calls 3

each$1Function · 0.70
registerActionFunction · 0.70
getDataMethod · 0.45

Tested by

no test coverage detected