(dom, // Theme name or themeOption.
theme, opts)
| 29409 | __extends(ECharts, _super); |
| 29410 | |
| 29411 | function ECharts(dom, // Theme name or themeOption. |
| 29412 | theme, opts) { |
| 29413 | var _this = _super.call(this, new ECEventProcessor()) || this; |
| 29414 | |
| 29415 | _this._chartsViews = []; |
| 29416 | _this._chartsMap = {}; |
| 29417 | _this._componentsViews = []; |
| 29418 | _this._componentsMap = {}; // Can't dispatch action during rendering procedure |
| 29419 | |
| 29420 | _this._pendingActions = []; |
| 29421 | opts = opts || {}; // Get theme by name |
| 29422 | |
| 29423 | if (typeof theme === 'string') { |
| 29424 | theme = themeStorage[theme]; |
| 29425 | } |
| 29426 | |
| 29427 | _this._dom = dom; |
| 29428 | var defaultRenderer = 'canvas'; |
| 29429 | var defaultUseDirtyRect = false; |
| 29430 | |
| 29431 | if ("development" !== 'production') { |
| 29432 | var root = |
| 29433 | /* eslint-disable-next-line */ |
| 29434 | hasWindow ? window : global; |
| 29435 | defaultRenderer = root.__ECHARTS__DEFAULT__RENDERER__ || defaultRenderer; |
| 29436 | var devUseDirtyRect = root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__; |
| 29437 | defaultUseDirtyRect = devUseDirtyRect == null ? defaultUseDirtyRect : devUseDirtyRect; |
| 29438 | } |
| 29439 | |
| 29440 | var zr = _this._zr = init(dom, { |
| 29441 | renderer: opts.renderer || defaultRenderer, |
| 29442 | devicePixelRatio: opts.devicePixelRatio, |
| 29443 | width: opts.width, |
| 29444 | height: opts.height, |
| 29445 | useDirtyRect: opts.useDirtyRect == null ? defaultUseDirtyRect : opts.useDirtyRect |
| 29446 | }); // Expect 60 fps. |
| 29447 | |
| 29448 | _this._throttledZrFlush = throttle(bind(zr.flush, zr), 17); |
| 29449 | theme = clone(theme); |
| 29450 | theme && globalBackwardCompat(theme, true); |
| 29451 | _this._theme = theme; |
| 29452 | _this._locale = createLocaleObject(opts.locale || SYSTEM_LANG); |
| 29453 | _this._coordSysMgr = new CoordinateSystemManager(); |
| 29454 | var api = _this._api = createExtensionAPI(_this); // Sort on demand |
| 29455 | |
| 29456 | function prioritySortFunc(a, b) { |
| 29457 | return a.__prio - b.__prio; |
| 29458 | } |
| 29459 | |
| 29460 | sort(visualFuncs, prioritySortFunc); |
| 29461 | sort(dataProcessorFuncs, prioritySortFunc); |
| 29462 | _this._scheduler = new Scheduler(_this, api, dataProcessorFuncs, visualFuncs); |
| 29463 | _this._messageCenter = new MessageCenter(); |
| 29464 | _this._labelManager = new LabelManager(); // Init mouse events |
| 29465 | |
| 29466 | _this._initEvents(); // In case some people write `window.onresize = chart.resize` |
| 29467 | |
| 29468 |
nothing calls this directly
no test coverage detected
searching dependent graphs…