MCPcopy
hub / github.com/tdewolff/minify / processSeries

Function processSeries

_benchmarks/sample_echarts.js:19218–19324  ·  view source on GitHub ↗
(seriesOpt)

Source from the content-addressed store, hash-verified

19216 }
19217
19218 function processSeries(seriesOpt) {
19219 if (!isObject$1(seriesOpt)) {
19220 return;
19221 }
19222
19223 compatEC2ItemStyle(seriesOpt);
19224 removeEC3NormalStatus(seriesOpt);
19225 compatTextStyle(seriesOpt, 'label'); // treemap
19226
19227 compatTextStyle(seriesOpt, 'upperLabel'); // graph
19228
19229 compatTextStyle(seriesOpt, 'edgeLabel');
19230
19231 if (seriesOpt.emphasis) {
19232 compatTextStyle(seriesOpt.emphasis, 'label'); // treemap
19233
19234 compatTextStyle(seriesOpt.emphasis, 'upperLabel'); // graph
19235
19236 compatTextStyle(seriesOpt.emphasis, 'edgeLabel');
19237 }
19238
19239 var markPoint = seriesOpt.markPoint;
19240
19241 if (markPoint) {
19242 compatEC2ItemStyle(markPoint);
19243 compatEC3CommonStyles(markPoint);
19244 }
19245
19246 var markLine = seriesOpt.markLine;
19247
19248 if (markLine) {
19249 compatEC2ItemStyle(markLine);
19250 compatEC3CommonStyles(markLine);
19251 }
19252
19253 var markArea = seriesOpt.markArea;
19254
19255 if (markArea) {
19256 compatEC3CommonStyles(markArea);
19257 }
19258
19259 var data = seriesOpt.data; // Break with ec3: if `setOption` again, there may be no `type` in option,
19260 // then the backward compat based on option type will not be performed.
19261
19262 if (seriesOpt.type === 'graph') {
19263 data = data || seriesOpt.nodes;
19264 var edgeData = seriesOpt.links || seriesOpt.edges;
19265
19266 if (edgeData && !isTypedArray(edgeData)) {
19267 for (var i = 0; i < edgeData.length; i++) {
19268 compatEC3CommonStyles(edgeData[i]);
19269 }
19270 }
19271
19272 each(seriesOpt.categories, function (opt) {
19273 removeEC3NormalStatus(opt);
19274 });
19275 }

Callers 1

globalCompatStyleFunction · 0.85

Calls 8

compatEC2ItemStyleFunction · 0.85
removeEC3NormalStatusFunction · 0.85
compatTextStyleFunction · 0.85
compatEC3CommonStylesFunction · 0.85
isTypedArrayFunction · 0.85
convertNormalEmphasisFunction · 0.85
eachFunction · 0.70
isArrayFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…