(seriesOpt: any)
| 146 | } |
| 147 | |
| 148 | function processSeries(seriesOpt: any) { |
| 149 | if (!isObject(seriesOpt)) { |
| 150 | return; |
| 151 | } |
| 152 | |
| 153 | compatEC2ItemStyle(seriesOpt); |
| 154 | removeEC3NormalStatus(seriesOpt); |
| 155 | |
| 156 | compatTextStyle(seriesOpt, 'label'); |
| 157 | // treemap |
| 158 | compatTextStyle(seriesOpt, 'upperLabel'); |
| 159 | // graph |
| 160 | compatTextStyle(seriesOpt, 'edgeLabel'); |
| 161 | if (seriesOpt.emphasis) { |
| 162 | compatTextStyle(seriesOpt.emphasis, 'label'); |
| 163 | // treemap |
| 164 | compatTextStyle(seriesOpt.emphasis, 'upperLabel'); |
| 165 | // graph |
| 166 | compatTextStyle(seriesOpt.emphasis, 'edgeLabel'); |
| 167 | } |
| 168 | |
| 169 | let markPoint = seriesOpt.markPoint; |
| 170 | if (markPoint) { |
| 171 | compatEC2ItemStyle(markPoint); |
| 172 | compatEC3CommonStyles(markPoint); |
| 173 | } |
| 174 | |
| 175 | let markLine = seriesOpt.markLine; |
| 176 | if (markLine) { |
| 177 | compatEC2ItemStyle(markLine); |
| 178 | compatEC3CommonStyles(markLine); |
| 179 | } |
| 180 | |
| 181 | const markArea = seriesOpt.markArea; |
| 182 | if (markArea) { |
| 183 | compatEC3CommonStyles(markArea); |
| 184 | } |
| 185 | |
| 186 | let data = seriesOpt.data; |
| 187 | |
| 188 | // Break with ec3: if `setOption` again, there may be no `type` in option, |
| 189 | // then the backward compat based on option type will not be performed. |
| 190 | |
| 191 | if (seriesOpt.type === 'graph') { |
| 192 | data = data || seriesOpt.nodes; |
| 193 | const edgeData = seriesOpt.links || seriesOpt.edges; |
| 194 | if (edgeData && !zrUtil.isTypedArray(edgeData)) { |
| 195 | for (let i = 0; i < edgeData.length; i++) { |
| 196 | compatEC3CommonStyles(edgeData[i]); |
| 197 | } |
| 198 | } |
| 199 | zrUtil.each(seriesOpt.categories, function (opt) { |
| 200 | removeEC3NormalStatus(opt); |
| 201 | }); |
| 202 | } |
| 203 | |
| 204 | if (data && !zrUtil.isTypedArray(data)) { |
| 205 | for (let i = 0; i < data.length; i++) { |
no test coverage detected
searching dependent graphs…