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

Function flattenDataDiffItems

src/animation/universalTransition.ts:119–144  ·  view source on GitHub ↗
(list: TransitionSeries[])

Source from the content-addressed store, hash-verified

117
118// flatten all data items from different serieses into one arrary
119function flattenDataDiffItems(list: TransitionSeries[]) {
120 const items: DiffItem[] = [];
121
122 each(list, seriesInfo => {
123 const data = seriesInfo.data;
124 const dataGroupId = seriesInfo.dataGroupId;
125 if (data.count() > DATA_COUNT_THRESHOLD) {
126 if (__DEV__) {
127 warn('Universal transition is disabled on large data > 10k.');
128 }
129 return;
130 }
131 const indices = data.getIndices();
132 for (let dataIndex = 0; dataIndex < indices.length; dataIndex++) {
133 items.push({
134 data,
135 groupId: getGroupId(data, dataIndex, dataGroupId, false), // either of groupId or childGroupId will be used as diffItem's key,
136 childGroupId: getGroupId(data, dataIndex, dataGroupId, true), // depending on the transition direction (see below)
137 divide: seriesInfo.divide,
138 dataIndex
139 });
140 }
141 });
142
143 return items;
144}
145
146
147function fadeInElement(newEl: Element, newSeries: SeriesModel, newIndex: number) {

Callers 1

transitionBetweenFunction · 0.85

Calls 5

warnFunction · 0.90
getGroupIdFunction · 0.85
countMethod · 0.65
eachFunction · 0.50
getIndicesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…