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

Function SimpleOptionPlayer

test/lib/ecSimpleOptionPlayer.js:36–57  ·  view source on GitHub ↗
(opt)

Source from the content-addressed store, hash-verified

34 }
35 var SimpleOptionPlayer = (function () {
36 function SimpleOptionPlayer(opt) {
37 assert(opt.chart
38 && isObject(opt.dataMeta)
39 && isArray(opt.optionList)
40 && opt.seriesIndex != null
41 && opt.optionList.length);
42 this._chart = opt.chart;
43 this._dataMeta = opt.dataMeta;
44 var optionList = this._optionList = opt.optionList;
45 var optionMap = this._optionMap = {};
46 this._replaceMerge = opt.replaceMerge;
47 this._seriesIndex = opt.seriesIndex;
48 this._currOptionIdx = null;
49 for (var i = 0; i < optionList.length; i++) {
50 var optionWrap = optionList[i];
51 var optionKey = optionWrap.key;
52 if (optionKey != null) {
53 assert(!hasOwn(optionMap, optionKey), 'option key duplicat: ' + optionKey);
54 optionMap[optionKey] = i;
55 }
56 }
57 }
58 SimpleOptionPlayer.prototype.next = function () {
59 var optionList = this._optionList;
60 var newOptionIdx = this._currOptionIdx == null

Callers

nothing calls this directly

Calls 4

isArrayFunction · 0.85
assertFunction · 0.70
isObjectFunction · 0.70
hasOwnFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…