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

Function processSeries

src/preprocessor/helper/compatStyle.ts:148–249  ·  view source on GitHub ↗
(seriesOpt: any)

Source from the content-addressed store, hash-verified

146}
147
148function 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++) {

Callers 1

globalCompatStyleFunction · 0.85

Calls 7

compatEC2ItemStyleFunction · 0.85
removeEC3NormalStatusFunction · 0.85
compatTextStyleFunction · 0.85
compatEC3CommonStylesFunction · 0.85
convertNormalEmphasisFunction · 0.85
isObjectFunction · 0.50
eachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…