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

Function mapDataStatistic

src/chart/map/mapDataStatistic.ts:72–94  ·  view source on GitHub ↗
(ecModel: GlobalModel)

Source from the content-addressed store, hash-verified

70export const mapDataStatisticStageHandler = createSimpleOverallStageHandler(SERIES_TYPE_MAP, mapDataStatistic);
71
72function mapDataStatistic(ecModel: GlobalModel): void {
73 zrUtil.each(buildAllMapSeriesGroups(ecModel), function (seriesGroup) {
74 const mainSeries = getMainMapSeries(seriesGroup);
75 if (!mainSeries) {
76 return;
77 }
78 const data = dataStatistics(
79 zrUtil.map(seriesGroup.f, function (seriesModel) {
80 return seriesModel.getData();
81 }),
82 // PENDING: It has long been using `seriesGroup[0]` here, but if the first map series
83 // is filtered out by legend, `seriesGroup[0]` is the second series in ec option, therefore,
84 // this definition is not reasonable enough for users.
85 mainSeries.get('mapValueCalculation')
86 );
87
88 zrUtil.each(seriesGroup.f, function (series) {
89 series.seriesGroup = seriesGroup;
90 series.originalData = series.getData();
91 series.setData(data.cloneShallow());
92 });
93 });
94}

Callers

nothing calls this directly

Calls 9

buildAllMapSeriesGroupsFunction · 0.90
getMainMapSeriesFunction · 0.90
dataStatisticsFunction · 0.85
setDataMethod · 0.80
getDataMethod · 0.65
eachMethod · 0.45
mapMethod · 0.45
getMethod · 0.45
cloneShallowMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…