(list: TransitionSeries[])
| 117 | |
| 118 | // flatten all data items from different serieses into one arrary |
| 119 | function 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 | |
| 147 | function fadeInElement(newEl: Element, newSeries: SeriesModel, newIndex: number) { |
no test coverage detected
searching dependent graphs…