diff --git a/dist/echarts.common.js b/dist/echarts.common.js index 9213ac4d01..f973c4f664 100644 --- a/dist/echarts.common.js +++ b/dist/echarts.common.js @@ -63,19 +63,19 @@ return /******/ (function(modules) { // webpackBootstrap __webpack_require__(132); __webpack_require__(137); __webpack_require__(146); - __webpack_require__(275); - __webpack_require__(269); + __webpack_require__(278); + __webpack_require__(272); __webpack_require__(111); - __webpack_require__(293); + __webpack_require__(314); - __webpack_require__(324); - __webpack_require__(330); - __webpack_require__(333); - __webpack_require__(294); - __webpack_require__(345); + __webpack_require__(343); + __webpack_require__(349); + __webpack_require__(352); + __webpack_require__(315); + __webpack_require__(364); - __webpack_require__(360); + __webpack_require__(377); /***/ }, /* 1 */ @@ -148,10 +148,7 @@ return /******/ (function(modules) { // webpackBootstrap // This flag is used to carry out this rule. // All events will be triggered out side main process (i.e. when !this[IN_MAIN_PROCESS]). var IN_MAIN_PROCESS = '__flag_in_main_process'; - // Only final events can be "program triggered", that is, trigger by `setOption`, - // `dispatchAciton` or `resize`. This flag is used to avoid dead lock when calling - // those method in final events listener. - var IN_FINAL_EVENTS = '__flag_in_final_event'; + var HAS_GRADIENT_OR_PATTERN_BG = '_hasGradientOrPatternBg'; function createRegisterEventWithLowercaseName(method) { return function (eventName, handler, context) { @@ -246,11 +243,6 @@ return /******/ (function(modules) { // webpackBootstrap */ this._coordSysMgr = new CoordinateSystemManager(); - /** - * @type {Array.} - */ - this._finalEvents = []; - Eventful.call(this); /** @@ -265,7 +257,8 @@ return /******/ (function(modules) { // webpackBootstrap // In case some people write `window.onresize = chart.resize` this.resize = zrUtil.bind(this.resize, this); - + // Can't dispatch action during rendering procedure + this._pendingActions = []; // Sort on demand function prioritySortFunc(a, b) { return a.prio - b.prio; @@ -300,9 +293,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.assert(!this[IN_MAIN_PROCESS], '`setOption` should not be called during main process.'); } - this[IN_MAIN_PROCESS] = 1; - - this._finalEvents = []; + this[IN_MAIN_PROCESS] = true; if (!this._model || notMerge) { this._model = new GlobalModel( @@ -314,11 +305,11 @@ return /******/ (function(modules) { // webpackBootstrap updateMethods.prepareAndUpdate.call(this); - !notRefreshImmediately && this._zr.refreshImmediately(); + this[IN_MAIN_PROCESS] = false; - this[IN_MAIN_PROCESS] = 0; + this._flushPendingActions(); - triggerFinalEvents.call(this); + !notRefreshImmediately && this._zr.refreshImmediately(); }; /** @@ -487,6 +478,7 @@ return /******/ (function(modules) { // webpackBootstrap var updateMethods = { + /** * @param {Object} payload * @private @@ -497,6 +489,7 @@ return /******/ (function(modules) { // webpackBootstrap var ecModel = this._model; var api = this._api; var coordSysMgr = this._coordSysMgr; + var zr = this._zr; // update before setOption if (!ecModel) { return; @@ -526,10 +519,10 @@ return /******/ (function(modules) { // webpackBootstrap // Set background var backgroundColor = ecModel.get('backgroundColor') || 'transparent'; - var painter = this._zr.painter; + var painter = zr.painter; // TODO all use clearColor ? if (painter.isSingleCanvas && painter.isSingleCanvas()) { - this._zr.configLayer(0, { + zr.configLayer(0, { clearColor: backgroundColor }); } @@ -542,8 +535,26 @@ return /******/ (function(modules) { // webpackBootstrap backgroundColor = 'transparent'; } } - backgroundColor = backgroundColor; - this._dom.style.backgroundColor = backgroundColor; + if (backgroundColor.colorStops || backgroundColor.image) { + // Gradient background + // FIXME Fixed layer? + zr.configLayer(0, { + clearColor: backgroundColor + }); + this[HAS_GRADIENT_OR_PATTERN_BG] = true; + + this._dom.style.background = 'transparent'; + } + else { + if (this[HAS_GRADIENT_OR_PATTERN_BG]) { + zr.configLayer(0, { + clearColor: null + }); + } + this[HAS_GRADIENT_OR_PATTERN_BG] = false; + + this._dom.style.background = backgroundColor; + } } // console.time && console.timeEnd('update'); @@ -674,9 +685,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.assert(!this[IN_MAIN_PROCESS], '`resize` should not be called during main process.'); } - this[IN_MAIN_PROCESS] = 1; - - this._finalEvents = []; + this[IN_MAIN_PROCESS] = true; this._zr.resize(); @@ -686,9 +695,9 @@ return /******/ (function(modules) { // webpackBootstrap // Resize loading effect this._loadingFX && this._loadingFX.resize(); - this[IN_MAIN_PROCESS] = 0; + this[IN_MAIN_PROCESS] = false; - triggerFinalEvents.call(this); + this._flushPendingActions(); }; var defaultLoadingEffect = __webpack_require__(92); @@ -728,16 +737,6 @@ return /******/ (function(modules) { // webpackBootstrap return payload; }; - function triggerFinalEvents() { - if (!this[IN_FINAL_EVENTS]) { // Avoid dead lock. - this[IN_FINAL_EVENTS] = 1; - each(this._finalEvents, function (eventObj) { - this.trigger(eventObj.type, eventObj); - }, this); - this[IN_FINAL_EVENTS] = 0; - } - } - /** * @pubilc * @param {Object} payload @@ -753,20 +752,22 @@ return /******/ (function(modules) { // webpackBootstrap var actionInfo = actionWrap.actionInfo; var updateMethod = actionInfo.update || 'update'; - if (true) { - zrUtil.assert( - updateMethod === 'none' || !this[IN_MAIN_PROCESS], - '`dispatchAction` should not be called during main process.' - + 'unless updateMathod is "none".' - ); - } + // if (__DEV__) { + // zrUtil.assert( + // !this[IN_MAIN_PROCESS], + // '`dispatchAction` should not be called during main process.' + // + 'unless updateMathod is "none".' + // ); + // } - var isFinalEvent = updateMethod === 'none' && this[IN_MAIN_PROCESS]; - if (!isFinalEvent) { - this[IN_MAIN_PROCESS] = 1; - this._finalEvents = []; + // May dispatchAction in rendering procedure + if (this[IN_MAIN_PROCESS]) { + this._pendingActions.push(payload); + return; } + this[IN_MAIN_PROCESS] = true; + var payloads = [payload]; var batched = false; // Batch action @@ -810,15 +811,19 @@ return /******/ (function(modules) { // webpackBootstrap eventObj = eventObjBatch[0]; } - if (!isFinalEvent) { - this[IN_MAIN_PROCESS] = 0; - if (!silent) { - this._messageCenter.trigger(eventObj.type, eventObj); - triggerFinalEvents.call(this); - } - } - else { - this._finalEvents.push(eventObj); + this[IN_MAIN_PROCESS] = false; + + !silent && this._messageCenter.trigger(eventObj.type, eventObj); + + this._flushPendingActions(); + + }; + + echartsProto._flushPendingActions = function () { + var pendingActions = this._pendingActions; + while (pendingActions.length) { + var payload = pendingActions.shift(); + this.dispatchAction(payload); } }; @@ -851,8 +856,12 @@ return /******/ (function(modules) { // webpackBootstrap chart[methodName](seriesModel, ecModel, api, payload); updateZ(seriesModel, chart); + + updateProgressiveAndBlend(seriesModel, chart); }, this); + // If use hover layer + updateHoverLayerStatus(this._zr, ecModel); } /** @@ -1001,7 +1010,6 @@ return /******/ (function(modules) { // webpackBootstrap chart.__alive = false; }, this); - var elCountAll = 0; // Render all charts ecModel.eachSeries(function (seriesModel, idx) { var chartView = this._chartsMap[seriesModel.__viewId]; @@ -1012,39 +1020,13 @@ return /******/ (function(modules) { // webpackBootstrap updateZ(seriesModel, chartView); - // Progressive configuration - var elCount = 0; - chartView.group.traverse(function (el) { - if (el.type !== 'group' && !el.ignore) { - elCount++; - } - }); - elCountAll += elCount; - - var frameDrawNum = +seriesModel.get('progressive'); - var needProgressive = elCount > seriesModel.get('progressiveThreshold') && frameDrawNum && !env.node; - if (needProgressive) { - chartView.group.traverse(function (el) { - // FIXME marker and other components - if (el.type !== 'group') { - el.progressive = needProgressive ? - Math.floor(elCount++ / frameDrawNum) : -1; - if (needProgressive) { - el.stopAnimation(true); - } - } - }); - } + updateProgressiveAndBlend(seriesModel, chartView); + }, this); // If use hover layer - if (elCountAll > ecModel.get('hoverLayerThreshold') && !env.node) { - this._zr.storage.traverse(function (el) { - if (el.type !== 'group') { - el.useHoverLayer = true; - } - }); - } + updateHoverLayerStatus(this._zr, ecModel); + // Remove groups of unrendered charts each(this._chartsViews, function (chart) { if (!chart.__alive) { @@ -1128,10 +1110,67 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.mixin(ECharts, Eventful); + function updateHoverLayerStatus(zr, ecModel) { + var storage = zr.storage; + var elCount = 0; + storage.traverse(function (el) { + if (!el.isGroup) { + elCount++; + } + }); + if (elCount > ecModel.get('hoverLayerThreshold') && !env.node) { + storage.traverse(function (el) { + if (!el.isGroup) { + el.useHoverLayer = true; + } + }); + } + } + /** + * Update chart progressive and blend. + * @param {module:echarts/model/Series|module:echarts/model/Component} model + * @param {module:echarts/view/Component|module:echarts/view/Chart} view + */ + function updateProgressiveAndBlend(seriesModel, chartView) { + // Progressive configuration + var elCount = 0; + chartView.group.traverse(function (el) { + if (el.type !== 'group' && !el.ignore) { + elCount++; + } + }); + var frameDrawNum = +seriesModel.get('progressive'); + var needProgressive = elCount > seriesModel.get('progressiveThreshold') && frameDrawNum && !env.node; + if (needProgressive) { + chartView.group.traverse(function (el) { + // FIXME marker and other components + if (!el.isGroup) { + el.progressive = needProgressive ? + Math.floor(elCount++ / frameDrawNum) : -1; + if (needProgressive) { + el.stopAnimation(true); + } + } + }); + } + + // Blend configration + var blendMode = seriesModel.get('blendMode') || null; + if (true) { + if (!env.canvasSupported && blendMode && blendMode !== 'source-over') { + console.warn('Only canvas support blendMode'); + } + } + chartView.group.traverse(function (el) { + // FIXME marker and other components + if (!el.isGroup) { + el.setStyle('blend', blendMode); + } + }); + } /** * @param {module:echarts/model/Series|module:echarts/model/Component} model * @param {module:echarts/view/Component|module:echarts/view/Chart} view - * @return {string} */ function updateZ(model, view) { var z = model.get('z'); @@ -1195,9 +1234,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * @type {number} */ - version: '3.1.10', + version: '3.2.0', dependencies: { - zrender: '3.1.0' + zrender: '3.1.1' } }; @@ -1507,9 +1546,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.createCanvas = creator; }; - echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, zrUtil.curry( - __webpack_require__(93), '', 'itemStyle' - )); + echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, __webpack_require__(93)); echarts.registerPreprocessor(__webpack_require__(94)); // Default action @@ -2959,6 +2996,7 @@ return /******/ (function(modules) { // webpackBootstrap var formatUtil = __webpack_require__(6); var nubmerUtil = __webpack_require__(7); + var Model = __webpack_require__(8); var zrUtil = __webpack_require__(4); var AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle']; @@ -3150,7 +3188,10 @@ return /******/ (function(modules) { // webpackBootstrap * @param {string|number|Date|Array|Object} dataItem */ modelUtil.isDataItemOption = function (dataItem) { - return zrUtil.isObject(dataItem) && !(dataItem instanceof Array); + return zrUtil.isObject(dataItem) + && !(dataItem instanceof Array); + // // markLine data can be array + // && !(dataItem[0] && zrUtil.isObject(dataItem[0]) && !(dataItem[0] instanceof Array)); }; /** @@ -3176,6 +3217,30 @@ return /******/ (function(modules) { // webpackBootstrap ? NaN : +value; // If string (like '-'), using '+' parse to NaN }; + /** + * Create a model proxy to be used in tooltip for edge data, markLine data, markPoint data. + * @param {module:echarts/data/List} data + * @param {Object} opt + * @param {string} [opt.seriesIndex] + * @param {Object} [opt.name] + * @param {Object} [opt.mainType] + * @param {Object} [opt.subType] + */ + modelUtil.createDataFormatModel = function (data, opt) { + var model = new Model(); + zrUtil.mixin(model, modelUtil.dataFormatMixin); + model.seriesIndex = opt.seriesIndex; + model.name = opt.name || ''; + model.mainType = opt.mainType; + model.subType = opt.subType; + + model.getData = function () { + return data; + }; + return model; + }; + + // PENDING A little ugly modelUtil.dataFormatMixin = { /** * Get params for formatter @@ -3356,6 +3421,33 @@ return /******/ (function(modules) { // webpackBootstrap && (cptOption.id + '').indexOf('\0_ec_\0') === 0; }; + /** + * Truncate text, if overflow. + * If not ASCII, count as tow ASCII length. + * Notice case: truncate('是', 1) => '是', not ''. + * + * @public + * @param {string} str + * @param {number} length Over the length, truncate. + * @param {string} [ellipsis='...'] + * @return {string} Result string. + */ + modelUtil.truncate = function (str, length, ellipsis) { + if (!str) { + return str; + } + + var count = 0; + for(var i = 0, l = str.length; i < l && count < length; i++) { + count += str.charCodeAt(i) > 255 ? 2 : 1; + } + if (i < l) { + str = str.slice(0, i) + (ellipsis || ''); + } + + return str; + }; + /** * A helper for removing duplicate items between batchA and batchB, * and in themselves, and categorize by series. @@ -3403,7 +3495,7 @@ return /******/ (function(modules) { // webpackBootstrap var dataIndices = mapToArray(map[i], true); dataIndices.length && result.push({seriesId: i, dataIndex: dataIndices}); } - }; + } } return result; } @@ -4776,8 +4868,14 @@ return /******/ (function(modules) { // webpackBootstrap */ create: function (x, y) { var out = new ArrayCtor(2); - out[0] = x || 0; - out[1] = y || 0; + if (x == null) { + x = 0; + } + if (y == null) { + y = 0; + } + out[0] = x; + out[1] = y; return out; }, @@ -6054,6 +6152,12 @@ return /******/ (function(modules) { // webpackBootstrap fontStyle: 'normal', fontWeight: 'normal' }, + + // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/ + // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + // Default is source-over + blendMode: null, + animation: true, animationDuration: 1000, animationDurationUpdate: 300, @@ -6061,7 +6165,7 @@ return /******/ (function(modules) { // webpackBootstrap animationEasingUpdate: 'cubicOut', animationThreshold: 2000, - // Progressive configuration + // Configuration for progressive/incremental rendering progressiveThreshold: 3000, progressive: 400, @@ -6114,7 +6218,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var echartsAPIList = [ - 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction', + 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption' ]; @@ -6134,7 +6238,6 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - // var zrUtil = require('zrender/lib/core/util'); var coordinateSystemCreators = {}; function CoordinateSystemManager() { @@ -6328,7 +6431,7 @@ return /******/ (function(modules) { // webpackBootstrap var oldOptionBackup = this._optionBackup; var newParsedOption = parseRawOption.call( - this, rawOption, optionPreprocessorFuncs + this, rawOption, optionPreprocessorFuncs, !oldOptionBackup ); this._newBaseOption = newParsedOption.baseOption; @@ -6448,7 +6551,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - function parseRawOption(rawOption, optionPreprocessorFuncs) { + function parseRawOption(rawOption, optionPreprocessorFuncs, isNew) { var timelineOptions = []; var mediaList = []; var mediaDefault; @@ -6502,7 +6605,7 @@ return /******/ (function(modules) { // webpackBootstrap })), function (option) { each(optionPreprocessorFuncs, function (preProcess) { - preProcess(option); + preProcess(option, isNew); }); } ); @@ -6658,6 +6761,11 @@ return /******/ (function(modules) { // webpackBootstrap // PENDING legendDataProvider: null, + /** + * Access path of color for visual + */ + visualColorAccessPath: 'itemStyle.normal.color', + init: function (option, parentModel, ecModel, extraOpt) { /** @@ -7509,17 +7617,17 @@ return /******/ (function(modules) { // webpackBootstrap */ - var idStart = 0x0907; + var idStart = 0x0907; + + module.exports = function () { + return idStart++; + }; - module.exports = function () { - return 'zr_' + (idStart++); - }; - /***/ }, /* 33 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { /** * 事件扩展 @@ -7530,8 +7638,6 @@ return /******/ (function(modules) { // webpackBootstrap var arrySlice = Array.prototype.slice; - var zrUtil = __webpack_require__(4); - var indexOf = zrUtil.indexOf; /** * 事件分发器 @@ -7564,8 +7670,10 @@ return /******/ (function(modules) { // webpackBootstrap _h[event] = []; } - if (indexOf(_h[event], event) >= 0) { - return this; + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return this; + } } _h[event].push({ @@ -7594,6 +7702,12 @@ return /******/ (function(modules) { // webpackBootstrap _h[event] = []; } + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return this; + } + } + _h[event].push({ h: handler, one: false, @@ -8659,12 +8773,14 @@ return /******/ (function(modules) { // webpackBootstrap var frame; if (percent < lastFramePercent) { // Start from next key + // PENDING start from lastFrame ? start = Math.min(lastFrame + 1, trackLen - 1); for (frame = start; frame >= 0; frame--) { if (kfPercents[frame] <= percent) { break; } } + // PENDING really need to do this ? frame = Math.min(frame, trackLen - 2); } else { @@ -10632,6 +10748,52 @@ return /******/ (function(modules) { // webpackBootstrap : (vertex[1] > 0 ? 'bottom' : 'top'); }; + /** + * Apply group transition animation from g1 to g2 + */ + graphic.groupTransition = function (g1, g2, animatableModel, cb) { + if (!g1 || !g2) { + return; + } + + function getElMap(g) { + var elMap = {}; + g.traverse(function (el) { + if (!el.isGroup && el.anid) { + elMap[el.anid] = el; + } + }); + return elMap; + } + function getAnimatableProps(el) { + var obj = { + position: vector.clone(el.position), + rotation: el.rotation + }; + if (el.shape) { + obj.shape = zrUtil.extend({}, el.shape); + } + return obj; + } + var elMap1 = getElMap(g1); + + g2.traverse(function (el) { + if (!el.isGroup && el.anid) { + var oldEl = elMap1[el.anid]; + if (oldEl) { + var newProp = getAnimatableProps(el); + el.attr(getAnimatableProps(oldEl)); + graphic.updateProps(el, newProp, animatableModel, el.dataIndex); + } + // else { + // if (el.previousProps) { + // graphic.updateProps + // } + // } + } + }); + }; + module.exports = graphic; @@ -11700,6 +11862,45 @@ return /******/ (function(modules) { // webpackBootstrap this.extendFrom(opts); }; + function createLinearGradient(ctx, obj, rect) { + // var size = + var x = obj.x; + var x2 = obj.x2; + var y = obj.y; + var y2 = obj.y2; + + if (!obj.global) { + x = x * rect.width + rect.x; + x2 = x2 * rect.width + rect.x; + y = y * rect.height + rect.y; + y2 = y2 * rect.height + rect.y; + } + + var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); + + return canvasGradient; + } + + function createRadialGradient(ctx, obj, rect) { + var width = rect.width; + var height = rect.height; + var min = Math.min(width, height); + + var x = obj.x; + var y = obj.y; + var r = obj.r; + if (!obj.global) { + x = x * width + rect.x; + y = y * height + rect.y; + r = r * min; + } + + var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); + + return canvasGradient; + } + + Style.prototype = { constructor: Style, @@ -11815,6 +12016,12 @@ return /******/ (function(modules) { // webpackBootstrap */ textShadowOffsetY: 0, + /** + * @type {string} + * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + */ + blend: null, + /** * @param {CanvasRenderingContext2D} ctx */ @@ -11842,6 +12049,10 @@ return /******/ (function(modules) { // webpackBootstrap if ((firstDraw || style.opacity !== prevStyle.opacity)) { ctx.globalAlpha = style.opacity == null ? 1 : style.opacity; } + + if ((firstDraw || style.blend !== prevStyle.blend)) { + ctx.globalCompositeOperation = style.blend || 'source-over'; + } if (this.hasStroke()) { var lineWidth = style.lineWidth; ctx.lineWidth = lineWidth / ( @@ -11902,35 +12113,9 @@ return /******/ (function(modules) { // webpackBootstrap return newStyle; }, - createLinearGradient: function (ctx, obj, rect) { - // var size = - var x = obj.x * rect.width + rect.x; - var x2 = obj.x2 * rect.width + rect.x; - var y = obj.y * rect.height + rect.y; - var y2 = obj.y2 * rect.height + rect.y; - - var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); - - return canvasGradient; - }, - - createRadialGradient: function (ctx, obj, rect) { - var width = rect.width; - var height = rect.height; - var min = Math.min(width, height); - - var x = obj.x * width + rect.x; - var y = obj.y * height + rect.y; - var r = obj.r * min; - - var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); - - return canvasGradient; - }, - getGradient: function (ctx, obj, rect) { - var method = obj.type === 'radial' ? 'createRadialGradient' : 'createLinearGradient'; - var canvasGradient = this[method](ctx, obj, rect); + var method = obj.type === 'radial' ? createRadialGradient : createLinearGradient; + var canvasGradient = method(ctx, obj, rect); var colorStops = obj.colorStops; for (var i = 0; i < colorStops.length; i++) { canvasGradient.addColorStop( @@ -11949,6 +12134,9 @@ return /******/ (function(modules) { // webpackBootstrap } } + // Provide for others + Style.getGradient = styleProto.getGradient; + module.exports = Style; @@ -12520,14 +12708,15 @@ return /******/ (function(modules) { // webpackBootstrap x -= offset * dx; y -= offset * dy; - while ((dx >= 0 && x <= x1) || (dx < 0 && x > x1)) { + while ((dx > 0 && x <= x1) || (dx < 0 && x >= x1) + || (dx == 0 && ((dy > 0 && y <= y1) || (dy < 0 && y >= y1)))) { idx = this._dashIdx; dash = lineDash[idx]; x += dx * dash; y += dy * dash; this._dashIdx = (idx + 1) % nDash; // Skip positive offset - if ((dx > 0 && x < x0) || (dx < 0 && x > x0)) { + if ((dx > 0 && x < x0) || (dx < 0 && x > x0) || (dy > 0 && y < y0) || (dy < 0 && y > y0)) { continue; } ctx[idx % 2 ? 'moveTo' : 'lineTo']( @@ -14496,7 +14685,7 @@ return /******/ (function(modules) { // webpackBootstrap var image; // Must bind each time - style.bind(ctx, prevEl); + style.bind(ctx, this, prevEl); // style.image is a url string if (typeof src === 'string') { @@ -14942,7 +15131,7 @@ return /******/ (function(modules) { // webpackBootstrap text != null && (text += ''); // Always bind style - style.bind(ctx, prevEl); + style.bind(ctx, this, prevEl); if (text) { @@ -15843,8 +16032,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [x2=1] * @param {number} [y2=0] * @param {Array.} colorStops + * @param {boolean} [globalCoord=false] */ - var LinearGradient = function (x, y, x2, y2, colorStops) { + var LinearGradient = function (x, y, x2, y2, colorStops, globalCoord) { this.x = x == null ? 0 : x; this.y = y == null ? 0 : y; @@ -15856,6 +16046,9 @@ return /******/ (function(modules) { // webpackBootstrap // Can be cloned this.type = 'linear'; + // If use global coord + this.global = globalCoord || false; + Gradient.call(this, colorStops); }; @@ -15886,8 +16079,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [y=0.5] * @param {number} [r=0.5] * @param {Array.} [colorStops] + * @param {boolean} [globalCoord=false] */ - var RadialGradient = function (x, y, r, colorStops) { + var RadialGradient = function (x, y, r, colorStops, globalCoord) { this.x = x == null ? 0.5 : x; this.y = y == null ? 0.5 : y; @@ -15897,6 +16091,9 @@ return /******/ (function(modules) { // webpackBootstrap // Can be cloned this.type = 'radial'; + // If use global coord + this.global = globalCoord || false; + Gradient.call(this, colorStops); }; @@ -15944,7 +16141,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * @type {string} */ - zrender.version = '3.1.0'; + zrender.version = '3.1.1'; /** * Initializing a zrender instance @@ -16253,10 +16450,10 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set default cursor - * @param {string} cursorStyle 例如 crosshair + * @param {string} [cursorStyle='default'] 例如 crosshair */ - setDefaultCursorStyle: function (cursorStyle) { - this.handler && this.handler.setDefaultCursorStyle(cursorStyle); + setCursorStyle: function (cursorStyle) { + this.handler && this.handler.setCursorStyle(cursorStyle); }, /** @@ -16398,7 +16595,7 @@ return /******/ (function(modules) { // webpackBootstrap this._hovered = hovered; - this.root.style.cursor = hovered ? hovered.cursor : this._defaultCursorStyle; + this.root.style.cursor = hovered ? hovered.cursor : 'default'; // Mouse out on previous hovered element if (lastHovered && hovered !== lastHovered && lastHovered.__zr) { this._dispatchProxy(lastHovered, 'mouseout', event); @@ -16630,12 +16827,6 @@ return /******/ (function(modules) { // webpackBootstrap */ this._lastY; - /** - * @private - * @type {string} - */ - this._defaultCursorStyle = 'default'; - /** * @private * @type {module:zrender/core/GestureMgr} @@ -16727,10 +16918,10 @@ return /******/ (function(modules) { // webpackBootstrap /** * 设置默认的cursor style - * @param {string} cursorStyle 例如 crosshair + * @param {string} [cursorStyle='default'] 例如 crosshair */ - setDefaultCursorStyle: function (cursorStyle) { - this._defaultCursorStyle = cursorStyle; + setCursorStyle: function (cursorStyle) { + this.root.style.cursor = cursorStyle || 'default'; }, /** @@ -17207,6 +17398,7 @@ return /******/ (function(modules) { // webpackBootstrap // if (a.z2 === b.z2) { // // FIXME Slow has renderidx compare // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement + // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012 // return a.__renderidx - b.__renderidx; // } return a.z2 - b.z2; @@ -18817,6 +19009,15 @@ return /******/ (function(modules) { // webpackBootstrap var el = list[i]; var elZLevel = this._singleCanvas ? 0 : el.zlevel; + var elFrame = el.__frame; + + // Flush at current context + // PENDING + if (elFrame < 0 && currentProgressiveLayer) { + flushProgressiveLayer(currentProgressiveLayer); + currentProgressiveLayer = null; + } + // Change draw layer if (currentZLevel !== elZLevel) { if (ctx) { @@ -18848,8 +19049,6 @@ return /******/ (function(modules) { // webpackBootstrap } } - var elFrame = el.__frame; - if (!(currentLayer.__dirty || paintAll)) { continue; } @@ -18889,10 +19088,6 @@ return /******/ (function(modules) { // webpackBootstrap } } else { - if (currentProgressiveLayer) { - flushProgressiveLayer(currentProgressiveLayer); - currentProgressiveLayer = null; - } this._doPaintEl(el, currentLayer, paintAll, scope); } @@ -19444,6 +19639,8 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(4); var config = __webpack_require__(41); + var Style = __webpack_require__(47); + var Pattern = __webpack_require__(59); function returnFalse() { return false; @@ -19612,7 +19809,7 @@ return /******/ (function(modules) { // webpackBootstrap var width = dom.width; var height = dom.height; - var haveClearColor = this.clearColor; + var clearColor = this.clearColor; var haveMotionBLur = this.motionBlur && !clearAll; var lastFrameAlpha = this.lastFrameAlpha; @@ -19632,9 +19829,26 @@ return /******/ (function(modules) { // webpackBootstrap } ctx.clearRect(0, 0, width / dpr, height / dpr); - if (haveClearColor) { + if (clearColor) { + var clearColorGradientOrPattern; + // Gradient + if (clearColor.colorStops) { + // Cache canvas gradient + clearColorGradientOrPattern = clearColor.__canvasGradient || Style.getGradient(ctx, clearColor, { + x: 0, + y: 0, + width: width / dpr, + height: height / dpr + }); + + clearColor.__canvasGradient = clearColorGradientOrPattern; + } + // Pattern + else if (clearColor.image) { + clearColorGradientOrPattern = Pattern.prototype.getCanvasPattern.call(clearColor, ctx); + } ctx.save(); - ctx.fillStyle = this.clearColor; + ctx.fillStyle = clearColorGradientOrPattern || clearColor; ctx.fillRect(0, 0, width / dpr, height / dpr); ctx.restore(); } @@ -19761,9 +19975,9 @@ return /******/ (function(modules) { // webpackBootstrap var Gradient = __webpack_require__(61); - module.exports = function (seriesType, styleType, ecModel) { + module.exports = function (ecModel) { function encodeColor(seriesModel) { - var colorAccessPath = [styleType, 'normal', 'color']; + var colorAccessPath = (seriesModel.visualColorAccessPath || 'itemStyle.normal.color').split('.'); var data = seriesModel.getData(); var color = seriesModel.get(colorAccessPath) // Set in itemStyle || seriesModel.getColorFromPalette(seriesModel.get('name')); // Default color @@ -19791,8 +20005,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } } - seriesType ? ecModel.eachRawSeriesByType(seriesType, encodeColor) - : ecModel.eachRawSeries(encodeColor); + ecModel.eachRawSeries(encodeColor); }; @@ -20285,13 +20498,15 @@ return /******/ (function(modules) { // webpackBootstrap // Use the name in option and create id for (var i = 0; i < data.length; i++) { - var id = ''; if (!nameList[i]) { - nameList[i] = data[i].name; - // Try using the id in option - id = data[i].id; + if (data[i] && data[i].name != null) { + nameList[i] = data[i].name; + } } var name = nameList[i] || ''; + // Try using the id in option + var id = data[i] && data[i].id; + if (!id && name) { // Use name as id and add counter to avoid same name nameRepeatCount[name] = nameRepeatCount[name] || 0; @@ -20403,6 +20618,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {boolean} stack */ listProto.getDataExtent = function (dim, stack) { + dim = this.getDimension(dim); var dimData = this._storage[dim]; var dimInfo = this.getDimensionInfo(dim); stack = (dimInfo && dimInfo.stackable) && stack; @@ -20494,6 +20710,32 @@ return /******/ (function(modules) { // webpackBootstrap return -1; }; + /** + * Retreive the index with given raw data index + * @param {number} idx + * @param {number} name + * @return {number} + */ + listProto.indexOfRawIndex = function (rawIndex) { + // Indices are ascending + var indices = this.indices; + var left = 0; + var right = indices.length - 1; + while (left <= right) { + var mid = (left + right) / 2 | 0; + if (indices[mid] < rawIndex) { + left = mid + 1; + } + else if (indices[mid] > rawIndex) { + right = mid - 1; + } + else { + return mid; + } + } + return -1; + }; + /** * Retreive the index of nearest value * @param {string} dim @@ -21372,24 +21614,21 @@ return /******/ (function(modules) { // webpackBootstrap var creator = creators[coordSysName]; var registeredCoordSys = CoordinateSystem.get(coordSysName); // FIXME - var result = creator && creator(data, seriesModel, ecModel); - var dimensions = result && result.dimensions; + var axesInfo = creator && creator(data, seriesModel, ecModel); + var dimensions = axesInfo && axesInfo.dimensions; if (!dimensions) { // Get dimensions from registered coordinate system dimensions = (registeredCoordSys && registeredCoordSys.dimensions) || ['x', 'y']; dimensions = completeDimensions(dimensions, data, dimensions.concat(['value'])); } - var categoryAxisModel = result && result.categoryAxisModel; - var categories; - - var categoryDimIndex = dimensions[0].type === 'ordinal' - ? 0 : (dimensions[1].type === 'ordinal' ? 1 : -1); + var categoryIndex = axesInfo ? axesInfo.categoryIndex : -1; var list = new List(dimensions, seriesModel); - var nameList = createNameList(result, data); + var nameList = createNameList(axesInfo, data); - var dimValueGetter = (categoryAxisModel && ifNeedCompleteOrdinalData(data)) + var categories = {}; + var dimValueGetter = (categoryIndex >= 0 && ifNeedCompleteOrdinalData(data)) ? function (itemOpt, dimName, dataIndex, dimIndex) { // If any dataItem is like { value: 10 } if (modelUtil.isDataItemOption(itemOpt)) { @@ -21397,7 +21636,7 @@ return /******/ (function(modules) { // webpackBootstrap } // Use dataIndex as ordinal value in categoryAxis - return dimIndex === categoryDimIndex + return dimIndex === categoryIndex ? dataIndex : converDataValue(getDataItemValue(itemOpt), dimensions[dimIndex]); } @@ -21409,12 +21648,14 @@ return /******/ (function(modules) { // webpackBootstrap list.hasItemOption = true; } - if (categoryDimIndex === dimIndex) { + var categoryAxesModels = axesInfo && axesInfo.categoryAxesModels; + if (categoryAxesModels && categoryAxesModels[dimName]) { // If given value is a category string if (typeof val === 'string') { // Lazy get categories - categories = categories || categoryAxisModel.getCategories(); - val = zrUtil.indexOf(categories, val); + categories[dimName] = categories[dimName] + || categoryAxesModels[dimName].getCategories(); + val = zrUtil.indexOf(categories[dimName], val); if (val < 0 && !isNaN(val)) { // In case some one write '1', '2' istead of 1, 2 val = +val; @@ -21444,7 +21685,6 @@ return /******/ (function(modules) { // webpackBootstrap /** * Creaters for each coord system. - * @return {Object} {dimensions, categoryAxisModel}; */ var creators = { @@ -21479,15 +21719,21 @@ return /******/ (function(modules) { // webpackBootstrap ]; var isXAxisCateogry = xAxisType === 'category'; + var isYAxisCategory = yAxisType === 'category'; completeDimensions(dimensions, data, ['x', 'y', 'z']); + var categoryAxesModels = {}; + if (isXAxisCateogry) { + categoryAxesModels.x = xAxisModel; + } + if (isYAxisCategory) { + categoryAxesModels.y = yAxisModel; + } return { dimensions: dimensions, - categoryIndex: isXAxisCateogry ? 0 : 1, - categoryAxisModel: isXAxisCateogry - ? xAxisModel - : (yAxisType === 'category' ? yAxisModel : null) + categoryIndex: isXAxisCateogry ? 0 : (isYAxisCategory ? 1 : -1), + categoryAxesModels: categoryAxesModels }; }, @@ -21530,15 +21776,21 @@ return /******/ (function(modules) { // webpackBootstrap } ]; var isAngleAxisCateogry = angleAxisType === 'category'; + var isRadiusAxisCateogry = radiusAxisType === 'category'; completeDimensions(dimensions, data, ['radius', 'angle', 'value']); + var categoryAxesModels = {}; + if (isRadiusAxisCateogry) { + categoryAxesModels.radius = radiusAxisModel; + } + if (isAngleAxisCateogry) { + categoryAxesModels.angle = angleAxisModel; + } return { dimensions: dimensions, - categoryIndex: isAngleAxisCateogry ? 1 : 0, - categoryAxisModel: isAngleAxisCateogry - ? angleAxisModel - : (radiusAxisType === 'category' ? radiusAxisModel : null) + categoryIndex: isAngleAxisCateogry ? 1 : (isRadiusAxisCateogry ? 0 : -1), + categoryAxesModels: categoryAxesModels }; }, @@ -21557,9 +21809,15 @@ return /******/ (function(modules) { // webpackBootstrap function createNameList(result, data) { var nameList = []; - if (result && result.categoryAxisModel) { + var categoryDim = result && result.dimensions[result.categoryIndex]; + var categoryAxisModel; + if (categoryDim) { + categoryAxisModel = result.categoryAxesModels[categoryDim.name]; + } + + if (categoryAxisModel) { // FIXME Two category axis - var categories = result.categoryAxisModel.getCategories(); + var categories = categoryAxisModel.getCategories(); if (categories) { var dataLen = data.length; // Ordered data is given explicitly like @@ -21872,6 +22130,93 @@ return /******/ (function(modules) { // webpackBootstrap return stepPoints; } + function clamp(number, extent) { + return Math.max(Math.min(number, extent[1]), extent[0]); + } + + function getVisualGradient(data, coordSys) { + var visualMetaList = data.getVisual('visualMeta'); + if (!visualMetaList || !visualMetaList.length) { + return; + } + + var visualMeta; + for (var i = visualMetaList.length - 1; i >= 0; i--) { + // Can only be x or y + if (visualMetaList[i].dimension < 2) { + visualMeta = visualMetaList[i]; + break; + } + } + if (!visualMeta || coordSys.type !== 'cartesian2d') { + if (true) { + console.warn('Visual map on line style only support x or y dimension.'); + } + return; + } + var dimension = visualMeta.dimension; + var dimName = data.dimensions[dimension]; + var dataExtent = data.getDataExtent(dimName); + + var stops = visualMeta.stops; + + var colorStops = []; + if (stops[0].interval) { + stops.sort(function (a, b) { + return a.interval[0] - b.interval[0]; + }); + } + + var firstStop = stops[0]; + var lastStop = stops[stops.length - 1]; + // Interval can be infinity in piecewise case + var min = firstStop.interval ? clamp(firstStop.interval[0], dataExtent) : firstStop.value; + var max = lastStop.interval ? clamp(lastStop.interval[1], dataExtent) : lastStop.value; + var stopsSpan = max - min; + for (var i = 0; i < stops.length; i++) { + // Piecewise + if (stops[i].interval) { + if (stops[i].interval[1] === stops[i].interval[0]) { + continue; + } + colorStops.push({ + // Make sure offset is between 0 and 1 + offset: (clamp(stops[i].interval[0], dataExtent) - min) / stopsSpan, + color: stops[i].color + }, { + offset: (clamp(stops[i].interval[1], dataExtent) - min) / stopsSpan, + color: stops[i].color + }); + } + // Continous + else { + // if (i > 0 && stops[i].value === stops[i - 1].value) { + // continue; + // } + colorStops.push({ + offset: (stops[i].value - min) / stopsSpan, + color: stops[i].color + }); + } + } + var gradient = new graphic.LinearGradient( + 0, 0, 0, 0, colorStops, true + ); + var axis = coordSys.getAxis(dimName); + + var start = Math.round(axis.toGlobalCoord(axis.dataToCoord(min))); + var end = Math.round(axis.toGlobalCoord(axis.dataToCoord(max))); + zrUtil.each(colorStops, function (colorStop) { + // Make sure each offset has rounded px to avoid not sharp edge + colorStop.offset = (Math.round(colorStop.offset * (end - start) + start) - start) / (end - start); + }); + + gradient[dimName] = start; + gradient[dimName + '2'] = end; + + return gradient; + } + module.exports = ChartView.extend({ type: 'line', @@ -22002,12 +22347,13 @@ return /******/ (function(modules) { // webpackBootstrap } } + var visualColor = getVisualGradient(data, coordSys) || data.getVisual('color'); polyline.useStyle(zrUtil.defaults( // Use color in lineStyle first lineStyleModel.getLineStyle(), { fill: 'none', - stroke: data.getVisual('color'), + stroke: visualColor, lineJoin: 'bevel' } )); @@ -22027,7 +22373,7 @@ return /******/ (function(modules) { // webpackBootstrap polygon.useStyle(zrUtil.defaults( areaStyleModel.getAreaStyle(), { - fill: data.getVisual('color'), + fill: visualColor, opacity: 0.7, lineJoin: 'bevel' } @@ -22058,7 +22404,7 @@ return /******/ (function(modules) { // webpackBootstrap var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload); - if (dataIndex != null && dataIndex >= 0) { + if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) { var symbol = data.getItemGraphicEl(dataIndex); if (!symbol) { // Create a temporary symbol if it is not exists @@ -23920,8 +24266,20 @@ return /******/ (function(modules) { // webpackBootstrap }; gridProto.getCartesian = function (xAxisIndex, yAxisIndex) { - var key = 'x' + xAxisIndex + 'y' + yAxisIndex; - return this._coordsMap[key]; + if (xAxisIndex != null && yAxisIndex != null) { + var key = 'x' + xAxisIndex + 'y' + yAxisIndex; + return this._coordsMap[key]; + } + else { + // When only xAxisIndex or yAxisIndex given, find its first cartesian. + for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) { + if (coordList[i].getAxis('x').index === xAxisIndex + || coordList[i].getAxis('y').index === yAxisIndex + ) { + return coordList[i]; + } + } + } }; /** @@ -24022,6 +24380,9 @@ return /******/ (function(modules) { // webpackBootstrap // Inject axisModel into axis axis.model = axisModel; + // Inject grid info axis + axis.grid = this; + // Index of axis, can be used as key axis.index = idx; @@ -24311,6 +24672,7 @@ return /******/ (function(modules) { // webpackBootstrap // Simple optimization for large amount of labels step = Math.floor(labels.length / 40); } + for (var i = 0; i < tickCoords.length; i += step) { var tickCoord = tickCoords[i]; var rect = textContain.getBoundingRect( @@ -24318,7 +24680,7 @@ return /******/ (function(modules) { // webpackBootstrap ); rect[isAxisHorizontal ? 'x' : 'y'] += tickCoord; // FIXME Magic number 1.5 - rect[isAxisHorizontal ? 'width' : 'height'] *= 1.5; + rect[isAxisHorizontal ? 'width' : 'height'] *= 1.3; if (!textSpaceTakenRect) { textSpaceTakenRect = rect.clone(); } @@ -24336,7 +24698,7 @@ return /******/ (function(modules) { // webpackBootstrap if (autoLabelInterval === 0 && step > 1) { return step; } - return autoLabelInterval * step; + return (autoLabelInterval + 1) * step - 1; }; /** @@ -25962,16 +26324,23 @@ return /******/ (function(modules) { // webpackBootstrap z: 0, // 二级层叠 // 反向坐标轴 inverse: false, + // 坐标轴名字,默认为空 name: '', // 坐标轴名字位置,支持'start' | 'middle' | 'end' nameLocation: 'end', + // 坐标轴名字旋转,degree。 + nameRotate: null, // Adapt to axis rotate, when nameLocation is 'middle'. + nameTruncateLength: null, // truncate text when characters more than the given number. + nameTruncateEllipsis: '...', // 坐标轴文字样式,默认取全局样式 nameTextStyle: {}, // 文字与轴线距离 nameGap: 15, + // 是否能触发鼠标事件 silent: true, + // 坐标轴线 axisLine: { // 默认显示,属性show控制显示与否 @@ -25994,7 +26363,6 @@ return /******/ (function(modules) { // webpackBootstrap length: 5, // 属性lineStyle控制线条样式 lineStyle: { - color: '#333', width: 1 } }, @@ -26008,7 +26376,6 @@ return /******/ (function(modules) { // webpackBootstrap // formatter: null, // 其余属性默认使用全局文本样式,详见TEXTSTYLE textStyle: { - color: '#333', fontSize: 12 } }, @@ -26171,6 +26538,11 @@ return /******/ (function(modules) { // webpackBootstrap this.group.removeAll(); + var oldAxisGroup = this._axisGroup; + this._axisGroup = new graphic.Group(); + + this.group.add(this._axisGroup); + if (!axisModel.get('show')) { return; } @@ -26183,13 +26555,15 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder); - this.group.add(axisBuilder.getGroup()); + this._axisGroup.add(axisBuilder.getGroup()); zrUtil.each(selfBuilderAttrs, function (name) { - if (axisModel.get(name +'.show')) { + if (axisModel.get(name + '.show')) { this['_' + name](axisModel, gridModel, layout.labelInterval); } }, this); + + graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel); }, /** @@ -26203,7 +26577,6 @@ return /******/ (function(modules) { // webpackBootstrap var splitLineModel = axisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); - var lineWidth = lineStyleModel.get('width'); var lineColors = lineStyleModel.get('color'); var lineInterval = getInterval(splitLineModel, labelInterval); @@ -26213,13 +26586,16 @@ return /******/ (function(modules) { // webpackBootstrap var gridRect = gridModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); - var splitLines = []; var lineCount = 0; var ticksCoords = axis.getTicksCoords(); + var ticks = axis.scale.getTicks(); var p1 = []; var p2 = []; + // Simple optimization + // Batching the lines if color are the same + var lineStyle = lineStyleModel.getLineStyle(); for (var i = 0; i < ticksCoords.length; i++) { if (ifIgnoreOnTick(axis, i, lineInterval)) { continue; @@ -26241,31 +26617,20 @@ return /******/ (function(modules) { // webpackBootstrap } var colorIndex = (lineCount++) % lineColors.length; - splitLines[colorIndex] = splitLines[colorIndex] || []; - splitLines[colorIndex].push(new graphic.Line(graphic.subPixelOptimizeLine({ + this._axisGroup.add(new graphic.Line(graphic.subPixelOptimizeLine({ + anid: 'line_' + ticks[i], + shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, - style: { - lineWidth: lineWidth - }, - silent: true - }))); - } - - // Simple optimization - // Batching the lines if color are the same - var lineStyle = lineStyleModel.getLineStyle(); - for (var i = 0; i < splitLines.length; i++) { - this.group.add(graphic.mergePath(splitLines[i], { style: zrUtil.defaults({ - stroke: lineColors[i % lineColors.length] + stroke: lineColors[colorIndex] }, lineStyle), silent: true - })); + }))); } }, @@ -26284,15 +26649,16 @@ return /******/ (function(modules) { // webpackBootstrap var gridRect = gridModel.coordinateSystem.getRect(); var ticksCoords = axis.getTicksCoords(); + var ticks = axis.scale.getTicks(); var prevX = axis.toGlobalCoord(ticksCoords[0]); var prevY = axis.toGlobalCoord(ticksCoords[0]); - var splitAreaRects = []; var count = 0; var areaInterval = getInterval(splitAreaModel, labelInterval); + var areaStyle = areaStyleModel.getAreaStyle(); areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors]; for (var i = 1; i < ticksCoords.length; i++) { @@ -26320,32 +26686,24 @@ return /******/ (function(modules) { // webpackBootstrap } var colorIndex = (count++) % areaColors.length; - splitAreaRects[colorIndex] = splitAreaRects[colorIndex] || []; - splitAreaRects[colorIndex].push(new graphic.Rect({ + this._axisGroup.add(new graphic.Rect({ + anid: 'area_' + ticks[i], + shape: { x: x, y: y, width: width, height: height }, + style: zrUtil.defaults({ + fill: areaColors[colorIndex] + }, areaStyle), silent: true })); prevX = x + width; prevY = y + height; } - - // Simple optimization - // Batching the rects if color are the same - var areaStyle = areaStyleModel.getAreaStyle(); - for (var i = 0; i < splitAreaRects.length; i++) { - this.group.add(graphic.mergePath(splitAreaRects[i], { - style: zrUtil.defaults({ - fill: areaColors[i % areaColors.length] - }, areaStyle), - silent: true - })); - } } }); @@ -26391,8 +26749,7 @@ return /******/ (function(modules) { // webpackBootstrap ]; // Axis rotation - var r = {x: 0, y: 1}; - layout.rotation = Math.PI / 2 * r[axisDim]; + layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim var dirMap = {top: -1, bottom: 1, left: -1, right: 1}; @@ -26430,11 +26787,16 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); + var modelUtil = __webpack_require__(5); var graphic = __webpack_require__(43); var Model = __webpack_require__(8); + var List = __webpack_require__(96); var numberUtil = __webpack_require__(7); var remRadian = numberUtil.remRadian; var isRadianAroundZero = numberUtil.isRadianAroundZero; + var vec2 = __webpack_require__(16); + var v2ApplyTransform = vec2.applyTransform; + var retrieve = zrUtil.retrieve; var PI = Math.PI; @@ -26477,7 +26839,10 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [opt.tickDirection=1] 1 or -1 * @param {number} [opt.labelDirection=1] 1 or -1 * @param {number} [opt.labelOffset=0] Usefull when onZero. + * @param {string} [opt.axisLabelShow] default get from axisModel. * @param {string} [opt.axisName] default get from axisModel. + * @param {string} [opt.axisNameTruncateLength] default get from axisModel. + * @param {string} [opt.axisNameTruncateEllipsis] default get from axisModel. * @param {number} [opt.labelRotation] by degree, default get from axisModel. * @param {number} [opt.labelInterval] Default label interval when label * interval from model is null or 'auto'. @@ -26511,10 +26876,21 @@ return /******/ (function(modules) { // webpackBootstrap /** * @readOnly */ - this.group = new graphic.Group({ + this.group = new graphic.Group(); + + // FIXME Not use a seperate text group? + var dumbGroup = new graphic.Group({ position: opt.position.slice(), rotation: opt.rotation }); + + // this.group.add(dumbGroup); + // this._dumbGroup = dumbGroup; + + dumbGroup.updateTransform(); + this._transform = dumbGroup.transform; + + this._dumbGroup = dumbGroup; }; AxisBuilder.prototype = { @@ -26550,12 +26926,24 @@ return /******/ (function(modules) { // webpackBootstrap var extent = this.axisModel.axis.getExtent(); - this.group.add(new graphic.Line({ + var matrix = this._transform; + var pt1 = [extent[0], 0]; + var pt2 = [extent[1], 0]; + if (matrix) { + v2ApplyTransform(pt1, pt1, matrix); + v2ApplyTransform(pt2, pt2, matrix); + } + + this.group.add(new graphic.Line(graphic.subPixelOptimizeLine({ + + // Id for animation + anid: 'line', + shape: { - x1: extent[0], - y1: 0, - x2: extent[1], - y2: 0 + x1: pt1[0], + y1: pt1[1], + x2: pt2[0], + y2: pt2[1] }, style: zrUtil.extend( {lineCap: 'round'}, @@ -26564,7 +26952,7 @@ return /******/ (function(modules) { // webpackBootstrap strokeContainThreshold: opt.strokeContainThreshold, silent: !!opt.axisLineSilent, z2: 1 - })); + }))); }, /** @@ -26585,8 +26973,11 @@ return /******/ (function(modules) { // webpackBootstrap var tickLen = tickModel.get('length'); var tickInterval = getInterval(tickModel, opt.labelInterval); var ticksCoords = axis.getTicksCoords(); - var tickLines = []; + var ticks = axis.scale.getTicks(); + var pt1 = []; + var pt2 = []; + var matrix = this._transform; for (var i = 0; i < ticksCoords.length; i++) { // Only ordinal scale support tick interval if (ifIgnoreOnTick(axis, i, tickInterval)) { @@ -26595,26 +26986,37 @@ return /******/ (function(modules) { // webpackBootstrap var tickCoord = ticksCoords[i]; - // Tick line - tickLines.push(new graphic.Line(graphic.subPixelOptimizeLine({ + pt1[0] = tickCoord; + pt1[1] = 0; + pt2[0] = tickCoord; + pt2[1] = opt.tickDirection * tickLen; + + if (matrix) { + v2ApplyTransform(pt1, pt1, matrix); + v2ApplyTransform(pt2, pt2, matrix); + } + // Tick line, Not use group transform to have better line draw + this.group.add(new graphic.Line(graphic.subPixelOptimizeLine({ + + // Id for animation + anid: 'tick_' + ticks[i], + shape: { - x1: tickCoord, - y1: 0, - x2: tickCoord, - y2: opt.tickDirection * tickLen - }, - style: { - lineWidth: lineStyleModel.get('width') + x1: pt1[0], + y1: pt1[1], + x2: pt2[0], + y2: pt2[1] }, + style: zrUtil.defaults( + lineStyleModel.getLineStyle(), + { + stroke: axisModel.get('axisLine.lineStyle.color') + } + ), + z2: 2, silent: true }))); } - - this.group.add(graphic.mergePath(tickLines, { - style: lineStyleModel.getLineStyle(), - z2: 2, - silent: true - })); }, /** @@ -26623,13 +27025,14 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ axisLabel: function () { + var opt = this.opt; var axisModel = this.axisModel; + var show = retrieve(opt.axisLabelShow, axisModel.get('axisLabel.show')); - if (!axisModel.get('axisLabel.show')) { + if (!show) { return; } - var opt = this.opt; var axis = axisModel.axis; var labelModel = axisModel.getModel('axisLabel'); var textStyleModel = labelModel.getModel('textStyle'); @@ -26638,10 +27041,7 @@ return /******/ (function(modules) { // webpackBootstrap var labels = axisModel.getFormattedLabels(); // Special label rotate. - var labelRotation = opt.labelRotation; - if (labelRotation == null) { - labelRotation = labelModel.get('rotate') || 0; - } + var labelRotation = retrieve(opt.labelRotation, labelModel.get('rotate')) || 0; // To radian. labelRotation = labelRotation * PI / 180; @@ -26661,7 +27061,8 @@ return /******/ (function(modules) { // webpackBootstrap categoryData[i].textStyle, textStyleModel, axisModel.ecModel ); } - var textColor = itemTextStyleModel.getTextColor(); + var textColor = itemTextStyleModel.getTextColor() + || axisModel.get('axisLine.lineStyle.color'); var tickCoord = axis.dataToCoord(ticks[i]); var pos = [ @@ -26671,6 +27072,10 @@ return /******/ (function(modules) { // webpackBootstrap var labelBeforeFormat = axis.scale.getLabel(ticks[i]); var textEl = new graphic.Text({ + + // Id for animation + anid: 'label_' + ticks[i], + style: { text: labels[i], textAlign: itemTextStyleModel.get('align', true) || labelLayout.textAlign, @@ -26688,8 +27093,15 @@ return /******/ (function(modules) { // webpackBootstrap textEl.eventData.targetType = 'axisLabel'; textEl.eventData.value = labelBeforeFormat; + + // FIXME + this._dumbGroup.add(textEl); + textEl.updateTransform(); + textEls.push(textEl); this.group.add(textEl); + + textEl.decomposeTransform(); } function isTwoLabelOverlapped(current, next) { @@ -26728,12 +27140,7 @@ return /******/ (function(modules) { // webpackBootstrap axisName: function () { var opt = this.opt; var axisModel = this.axisModel; - - var name = this.opt.axisName; - // If name is '', do not get name from axisMode. - if (name == null) { - name = axisModel.get('name'); - } + var name = retrieve(opt.axisName, axisModel.get('name')); if (!name) { return; @@ -26758,16 +27165,46 @@ return /******/ (function(modules) { // webpackBootstrap var labelLayout; + var nameRotation = axisModel.get('nameRotate'); + if (nameRotation != null) { + nameRotation = nameRotation * PI / 180; // To radian. + } + if (nameLocation === 'middle') { - labelLayout = innerTextLayout(opt, opt.rotation, nameDirection); + labelLayout = innerTextLayout( + opt, + nameRotation != null ? nameRotation : opt.rotation, // Adapt to axis. + nameDirection + ); } else { - labelLayout = endTextLayout(opt, nameLocation, extent); + labelLayout = endTextLayout( + opt, nameLocation, nameRotation || 0, extent + ); + } + + var truncatedText = name; + var truncateLength = retrieve( + opt.axisNameTruncateLength, axisModel.get('nameTruncateLength') + ); + var truncateEllipsis = retrieve( + opt.axisNameTruncateEllipsis, axisModel.get('nameTruncateEllipsis') + ); + + if (truncateLength != null) { + truncatedText = modelUtil.truncate(name, truncateLength, truncateEllipsis); } var textEl = new graphic.Text({ + + // Id for animation + anid: 'name', + + __fullText: name, + __truncatedText: truncatedText, + style: { - text: name, + text: truncatedText, textFont: textStyleModel.getFont(), fill: textStyleModel.getTextColor() || axisModel.get('axisLine.lineStyle.color'), @@ -26780,15 +27217,33 @@ return /******/ (function(modules) { // webpackBootstrap z2: 1 }); + // Make truncate tooltip show. + if (truncateLength != null) { + textEl.dataIndex = 0; + var data = new List(['value'], axisModel); + data.initData([{value: name, tooltip: {formatter: tooltipFormatter}}]); + textEl.dataModel = modelUtil.createDataFormatModel(data, {mainType: 'axis'}); + } + textEl.eventData = makeAxisEventDataBase(axisModel); textEl.eventData.targetType = 'axisName'; textEl.eventData.name = name; + // FIXME + this._dumbGroup.add(textEl); + textEl.updateTransform(); + this.group.add(textEl); + + textEl.decomposeTransform(); } }; + function tooltipFormatter(params) { + return params.value; + } + /** * @inner */ @@ -26826,8 +27281,8 @@ return /******/ (function(modules) { // webpackBootstrap /** * @inner */ - function endTextLayout(opt, textPosition, extent) { - var rotationDiff = remRadian(-opt.rotation); + function endTextLayout(opt, textPosition, textRotate, extent) { + var rotationDiff = remRadian(textRotate - opt.rotation); var textAlign; var verticalAlign; var inverse = extent[0] > extent[1]; @@ -26993,17 +27448,11 @@ return /******/ (function(modules) { // webpackBootstrap normal: { // color: '各异', // 柱条边线 - barBorderColor: '#fff', + borderColor: '#fff', // 柱条边线线宽,单位px,默认为1 - barBorderWidth: 0 + borderWidth: 0 }, - emphasis: { - // color: '各异', - // 柱条边线 - barBorderColor: '#fff', - // 柱条边线线宽,单位px,默认为1 - barBorderWidth: 0 - } + emphasis: {} } } }); @@ -27233,22 +27682,32 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { + + + var getBarItemStyle = __webpack_require__(11)( + [ + ['fill', 'color'], + ['stroke', 'borderColor'], + ['lineWidth', 'borderWidth'], + // Compatitable with 2 + ['stroke', 'barBorderColor'], + ['lineWidth', 'barBorderWidth'], + ['opacity'], + ['shadowBlur'], + ['shadowOffsetX'], + ['shadowOffsetY'], + ['shadowColor'] + ] + ); module.exports = { - getBarItemStyle: __webpack_require__(11)( - [ - ['fill', 'color'], - ['stroke', 'borderColor'], - ['lineWidth', 'borderWidth'], - // Compatitable with 2 - ['stroke', 'barBorderColor'], - ['lineWidth', 'barBorderWidth'], - ['opacity'], - ['shadowBlur'], - ['shadowOffsetX'], - ['shadowOffsetY'], - ['shadowColor'] - ] - ) + getBarItemStyle: function (excludes) { + var style = getBarItemStyle.call(this, excludes); + if (this.getBorderLineDash) { + var lineDash = this.getBorderLineDash(); + lineDash && (style.lineDash = lineDash); + } + return style; + } }; @@ -29099,7 +29558,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 174 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { @@ -29107,23 +29566,16 @@ return /******/ (function(modules) { // webpackBootstrap var interactionMutex = { - take: function (zr, resourceKey, userKey, onTakeAway) { + take: function (zr, resourceKey, userKey) { var store = getStore(zr); - var record = store[resourceKey]; - - record && record.onTakeAway && record.onTakeAway(); - - store[resourceKey] = { - userKey: userKey, - onTakeAway: onTakeAway - }; + store[resourceKey] = userKey; }, release: function (zr, resourceKey, userKey) { var store = getStore(zr); - var record = store[resourceKey]; + var uKey = store[resourceKey]; - if (record && (record.userKey === userKey)) { + if (uKey === userKey) { store[resourceKey] = null; } }, @@ -29137,6 +29589,18 @@ return /******/ (function(modules) { // webpackBootstrap return zr[ATTR] || (zr[ATTR] = {}); } + /** + * payload: { + * type: 'takeGlobalCursor', + * key: 'dataZoomSelect', or 'brush', or ..., + * If no userKey, release global cursor. + * } + */ + __webpack_require__(1).registerAction( + {type: 'takeGlobalCursor', event: 'globalCursorTaken', update: 'update'}, + function () {} + ); + module.exports = interactionMutex; @@ -29202,12 +29666,21 @@ return /******/ (function(modules) { // webpackBootstrap var group = this.group; var LineCtor = this._ctor; + var hostModel = lineData.hostModel; + + var seriesScope = { + lineStyle: hostModel.getModel('lineStyle.normal').getLineStyle(), + hoverLineStyle: hostModel.getModel('lineStyle.emphasis').getLineStyle(), + labelModel: hostModel.getModel('label.normal'), + hoverLabelModel: hostModel.getModel('label.emphasis') + }; + lineData.diff(oldLineData) .add(function (idx) { if (!lineNeedsDraw(lineData.getItemLayout(idx))) { return; } - var lineGroup = new LineCtor(lineData, idx); + var lineGroup = new LineCtor(lineData, idx, seriesScope); lineData.setItemGraphicEl(idx, lineGroup); @@ -29221,10 +29694,10 @@ return /******/ (function(modules) { // webpackBootstrap } if (!lineGroup) { - lineGroup = new LineCtor(lineData, newIdx); + lineGroup = new LineCtor(lineData, newIdx, seriesScope); } else { - lineGroup.updateData(lineData, newIdx); + lineGroup.updateData(lineData, newIdx, seriesScope); } lineData.setItemGraphicEl(newIdx, lineGroup); @@ -29428,10 +29901,10 @@ return /******/ (function(modules) { // webpackBootstrap * @extends {module:zrender/graphic/Group} * @alias {module:echarts/chart/helper/Line} */ - function Line(lineData, idx) { + function Line(lineData, idx, seriesScope) { graphic.Group.call(this); - this._createLine(lineData, idx); + this._createLine(lineData, idx, seriesScope); } var lineProto = Line.prototype; @@ -29439,7 +29912,7 @@ return /******/ (function(modules) { // webpackBootstrap // Update symbol position and rotation lineProto.beforeUpdate = updateSymbolAndLabelBeforeLineUpdate; - lineProto._createLine = function (lineData, idx) { + lineProto._createLine = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var linePoints = lineData.getItemLayout(idx); @@ -29467,10 +29940,10 @@ return /******/ (function(modules) { // webpackBootstrap this[makeSymbolTypeKey(symbolCategory)] = lineData.getItemVisual(idx, symbolCategory); }, this); - this._updateCommonStl(lineData, idx); + this._updateCommonStl(lineData, idx, seriesScope); }; - lineProto.updateData = function (lineData, idx) { + lineProto.updateData = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); @@ -29486,28 +29959,37 @@ return /******/ (function(modules) { // webpackBootstrap var key = makeSymbolTypeKey(symbolCategory); // Symbol changed if (this[key] !== symbolType) { - var symbol = createSymbol(symbolCategory, lineData, idx); this.remove(this.childOfName(symbolCategory)); + var symbol = createSymbol(symbolCategory, lineData, idx); this.add(symbol); } this[key] = symbolType; }, this); - this._updateCommonStl(lineData, idx); + this._updateCommonStl(lineData, idx, seriesScope); }; - lineProto._updateCommonStl = function (lineData, idx) { + lineProto._updateCommonStl = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); - var itemModel = lineData.getItemModel(idx); - var labelModel = itemModel.getModel('label.normal'); - var textStyleModel = labelModel.getModel('textStyle'); - var labelHoverModel = itemModel.getModel('label.emphasis'); - var textStyleHoverModel = labelHoverModel.getModel('textStyle'); + var lineStyle = seriesScope && seriesScope.lineStyle; + var hoverLineStyle = seriesScope && seriesScope.hoverLineStyle; + var labelModel = seriesScope && seriesScope.labelModel; + var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel; + + // Optimization for large dataset + if (!seriesScope || lineData.hasItemOption) { + var itemModel = lineData.getItemModel(idx); + + lineStyle = itemModel.getModel('lineStyle.normal').getLineStyle(); + hoverLineStyle = itemModel.getModel('lineStyle.emphasis').getLineStyle(); + + labelModel = itemModel.getModel('label.normal'); + hoverLabelModel = itemModel.getModel('label.emphasis'); + } - var defaultText = numberUtil.round(seriesModel.getRawValue(idx)); var visualColor = lineData.getItemVisual(idx, 'color'); if (isNaN(defaultText)) { // Use name @@ -29519,37 +30001,57 @@ return /******/ (function(modules) { // webpackBootstrap fill: 'none', stroke: visualColor }, - itemModel.getModel('lineStyle.normal').getLineStyle() + lineStyle )); - line.hoverStyle = itemModel.getModel('lineStyle.emphasis').getLineStyle(); - var defaultColor = visualColor || '#000'; + line.hoverStyle = hoverLineStyle; + + var showLabel = labelModel.getShallow('show'); + var hoverShowLabel = hoverLabelModel.getShallow('show'); + var defaultText; var label = this.childOfName('label'); + var defaultLabelColor; + if (showLabel || hoverShowLabel) { + defaultText = numberUtil.round(seriesModel.getRawValue(idx)); + defaultLabelColor = visualColor || '#000'; + } // label.afterUpdate = lineAfterUpdate; - label.setStyle({ - text: labelModel.get('show') - ? zrUtil.retrieve( - seriesModel.getFormattedLabel(idx, 'normal', lineData.dataType), - defaultText - ) - : '', - textFont: textStyleModel.getFont(), - fill: textStyleModel.getTextColor() || defaultColor - }); - label.hoverStyle = { - text: labelHoverModel.get('show') - ? zrUtil.retrieve( - seriesModel.getFormattedLabel(idx, 'emphasis', lineData.dataType), - defaultText - ) - : '', - textFont: textStyleHoverModel.getFont(), - fill: textStyleHoverModel.getTextColor() || defaultColor - }; - label.__textAlign = textStyleModel.get('align'); - label.__verticalAlign = textStyleModel.get('baseline'); - label.__position = labelModel.get('position'); + if (showLabel) { + var textStyleModel = labelModel.getModel('textStyle'); + label.setStyle({ + text: zrUtil.retrieve( + seriesModel.getFormattedLabel(idx, 'normal', lineData.dataType), + defaultText + ), + textFont: textStyleModel.getFont(), + fill: textStyleModel.getTextColor() || defaultLabelColor + }); - label.ignore = !label.style.text && !label.hoverStyle.text; + label.__textAlign = textStyleModel.get('align'); + label.__verticalAlign = textStyleModel.get('baseline'); + label.__position = labelModel.get('position'); + } + else { + label.setStyle('text', ''); + } + if (hoverShowLabel) { + var textStyleHoverModel = hoverLabelModel.getModel('textStyle'); + + label.hoverStyle = { + text: zrUtil.retrieve( + seriesModel.getFormattedLabel(idx, 'emphasis', lineData.dataType), + defaultText + ), + textFont: textStyleHoverModel.getFont(), + fill: textStyleHoverModel.getTextColor() || defaultLabelColor + }; + } + else { + label.hoverStyle = { + text: '' + }; + } + + label.ignore = !showLabel && !hoverShowLabel; graphic.setHoverStyle(this); }; @@ -29675,7 +30177,7 @@ return /******/ (function(modules) { // webpackBootstrap var interactionMutex = __webpack_require__(174); var DataDiffer = __webpack_require__(97); - var bind = zrUtil.bind; + var curry = zrUtil.curry; var each = zrUtil.each; var map = zrUtil.map; var mathMin = Math.min; @@ -29683,7 +30185,7 @@ return /******/ (function(modules) { // webpackBootstrap var mathPow = Math.pow; var COVER_Z = 10000; - var UNSELECT_THRESHOLD = 2; + var UNSELECT_THRESHOLD = 6; var MIN_RESIZE_LINE_WIDTH = 6; var MUTEX_RESOURCE_KEY = 'globalPan'; @@ -29707,10 +30209,11 @@ return /******/ (function(modules) { // webpackBootstrap brushStyle: { lineWidth: 2, stroke: 'rgba(0,0,0,0.3)', - fill: 'rgba(0,0,0,0.15)' + fill: 'rgba(0,0,0,0.1)' }, transformable: true, - brushMode: 'single' + brushMode: 'single', + removeOnClick: false }; var baseUID = 0; @@ -29719,18 +30222,30 @@ return /******/ (function(modules) { // webpackBootstrap * @alias module:echarts/component/helper/BrushController * @constructor * @mixin {module:zrender/mixin/Eventful} + * @event module:echarts/component/helper/BrushController#brush + * params: + * areas: Array., coord relates to container group, + * If no container specified, to global. + * opt { + * isEnd: boolean, + * removeOnClick: boolean + * } * * @param {module:zrender/zrender~ZRender} zr */ function BrushController(zr) { + if (true) { + zrUtil.assert(zr); + } + Eventful.call(this); /** * @type {module:zrender/zrender~ZRender} - * @readOnly + * @private */ - this.zr = zr; + this._zr = zr; /** * @type {module:zrender/container/Group} @@ -29754,9 +30269,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * @private - * @type {module:zrender/core/BoundingRect} + * @type {Object} */ - this._containerRect = null; + this._panels; /** * @private @@ -29782,11 +30297,26 @@ return /******/ (function(modules) { // webpackBootstrap */ this._creatingCover; + /** + * true means global panel + * @private + * @type {module:zrender/container/Group|boolean} + */ + this._creatingPanel; + /** * @private * @type {boolean} */ - this._mounted = false; + this._enableGlobalPan; + + /** + * @private + * @type {boolean} + */ + if (true) { + this._mounted; + } /** * @private @@ -29800,7 +30330,7 @@ return /******/ (function(modules) { // webpackBootstrap */ this._handlers = {}; each(mouseHandlers, function (handler, eventName) { - this._handlers[eventName] = bind(handler, this); + this._handlers[eventName] = zrUtil.bind(handler, this); }, this); } @@ -29815,7 +30345,7 @@ return /******/ (function(modules) { // webpackBootstrap * If pass false/null/undefined, disable brush. * @param {number} [brushOption.brushMode='single'] 'single' or 'multiple' * @param {boolean} [brushOption.transformable=true] - * @param {boolean} [brushOption.onRelease] + * @param {boolean} [brushOption.removeOnClick=false] * @param {Object} [brushOption.brushStyle] * @param {number} [brushOption.brushStyle.width] * @param {number} [brushOption.brushStyle.lineWidth] @@ -29823,42 +30353,76 @@ return /******/ (function(modules) { // webpackBootstrap * @param {string} [brushOption.brushStyle.fill] */ enableBrush: function (brushOption) { - if (!this._mounted) { - return; + if (true) { + zrUtil.assert(this._mounted); } - this._brushType && doDisableBrush.call(this); - brushOption.brushType && doEnableBrush.call(this, brushOption); + this._brushType && doDisableBrush(this); + brushOption.brushType && doEnableBrush(this, brushOption); return this; }, /** - * @param {module:zrender/mixin/Transformable} container - * @param {module:zrender/core/BoundingRect|boolean} [rect] If not specified, - * use container.getBoundingRect(). If false, do not use containerRect, - * which means global select. + * @param {Array.} panelOpts If not pass, it is global brush. + * Each items: {panelId, rect} */ - mount: function (container, rect) { - this._mounted = true; // should be at first. - - // Remove from old container. - removeGroup.call(this); + setPanels: function (panelOpts) { + var oldPanels = this._panels || {}; + var newPanels = this._panels = panelOpts && panelOpts.length && {}; + var thisGroup = this.group; - // boundingRect will change when dragging, so we have - // to keep initial boundingRect. - this._containerRect = rect !== false - ? (rect || container.getBoundingRect()) : null; + newPanels && each(panelOpts, function (panelOpt) { + var panelId = panelOpt.panelId; + var panel = oldPanels[panelId]; + if (!panel) { + panel = new graphic.Rect({ + silent: true, + invisible: true + }); + thisGroup.add(panel); + } + panel.attr('shape', panelOpt.rect); + panel.__brushPanelId = panelId; + newPanels[panelId] = panel; + oldPanels[panelId] = null; + }); - // Add to new container. - container.add(this.group); + each(oldPanels, function (panel) { + panel && thisGroup.remove(panel); + }); return this; }, /** - * @param + * @param {Object} [opt] + * @return {boolean} [opt.enableGlobalPan=false] + * @return {boolean} [opt.position=[0, 0]] + * @return {boolean} [opt.rotation=0] + * @return {boolean} [opt.scale=[1, 1]] */ + mount: function (opt) { + opt = opt || {}; + + if (true) { + this._mounted = true; // should be at first. + } + + this._enableGlobalPan = opt.enableGlobalPan; + + var thisGroup = this.group; + this._zr.add(thisGroup); + + thisGroup.attr({ + position: opt.position || [0, 0], + rotation: opt.rotation || 0, + scale: opt.scale || [1, 1] + }); + + return this; + }, + eachCover: function (cb, context) { each(this._covers, cb, context); }, @@ -29877,8 +30441,8 @@ return /******/ (function(modules) { // webpackBootstrap * If brushOptionList is null/undefined, all covers removed. */ updateCovers: function (brushOptionList) { - if (!this._mounted) { - return; + if (true) { + zrUtil.assert(this._mounted); } brushOptionList = zrUtil.map(brushOptionList, function (brushOption) { @@ -29889,53 +30453,60 @@ return /******/ (function(modules) { // webpackBootstrap var oldCovers = this._covers; var newCovers = this._covers = []; var controller = this; + var creatingCover = this._creatingCover; - (new DataDiffer(oldCovers, brushOptionList, oldGetKey, newGetKey)) - .add(add) - .update(update) + (new DataDiffer(oldCovers, brushOptionList, oldGetKey, getKey)) + .add(addOrUpdate) + .update(addOrUpdate) .remove(remove) .execute(); return this; - function oldGetKey(cover, index) { - var brushOption = cover.__brushOption; - return brushOption.id != null ? brushOption.id : tmpIdPrefix + index; + function getKey(brushOption, index) { + return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + + '-' + brushOption.brushType; } - function newGetKey(brushOption, index) { - return brushOption.id != null ? brushOption.id : tmpIdPrefix + index; - } - - function add(newIndex) { - newCovers[newIndex] = createCover.call(controller, brushOptionList[newIndex]); - updateCoverAfterCreation.call(controller, newCovers[newIndex]); + function oldGetKey(cover, index) { + return getKey(cover.__brushOption, index); } - function update(newIndex, oldIndex) { - var cover = newCovers[newIndex] = oldCovers[oldIndex]; + function addOrUpdate(newIndex, oldIndex) { var newBrushOption = brushOptionList[newIndex]; - - if (newBrushOption.brushType !== cover.__brushOption.brushType) { - controller.group.remove(cover); - cover = createCover.call(controller, newBrushOption); + // Consider setOption in event listener of brushSelect, + // where updating cover when creating should be forbiden. + if (oldIndex != null && oldCovers[oldIndex] === creatingCover) { + newCovers[newIndex] = oldCovers[oldIndex]; + } + else { + var cover = newCovers[newIndex] = oldIndex != null + ? ( + oldCovers[oldIndex].__brushOption = newBrushOption, + oldCovers[oldIndex] + ) + : endCreating(controller, createCover(controller, newBrushOption)); + updateCoverAfterCreation(controller, cover); } - - cover.__brushOption = newBrushOption; - updateCoverAfterCreation.call(controller, newCovers[newIndex]); } function remove(oldIndex) { - controller.group.remove(oldCovers[oldIndex]); + if (oldCovers[oldIndex] !== creatingCover) { + controller.group.remove(oldCovers[oldIndex]); + } } }, unmount: function () { this.enableBrush(false); - removeGroup.call(this); - this._covers = []; - this._mounted = false; // should be at last. + // container may 'removeAll' outside. + clearCovers(this); + this._zr.remove(this.group); + + if (true) { + this._mounted = false; // should be at last. + } return this; }, @@ -29949,89 +30520,128 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.mixin(BrushController, Eventful); - function doEnableBrush(brushOption) { - var zr = this.zr; - - if (isGlobalBrush(this)) { - // FIXME - // 多个 selectcontroller,区域不一样时,这是否合理? - var onRelease = zrUtil.bind(function (userOnRelease) { - this.enableBrush(false); - userOnRelease && userOnRelease(); - }, this, brushOption.onRelease); + function doEnableBrush(controller, brushOption) { + var zr = controller._zr; - interactionMutex.take(zr, MUTEX_RESOURCE_KEY, this._uid, onRelease); - zr.setDefaultCursorStyle('crosshair'); + // Consider roam, which takes globalPan too. + if (!controller._enableGlobalPan) { + interactionMutex.take(zr, MUTEX_RESOURCE_KEY, controller._uid); } - each(this._handlers, function (handler, eventName) { + each(controller._handlers, function (handler, eventName) { zr.on(eventName, handler); }); - this._brushType = brushOption.brushType; - this._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true); + controller._brushType = brushOption.brushType; + controller._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true); } - function doDisableBrush() { - var zr = this.zr; + function doDisableBrush(controller) { + var zr = controller._zr; - interactionMutex.release(zr, MUTEX_RESOURCE_KEY, this._uid); - zr.setDefaultCursorStyle('default'); + interactionMutex.release(zr, MUTEX_RESOURCE_KEY, controller._uid); - each(this._handlers, function (handler, eventName) { + each(controller._handlers, function (handler, eventName) { zr.off(eventName, handler); }); - this._brushType = this._brushOption = null; + controller._brushType = controller._brushOption = null; } - function createCover(brushOption) { - var cover = coverRenderers[brushOption.brushType].createCover.call(this, brushOption); + function createCover(controller, brushOption) { + var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption); updateZ(cover); cover.__brushOption = brushOption; - this.group.add(cover); + controller.group.add(cover); return cover; } + function endCreating(controller, creatingCover) { + var coverRenderer = getCoverRenderer(creatingCover); + if (coverRenderer.endCreating) { + coverRenderer.endCreating(controller, creatingCover); + updateZ(creatingCover); + } + return creatingCover; + } + + function updateCoverShape(controller, cover) { + var brushOption = cover.__brushOption; + getCoverRenderer(cover).updateCoverShape( + controller, cover, brushOption.range, brushOption + ); + } + function updateZ(group) { group.traverse(function (el) { el.z = COVER_Z; + el.z2 = COVER_Z; // Consider in given container. }); } - function updateCoverAfterCreation(cover) { - var brushOption = cover.__brushOption; - var coverRenderer = coverRenderers[brushOption.brushType]; - coverRenderer.updateCoverShape.call(this, cover); - coverRenderer.updateCommon.call(this, cover); + function updateCoverAfterCreation(controller, cover) { + getCoverRenderer(cover).updateCommon(controller, cover); + updateCoverShape(controller, cover); } - function isInContainer(x, y) { - var localPos = this.group.transformCoordToLocal(x, y); - return !this._containerRect - || this._containerRect.contain(localPos[0], localPos[1]); + function getCoverRenderer(cover) { + return coverRenderers[cover.__brushOption.brushType]; } - function clearCovers() { - each(this._covers, function (cover) { - this.group.remove(cover); - }, this); - this._covers.length = 0; + function getPanelByPoint(controller, x, y) { + var panels = controller._panels; + if (!panels) { + return true; // Global panel + } + var panel; + each(panels, function (pn) { + pn.contain(x, y) && (panel = pn); + }); + return panel; } - function trigger(isEnd) { - var brushRanges = map(this._covers, function (cover) { + function getPanelByCover(controller, cover) { + var panels = controller._panels; + if (!panels) { + return true; // Global panel + } + var panelId = cover.__brushOption.panelId; + // User may give cover without coord sys info, + // which is then treated as global panel. + return panelId != null ? panels[panelId] : true; + } + + function clearCovers(controller) { + var covers = controller._covers; + var originalLength = covers.length; + each(covers, function (cover) { + controller.group.remove(cover); + }, controller); + covers.length = 0; + + return !!originalLength; + } + + function trigger(controller, opt) { + var areas = map(controller._covers, function (cover) { var brushOption = cover.__brushOption; + var range = zrUtil.clone(brushOption.range); + return { brushType: brushOption.brushType, - range: zrUtil.clone(brushOption.range) + panelId: brushOption.panelId, + range: range }; }); - this.trigger('brush', brushRanges, !!isEnd); + + controller.trigger('brush', areas, { + isEnd: !!opt.isEnd, + removeOnClick: !!opt.removeOnClick + }); } - function shouldShowCover() { - var track = this._track; + function shouldShowCover(controller) { + var track = controller._track; if (!track.length) { return false; @@ -30046,56 +30656,109 @@ return /******/ (function(modules) { // webpackBootstrap return dist > UNSELECT_THRESHOLD; } - function removeGroup() { - // container may 'removeAll' outside. - var group = this.group; - var container = group.parent; - if (container) { - container.remove(group); - } - } - - function isGlobalBrush(controller) { - return !controller._containerRect; - } - - function getLocalTrack() { - return map(this._track, function (point) { - return this.group.transformCoordToLocal(point[0], point[1]); - }, this); - } - - function getLocalTrackEnds() { - var localTrack = getLocalTrack.call(this); - var tail = localTrack.length - 1; + function getTrackEnds(track) { + var tail = track.length - 1; tail < 0 && (tail = 0); - return [localTrack[0], localTrack[tail]]; + return [track[0], track[tail]]; } - function createBaseRect(cover, brushOption) { + function createBaseRectCover(doDrift, controller, brushOption, edgeNames) { + var cover = new graphic.Group(); + cover.add(new graphic.Rect({ - name: 'rect', - style: brushOption.brushStyle, + name: 'main', + style: makeStyle(brushOption), silent: true, draggable: true, cursor: 'move', - drift: bind(driftRect, this, cover, 'nswe'), - ondragend: bind(trigger, this, true) + drift: curry(doDrift, controller, cover, 'nswe'), + ondragend: curry(trigger, controller, {isEnd: true}) })); + + each( + edgeNames, + function (name) { + cover.add(new graphic.Rect({ + name: name, + style: {opacity: 0}, + draggable: true, + silent: true, + invisible: true, + drift: curry(doDrift, controller, cover, name), + ondragend: curry(trigger, controller, {isEnd: true}) + })); + } + ); + + return cover; } - function updateCommon(cover) { + function updateBaseRect(controller, cover, localRange, brushOption) { + var lineWidth = brushOption.brushStyle.lineWidth || 0; + var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH); + var x = localRange[0][0]; + var y = localRange[1][0]; + var xa = x - lineWidth / 2; + var ya = y - lineWidth / 2; + var x2 = localRange[0][1]; + var y2 = localRange[1][1]; + var x2a = x2 - handleSize + lineWidth / 2; + var y2a = y2 - handleSize + lineWidth / 2; + var width = x2 - x; + var height = y2 - y; + var widtha = width + lineWidth; + var heighta = height + lineWidth; + + updateRectShape(controller, cover, 'main', x, y, width, height); + + if (brushOption.transformable) { + updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta); + updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta); + updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize); + updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize); + + updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize); + updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize); + updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize); + updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize); + } + } + + function updateCommon(controller, cover) { var brushOption = cover.__brushOption; - cover.childAt(0).useStyle(brushOption.brushStyle); var transformable = brushOption.transformable; - cover.childAt(0).attr({ + + var mainEl = cover.childAt(0); + mainEl.useStyle(makeStyle(brushOption)); + mainEl.attr({ silent: !transformable, cursor: transformable ? 'move' : 'default' }); + + each( + ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], + function (name) { + var el = cover.childOfName(name); + var globalDir = getGlobalDirection(controller, name); + + el && el.attr({ + silent: !transformable, + invisible: !transformable, + cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null + }); + } + ); } - function updateRectShape(cover, name, x, y, w, h) { - cover.childOfName(name).setShape({x: x, y: y, width: w, height: h}); + function updateRectShape(controller, cover, name, x, y, w, h) { + var el = cover.childOfName(name); + el && el.setShape(pointsToRect( + clipByPanel(controller, cover, [[x, y], [x + w, y + h]]) + )); + } + + function makeStyle(brushOption) { + return zrUtil.defaults({strokeNoScale: true}, brushOption.brushStyle); } function formatRectRange(x, y, x2, y2) { @@ -30108,34 +30771,130 @@ return /******/ (function(modules) { // webpackBootstrap ]; } - function driftRect(cover, name, dx, dy) { + function getTransform(controller) { + return graphic.getTransform(controller.group); + } + + function getGlobalDirection(controller, localDirection) { + if (localDirection.length > 1) { + localDirection = localDirection.split(''); + var globalDir = [ + getGlobalDirection(controller, localDirection[0]), + getGlobalDirection(controller, localDirection[1]) + ]; + (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse(); + return globalDir.join(''); + } + else { + var map = {w: 'left', e: 'right', n: 'top', s: 'bottom'}; + var inverseMap = {left: 'w', right: 'e', top: 'n', bottom: 's'}; + var globalDir = graphic.transformDirection( + map[localDirection], getTransform(controller) + ); + return inverseMap[globalDir]; + } + } + + function driftRect(toRectRange, fromRectRange, controller, cover, name, dx, dy, e) { var brushOption = cover.__brushOption; - var rectRange = brushOption.range; - var delta = [dx, dy]; + var rectRange = toRectRange(brushOption.range); + var localDelta = toLocalDelta(controller, dx, dy); each(name.split(''), function (namePart) { var ind = DIRECTION_MAP[namePart]; - rectRange[ind[0]][ind[1]] += delta[ind[0]]; + rectRange[ind[0]][ind[1]] += localDelta[ind[0]]; }); - brushOption.range = formatRectRange( + brushOption.range = fromRectRange(formatRectRange( rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1] - ); + )); - updateCoverAfterCreation.call(this, cover); - trigger.call(this, false); + updateCoverAfterCreation(controller, cover); + trigger(controller, {isEnd: false}); } - function driftPolygon(cover, dx, dy) { + function driftPolygon(controller, cover, dx, dy, e) { var range = cover.__brushOption.range; + var localDelta = toLocalDelta(controller, dx, dy); each(range, function (point) { - point[0] += dx; - point[1] += dy; + point[0] += localDelta[0]; + point[1] += localDelta[1]; }); - updateCoverAfterCreation.call(this, cover); - trigger.call(this, false); + updateCoverAfterCreation(controller, cover); + trigger(controller, {isEnd: false}); + } + + function toLocalDelta(controller, dx, dy) { + var thisGroup = controller.group; + var localD = thisGroup.transformCoordToLocal(dx, dy); + var localZero = thisGroup.transformCoordToLocal(0, 0); + + return [localD[0] - localZero[0], localD[1] - localZero[1]]; + } + + function clipByPanel(controller, cover, data) { + var panel = getPanelByCover(controller, cover); + if (panel === true) { // Global panel + return zrUtil.clone(data); + } + + var panelRect = panel.getBoundingRect(); + + return zrUtil.map(data, function (point) { + var x = point[0]; + x = mathMax(x, panelRect.x); + x = mathMin(x, panelRect.x + panelRect.width); + var y = point[1]; + y = mathMax(y, panelRect.y); + y = mathMin(y, panelRect.y + panelRect.height); + return [x, y]; + }); + } + + function pointsToRect(points) { + var xmin = mathMin(points[0][0], points[1][0]); + var ymin = mathMin(points[0][1], points[1][1]); + var xmax = mathMax(points[0][0], points[1][0]); + var ymax = mathMax(points[0][1], points[1][1]); + + return { + x: xmin, + y: ymin, + width: xmax - xmin, + height: ymax - ymin + }; + } + + function resetCursor(controller, e) { + var x = e.offsetX; + var y = e.offsetY; + var zr = controller._zr; + + if (controller._brushType) { // If active + var panels = controller._panels; + var covers = controller._covers; + var inCover; + + for (var i = 0; i < covers.length; i++) { + if (coverRenderers[covers[i].__brushOption.brushType].contain(covers[i], x, y)) { + inCover = true; + break; + } + } + + if (!inCover) { + if (panels) { // Brush on panels + each(panels, function (panel) { + panel.contain(x, y) && zr.setCursorStyle('crosshair'); + }); + } + else { // Global brush + zr.setCursorStyle('crosshair'); + } + } + } } function preventDefault(e) { @@ -30143,87 +30902,127 @@ return /******/ (function(modules) { // webpackBootstrap rawE.preventDefault && rawE.preventDefault(); } - function updateCoverByMouse(e, isEnd) { + function mainShapeContain(cover, x, y) { + return cover.childOfName('main').contain(x, y); + } + + function updateCoverByMouse(controller, e, isEnd) { var x = e.offsetX; var y = e.offsetY; - var creatingCover = this._creatingCover; - var thisBrushOption = this._brushOption; + var creatingCover = controller._creatingCover; + var panel = controller._creatingPanel; + var thisBrushOption = controller._brushOption; + var eventParams; - if (isInContainer.call(this, x, y)) { - this._track.push([x, y]); + controller._track.push(controller.group.transformCoordToLocal(x, y)); - if (shouldShowCover.call(this)) { + if (shouldShowCover(controller) || creatingCover) { - if (!creatingCover) { - thisBrushOption.brushMode === 'single' && clearCovers.call(this); - creatingCover = this._creatingCover = - createCover.call(this, zrUtil.clone(thisBrushOption)); - this._covers.push(creatingCover); - } + if (panel && !creatingCover) { + thisBrushOption.brushMode === 'single' && clearCovers(controller); + var brushOption = zrUtil.clone(thisBrushOption); + brushOption.panelId = panel === true ? null : panel.__brushPanelId; + creatingCover = controller._creatingCover = createCover(controller, brushOption); + controller._covers.push(creatingCover); + } - var coverRenderer = coverRenderers[this._brushType]; + if (creatingCover) { + var coverRenderer = coverRenderers[controller._brushType]; var coverBrushOption = creatingCover.__brushOption; - coverBrushOption.range = - coverRenderer.getCreatingRange.call(this, isEnd); + coverBrushOption.range = coverRenderer.getCreatingRange( + clipByPanel(controller, creatingCover, controller._track) + ); if (isEnd) { - if (coverRenderer.endCreating) { - coverRenderer.endCreating.call(this, creatingCover); - updateZ(creatingCover); - } - coverRenderer.updateCommon.call(this, creatingCover); + endCreating(controller, creatingCover); + coverRenderer.updateCommon(controller, creatingCover); } - coverRenderer.updateCoverShape.call(this, creatingCover); + updateCoverShape(controller, creatingCover); - trigger.call(this, isEnd); + eventParams = {isEnd: isEnd}; } } - - if (isEnd && creatingCover) { - this._creatingCover = null; + else if ( + isEnd + && thisBrushOption.brushMode === 'single' + && thisBrushOption.removeOnClick + ) { + // Help user to remove covers easily, only by a tiny drag, in 'single' mode. + // But a single click do not clear covers, because user may have casual + // clicks (for example, click on other component and do not expect covers + // disappear). + // Only some cover removed, trigger action, but not every click trigger action. + if (getPanelByPoint(controller, x, y) && clearCovers(controller)) { + eventParams = {isEnd: isEnd, removeOnClick: true}; + } } + + return eventParams; } var mouseHandlers = { mousedown: function (e) { - if (!e.target || !e.target.draggable) { + if (this._dragging) { + // In case some browser do not support globalOut, + // and release mose out side the browser. + handleDragEnd.call(this, e); + } + else if (!e.target || !e.target.draggable) { preventDefault(e); var x = e.offsetX; var y = e.offsetY; - if (isInContainer.call(this, x, y)) { + this._creatingCover = null; + var panel = this._creatingPanel = getPanelByPoint(this, x, y); + + if (panel) { this._dragging = true; - this._track = [[x, y]]; + this._track = [this.group.transformCoordToLocal(x, y)]; } } }, mousemove: function (e) { + // set Cursor + resetCursor(this, e); + if (this._dragging) { preventDefault(e); - updateCoverByMouse.call(this, e, false); + var eventParams = updateCoverByMouse(this, e, false); + + eventParams && trigger(this, eventParams); } }, - mouseup: function (e) { - if (this._dragging) { + mouseup: handleDragEnd //, - preventDefault(e); + // FIXME + // in tooltip, globalout should not be triggered. + // globalout: handleDragEnd + }; - updateCoverByMouse.call(this, e, true); + function handleDragEnd(e) { + if (this._dragging) { - this._dragging = false; - this._track = []; - } + preventDefault(e); + + var eventParams = updateCoverByMouse(this, e, true); + + this._dragging = false; + this._track = []; + this._creatingCover = null; + + // trigger event shoule be at final, after procedure will be nested. + eventParams && trigger(this, eventParams); } - }; + } /** * key: brushType @@ -30231,143 +31030,131 @@ return /******/ (function(modules) { // webpackBootstrap */ var coverRenderers = { - line: { - createCover: function (brushOption) { - var cover = new graphic.Group(); - - createBaseRect.call(this, cover, brushOption); + lineX: getLineRenderer(0), - return cover; - }, - getCreatingRange: function () { - var ends = getLocalTrackEnds.call(this); - var min = mathMin(ends[0][0], ends[1][0]); - var max = mathMax(ends[0][0], ends[1][0]); - - return [min, max]; - }, - updateCoverShape: function (cover) { - var info = cover.__brushOption; - var range = info.range; - var width = info.brushStyle.width; - cover.childOfName('rect').setShape({ - x: range[0], - y: -width / 2, - width: range[1] - range[0], - height: width - }); - }, - updateCommon: updateCommon - }, + lineY: getLineRenderer(1), rect: { - createCover: function (brushOption) { - var cover = new graphic.Group(); - - createBaseRect.call(this, cover, brushOption); - - each( - ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], - function (name) { - cover.add(new graphic.Rect({ - name: name, - __cursor: CURSOR_MAP[name] + '-resize', - style: {opacity: 0}, - draggable: true, - drift: bind(driftRect, this, cover, name), - ondragend: bind(trigger, this, true) - })); - }, - this + createCover: function (controller, brushOption) { + return createBaseRectCover( + curry( + driftRect, + function (range) { + return range; + }, + function (range) { + return range; + } + ), + controller, + brushOption, + ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'] ); - - return cover; }, - getCreatingRange: function () { - var ends = getLocalTrackEnds.call(this); + getCreatingRange: function (localTrack) { + var ends = getTrackEnds(localTrack); return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]); }, - updateCoverShape: function (cover) { - var info = cover.__brushOption; - var range = info.range; - var lineWidth = info.brushStyle.lineWidth || 0; - var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH); - var x = range[0][0]; - var y = range[1][0]; - var xa = x - lineWidth / 2; - var ya = y - lineWidth / 2; - var x2 = range[0][1]; - var y2 = range[1][1]; - var x2a = x2 - handleSize + lineWidth / 2; - var y2a = y2 - handleSize + lineWidth / 2; - var width = x2 - x; - var height = y2 - y; - var widtha = width + lineWidth; - var heighta = height + lineWidth; - - updateRectShape(cover, 'rect', x, y, width, height); - - if (info.transformable) { - updateRectShape(cover, 'w', xa, ya, handleSize, heighta); - updateRectShape(cover, 'e', x2a, ya, handleSize, heighta); - updateRectShape(cover, 'n', xa, ya, widtha, handleSize); - updateRectShape(cover, 's', xa, y2a, widtha, handleSize); - - updateRectShape(cover, 'nw', xa, ya, handleSize, handleSize); - updateRectShape(cover, 'ne', x2a, ya, handleSize, handleSize); - updateRectShape(cover, 'sw', xa, y2a, handleSize, handleSize); - updateRectShape(cover, 'se', x2a, y2a, handleSize, handleSize); - } + updateCoverShape: function (controller, cover, localRange, brushOption) { + updateBaseRect(controller, cover, localRange, brushOption); }, - updateCommon: function (cover) { - updateCommon.call(this, cover); - var transformable = cover.__brushOption.transformable; - each( - ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], - function (name) { - var el = cover.childOfName(name); - el.attr({ - silent: !transformable, - cursor: transformable ? el.__cursor : 'default' - }); - }, - this - ); - } + updateCommon: updateCommon, + contain: mainShapeContain }, polygon: { - createCover: function (brushOption) { + createCover: function (controller, brushOption) { var cover = new graphic.Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the // border of the shape when drawing, which is a better experience for user. cover.add(new graphic.Polyline({ - style: brushOption.brushStyle, + name: 'main', + style: makeStyle(brushOption), silent: true })); return cover; }, - getCreatingRange: function (isEnd) { - return this._track.slice(); + getCreatingRange: function (localTrack) { + return localTrack; }, - endCreating: function (cover) { + endCreating: function (controller, cover) { cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape. cover.add(new graphic.Polygon({ + name: 'main', draggable: true, - drift: bind(driftPolygon, this, cover), - ondragend: bind(trigger, this, true) + drift: curry(driftPolygon, controller, cover), + ondragend: curry(trigger, controller, {isEnd: true}) })); }, - updateCoverShape: function (cover) { - cover.childAt(0).setShape({points: cover.__brushOption.range}); + updateCoverShape: function (controller, cover, localRange, brushOption) { + cover.childAt(0).setShape({ + points: clipByPanel(controller, cover, localRange) + }); }, - updateCommon: updateCommon + updateCommon: updateCommon, + contain: mainShapeContain } }; + function getLineRenderer(xyIndex) { + return { + createCover: function (controller, brushOption) { + return createBaseRectCover( + curry( + driftRect, + function (range) { + var rectRange = [range, [0, 100]]; + xyIndex && rectRange.reverse(); + return rectRange; + }, + function (rectRange) { + return rectRange[xyIndex]; + } + ), + controller, + brushOption, + [['w', 'e'], ['n', 's']][xyIndex] + ); + }, + getCreatingRange: function (localTrack) { + var ends = getTrackEnds(localTrack); + var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]); + var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]); + + return [min, max]; + }, + updateCoverShape: function (controller, cover, localRange, brushOption) { + var brushWidth = brushOption.brushStyle.width; + var otherExtent; + // If brushWidth not specified, fit the panel. + if (brushWidth == null) { + var panel = getPanelByCover(controller, cover); + var base = 0; + if (panel !== true) { + var rect = panel.getBoundingRect(); + brushWidth = xyIndex ? rect.width : rect.height; + base = xyIndex ? rect.x : rect.y; + } + // FIXME + // do not support global panel yet. + otherExtent = [base, base + (brushWidth || 0)]; + } + else { + otherExtent = [-brushWidth / 2, brushWidth / 2]; + } + var rectRange = [localRange, otherExtent]; + xyIndex && rectRange.reverse(); + + updateBaseRect(controller, cover, rectRange, brushOption); + }, + updateCommon: updateCommon, + contain: mainShapeContain + }; + } + module.exports = BrushController; @@ -30408,7 +31195,10 @@ return /******/ (function(modules) { // webpackBootstrap /* 266 */, /* 267 */, /* 268 */, -/* 269 */ +/* 269 */, +/* 270 */, +/* 271 */, +/* 272 */ /***/ function(module, exports, __webpack_require__) { /** @@ -30416,17 +31206,17 @@ return /******/ (function(modules) { // webpackBootstrap */ - __webpack_require__(270); - __webpack_require__(271); - __webpack_require__(272); + __webpack_require__(273); + __webpack_require__(274); + __webpack_require__(275); var echarts = __webpack_require__(1); // Series Filter - echarts.registerProcessor(__webpack_require__(274)); + echarts.registerProcessor(__webpack_require__(277)); /***/ }, -/* 270 */ +/* 273 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30481,7 +31271,8 @@ return /******/ (function(modules) { // webpackBootstrap _updateData: function (ecModel) { var legendData = zrUtil.map(this.get('data') || [], function (dataItem) { - if (typeof dataItem === 'string') { + // Can be string or number + if (typeof dataItem === 'string' || typeof dataItem === 'number') { dataItem = { name: dataItem }; @@ -30617,7 +31408,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 271 */ +/* 274 */ /***/ function(module, exports, __webpack_require__) { /** @@ -30704,7 +31495,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 272 */ +/* 275 */ /***/ function(module, exports, __webpack_require__) { @@ -30712,7 +31503,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var symbolCreator = __webpack_require__(105); var graphic = __webpack_require__(43); - var listComponentHelper = __webpack_require__(273); + var listComponentHelper = __webpack_require__(276); var curry = zrUtil.curry; @@ -30788,7 +31579,7 @@ return /******/ (function(modules) { // webpackBootstrap var seriesModel = ecModel.getSeriesByName(name)[0]; if (legendDrawedMap[name]) { - // Series not exists + // Have been drawed return; } @@ -30854,6 +31645,12 @@ return /******/ (function(modules) { // webpackBootstrap } }, this); } + + if (true) { + if (!legendDrawedMap[name]) { + console.warn(name + ' series not exists. Legend data should be same with series name or data name.'); + } + } }, this); listComponentHelper.layout(group, legendModel, api); @@ -30946,7 +31743,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 273 */ +/* 276 */ /***/ function(module, exports, __webpack_require__) { @@ -31016,7 +31813,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 274 */ +/* 277 */ /***/ function(module, exports) { @@ -31040,15 +31837,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 275 */ +/* 278 */ /***/ function(module, exports, __webpack_require__) { // FIXME Better way to pack data in graphic element - __webpack_require__(276); + __webpack_require__(279); - __webpack_require__(277); + __webpack_require__(280); // Show tip action /** @@ -31081,7 +31878,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 276 */ +/* 279 */ /***/ function(module, exports, __webpack_require__) { @@ -31190,12 +31987,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 277 */ +/* 280 */ /***/ function(module, exports, __webpack_require__) { - var TooltipContent = __webpack_require__(278); + var TooltipContent = __webpack_require__(281); var graphic = __webpack_require__(43); var zrUtil = __webpack_require__(4); var formatUtil = __webpack_require__(6); @@ -32341,7 +33138,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 278 */ +/* 281 */ /***/ function(module, exports, __webpack_require__) { /** @@ -32614,9 +33411,6 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 279 */, -/* 280 */, -/* 281 */, /* 282 */, /* 283 */, /* 284 */, @@ -32628,7 +33422,427 @@ return /******/ (function(modules) { // webpackBootstrap /* 290 */, /* 291 */, /* 292 */, -/* 293 */ +/* 293 */, +/* 294 */, +/* 295 */, +/* 296 */, +/* 297 */, +/* 298 */, +/* 299 */, +/* 300 */, +/* 301 */, +/* 302 */, +/* 303 */, +/* 304 */, +/* 305 */, +/* 306 */, +/* 307 */ +/***/ function(module, exports) { + + + + var lib = {}; + + var ORIGIN_METHOD = '\0__throttleOriginMethod'; + var RATE = '\0__throttleRate'; + var THROTTLE_TYPE = '\0__throttleType'; + + /** + * @public + * @param {(Function)} fn + * @param {number} [delay=0] Unit: ms. + * @param {boolean} [debounce=false] + * true: If call interval less than `delay`, only the last call works. + * false: If call interval less than `delay, call works on fixed rate. + * @return {(Function)} throttled fn. + */ + lib.throttle = function (fn, delay, debounce) { + + var currCall; + var lastCall = 0; + var lastExec = 0; + var timer = null; + var diff; + var scope; + var args; + + delay = delay || 0; + + function exec() { + lastExec = (new Date()).getTime(); + timer = null; + fn.apply(scope, args || []); + } + + var cb = function () { + currCall = (new Date()).getTime(); + scope = this; + args = arguments; + diff = currCall - (debounce ? lastCall : lastExec) - delay; + + clearTimeout(timer); + + if (debounce) { + timer = setTimeout(exec, delay); + } + else { + if (diff >= 0) { + exec(); + } + else { + timer = setTimeout(exec, -diff); + } + } + + lastCall = currCall; + }; + + /** + * Clear throttle. + * @public + */ + cb.clear = function () { + if (timer) { + clearTimeout(timer); + timer = null; + } + }; + + return cb; + }; + + /** + * Create throttle method or update throttle rate. + * + * @example + * ComponentView.prototype.render = function () { + * ... + * throttle.createOrUpdate( + * this, + * '_dispatchAction', + * this.model.get('throttle'), + * 'fixRate' + * ); + * }; + * ComponentView.prototype.remove = function () { + * throttle.clear(this, '_dispatchAction'); + * }; + * ComponentView.prototype.dispose = function () { + * throttle.clear(this, '_dispatchAction'); + * }; + * + * @public + * @param {Object} obj + * @param {string} fnAttr + * @param {number} [rate] + * @param {string} [throttleType='fixRate'] 'fixRate' or 'debounce' + * @return {Function} throttled function. + */ + lib.createOrUpdate = function (obj, fnAttr, rate, throttleType) { + var fn = obj[fnAttr]; + + if (!fn) { + return; + } + + var originFn = fn[ORIGIN_METHOD] || fn; + var lastThrottleType = fn[THROTTLE_TYPE]; + var lastRate = fn[RATE]; + + if (lastRate !== rate || lastThrottleType !== throttleType) { + if (rate == null || !throttleType) { + return (obj[fnAttr] = originFn); + } + + fn = obj[fnAttr] = lib.throttle( + originFn, rate, throttleType === 'debounce' + ); + fn[ORIGIN_METHOD] = originFn; + fn[THROTTLE_TYPE] = throttleType; + fn[RATE] = rate; + } + + return fn; + }; + + /** + * Clear throttle. Example see throttle.createOrUpdate. + * + * @public + * @param {Object} obj + * @param {string} fnAttr + */ + lib.clear = function (obj, fnAttr) { + var fn = obj[fnAttr]; + if (fn && fn[ORIGIN_METHOD]) { + obj[fnAttr] = fn[ORIGIN_METHOD]; + } + }; + + module.exports = lib; + + + +/***/ }, +/* 308 */ +/***/ function(module, exports, __webpack_require__) { + + + + var zrUtil = __webpack_require__(4); + var graphic = __webpack_require__(43); + + var each = zrUtil.each; + + var helper = {}; + + var COMPONENT_NAMES = ['geo', 'xAxis', 'yAxis']; + var PANEL_ID_SPLIT = '--'; + var COORD_CONVERTS = ['dataToPoint', 'pointToData']; + + helper.parseOutputRanges = function (areas, coordInfoList, ecModel, rangesCoordInfo) { + each(areas, function (area, index) { + var panelId = area.panelId; + + if (panelId) { + panelId = panelId.split(PANEL_ID_SPLIT); + + area[panelId[0] + 'Index'] = +panelId[1]; + + var coordInfo = findCoordInfo(area, coordInfoList); + area.coordRange = coordConvert[area.brushType]( + 1, coordInfo, area.range + ); + rangesCoordInfo && (rangesCoordInfo[index] = coordInfo); + } + }); + }; + + helper.parseInputRanges = function (brushModel, ecModel) { + each(brushModel.areas, function (area) { + var coordInfo = findCoordInfo(area, brushModel.coordInfoList); + + if (true) { + zrUtil.assert( + !coordInfo || coordInfo === true || area.coordRange, + 'coordRange must be specified when coord index specified.' + ); + zrUtil.assert( + !coordInfo || coordInfo !== true || area.range, + 'range must be specified.' + ); + } + + area.range = area.range || []; + + // convert coordRange to global range and set panelId. + if (coordInfo && coordInfo !== true) { + area.range = coordConvert[area.brushType]( + 0, coordInfo, area.coordRange + ); + area.panelId = coordInfo.panelId; + } + }); + }; + + helper.makePanelOpts = function (coordInfoList) { + var panelOpts = []; + + each(coordInfoList, function (coordInfo) { + var coordSys = coordInfo.coordSys; + var rect; + + if (coordInfo.geoIndex >= 0) { + rect = coordSys.getBoundingRect().clone(); + // geo roam and zoom transform + rect.applyTransform(graphic.getTransform(coordSys)); + } + else { // xAxis or yAxis + // grid is not Transformable. + rect = coordSys.grid.getRect().clone(); + } + + panelOpts.push({panelId: coordInfo.panelId, rect: rect}); + }); + + return panelOpts; + }; + + /** + * @param {Object} option {xAxisIndex, yAxisIndex, geoIndex} + * @param {module:echarts/model/Global} ecModel + * @return {Array.} coordInfoList + */ + helper.makeCoordInfoList = function (option, ecModel) { + var coordInfoList = []; + + each(COMPONENT_NAMES, function (componentName) { + var componentIndices = option[componentName + 'Index']; + if (componentIndices == null || componentIndices === 'none') { + return; + } + if (componentIndices !== 'all' && !zrUtil.isArray(componentIndices)) { + componentIndices = [componentIndices]; + } + + ecModel.eachComponent({mainType: componentName}, function (componentModel, index) { + if (componentIndices !== 'all' && zrUtil.indexOf(componentIndices, index) < 0) { + return; + } + + var grid; + var coordSys; + + (componentName === 'xAxis' || componentName === 'yAxis') + ? (grid = componentModel.axis.grid) + : (coordSys = componentModel.coordinateSystem); // geo + + var coordInfo; + + // Check duplicate and find cartesian when tranval to yAxis. + for (var i = 0, len = coordInfoList.length; i < len; i++) { + var cInfo = coordInfoList[i]; + if (true) { + zrUtil.assert( + cInfo[componentName + 'Index'] != index, + 'Coord should not be defined duplicately: ' + componentName + index + ); + } + // CoordSys is always required for `rect brush` or `polygon brush`. + // If both xAxisIndex and yAxisIndex specified, fetch cartesian by them. + if (componentName === 'yAxis' && !cInfo.yAxis && cInfo.xAxis) { + var aCoordSys = grid.getCartesian(cInfo.xAxisIndex, index); + if (aCoordSys) { // The yAxis and xAxis are in the same cartesian. + coordSys = aCoordSys; + coordInfo = cInfo; + break; + } + } + } + + !coordInfo && coordInfoList.push(coordInfo = {}); + + coordInfo[componentName] = componentModel; + coordInfo[componentName + 'Index'] = index; + // If both xAxisIndex and yAxisIndex specified, panelId only use yAxisIndex, + // which is enough to index panel. + coordInfo.panelId = componentName + PANEL_ID_SPLIT + index; + coordInfo.coordSys = coordSys + // If only xAxisIndex or only yAxisIndex specified, find its first cartesian. + || grid.getCartesian(coordInfo.xAxisIndex, coordInfo.yAxisIndex); + + coordInfo.coordSys + ? (coordInfoList[componentName + 'Has'] = true) + : coordInfoList.pop(); // If a coordInfo exists originally, existance of coordSys is ensured. + }); + }); + + return coordInfoList; + }; + + helper.controlSeries = function (area, brushModel, seriesModel) { + // Check whether area is bound in coord, and series do not belong to that coord. + // If do not do this check, some brush (like lineX) will controll all axes. + var coordInfo = findCoordInfo(area, brushModel.coordInfoList); + return coordInfo === true || (coordInfo && coordInfo.coordSys === seriesModel.coordinateSystem); + }; + + function formatMinMax(minMax) { + minMax[0] > minMax[1] && minMax.reverse(); + return minMax; + } + + /** + * If return Object, a coord found. + * If reutrn true, global found. + * Otherwise nothing found. + * + * @param {Object} area {Index} + * @param {Array} coordInfoList + * @return {Obejct|boolean} + */ + function findCoordInfo(area, coordInfoList) { + var isGlobal = true; + for (var j = 0; j < COMPONENT_NAMES.length; j++) { + var indexAttr = COMPONENT_NAMES[j] + 'Index'; + if (area[indexAttr] >= 0) { + isGlobal = false; + for (var i = 0; i < coordInfoList.length; i++) { + if (coordInfoList[i][indexAttr] === area[indexAttr]) { + return coordInfoList[i]; + } + } + } + } + return isGlobal; + } + + function axisConvert(axisName, to, coordInfo, coordRange) { + var axis = coordInfo.coordSys.getAxis(axisName); + + if (true) { + zrUtil.assert(axis, 'line brush is only available in cartesian (grid).'); + } + + return formatMinMax(zrUtil.map([0, 1], function (i) { + return to + ? axis.coordToData(axis.toLocalCoord(coordRange[i])) + : axis.toGlobalCoord(axis.dataToCoord(coordRange[i])); + })); + } + + var coordConvert = { + + lineX: zrUtil.curry(axisConvert, 'x'), + + lineY: zrUtil.curry(axisConvert, 'y'), + + rect: function (to, coordInfo, coordRange) { + var coordSys = coordInfo.coordSys; + var xminymin = coordSys[COORD_CONVERTS[to]]([coordRange[0][0], coordRange[1][0]]); + var xmaxymax = coordSys[COORD_CONVERTS[to]]([coordRange[0][1], coordRange[1][1]]); + return [ + formatMinMax([xminymin[0], xmaxymax[0]]), + formatMinMax([xminymin[1], xmaxymax[1]]) + ]; + }, + + polygon: function (to, coordInfo, coordRange) { + var coordSys = coordInfo.coordSys; + return zrUtil.map(coordRange, coordSys[COORD_CONVERTS[to]], coordSys); + } + }; + + module.exports = helper; + + + +/***/ }, +/* 309 */, +/* 310 */, +/* 311 */, +/* 312 */, +/* 313 */ +/***/ function(module, exports) { + + 'use strict'; + + + var features = {}; + + module.exports = { + register: function (name, ctor) { + features[name] = ctor; + }, + + get: function (name) { + return features[name]; + } + }; + + +/***/ }, +/* 314 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32672,9 +33886,14 @@ return /******/ (function(modules) { // webpackBootstrap top: 0, // 水平对齐 - // 'auto' | 'left' | 'right' - // 默认根据 x 的位置判断是左对齐还是右对齐 - //textAlign: null + // 'auto' | 'left' | 'right' | 'center' + // 默认根据 left 的位置判断是左对齐还是右对齐 + // textAlign: null + // + // 垂直对齐 + // 'auto' | 'top' | 'bottom' | 'middle' + // 默认根据 top 位置判断是上对齐还是下对齐 + // textBaseline: null backgroundColor: 'rgba(0,0,0,0)', @@ -32693,11 +33912,9 @@ return /******/ (function(modules) { // webpackBootstrap textStyle: { fontSize: 18, fontWeight: 'bolder', - // 主标题文字颜色 color: '#333' }, subtextStyle: { - // 副标题文字颜色 color: '#aaa' } } @@ -32721,13 +33938,13 @@ return /******/ (function(modules) { // webpackBootstrap var subtextStyleModel = titleModel.getModel('subtextStyle'); var textAlign = titleModel.get('textAlign'); + var textBaseline = titleModel.get('textBaseline'); var textEl = new graphic.Text({ style: { text: titleModel.get('text'), textFont: textStyleModel.getFont(), - fill: textStyleModel.getTextColor(), - textBaseline: 'top' + fill: textStyleModel.getTextColor() }, z2: 10 }); @@ -32784,11 +34001,6 @@ return /******/ (function(modules) { // webpackBootstrap if (textAlign === 'middle') { textAlign = 'center'; } - // If textAlign is illegal, canvas render text with textAlign 'left' and 'right' - // alternatively (after optimized that ctx.save/restore are not called if no change). - if (textAlign !== 'left' && textAlign !== 'right' && textAlign !== 'center') { - textAlign = 'left'; - } // Adjust layout by text align if (textAlign === 'right') { layoutRect.x += layoutRect.width; @@ -32797,10 +34009,28 @@ return /******/ (function(modules) { // webpackBootstrap layoutRect.x += layoutRect.width / 2; } } + if (!textBaseline) { + textBaseline = titleModel.get('top') || titleModel.get('bottom'); + if (textBaseline === 'center') { + textBaseline = 'middle'; + } + if (textBaseline === 'bottom') { + layoutRect.y += layoutRect.height; + } + else if (textBaseline === 'middle') { + layoutRect.y += layoutRect.height / 2; + } + + textBaseline = textBaseline || 'top'; + } group.attr('position', [layoutRect.x, layoutRect.y]); - textEl.setStyle('textAlign', textAlign); - subTextEl.setStyle('textAlign', textAlign); + var alignStyle = { + textAlign: textAlign, + textVerticalAlign: textBaseline + }; + textEl.setStyle(alignStyle); + subTextEl.setStyle(alignStyle); // Render background // Get groupRect again because textAlign has been changed @@ -32826,7 +34056,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 294 */ +/* 315 */ /***/ function(module, exports, __webpack_require__) { /** @@ -32834,24 +34064,24 @@ return /******/ (function(modules) { // webpackBootstrap */ - __webpack_require__(295); + __webpack_require__(316); - __webpack_require__(296); - __webpack_require__(298); + __webpack_require__(317); + __webpack_require__(319); - __webpack_require__(299); - __webpack_require__(300); + __webpack_require__(320); + __webpack_require__(321); - __webpack_require__(303); - __webpack_require__(304); + __webpack_require__(323); + __webpack_require__(324); - __webpack_require__(306); - __webpack_require__(307); + __webpack_require__(326); + __webpack_require__(327); /***/ }, -/* 295 */ +/* 316 */ /***/ function(module, exports, __webpack_require__) { @@ -32864,7 +34094,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 296 */ +/* 317 */ /***/ function(module, exports, __webpack_require__) { /** @@ -32876,7 +34106,7 @@ return /******/ (function(modules) { // webpackBootstrap var env = __webpack_require__(2); var echarts = __webpack_require__(1); var modelUtil = __webpack_require__(5); - var AxisProxy = __webpack_require__(297); + var AxisProxy = __webpack_require__(318); var each = zrUtil.each; var eachAxisDim = modelUtil.eachAxisDim; @@ -32895,8 +34125,8 @@ return /******/ (function(modules) { // webpackBootstrap zlevel: 0, z: 4, // Higher than normal component (z: 2). orient: null, // Default auto by axisIndex. Possible value: 'horizontal', 'vertical'. - xAxisIndex: null, // Default all horizontal category axis. - yAxisIndex: null, // Default all vertical category axis. + xAxisIndex: null, // Default the first horizontal category axis. + yAxisIndex: null, // Default the first vertical category axis. angleAxisIndex: null, radiusAxisIndex: null, filterMode: 'filter', // Possible values: 'filter' or 'empty'. @@ -33327,7 +34557,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 297 */ +/* 318 */ /***/ function(module, exports, __webpack_require__) { /** @@ -33689,7 +34919,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 298 */ +/* 319 */ /***/ function(module, exports, __webpack_require__) { @@ -33778,7 +35008,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 299 */ +/* 320 */ /***/ function(module, exports, __webpack_require__) { /** @@ -33786,7 +35016,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - var DataZoomModel = __webpack_require__(296); + var DataZoomModel = __webpack_require__(317); var SliderZoomModel = DataZoomModel.extend({ @@ -33857,20 +35087,20 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 300 */ +/* 321 */ /***/ function(module, exports, __webpack_require__) { var zrUtil = __webpack_require__(4); var graphic = __webpack_require__(43); - var throttle = __webpack_require__(301); - var DataZoomView = __webpack_require__(298); + var throttle = __webpack_require__(307); + var DataZoomView = __webpack_require__(319); var Rect = graphic.Rect; var numberUtil = __webpack_require__(7); var linearMap = numberUtil.linearMap; var layout = __webpack_require__(21); - var sliderMove = __webpack_require__(302); + var sliderMove = __webpack_require__(322); var asc = numberUtil.asc; var bind = zrUtil.bind; // var mathMax = Math.max; @@ -34596,207 +35826,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 301 */ -/***/ function(module, exports) { - - - - var lib = {}; - - var ORIGIN_METHOD = '\0__throttleOriginMethod'; - var RATE = '\0__throttleRate'; - - /** - * 频率控制 返回函数连续调用时,fn 执行频率限定为每多少时间执行一次 - * 例如常见效果: - * notifyWhenChangesStop - * 频繁调用时,只保证最后一次执行 - * 配成:trailing:true;debounce:true 即可 - * notifyAtFixRate - * 频繁调用时,按规律心跳执行 - * 配成:trailing:true;debounce:false 即可 - * 注意: - * 根据model更新view的时候,可以使用throttle, - * 但是根据view更新model的时候,避免使用这种延迟更新的方式。 - * 因为这可能导致model和server同步出现问题。 - * - * @public - * @param {(Function|Array.)} fn 需要调用的函数 - * 如果fn为array,则表示可以对多个函数进行throttle。 - * 他们共享同一个timer。 - * @param {number} delay 延迟时间,单位毫秒 - * @param {bool} trailing 是否保证最后一次触发的执行 - * true:表示保证最后一次调用会触发执行。 - * 但任何调用后不可能立即执行,总会delay。 - * false:表示不保证最后一次调用会触发执行。 - * 但只要间隔大于delay,调用就会立即执行。 - * @param {bool} debounce 节流 - * true:表示:频繁调用(间隔小于delay)时,根本不执行 - * false:表示:频繁调用(间隔小于delay)时,按规律心跳执行 - * @return {(Function|Array.)} 实际调用函数。 - * 当输入的fn为array时,返回值也为array。 - * 每项是Function。 - */ - lib.throttle = function (fn, delay, trailing, debounce) { - - var currCall = (new Date()).getTime(); - var lastCall = 0; - var lastExec = 0; - var timer = null; - var diff; - var scope; - var args; - var isSingle = typeof fn === 'function'; - delay = delay || 0; - - if (isSingle) { - return createCallback(); - } - else { - var ret = []; - for (var i = 0; i < fn.length; i++) { - ret[i] = createCallback(i); - } - return ret; - } - - function createCallback(index) { - - function exec() { - lastExec = (new Date()).getTime(); - timer = null; - (isSingle ? fn : fn[index]).apply(scope, args || []); - } - - var cb = function () { - currCall = (new Date()).getTime(); - scope = this; - args = arguments; - diff = currCall - (debounce ? lastCall : lastExec) - delay; - - clearTimeout(timer); - - if (debounce) { - if (trailing) { - timer = setTimeout(exec, delay); - } - else if (diff >= 0) { - exec(); - } - } - else { - if (diff >= 0) { - exec(); - } - else if (trailing) { - timer = setTimeout(exec, -diff); - } - } - - lastCall = currCall; - }; - - /** - * Clear throttle. - * @public - */ - cb.clear = function () { - if (timer) { - clearTimeout(timer); - timer = null; - } - }; - - return cb; - } - }; - - /** - * 按一定频率执行,最后一次调用总归会执行 - * - * @public - */ - lib.fixRate = function (fn, delay) { - return delay != null - ? lib.throttle(fn, delay, true, false) - : fn; - }; - - /** - * 直到不频繁调用了才会执行,最后一次调用总归会执行 - * - * @public - */ - lib.debounce = function (fn, delay) { - return delay != null - ? lib.throttle(fn, delay, true, true) - : fn; - }; - - - /** - * Create throttle method or update throttle rate. - * - * @example - * ComponentView.prototype.render = function () { - * ... - * throttle.createOrUpdate( - * this, - * '_dispatchAction', - * this.model.get('throttle'), - * 'fixRate' - * ); - * }; - * ComponentView.prototype.remove = function () { - * throttle.clear(this, '_dispatchAction'); - * }; - * ComponentView.prototype.dispose = function () { - * throttle.clear(this, '_dispatchAction'); - * }; - * - * @public - * @param {Object} obj - * @param {string} fnAttr - * @param {number} rate - * @param {string} throttleType 'fixRate' or 'debounce' - */ - lib.createOrUpdate = function (obj, fnAttr, rate, throttleType) { - var fn = obj[fnAttr]; - - if (!fn || rate == null || !throttleType) { - return; - } - - var originFn = fn[ORIGIN_METHOD] || fn; - var lastRate = fn[RATE]; - - if (lastRate !== rate) { - fn = obj[fnAttr] = lib[throttleType](originFn, rate); - fn[ORIGIN_METHOD] = originFn; - fn[RATE] = rate; - } - }; - - /** - * Clear throttle. Example see throttle.createOrUpdate. - * - * @public - * @param {Object} obj - * @param {string} fnAttr - */ - lib.clear = function (obj, fnAttr) { - var fn = obj[fnAttr]; - if (fn && fn[ORIGIN_METHOD]) { - obj[fnAttr] = fn[ORIGIN_METHOD]; - } - }; - - module.exports = lib; - - - -/***/ }, -/* 302 */ +/* 322 */ /***/ function(module, exports) { @@ -34855,7 +35885,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 303 */ +/* 323 */ /***/ function(module, exports, __webpack_require__) { /** @@ -34863,7 +35893,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - module.exports = __webpack_require__(296).extend({ + module.exports = __webpack_require__(317).extend({ type: 'dataZoom.inside', @@ -34877,15 +35907,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 304 */ +/* 324 */ /***/ function(module, exports, __webpack_require__) { - var DataZoomView = __webpack_require__(298); + var DataZoomView = __webpack_require__(319); var zrUtil = __webpack_require__(4); - var sliderMove = __webpack_require__(302); - var roams = __webpack_require__(305); + var sliderMove = __webpack_require__(322); + var roams = __webpack_require__(325); var bind = zrUtil.bind; var InsideZoomView = DataZoomView.extend({ @@ -34944,15 +35974,6 @@ return /******/ (function(modules) { // webpackBootstrap // polar支持 }, - /** - * @override - */ - remove: function () { - roams.unregister(this.api, this.dataZoomModel.id); - InsideZoomView.superApply(this, 'remove', arguments); - this._range = null; - }, - /** * @override */ @@ -35077,7 +36098,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 305 */ +/* 325 */ /***/ function(module, exports, __webpack_require__) { /** @@ -35093,7 +36114,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var RoamController = __webpack_require__(173); - var throttle = __webpack_require__(301); + var throttle = __webpack_require__(307); var curry = zrUtil.curry; var ATTR = '\0_ec_dataZoom_roams'; @@ -35274,7 +36295,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 306 */ +/* 326 */ /***/ function(module, exports, __webpack_require__) { /** @@ -35337,7 +36358,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 307 */ +/* 327 */ /***/ function(module, exports, __webpack_require__) { /** @@ -35385,30 +36406,29 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 308 */, -/* 309 */, -/* 310 */, -/* 311 */, -/* 312 */, -/* 313 */, -/* 314 */, -/* 315 */, -/* 316 */, -/* 317 */, -/* 318 */, -/* 319 */, -/* 320 */, -/* 321 */, -/* 322 */, -/* 323 */, -/* 324 */ +/* 328 */, +/* 329 */, +/* 330 */, +/* 331 */, +/* 332 */, +/* 333 */, +/* 334 */, +/* 335 */, +/* 336 */, +/* 337 */, +/* 338 */, +/* 339 */, +/* 340 */, +/* 341 */, +/* 342 */, +/* 343 */ /***/ function(module, exports, __webpack_require__) { // HINT Markpoint can't be used too much - __webpack_require__(325); - __webpack_require__(327); + __webpack_require__(344); + __webpack_require__(346); __webpack_require__(1).registerPreprocessor(function (opt) { // Make sure markPoint component is enabled @@ -35417,12 +36437,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 325 */ +/* 344 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(326).extend({ + module.exports = __webpack_require__(345).extend({ type: 'markPoint', @@ -35455,7 +36475,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 326 */ +/* 345 */ /***/ function(module, exports, __webpack_require__) { @@ -35590,7 +36610,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 327 */ +/* 346 */ /***/ function(module, exports, __webpack_require__) { @@ -35601,15 +36621,15 @@ return /******/ (function(modules) { // webpackBootstrap var List = __webpack_require__(96); - var markerHelper = __webpack_require__(328); + var markerHelper = __webpack_require__(347); function updateMarkerLayout(mpData, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; mpData.each(function (idx) { var itemModel = mpData.getItemModel(idx); var point; - var xPx = numberUtil.parsePercent(itemModel.getShallow('x'), api.getWidth()); - var yPx = numberUtil.parsePercent(itemModel.getShallow('y'), api.getHeight()); + var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth()); + var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } @@ -35639,7 +36659,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } - __webpack_require__(329).extend({ + __webpack_require__(348).extend({ type: 'markPoint', @@ -35751,7 +36771,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 328 */ +/* 347 */ /***/ function(module, exports, __webpack_require__) { @@ -35955,7 +36975,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 329 */ +/* 348 */ /***/ function(module, exports, __webpack_require__) { @@ -35997,13 +37017,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 330 */ +/* 349 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(331); - __webpack_require__(332); + __webpack_require__(350); + __webpack_require__(351); __webpack_require__(1).registerPreprocessor(function (opt) { // Make sure markLine component is enabled @@ -36012,12 +37032,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 331 */ +/* 350 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(326).extend({ + module.exports = __webpack_require__(345).extend({ type: 'markLine', @@ -36057,7 +37077,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 332 */ +/* 351 */ /***/ function(module, exports, __webpack_require__) { @@ -36066,7 +37086,7 @@ return /******/ (function(modules) { // webpackBootstrap var List = __webpack_require__(96); var numberUtil = __webpack_require__(7); - var markerHelper = __webpack_require__(328); + var markerHelper = __webpack_require__(347); var LineDraw = __webpack_require__(198); @@ -36186,13 +37206,10 @@ return /******/ (function(modules) { // webpackBootstrap var itemModel = data.getItemModel(idx); var point; - var xPx = itemModel.get('x'); - var yPx = itemModel.get('y'); - if (xPx != null && yPx != null) { - point = [ - numberUtil.parsePercent(xPx, api.getWidth()), - numberUtil.parsePercent(yPx, api.getHeight()) - ]; + var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth()); + var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight()); + if (!isNaN(xPx) && !isNaN(yPx)) { + point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic @@ -36228,12 +37245,20 @@ return /******/ (function(modules) { // webpackBootstrap point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]); } } + + // Use x, y if has any + if (!isNaN(xPx)) { + point[0] = xPx; + } + if (!isNaN(yPx)) { + point[1] = yPx; + } } data.setItemLayout(idx, point); } - __webpack_require__(329).extend({ + __webpack_require__(348).extend({ type: 'markLine', @@ -36402,6 +37427,7 @@ return /******/ (function(modules) { // webpackBootstrap lineData.initData( zrUtil.map(optData, function (item) { return item[2]; }) ); + lineData.hasItemOption = true; return { from: fromData, to: toData, @@ -36411,13 +37437,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 333 */ +/* 352 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(334); - __webpack_require__(335); + __webpack_require__(353); + __webpack_require__(354); __webpack_require__(1).registerPreprocessor(function (opt) { // Make sure markArea component is enabled @@ -36426,12 +37452,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 334 */ +/* 353 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(326).extend({ + module.exports = __webpack_require__(345).extend({ type: 'markArea', @@ -36467,7 +37493,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 335 */ +/* 354 */ /***/ function(module, exports, __webpack_require__) { // TODO Better on polar @@ -36479,7 +37505,7 @@ return /******/ (function(modules) { // webpackBootstrap var graphic = __webpack_require__(43); var colorUtil = __webpack_require__(39); - var markerHelper = __webpack_require__(328); + var markerHelper = __webpack_require__(347); var markAreaTransform = function (seriesModel, coordSys, maModel, item) { var lt = markerHelper.dataTransform(seriesModel, item[0]); @@ -36554,13 +37580,10 @@ return /******/ (function(modules) { // webpackBootstrap var itemModel = data.getItemModel(idx); var point; - var xPx = itemModel.get(dims[0]); - var yPx = itemModel.get(dims[1]); - if (xPx != null && yPx != null) { - point = [ - numberUtil.parsePercent(xPx, api.getWidth()), - numberUtil.parsePercent(yPx, api.getHeight()) - ]; + var xPx = numberUtil.parsePercent(itemModel.get(dims[0]), api.getWidth()); + var yPx = numberUtil.parsePercent(itemModel.get(dims[1]), api.getHeight()); + if (!isNaN(xPx) && !isNaN(yPx)) { + point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic @@ -36587,6 +37610,14 @@ return /******/ (function(modules) { // webpackBootstrap point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]); } } + + // Use x, y if has any + if (!isNaN(xPx)) { + point[0] = xPx; + } + if (!isNaN(yPx)) { + point[1] = yPx; + } } return point; @@ -36594,7 +37625,7 @@ return /******/ (function(modules) { // webpackBootstrap var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']]; - __webpack_require__(329).extend({ + __webpack_require__(348).extend({ type: 'markArea', @@ -36767,43 +37798,43 @@ return /******/ (function(modules) { // webpackBootstrap return item.value; }; areaData.initData(optData, null, dimValueGetter); + areaData.hasItemOption = true; return areaData; } /***/ }, -/* 336 */, -/* 337 */, -/* 338 */, -/* 339 */, -/* 340 */, -/* 341 */, -/* 342 */, -/* 343 */, -/* 344 */, -/* 345 */ +/* 355 */, +/* 356 */, +/* 357 */, +/* 358 */, +/* 359 */, +/* 360 */, +/* 361 */, +/* 362 */, +/* 363 */, +/* 364 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(346); - __webpack_require__(348); + __webpack_require__(365); + __webpack_require__(366); - __webpack_require__(350); - __webpack_require__(351); - __webpack_require__(352); - __webpack_require__(353); - __webpack_require__(358); - __webpack_require__(359); + __webpack_require__(368); + __webpack_require__(369); + __webpack_require__(370); + __webpack_require__(371); + __webpack_require__(376); /***/ }, -/* 346 */ +/* 365 */ /***/ function(module, exports, __webpack_require__) { - var featureManager = __webpack_require__(347); + var featureManager = __webpack_require__(313); var zrUtil = __webpack_require__(4); var ToolboxModel = __webpack_require__(1).extendComponentModel({ @@ -36874,44 +37905,24 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 347 */ -/***/ function(module, exports) { - - 'use strict'; - - - var features = {}; - - module.exports = { - register: function (name, ctor) { - features[name] = ctor; - }, - - get: function (name) { - return features[name]; - } - }; - - -/***/ }, -/* 348 */ +/* 366 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) { - var featureManager = __webpack_require__(347); + var featureManager = __webpack_require__(313); var zrUtil = __webpack_require__(4); var graphic = __webpack_require__(43); var Model = __webpack_require__(8); var DataDiffer = __webpack_require__(97); - var listComponentHelper = __webpack_require__(273); + var listComponentHelper = __webpack_require__(276); var textContain = __webpack_require__(14); module.exports = __webpack_require__(1).extendComponentView({ type: 'toolbox', - render: function (toolboxModel, ecModel, api) { + render: function (toolboxModel, ecModel, api, payload) { var group = this.group; group.removeAll(); @@ -36994,7 +38005,7 @@ return /******/ (function(modules) { // webpackBootstrap }; if (feature.render) { - feature.render(featureModel, ecModel, api); + feature.render(featureModel, ecModel, api, payload); } } @@ -37113,6 +38124,18 @@ return /******/ (function(modules) { // webpackBootstrap }); }, + updateView: function (toolboxModel, ecModel, api, payload) { + zrUtil.each(this._features, function (feature) { + feature.updateView && feature.updateView(feature.model, ecModel, api, payload); + }); + }, + + updateLayout: function (toolboxModel, ecModel, api, payload) { + zrUtil.each(this._features, function (feature) { + feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload); + }); + }, + remove: function (ecModel, api) { zrUtil.each(this._features, function (feature) { feature.remove && feature.remove(ecModel, api); @@ -37132,10 +38155,10 @@ return /******/ (function(modules) { // webpackBootstrap } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(349))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(367))) /***/ }, -/* 349 */ +/* 367 */ /***/ function(module, exports) { // shim for using process in browser @@ -37260,7 +38283,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 350 */ +/* 368 */ /***/ function(module, exports, __webpack_require__) { @@ -37324,7 +38347,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - __webpack_require__(347).register( + __webpack_require__(313).register( 'saveAsImage', SaveAsImage ); @@ -37332,7 +38355,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 351 */ +/* 369 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -37500,13 +38523,13 @@ return /******/ (function(modules) { // webpackBootstrap ecModel.mergeOption(payload.newOption); }); - __webpack_require__(347).register('magicType', MagicType); + __webpack_require__(313).register('magicType', MagicType); module.exports = MagicType; /***/ }, -/* 352 */ +/* 370 */ /***/ function(module, exports, __webpack_require__) { /** @@ -37953,7 +38976,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } - __webpack_require__(347).register('dataView', DataView); + __webpack_require__(313).register('dataView', DataView); __webpack_require__(1).registerAction({ type: 'changeDataView', @@ -37989,54 +39012,38 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 353 */ +/* 371 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var zrUtil = __webpack_require__(4); - var numberUtil = __webpack_require__(7); var BrushController = __webpack_require__(232); - var BoundingRect = __webpack_require__(15); - var Group = __webpack_require__(30); - var history = __webpack_require__(354); + var brushHelper = __webpack_require__(308); + var history = __webpack_require__(372); var each = zrUtil.each; - var asc = numberUtil.asc; // Use dataZoomSelect - __webpack_require__(355); + __webpack_require__(373); // Spectial component id start with \0ec\0, see echarts/model/Global.js~hasInnerId var DATA_ZOOM_ID_BASE = '\0_ec_\0toolbox-dataZoom_'; function DataZoom(model, ecModel, api) { - this.model = model; - this.ecModel = ecModel; - this.api = api; - var zr = api.getZr(); - - /** - * @private - * @type {module:zrender/container/Group} - */ - var controllerGroup = this._controllerGroup = new Group(); - zr.add(controllerGroup); - /** * @private * @type {module:echarts/component/helper/BrushController} */ - (this._brushController = new BrushController(zr)) + (this._brushController = new BrushController(api.getZr())) .on('brush', zrUtil.bind(this._onBrush, this)) - .mount(controllerGroup, false); + .mount(); /** - * Is zoom active. * @private - * @type {Object} + * @type {boolean} */ this._isZoomActive; } @@ -38056,7 +39063,12 @@ return /******/ (function(modules) { // webpackBootstrap var proto = DataZoom.prototype; - proto.render = function (featureModel, ecModel, api) { + proto.render = function (featureModel, ecModel, api, payload) { + this.model = featureModel; + this.ecModel = ecModel; + this.api = api; + + updateZoomBtnStatus(featureModel, ecModel, this, payload); updateBackBtnStatus(featureModel, ecModel); }; @@ -38069,9 +39081,7 @@ return /******/ (function(modules) { // webpackBootstrap }; proto.dispose = function (ecModel, api) { - var zr = api.getZr(); this._brushController.dispose(); - this._controllerGroup && zr.remove(this._controllerGroup); }; /** @@ -38081,160 +39091,114 @@ return /******/ (function(modules) { // webpackBootstrap zoom: function () { var nextActive = !this._isZoomActive; - var controller = this._brushController; - if (nextActive) { - this._isZoomActive = nextActive; - this.model.setIconStatus('zoom', 'emphasis'); - - controller.enableBrush({ - brushType: 'rect', - brushStyle: { - // FIXME - // user customized? - lineWidth: 3, - stroke: '#333', - fill: 'rgba(0,0,0,0.2)' - }, - // FIXME - // 是否应通过触发 action 的方式来互斥而非 onRelease? - onRelease: zrUtil.bind(onRelease, this) - }); - } - else { - controller.enableBrush(false); - } - - function onRelease() { - this.model.setIconStatus('zoom', 'normal'); - this._isZoomActive = false; - } + this.api.dispatchAction({ + type: 'takeGlobalCursor', + key: 'dataZoomSelect', + dataZoomSelectActive: nextActive + }); }, back: function () { - this._dispatchAction(history.pop(this.ecModel)); + this._dispatchZoomAction(history.pop(this.ecModel)); } }; - function prepareCoordInfo(grid, ecModel) { - // Default use the first axis. - // FIXME - var coordInfo = [ - {axisModel: grid.getAxis('x').model, axisIndex: 0}, // x - {axisModel: grid.getAxis('y').model, axisIndex: 0} // y - ]; - coordInfo.grid = grid; - - ecModel.eachComponent( - {mainType: 'dataZoom', subType: 'select'}, - function (dzModel, dataZoomIndex) { - if (isTheAxis('xAxis', coordInfo[0].axisModel, dzModel, ecModel)) { - coordInfo[0].dataZoomModel = dzModel; - } - if (isTheAxis('yAxis', coordInfo[1].axisModel, dzModel, ecModel)) { - coordInfo[1].dataZoomModel = dzModel; - } - } - ); - - return coordInfo; - } - - function isTheAxis(axisName, axisModel, dataZoomModel, ecModel) { - var axisIndex = dataZoomModel.get(axisName + 'Index'); - return axisIndex != null - && ecModel.getComponent(axisName, axisIndex) === axisModel; - } - /** * @private */ - proto._onBrush = function (brushRanges, isEnd) { - if (!isEnd || !brushRanges.length) { + proto._onBrush = function (areas, opt) { + if (!opt.isEnd || !areas.length) { return; } - var brushRange = brushRanges[0]; - - this._brushController.updateCovers([]); // remove cover - var snapshot = {}; var ecModel = this.ecModel; - // FIXME - // polar + this._brushController.updateCovers([]); // remove cover - ecModel.eachComponent('grid', function (gridModel, gridIndex) { - var grid = gridModel.coordinateSystem; - var coordInfo = prepareCoordInfo(grid, ecModel); - var selDataRange = pointToDataInCartesian(brushRange, coordInfo); + var coordInfoList = brushHelper.makeCoordInfoList( + retrieveAxisSetting(this.model.option), ecModel + ); + var rangesCoordInfoList = []; + brushHelper.parseOutputRanges(areas, coordInfoList, ecModel, rangesCoordInfoList); - if (selDataRange) { - var xBatchItem = scaleCartesianAxis(selDataRange, coordInfo, 0, 'x'); - var yBatchItem = scaleCartesianAxis(selDataRange, coordInfo, 1, 'y'); + var area = areas[0]; // dataZoom can not multiple area. + var coordInfo = rangesCoordInfoList[0]; + var coordRange = area.coordRange; + var brushType = area.brushType; - xBatchItem && (snapshot[xBatchItem.dataZoomId] = xBatchItem); - yBatchItem && (snapshot[yBatchItem.dataZoomId] = yBatchItem); + if (coordInfo && coordRange) { + if (brushType === 'rect') { + setBatch('xAxis', coordRange[0], coordInfo); + setBatch('yAxis', coordRange[1], coordInfo); } - }, this); + else { + var axisNames = {lineX: 'xAxis', lineY: 'yAxis'}; + setBatch(axisNames[brushType], coordRange, coordInfo); + } + } history.push(ecModel, snapshot); - this._dispatchAction(snapshot); - }; - - function pointToDataInCartesian(brushRange, coordInfo) { - var grid = coordInfo.grid; - var range = brushRange.range; + this._dispatchZoomAction(snapshot); - var selRect = new BoundingRect( - range[0][0], - range[1][0], - range[0][1] - range[0][0], - range[1][1] - range[1][0] - ); - if (!selRect.intersect(grid.getRect())) { - return; + function setBatch(axisName, minMax, coordInfo) { + var dataZoomModel = findDataZoom(axisName, coordInfo[axisName], ecModel); + if (dataZoomModel) { + snapshot[dataZoomModel.id] = { + dataZoomId: dataZoomModel.id, + startValue: minMax[0], + endValue: minMax[1] + }; + } } - var cartesian = grid.getCartesian(coordInfo[0].axisIndex, coordInfo[1].axisIndex); - var dataLeftTop = cartesian.pointToData([range[0][0], range[1][0]], true); - var dataRightBottom = cartesian.pointToData([range[0][1], range[1][1]], true); - - return [ - asc([dataLeftTop[0], dataRightBottom[0]]), // x, using asc to handle inverse - asc([dataLeftTop[1], dataRightBottom[1]]) // y, using asc to handle inverse - ]; - } - function scaleCartesianAxis(selDataRange, coordInfo, dimIdx, dimName) { - var dimCoordInfo = coordInfo[dimIdx]; - var dataZoomModel = dimCoordInfo.dataZoomModel; - - if (dataZoomModel) { - return { - dataZoomId: dataZoomModel.id, - startValue: selDataRange[dimIdx][0], - endValue: selDataRange[dimIdx][1] - }; + function findDataZoom(axisName, axisModel, ecModel) { + var dataZoomModel; + ecModel.eachComponent( + {mainType: 'dataZoom', subType: 'select'}, + function (dzModel, dataZoomIndex) { + var axisIndex = dzModel.get(axisName + 'Index'); + if (axisIndex != null + && ecModel.getComponent(axisName, axisIndex) === axisModel + ) { + dataZoomModel = dzModel; + } + } + ); + return dataZoomModel; } - } + }; /** * @private */ - proto._dispatchAction = function (snapshot) { + proto._dispatchZoomAction = function (snapshot) { var batch = []; - each(snapshot, function (batchItem) { - batch.push(batchItem); + // Convert from hash map to array. + each(snapshot, function (batchItem, dataZoomId) { + batch.push(zrUtil.clone(batchItem)); }); batch.length && this.api.dispatchAction({ type: 'dataZoom', from: this.uid, - batch: zrUtil.clone(batch, true) + batch: batch }); }; + function retrieveAxisSetting(option) { + var setting = {}; + // Compatible with previous setting: null => all axis, false => no axis. + zrUtil.each(['xAxisIndex', 'yAxisIndex'], function (name) { + setting[name] = option[name]; + setting[name] == null && (setting[name] = 'all'); + (setting[name] === false || setting[name] === 'none') && (setting[name] = []); + }); + return setting; + } + function updateBackBtnStatus(featureModel, ecModel) { featureModel.setIconStatus( 'back', @@ -38242,8 +39206,45 @@ return /******/ (function(modules) { // webpackBootstrap ); } + function updateZoomBtnStatus(featureModel, ecModel, view, payload) { + var zoomActive = view._isZoomActive; + + if (payload && payload.type === 'takeGlobalCursor') { + zoomActive = payload.key === 'dataZoomSelect' + ? payload.dataZoomSelectActive : false; + } + + view._isZoomActive = zoomActive; + + featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal'); + + var coordInfoList = brushHelper.makeCoordInfoList( + retrieveAxisSetting(featureModel.option), ecModel + ); + var brushType = (coordInfoList.xAxisHas && !coordInfoList.yAxisHas) + ? 'lineX' + : (!coordInfoList.xAxisHas && coordInfoList.yAxisHas) + ? 'lineY' + : 'rect'; + + view._brushController + .setPanels(brushHelper.makePanelOpts(coordInfoList)) + .enableBrush( + zoomActive + ? { + brushType: brushType, + brushStyle: { // FIXME user customized? + lineWidth: 0, + // stroke: '#333', + fill: 'rgba(0,0,0,0.2)' + } + } + : false + ); + } + - __webpack_require__(347).register('dataZoom', DataZoom); + __webpack_require__(313).register('dataZoom', DataZoom); // Create special dataZoom option for select @@ -38276,14 +39277,19 @@ return /******/ (function(modules) { // webpackBootstrap return; } + // Try not to modify model, because it is not merged yet. var axisIndicesName = axisName + 'Index'; var givenAxisIndices = dataZoomOpt[axisIndicesName]; - if (givenAxisIndices != null && !zrUtil.isArray(givenAxisIndices)) { - givenAxisIndices = givenAxisIndices === false ? [] : [givenAxisIndices]; + if (givenAxisIndices != null + && givenAxisIndices != 'all' + && !zrUtil.isArray(givenAxisIndices) + ) { + givenAxisIndices = (givenAxisIndices === false || givenAxisIndices === 'none') ? [] : [givenAxisIndices]; } forEachComponent(axisName, function (axisOpt, axisIndex) { if (givenAxisIndices != null + && givenAxisIndices != 'all' && zrUtil.indexOf(givenAxisIndices, axisIndex) === -1 ) { return; @@ -38314,7 +39320,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 354 */ +/* 372 */ /***/ function(module, exports, __webpack_require__) { /** @@ -38428,7 +39434,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 355 */ +/* 373 */ /***/ function(module, exports, __webpack_require__) { /** @@ -38436,21 +39442,21 @@ return /******/ (function(modules) { // webpackBootstrap */ - __webpack_require__(295); + __webpack_require__(316); - __webpack_require__(296); - __webpack_require__(298); + __webpack_require__(317); + __webpack_require__(319); - __webpack_require__(356); - __webpack_require__(357); + __webpack_require__(374); + __webpack_require__(375); - __webpack_require__(306); - __webpack_require__(307); + __webpack_require__(326); + __webpack_require__(327); /***/ }, -/* 356 */ +/* 374 */ /***/ function(module, exports, __webpack_require__) { /** @@ -38458,7 +39464,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - var DataZoomModel = __webpack_require__(296); + var DataZoomModel = __webpack_require__(317); module.exports = DataZoomModel.extend({ @@ -38469,12 +39475,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 357 */ +/* 375 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(298).extend({ + module.exports = __webpack_require__(319).extend({ type: 'dataZoom.select' @@ -38483,13 +39489,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 358 */ +/* 376 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var history = __webpack_require__(354); + var history = __webpack_require__(372); function Restore(model) { this.model = model; @@ -38513,7 +39519,7 @@ return /******/ (function(modules) { // webpackBootstrap }; - __webpack_require__(347).register('restore', Restore); + __webpack_require__(313).register('restore', Restore); __webpack_require__(1).registerAction( @@ -38527,133 +39533,16 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 359 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - - var featureManager = __webpack_require__(347); - var zrUtil = __webpack_require__(4); - - function Brush(model, ecModel, api) { - this.model = model; - this.ecModel = ecModel; - this.api = api; - - /** - * @private - * @type {string} - */ - this._brushType; - - /** - * @private - * @type {string} - */ - this._brushMode; - } - - Brush.defaultOption = { - show: true, - type: ['rect', 'polygon', 'keep', 'clear'], - icon: { - // FIXME - rect: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1', - // FIXME - polygon: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1', - // FIXME - keep: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5', - // FIXME - clear: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5' - }, - title: { - rect: '矩形选择', - polygon: '圈选', - keep: '保持选择', - clear: '清除选择' - } - }; - - var proto = Brush.prototype; - - proto.render = function (featureModel, ecModel, api) { - var brushType; - var brushMode; - - ecModel.eachComponent({mainType: 'brush'}, function (brushModel) { - brushType = brushModel.brushType; - brushMode = brushModel.brushOption.brushMode || 'single'; - }); - - this._brushType = brushType; - this._brushMode = brushMode; - - zrUtil.each(featureModel.get('type', true), function (type) { - if (type !== 'clear' && type !== 'keep') { - featureModel.setIconStatus(type, type === brushType ? 'emphasis' : 'normal'); - } - if (type === 'keep') { - featureModel.setIconStatus(type, brushMode === 'multiple' ? 'emphasis' : 'normal'); - } - }); - }; - - proto.getIcons = function () { - var model = this.model; - var availableIcons = model.get('icon', true); - var icons = {}; - zrUtil.each(model.get('type', true), function (type) { - if (availableIcons[type]) { - icons[type] = availableIcons[type]; - } - }); - return icons; - }; - - proto.onclick = function (ecModel, api, type) { - var api = this.api; - var brushType = this._brushType; - var brushMode = this._brushMode; - - if (type === 'clear') { - api.dispatchAction({ - type: 'brush', - // Clear all brushRanges of all brush components. - brushRanges: [] - }); - } - else { - api.dispatchAction({ - type: 'enableBrush', - brushOption: { - brushType: type === 'keep' - ? brushType - : (brushType === type ? false : type), - brushMode: type === 'keep' - ? (brushMode === 'multiple' ? 'single' : 'multiple') - : brushMode - } - }); - } - }; - - featureManager.register('brush', Brush); - - module.exports = Brush; - - -/***/ }, -/* 360 */ +/* 377 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(361); - __webpack_require__(81).registerPainter('vml', __webpack_require__(363)); + __webpack_require__(378); + __webpack_require__(81).registerPainter('vml', __webpack_require__(380)); /***/ }, -/* 361 */ +/* 378 */ /***/ function(module, exports, __webpack_require__) { // http://www.w3.org/TR/NOTE-VML @@ -38674,7 +39563,7 @@ return /******/ (function(modules) { // webpackBootstrap var Gradient = __webpack_require__(61); - var vmlCore = __webpack_require__(362); + var vmlCore = __webpack_require__(379); var round = Math.round; var sqrt = Math.sqrt; @@ -38872,15 +39761,15 @@ return /******/ (function(modules) { // webpackBootstrap }; var updateStrokeNode = function (el, style) { - if (style.lineJoin != null) { - el.joinstyle = style.lineJoin; - } - if (style.miterLimit != null) { - el.miterlimit = style.miterLimit * Z; - } - if (style.lineCap != null) { - el.endcap = style.lineCap; - } + // if (style.lineJoin != null) { + // el.joinstyle = style.lineJoin; + // } + // if (style.miterLimit != null) { + // el.miterlimit = style.miterLimit * Z; + // } + // if (style.lineCap != null) { + // el.endcap = style.lineCap; + // } if (style.lineDash != null) { el.dashstyle = style.lineDash.join(' '); } @@ -39490,6 +40379,7 @@ return /******/ (function(modules) { // webpackBootstrap // FIXME encodeHtmlAttribute ? var font = fontStyle.style + ' ' + fontStyle.variant + ' ' + fontStyle.weight + ' ' + fontStyle.size + 'px "' + fontStyle.family + '"'; + var baseline = style.textBaseline; var verticalAlign = style.textVerticalAlign; @@ -39710,7 +40600,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 362 */ +/* 379 */ /***/ function(module, exports, __webpack_require__) { @@ -39763,7 +40653,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 363 */ +/* 380 */ /***/ function(module, exports, __webpack_require__) { /** @@ -39775,7 +40665,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrLog = __webpack_require__(40); - var vmlCore = __webpack_require__(362); + var vmlCore = __webpack_require__(379); function parseInt10(val) { return parseInt(val, 10); @@ -39916,6 +40806,10 @@ return /******/ (function(modules) { // webpackBootstrap return this._height; }, + clear: function () { + this.root.removeChild(this.vmlViewport); + }, + _getWidth: function () { var root = this.root; var stl = root.currentStyle; diff --git a/dist/echarts.common.min.js b/dist/echarts.common.min.js index 7be32663be..3e658b448e 100644 --- a/dist/echarts.common.min.js +++ b/dist/echarts.common.min.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.echarts=e():t.echarts=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(2),i(91),i(85),i(96),i(171),i(208),i(184),i(36),i(198),i(191),i(190),i(189),i(174),i(199),i(216)},function(t,e){function i(t){if("object"==typeof t&&null!==t){var e=t;if(t instanceof Array){e=[];for(var n=0,r=t.length;r>n;n++)e[n]=i(t[n])}else if(!S(t)&&!A(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=i(t[o]))}return e}return t}function n(t,e,r){if(!M(e)||!M(t))return r?i(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!M(s)||!M(a)||_(s)||_(a)||A(s)||A(a)||S(s)||S(a)?!r&&o in t||(t[o]=i(e[o],!0)):n(a,s,r)}return t}function r(t,e){for(var i=t[0],r=1,o=t.length;o>r;r++)i=n(i,t[r],e);return i}function o(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function a(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return document.createElement("canvas")}function l(){return k||(k=B.createCanvas().getContext("2d")),k}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,a(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===O)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===R)return t.map(e,i);for(var n=[],r=0,o=t.length;o>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===N)return t.reduce(e,i,n);for(var r=0,o=t.length;o>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===z)return t.filter(e,i);for(var n=[],r=0,o=t.length;o>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=E.call(arguments,2);return function(){return t.apply(e,i.concat(E.call(arguments)))}}function x(t){var e=E.call(arguments,1);return function(){return t.apply(this,e.concat(E.call(arguments)))}}function _(t){return"[object Array]"===D.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===D.call(t)}function M(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function S(t){return!!L[D.call(t)]}function A(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function T(t){for(var e=0,i=arguments.length;i>e;e++)if(null!=arguments[e])return arguments[e]}function I(){return Function.call.apply(E,arguments)}function C(t,e){if(!t)throw new Error(e)}var k,L={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},D=Object.prototype.toString,P=Array.prototype,O=P.forEach,z=P.filter,E=P.slice,R=P.map,N=P.reduce,B={inherits:u,mixin:c,clone:i,merge:n,mergeAll:r,extend:o,defaults:a,getContext:l,createCanvas:s,indexOf:h,slice:I,find:m,isArrayLike:d,each:f,map:p,reduce:g,filter:v,bind:y,curry:x,isArray:_,isString:w,isObject:M,isFunction:b,isBuildInObject:S,isDom:A,retrieve:T,assert:C,noop:function(){}};t.exports=B},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),L.prototype[t].call(this,e,i,n)}}function r(){L.call(this)}function o(t,e,i){function n(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=Q[e]),this.id,this.group,this._dom=t,this._zr=I.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio}),this._theme=C.clone(e),this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._api=new x(this),this._coordSysMgr=new _,this._finalEvents=[],L.call(this),this._messageCenter=new r,this._initEvents(),this.resize=C.bind(this.resize,this),D($,n),D(X,n)}function a(t,e){var i=this._model;i&&i.eachComponent({mainType:"series",query:e},function(n,r){var o=this._chartsMap[n.__viewId];o&&o.__alive&&o[t](n,i,this._api,e)},this)}function s(){this[H]||(this[H]=1,P(this._finalEvents,function(t){this.trigger(t.type,t)},this),this[H]=0)}function l(t,e,i){var n=this._api;P(this._componentsViews,function(r){var o=r.__model;r[t](o,e,n,i),g(o,r)},this),e.eachSeries(function(r,o){var a=this._chartsMap[r.__viewId];a[t](r,e,n,i),g(r,a)},this)}function h(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,r=i?this._componentsMap:this._chartsMap,o=this._zr,a=0;ar.get("progressiveThreshold")&&l&&!m.node;h&&a.group.traverse(function(t){"group"!==t.type&&(t.progressive=h?Math.floor(s++/l):-1,h&&t.stopAnimation(!0))})},this),n>t.get("hoverLayerThreshold")&&!m.node&&this._zr.storage.traverse(function(t){"group"!==t.type&&(t.useHoverLayer=!0)}),P(this._chartsViews,function(e){e.__alive||e.remove(t,i)},this)}function g(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function v(t){function e(t,e){for(var i=0;in;n++)e[n]=i(t[n])}else if(!S(t)&&!A(t)){e={};for(var a in t)t.hasOwnProperty(a)&&(e[a]=i(t[a]))}return e}return t}function n(t,e,r){if(!M(e)||!M(t))return r?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!M(s)||!M(o)||_(s)||_(o)||A(s)||A(o)||S(s)||S(o)?!r&&a in t||(t[a]=i(e[a],!0)):n(o,s,r)}return t}function r(t,e){for(var i=t[0],r=1,a=t.length;a>r;r++)i=n(i,t[r],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function o(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return document.createElement("canvas")}function l(){return k||(k=B.createCanvas().getContext("2d")),k}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,o(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===O)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===R)return t.map(e,i);for(var n=[],r=0,a=t.length;a>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===N)return t.reduce(e,i,n);for(var r=0,a=t.length;a>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===z)return t.filter(e,i);for(var n=[],r=0,a=t.length;a>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=E.call(arguments,2);return function(){return t.apply(e,i.concat(E.call(arguments)))}}function x(t){var e=E.call(arguments,1);return function(){return t.apply(this,e.concat(E.call(arguments)))}}function _(t){return"[object Array]"===P.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===P.call(t)}function M(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function S(t){return!!L[P.call(t)]}function A(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function T(t){for(var e=0,i=arguments.length;i>e;e++)if(null!=arguments[e])return arguments[e]}function I(){return Function.call.apply(E,arguments)}function C(t,e){if(!t)throw new Error(e)}var k,L={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},P=Object.prototype.toString,D=Array.prototype,O=D.forEach,z=D.filter,E=D.slice,R=D.map,N=D.reduce,B={inherits:u,mixin:c,clone:i,merge:n,mergeAll:r,extend:a,defaults:o,getContext:l,createCanvas:s,indexOf:h,slice:I,find:m,isArrayLike:d,each:f,map:p,reduce:g,filter:v,bind:y,curry:x,isArray:_,isString:w,isObject:M,isFunction:b,isBuildInObject:S,isDom:A,retrieve:T,assert:C,noop:function(){}};t.exports=B},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),P.prototype[t].call(this,e,i,n)}}function r(){P.call(this)}function a(t,e,i){function n(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=K[e]),this.id,this.group,this._dom=t,this._zr=C.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio}),this._theme=k.clone(e),this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._api=new _(this),this._coordSysMgr=new b,P.call(this),this._messageCenter=new r,this._initEvents(),this.resize=k.bind(this.resize,this),this._pendingActions=[],D(Q,n),D(Y,n)}function o(t,e){var i=this._model;i&&i.eachComponent({mainType:"series",query:e},function(n,r){var a=this._chartsMap[n.__viewId];a&&a.__alive&&a[t](n,i,this._api,e)},this)}function s(t,e,i){var n=this._api;O(this._componentsViews,function(r){var a=r.__model;r[t](a,e,n,i),v(a,r)},this),e.eachSeries(function(r,a){var o=this._chartsMap[r.__viewId];o[t](r,e,n,i),v(r,o),g(r,o)},this),p(this._zr,e)}function l(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,r=i?this._componentsMap:this._chartsMap,a=this._zr,o=0;oe.get("hoverLayerThreshold")&&!y.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function g(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),r=i>t.get("progressiveThreshold")&&n&&!y.node;r&&e.group.traverse(function(t){t.isGroup||(t.progressive=r?Math.floor(i++/n):-1,r&&t.stopAnimation(!0))});var a=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.setStyle("blend",a)})}function v(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function m(t){function e(t,e){for(var i=0;i0?e.animateTo(i,l,u||0,h,o):(e.attr(i),o&&o())}else e.attr(i),o&&o()}var v=i(1),m=i(162),y=Math.round,x=i(6),_=i(17),b=i(19),w=i(5),M=(i(30),{});M.Group=i(28),M.Image=i(48),M.Text=i(72),M.Circle=i(153),M.Sector=i(159),M.Ring=i(158),M.Polygon=i(155),M.Polyline=i(156),M.Rect=i(157),M.Line=i(154),M.BezierCurve=i(152),M.Arc=i(151),M.CompoundPath=i(145),M.LinearGradient=i(82),M.RadialGradient=i(147),M.BoundingRect=i(7),M.extendShape=function(t){return x.extend(t)},M.extendPath=function(t,e){return m.extendFromString(t,e)},M.makePath=function(t,e,i,n){var r=m.createFromString(t,e),o=r.getBoundingRect();if(i){var a=o.width/o.height;if("center"===n){var s,l=i.height*a;l<=i.width?s=i.height:(l=i.width,s=l/a);var h=i.x+i.width/2,u=i.y+i.height/2;i.x=h-l/2,i.y=u-s/2,i.width=l,i.height=s}this.resizePath(r,i)}return r},M.mergePath=m.mergePath,M.resizePath=function(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}},M.subPixelOptimizeLine=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth;return y(2*i.x1)===y(2*i.x2)&&(i.x1=i.x2=e(i.x1,n,!0)),y(2*i.y1)===y(2*i.y2)&&(i.y1=i.y2=e(i.y1,n,!0)),t},M.subPixelOptimizeRect=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth,r=i.x,o=i.y,a=i.width,s=i.height;return i.x=e(i.x,n,!0),i.y=e(i.y,n,!0),i.width=Math.max(e(r+a,n,!1)-i.x,0===a?0:1),i.height=Math.max(e(o+s,n,!1)-i.y,0===s?0:1),t},M.subPixelOptimize=function(t,e,i){var n=y(2*t);return(n+y(e))%2===0?n/2:(n+(i?1:-1))/2},M.setHoverStyle=function(t,e){"group"===t.type?t.traverse(function(t){"group"!==t.type&&u(t,e)}):u(t,e),t.on("mouseover",c).on("mouseout",d),t.on("emphasis",f).on("normal",p)},M.setText=function(t,e,i){var n=e.getShallow("position")||"inside",r=n.indexOf("inside")>=0?"white":i,o=e.getModel("textStyle");v.extend(t,{textDistance:e.getShallow("distance")||5,textFont:o.getFont(),textPosition:n,textFill:o.getTextColor()||r})},M.updateProps=function(t,e,i,n,r){g(!0,t,e,i,n,r)},M.initProps=function(t,e,i,n,r){g(!1,t,e,i,n,r)},M.getTransform=function(t,e){for(var i=b.identity([]);t&&t!==e;)b.mul(i,t.getLocalTransform(),i),t=t.parent;return i},M.applyTransform=function(t,e,i){return i&&(e=b.invert([],e)),w.applyTransform([],t,e)},M.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return o=M.applyTransform(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},t.exports=M},function(t,e){function i(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}var n={},r=1e-4;n.linearMap=function(t,e,i,n){var r=e[1]-e[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]},n.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?i(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},n.round=function(t){return+(+t).toFixed(10)},n.asc=function(t){return t.sort(function(t,e){return t-e}),t},n.getPrecision=function(t){if(isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},n.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n);return Math.max(-r+o,0)},n.MAX_SAFE_INTEGER=9007199254740991,n.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},n.isRadianAroundZero=function(t){return t>-r&&r>t},n.parseDate=function(t){return t instanceof Date?t:new Date("string"==typeof t?new Date(t.replace(/-/g,"/"))-new Date("1970/01/01"):Math.round(t))},n.quantity=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},n.nice=function(t,e){var i,r=n.quantity(t),o=t/r;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,i*r},t.exports=n},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(t,e){var n=new i(2);return n[0]=t||0,n[1]=e||0,n},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},normalize:function(t,e){var i=n.len(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}};n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t.exports=n},function(t,e,i){function n(t){r.call(this,t),this.path=new a}var r=i(37),o=i(1),a=i(29),s=i(141),l=i(146),h=l.prototype.getCanvasPattern,u=Math.abs;n.prototype={constructor:n,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path,r=i.hasStroke(),o=i.hasFill(),a=i.fill,s=i.stroke,l=o&&!!a.colorStops,u=r&&!!s.colorStops,c=o&&!!a.image,d=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f=this.getBoundingRect();l&&(this._fillGradient=i.getGradient(t,a,f)),u&&(this._strokeGradient=i.getGradient(t,s,f))}l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=h.call(a,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=h.call(s,t));var p=i.lineDash,g=i.lineDashOffset,v=!!t.setLineDash,m=this.getGlobalScale();n.setScale(m[0],m[1]),this.__dirtyPath||p&&!v&&r?(n=this.path.beginPath(t),p&&!v&&(n.setLineDash(p),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),o&&n.fill(t),p&&v&&(t.setLineDash(p),t.lineDashOffset=g),r&&n.stroke(t),p&&v&&t.setLineDash([]),this.restoreTransform(t),(i.text||0===i.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),s.containStroke(o,a/l,t,e)))return!0}if(r.hasFill())return s.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(o.isObject(t))for(var n in t)i[n]=t[n];else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&u(t[0]-1)>1e-10&&u(t[3]-1)>1e-10?Math.sqrt(u(t[0]*t[3]-t[2]*t[1])):1}},n.extend=function(t){var e=function(e){n.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var o in i)!r.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(r[o]=i[o])}t.init&&t.init.call(this,e)};o.inherits(e,n);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},o.inherits(n,r),t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){this.x=t,this.y=e,this.width=i,this.height=n}var r=i(5),o=i(19),a=r.applyTransform,s=Math.min,l=Math.abs,h=Math.max;n.prototype={constructor:n,union:function(t){var e=s(t.x,this.x),i=s(t.y,this.y);this.width=h(t.x+t.width,this.x+this.width)-e,this.height=h(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[];return function(i){i&&(t[0]=this.x,t[1]=this.y,e[0]=this.x+this.width,e[1]=this.y+this.height,a(t,t,i),a(e,e,i),this.x=s(t[0],e[0]),this.y=s(t[1],e[1]),this.width=l(e[0]-t[0]),this.height=l(e[1]-t[1]))}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=o.create();return o.translate(r,r,[-e.x,-e.y]),o.scale(r,r,[i,n]),o.translate(r,r,[t.x,t.y]),r},intersect:function(t){var e=this,i=e.x,n=e.x+e.width,r=e.y,o=e.y+e.height,a=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(a>n||i>s||l>o||r>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new n(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},t.exports=n},function(t,e,i){var n=i(9),r=i(4),o=i(1),a=["x","y","z","radius","angle"],s={};s.createNameEach=function(t,e){t=t.slice();var i=o.map(t,s.capitalFirst);e=(e||[]).slice();var n=o.map(e,s.capitalFirst);return function(r,a){o.each(t,function(t,o){for(var s={name:t,capital:i[o]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function a(t,n){n.nodes.push(t),e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function o(t){!n(t,s)&&r(t,s)&&(a(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;a(i,s);var l;do l=!1,t(o);while(l);return s}},s.defaultEmphasis=function(t,e){if(t){var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{};o.each(e,function(t){var e=o.retrieve(i[t],n[t]);null!=e&&(i[t]=e)})}},s.LABEL_OPTIONS=["position","show","textStyle","distance","formatter"],s.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},s.isDataItemOption=function(t){return o.isObject(t)&&!(t instanceof Array)},s.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isFinite(t)||null==t||"-"===t||(t=+r.parseDate(t)),null==t||""===t?NaN:+t)},s.dataFormatMixin={getDataParams:function(t,e){var i=this.getData(e),n=this.seriesIndex,r=this.name,o=this.getRawValue(t,e),a=i.getRawIndex(t),s=i.getName(t,!0),l=i.getRawDataItem(t);return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:n,seriesName:r,name:s,dataIndex:a,data:l,dataType:e,value:o,color:i.getItemVisual(t,"color"),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,r){e=e||"normal";var o=this.getData(i),a=o.getItemModel(t),s=this.getDataParams(t,i);null!=r&&s.value instanceof Array&&(s.value=s.value[r]);var l=a.get(["label",e,"formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?n.formatTpl(l,s):void 0},getRawValue:function(t,e){var i=this.getData(e),n=i.getRawDataItem(t);return null!=n?!o.isObject(n)||n instanceof Array?n:n.value:void 0},formatTooltip:o.noop},s.mappingToExists=function(t,e){e=(e||[]).slice();var i=o.map(t||[],function(t,e){return{exist:t}});return o.each(e,function(t,n){if(o.isObject(t))for(var r=0;r=i.length&&i.push({option:t})}}),i},s.isIdInner=function(t){return o.isObject(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")},s.compressBatches=function(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var o=t[n].seriesId,a=s.normalizeToArray(t[n].dataIndex),l=i&&i[o],h=0,u=a.length;u>h;h++){var c=a[h];l&&l[c]?l[c]=null:(e[o]||(e[o]={}))[c]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var o=n(t[r],!0);o.length&&i.push({seriesId:r,dataIndex:o})}return i}var r={},o={};return i(t||[],r),i(e||[],o,r),[n(r),n(o)]},t.exports=s},function(t,e,i){function n(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function r(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function o(t){var e=t.length;return"number"==typeof t?[t,t,t,t]:2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function a(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function s(t,e){return"{"+t+(null==e?"":e)+"}"}function l(t,e){c.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars,r=0;ra;a++)for(var l=0;lt?"0"+t:t}var c=i(1),d=i(4),f=["a","b","c","d","e","f","g"];t.exports={normalizeCssArray:o,addCommas:n,toCamelCase:r,encodeHTML:a,formatTpl:l,formatTime:h}},function(t,e,i){function n(t){var e=[];return o.each(u.getClassesByMainType(t),function(t){a.apply(e,t.prototype.dependencies||[])}),o.map(e,function(t){return l.parseClassType(t).main})}var r=i(12),o=i(1),a=Array.prototype.push,s=i(42),l=i(20),h=i(14),u=r.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,init:function(t,e,i,n){this.mergeDefaultAndTheme(this.option,this.ecModel)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?h.getLayoutParams(t):{},r=e.getTheme();o.merge(t,r.get(this.mainType)),o.merge(t,this.getDefaultOption()),i&&h.mergeLayoutParam(t,n,i)},mergeOption:function(t){o.merge(this.option,t,!0);var e=this.layoutMode;e&&h.mergeLayoutParam(this.option,t,e)},optionUpdated:function(t,e){},getDefaultOption:function(){if(!this.hasOwnProperty("__defaultOption")){for(var t=[],e=this.constructor;e;){var i=e.prototype.defaultOption;i&&t.push(i),e=e.superClass}for(var n={},r=t.length-1;r>=0;r--)n=o.merge(n,t[r],!0);this.__defaultOption=n}return this.__defaultOption}});l.enableClassExtend(u,function(t,e,i,n){o.extend(this,n),this.uid=s.getUID("componentModel")}),l.enableClassManagement(u,{registerWhenExtend:!0}),s.enableSubTypeDefaulter(u),s.enableTopologicalTravel(u,n),o.mixin(u,i(120)),t.exports=u},function(t,e){function i(t){var e={},i={},n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/);return n&&(i.ie=!0,i.version=n[1]),n&&(i.ie=!0,i.version=n[1]),r&&(i.edge=!0,i.version=r[1]),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=10)}}var n={};n="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:i(navigator.userAgent),t.exports=n},function(t,e,i){function n(t,e,i,n){this.parentModel=e,this.ecModel=i,this.option=t,this.init&&(arguments.length<=4?this.init(t,e,i,n):this.init.apply(this,arguments))}var r=i(1),o=i(20);n.prototype={constructor:n,init:null,mergeOption:function(t){r.merge(this.option,t,!0)},get:function(t,e){if(!t)return this.option;"string"==typeof t&&(t=t.split("."));for(var i=this.option,n=this.parentModel,r=0;r=0?r[s]=new l.constructor(o[s].length):r[s]=o[s]}return n}var o="undefined",a="undefined"==typeof window?e:window,s=typeof a.Float64Array===o?Array:a.Float64Array,l=typeof a.Int32Array===o?Array:a.Int32Array,h={"float":s,"int":l,ordinal:Array,number:Array,time:Array},u=i(12),c=i(45),d=i(1),f=i(8),p=d.isObject,g=["stackedOn","hasItemOption","_nameList","_idList","_rawData"],v=function(t,e){d.each(g.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods},m=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;r0&&(b+="__ec__"+u[w]),u[w]++),b&&(l[c]=b)}this._nameList=e,this._idList=l},y.count=function(){return this.indices.length},y.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r)return NaN;var o=n[t]&&n[t][r];if(i){var a=this._dimensionInfos[t];if(a&&a.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(o>=0&&l>0||0>=o&&0>l)&&(o+=l),s=s.stackedOn}}return o},y.getValues=function(t,e,i){var n=[];d.isArray(t)||(i=e,e=t,t=this.dimensions);for(var r=0,o=t.length;o>r;r++)n.push(this.get(t[r],e,i));return n},y.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},y.getDataExtent=function(t,e){var i=this._storage[t],n=this.getDimensionInfo(t);e=n&&n.stackable&&e;var r,o=(this._extent||(this._extent={}))[t+!!e];if(o)return o;if(i){for(var a=1/0,s=-(1/0),l=0,h=this.count();h>l;l++)r=this.get(t,l,e),a>r&&(a=r),r>s&&(s=r);return this._extent[t+!!e]=[a,s]}return[1/0,-(1/0)]},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,o=this.count();o>r;r++){var a=this.get(t,r,e);isNaN(a)||(n+=a)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var o=0,a=r.length;a>o;o++){var s=r[o];if(n[s]===e)return o}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var o=e[n];if(i[o]===t)return n}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,r=n[t];if(r){for(var o=Number.MAX_VALUE,a=-1,s=0,l=this.count();l>s;s++){var h=e-this.get(t,s,i),u=Math.abs(h);(o>u||u===o&&h>0)&&(o=u,a=s)}return a}return-1},y.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},y.getRawDataItem=function(t){return this._rawData[this.getRawIndex(t)]},y.getName=function(t){return this._nameList[this.indices[t]]||""},y.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},y.each=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],a=t.length,s=this.indices;r=r||this;for(var l=0;lh;h++)o[h]=this.get(t[h],l,i);o[h]=l,e.apply(r,o)}},y.filterSelf=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],a=[],s=t.length,l=this.indices;r=r||this;for(var h=0;hc;c++)a[c]=this.get(t[c],h,i);a[c]=h,u=e.apply(r,a)}u&&o.push(l[h])}return this.indices=o,this._extent={},this},y.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},y.map=function(t,e,i,o){t=d.map(n(t),this.getDimension,this);var a=r(this,t),s=a.indices=this.indices,l=a._storage,h=[]; -return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(h[0]=n,n=h);for(var r=0;rg;g+=d){d>p-g&&(d=p-g,u.length=d);for(var v=0;d>v;v++){var m=l[g+v];u[v]=f[m],c[v]=m}var y=i(u),m=c[n(u,y)||0];f[m]=y,h.push(m)}return o},y.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new u(this._rawData[t],e,e&&e.ecModel)},y.diff=function(t){var e=this._idList,i=t&&t._idList;return new c(t?t.indices:[],this.indices,function(t){return i[t]||t+""},function(t){return e[t]||t+""})},y.getVisual=function(t){var e=this._visual;return e&&e[t]},y.setVisual=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},y.setLayout=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},y.getLayout=function(t){return this._layout[t]},y.getItemLayout=function(t){return this._itemLayouts[t]},y.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?d.extend(this._itemLayouts[t]||{},e):e},y.clearItemLayouts=function(){this._itemLayouts.length=0},y.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=i},y.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var x=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};y.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(x,e)),this._graphicEls[t]=e},y.getItemGraphicEl=function(t){return this._graphicEls[t]},y.eachItemGraphicEl=function(t,e){d.each(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},y.cloneShallow=function(){var t=d.map(this.dimensions,this.getDimensionInfo,this),e=new m(t,this.hostModel);return e._storage=this._storage,v(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=d.extend({},this._extent)),e},y.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(d.slice(arguments)))})},y.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],y.CHANGABLE_METHODS=["filterSelf"],t.exports=m}).call(e,function(){return this}())},function(t,e,i){"use strict";function n(t,e,i,n,r){var o=0,a=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);u=o+v,u>n||l.newline?(o=0,u=v,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=a+m,c>r||l.newline?(o+=s+i,a=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=u+i:a=c+i)})}var r=i(1),o=i(7),a=i(4),s=i(9),l=a.parsePercent,h=r.each,u={},c=["left","right","top","bottom","width","height"];u.box=n,u.vbox=r.curry(n,"vertical"),u.hbox=r.curry(n,"horizontal"),u.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,o=l(t.x,n),a=l(t.y,r),h=l(t.x2,n),u=l(t.y2,r);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=n),(isNaN(a)||isNaN(parseFloat(t.y)))&&(a=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=r),i=s.normalizeCssArray(i||0),{width:Math.max(h-o-i[1]-i[3],0),height:Math.max(u-a-i[0]-i[2],0)}},u.getLayoutRect=function(t,e,i){i=s.normalizeCssArray(i||0);var n=e.width,r=e.height,a=l(t.left,n),h=l(t.top,r),u=l(t.right,n),c=l(t.bottom,r),d=l(t.width,n),f=l(t.height,r),p=i[2]+i[0],g=i[1]+i[3],v=t.aspect;switch(isNaN(d)&&(d=n-u-g-a),isNaN(f)&&(f=r-c-p-h),isNaN(d)&&isNaN(f)&&(v>n/r?d=.8*n:f=.8*r),null!=v&&(isNaN(d)&&(d=v*f),isNaN(f)&&(f=d/v)),isNaN(a)&&(a=n-u-d-g),isNaN(h)&&(h=r-c-f-p),t.left||t.right){case"center":a=n/2-d/2-i[3];break;case"right":a=n-d-g}switch(t.top||t.bottom){case"middle":case"center":h=r/2-f/2-i[0];break;case"bottom":h=r-f-p}a=a||0,h=h||0,isNaN(d)&&(d=n-a-(u||0)),isNaN(f)&&(f=r-h-(c||0));var m=new o(a+i[3],h+i[0],d,f);return m.margin=i,m},u.positionGroup=function(t,e,i,n){var o=t.getBoundingRect();e=r.extend(r.clone(e),{width:o.width,height:o.height}),e=u.getLayoutRect(e,i,n),t.attr("position",[e.x-o.x,e.y-o.y])},u.mergeLayoutParam=function(t,e,i){function n(n){var r={},s=0,l={},u=0,c=i.ignoreSize?1:2;if(h(n,function(e){l[e]=t[e]}),h(n,function(t){o(e,t)&&(r[t]=l[t]=e[t]),a(r,t)&&s++,a(l,t)&&u++}),u!==c&&s){if(s>=c)return r;for(var d=0;d',d=this.name;return"\x00-"===d&&(d=""),e?c+h(this.name)+" : "+a:(d&&h(d)+"
")+c+(s?h(s)+" : "+a:a)},ifEnableAnimation:function(){if(l.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()},getColorFromPalette:function(t,e){var i=this.ecModel,n=s.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipDataIndex:null});n.mixin(c,o.dataFormatMixin),n.mixin(c,s),t.exports=c},function(t,e,i){"use strict";function n(t){return t>-w&&w>t}function r(t){return t>w||-w>t}function o(t,e,i,n,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*n+3*o*i)}function a(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function s(t,e,i,r,o,a){var s=r+3*(e-i)-t,l=3*(i-2*e+t),h=3*(e-t),u=t-o,c=l*l-3*s*h,d=l*h-9*s*u,f=h*h-3*l*u,p=0;if(n(c)&&n(d))if(n(l))a[0]=0;else{var g=-h/l;g>=0&&1>=g&&(a[p++]=g)}else{var v=d*d-4*c*f;if(n(v)){var m=d/c,g=-l/s+m,y=-m/2;g>=0&&1>=g&&(a[p++]=g),y>=0&&1>=y&&(a[p++]=y)}else if(v>0){var x=b(v),w=c*l+1.5*s*(-d+x),M=c*l+1.5*s*(-d-x);w=0>w?-_(-w,A):_(w,A),M=0>M?-_(-M,A):_(M,A);var g=(-l-(w+M))/(3*s);g>=0&&1>=g&&(a[p++]=g)}else{var T=(2*c*l-3*s*d)/(2*b(c*c*c)),I=Math.acos(T)/3,C=b(c),k=Math.cos(I),g=(-l-2*C*k)/(3*s),y=(-l+C*(k+S*Math.sin(I)))/(3*s),L=(-l+C*(k-S*Math.sin(I)))/(3*s);g>=0&&1>=g&&(a[p++]=g),y>=0&&1>=y&&(a[p++]=y),L>=0&&1>=L&&(a[p++]=L)}}return p}function l(t,e,i,o,a){var s=6*i-12*e+6*t,l=9*e+3*o-3*t-9*i,h=3*e-3*t,u=0;if(n(l)){if(r(s)){var c=-h/s;c>=0&&1>=c&&(a[u++]=c)}}else{var d=s*s-4*l*h;if(n(d))a[0]=-s/(2*l);else if(d>0){var f=b(d),c=(-s+f)/(2*l),p=(-s-f)/(2*l);c>=0&&1>=c&&(a[u++]=c),p>=0&&1>=p&&(a[u++]=p)}}return u}function h(t,e,i,n,r,o){var a=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-a)*r+a,u=(l-s)*r+s,c=(u-h)*r+h;o[0]=t,o[1]=a,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=n}function u(t,e,i,n,r,a,s,l,h,u,c){var d,f,p,g,v,m=.005,y=1/0;T[0]=h,T[1]=u;for(var _=0;1>_;_+=.05)I[0]=o(t,i,r,s,_),I[1]=o(e,n,a,l,_),g=x(T,I),y>g&&(d=_,y=g);y=1/0;for(var w=0;32>w&&!(M>m);w++)f=d-m,p=d+m,I[0]=o(t,i,r,s,f),I[1]=o(e,n,a,l,f),g=x(I,T),f>=0&&y>g?(d=f,y=g):(C[0]=o(t,i,r,s,p),C[1]=o(e,n,a,l,p),v=x(C,T),1>=p&&y>v?(d=p,y=v):m*=.5);return c&&(c[0]=o(t,i,r,s,d),c[1]=o(e,n,a,l,d)),b(y)}function c(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function d(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function f(t,e,i,o,a){var s=t-2*e+i,l=2*(e-t),h=t-o,u=0;if(n(s)){if(r(l)){var c=-h/l;c>=0&&1>=c&&(a[u++]=c)}}else{var d=l*l-4*s*h;if(n(d)){var c=-l/(2*s);c>=0&&1>=c&&(a[u++]=c)}else if(d>0){var f=b(d),c=(-l+f)/(2*s),p=(-l-f)/(2*s);c>=0&&1>=c&&(a[u++]=c),p>=0&&1>=p&&(a[u++]=p)}}return u}function p(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function g(t,e,i,n,r){var o=(e-t)*n+t,a=(i-e)*n+e,s=(a-o)*n+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=i}function v(t,e,i,n,r,o,a,s,l){var h,u=.005,d=1/0;T[0]=a,T[1]=s;for(var f=0;1>f;f+=.05){I[0]=c(t,i,r,f),I[1]=c(e,n,o,f);var p=x(T,I);d>p&&(h=f,d=p)}d=1/0;for(var g=0;32>g&&!(M>u);g++){var v=h-u,m=h+u;I[0]=c(t,i,r,v),I[1]=c(e,n,o,v);var p=x(I,T);if(v>=0&&d>p)h=v,d=p;else{C[0]=c(t,i,r,m),C[1]=c(e,n,o,m);var y=x(C,T);1>=m&&d>y?(h=m,d=y):u*=.5}}return l&&(l[0]=c(t,i,r,h),l[1]=c(e,n,o,h)),b(d)}var m=i(5),y=m.create,x=m.distSquare,_=Math.pow,b=Math.sqrt,w=1e-8,M=1e-4,S=b(3),A=1/3,T=y(),I=y(),C=y();t.exports={cubicAt:o,cubicDerivativeAt:a,cubicRootAt:s,cubicExtrema:l,cubicSubdivide:h,cubicProjectPoint:u,quadraticAt:c,quadraticDerivativeAt:d,quadraticRootAt:f,quadraticExtremum:p,quadraticSubdivide:g,quadraticProjectPoint:v}},function(t,e){function i(t){return t=Math.round(t),0>t?0:t>255?255:t}function n(t){return t=Math.round(t),0>t?0:t>360?360:t}function r(t){return 0>t?0:t>1?1:t}function o(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function a(t){return r(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function s(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function l(t,e,i){return t+(e-t)*i}function h(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in x)return x[e].slice();if("#"!==e.charAt(0)){var i=e.indexOf("("),n=e.indexOf(")");if(-1!==i&&n+1===e.length){var r=e.substr(0,i),s=e.substr(i+1,n-(i+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return;l=a(s.pop());case"rgb":if(3!==s.length)return;return[o(s[0]),o(s[1]),o(s[2]),l];case"hsla":if(4!==s.length)return;return s[3]=a(s[3]),u(s);case"hsl":if(3!==s.length)return;return u(s);default:return}}}else{if(4===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&4095>=h))return;return[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]}if(7===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&16777215>=h))return;return[(16711680&h)>>16,(65280&h)>>8,255&h,1]}}}}function u(t){var e=(parseFloat(t[0])%360+360)%360/360,n=a(t[1]),r=a(t[2]),o=.5>=r?r*(n+1):r+n-r*n,l=2*r-o,h=[i(255*s(l,o,e+1/3)),i(255*s(l,o,e)),i(255*s(l,o,e-1/3))];return 4===t.length&&(h[3]=t[3]),h}function c(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a,h=(s+a)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+a):l/(2-s-a);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+u-d:o===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function d(t,e){var i=h(t);if(i){for(var n=0;3>n;n++)0>e?i[n]=i[n]*(1-e)|0:i[n]=(255-i[n])*e+i[n]|0;return y(i,4===i.length?"rgba":"rgb")}}function f(t,e){var i=h(t);return i?((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1):void 0}function p(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[0,0,0,0];var r=t*(e.length-1),o=Math.floor(r),a=Math.ceil(r),s=e[o],h=e[a],u=r-o;return n[0]=i(l(s[0],h[0],u)),n[1]=i(l(s[1],h[1],u)),n[2]=i(l(s[2],h[2],u)),n[3]=i(l(s[3],h[3],u)),n}}function g(t,e,n){if(e&&e.length&&t>=0&&1>=t){var o=t*(e.length-1),a=Math.floor(o),s=Math.ceil(o),u=h(e[a]),c=h(e[s]),d=o-a,f=y([i(l(u[0],c[0],d)),i(l(u[1],c[1],d)),i(l(u[2],c[2],d)),r(l(u[3],c[3],d))],"rgba");return n?{color:f,leftIndex:a,rightIndex:s,value:o}:f}}function v(t,e,i,r){return t=h(t),t?(t=c(t),null!=e&&(t[0]=n(e)),null!=i&&(t[1]=a(i)),null!=r&&(t[2]=a(r)),y(u(t),"rgba")):void 0}function m(t,e){return t=h(t),t&&null!=e?(t[3]=r(e),y(t,"rgba")):void 0}function y(t,e){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}var x={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};t.exports={parse:h,lift:d,toHex:f,fastMapToColor:p,mapToColor:g,modifyHSL:v,modifyAlpha:m,stringify:y}},function(t,e,i){function n(t,e){var i=t+":"+e;if(h[i])return h[i];for(var n=(t+"").split("\n"),r=0,o=0,a=n.length;a>o;o++)r=Math.max(p.measureText(n[o],e).width,r);return u>c&&(u=0,h={}),u++,h[i]=r,r}function r(t,e,i,r){var o=((t||"")+"").split("\n").length,a=n(t,e),s=n("国",e),l=o*s,h=new f(0,0,a,l);switch(h.lineHeight=s,r){case"bottom":case"alphabetic":h.y-=s;break;case"middle":h.y-=s/2}switch(i){case"end":case"right":h.x-=h.width;break;case"center":h.x-=h.width/2}return h}function o(t,e,i,n){var r=e.x,o=e.y,a=e.height,s=e.width,l=i.height,h=a/2-l/2,u="left";switch(t){case"left":r-=n,o+=h,u="right";break;case"right":r+=n+s,o+=h,u="left";break;case"top":r+=s/2,o-=n+l,u="center";break;case"bottom":r+=s/2,o+=a+n,u="center";break;case"inside":r+=s/2,o+=h,u="center";break;case"insideLeft":r+=n,o+=h,u="left";break;case"insideRight":r+=s-n,o+=h,u="right";break;case"insideTop":r+=s/2,o+=n,u="center";break;case"insideBottom":r+=s/2,o+=a-l-n,u="center";break;case"insideTopLeft":r+=n,o+=n,u="left";break;case"insideTopRight":r+=s-n,o+=n,u="right";break;case"insideBottomLeft":r+=n,o+=a-l-n;break;case"insideBottomRight":r+=s-n,o+=a-l-n,u="right"}return{x:r,y:o,textAlign:u,textBaseline:"top"}}function a(t,e,i,r){if(!i)return"";r=d.defaults({ellipsis:"...",minCharacters:3,maxIterations:3,cnCharWidth:n("国",e),ascCharWidth:n("a",e)},r,!0),i-=n(r.ellipsis);for(var o=(t+"").split("\n"),a=0,l=o.length;l>a;a++)o[a]=s(o[a],e,i,r);return o.join("\n")}function s(t,e,i,r){for(var o=0;;o++){var a=n(t,e);if(i>a||o>=r.maxIterations){t+=r.ellipsis;break}var s=0===o?l(t,i,r):Math.floor(t.length*i/a);if(sr&&e>n;r++){var a=t.charCodeAt(r);n+=a>=0&&127>=a?i.ascCharWidth:i.cnCharWidth}return r}var h={},u=0,c=5e3,d=i(1),f=i(7),p={getWidth:n,getBoundingRect:r,adjustTextPositionOnRect:o,ellipsis:a,measureText:function(t,e){var i=d.getContext();return i.font=e,i.measureText(t)}};t.exports=p},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(){var t=new i(6);return n.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},rotate:function(t,e,i){var n=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+a*h,t[1]=-n*h+a*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*o+h*l,t[5]=u*l-h*o,t},scale:function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},invert:function(t,e){var i=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=i*a-o*n;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*r)*l,t[5]=(o*r-i*s)*l,t):null}};t.exports=n},function(t,e,i){function n(t,e){var i=o.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function r(t,e,i){return this.superClass.prototype[e].apply(t,i)}var o=i(1),a={},s=".",l="___EC__COMPONENT__CONTAINER___",h=a.parseClassType=function(t){var e={main:"",sub:""};return t&&(t=t.split(s),e.main=t[0]||"",e.sub=t[1]||""),e};a.enableClassExtend=function(t,e){t.extend=function(i){var a=function(){e&&e.apply(this,arguments),t.apply(this,arguments)};return o.extend(a.prototype,i),a.extend=this.extend,a.superCall=n,a.superApply=r,o.inherits(a,this),a.superClass=this,a}},a.enableClassManagement=function(t,e){function i(t){var e=n[t.main];return e&&e[l]||(e=n[t.main]={},e[l]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(e=h(e),e.sub){if(e.sub!==l){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[l]&&(r=e?r[e]:null),i&&!r)throw new Error("Component "+t+"."+(e||"")+" not exists. Load it first.");return r},t.getClassesByMainType=function(t){t=h(t);var e=[],i=n[t.main];return i&&i[l]?o.each(i,function(t,i){i!==l&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=h(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return o.each(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=h(t);var e=n[t.main];return e&&e[l]},t.parseClassType=h,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t},a.setReadOnly=function(t,e){},t.exports=a},function(t,e,i){var n=Array.prototype.slice,r=i(1),o=r.indexOf,a=function(){this._$handlers={}};a.prototype={constructor:a,one:function(t,e,i){var n=this._$handlers;return e&&t?(n[t]||(n[t]=[]),o(n[t],t)>=0?this:(n[t].push({h:e,one:!0,ctx:i||this}),this)):this},on:function(t,e,i){var n=this._$handlers;return e&&t?(n[t]||(n[t]=[]),n[t].push({h:e,one:!1,ctx:i||this}),this):this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,o=i[t].length;o>r;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=n.call(e,1));for(var r=this._$handlers[t],o=r.length,a=0;o>a;){switch(i){case 1:r[a].h.call(r[a].ctx);break;case 2:r[a].h.call(r[a].ctx,e[1]);break;case 3:r[a].h.call(r[a].ctx,e[1],e[2]);break;default:r[a].h.apply(r[a].ctx,e)}r[a].one?(r.splice(a,1),o--):a++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=n.call(e,1,e.length-1));for(var r=e[e.length-1],o=this._$handlers[t],a=o.length,s=0;a>s;){switch(i){case 1:o[s].h.call(r);break;case 2:o[s].h.call(r,e[1]);break;case 3:o[s].h.call(r,e[1],e[2]);break;default:o[s].h.apply(r,e)}o[s].one?(o.splice(s,1),a--):s++}}return this}},t.exports=a},function(t,e){"use strict";var i={};t.exports={register:function(t,e){i[t]=e},get:function(t){return i[t]}}},function(t,e,i){"use strict";function n(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function r(t,e,i){var r=n(t);return i=i||{},i.zrX=e.clientX-r.left,i.zrY=e.clientY-r.top,i}function o(t,e){if(e=e||window.event,null!=e.zrX)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var o="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];o&&r(t,o,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function a(t,e,i){h?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function s(t,e,i){h?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}var l=i(21),h="undefined"!=typeof window&&!!window.addEventListener,u=h?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};t.exports={clientToLocal:r,normalizeEvent:o,addEventListener:a,removeEventListener:s,stop:u,Dispatcher:l}},function(t,e){"use strict";function i(){this._coordinateSystems=[]}var n={};i.prototype={constructor:i,create:function(t,e){var i=[];for(var r in n){var o=n[r].create(t,e);o&&(i=i.concat(o))}this._coordinateSystems=i},update:function(t,e){for(var i=this._coordinateSystems,n=0;n0&&l>0&&!c&&(o=0),0>o&&0>l&&!d&&(l=0)),[o,l]},h.niceScaleExtent=function(t,e){var i=t.scale,n=h.getScaleExtent(t,e),r=null!=(e.getMin?e.getMin():e.get("min")),o=null!=(e.getMax?e.getMax():e.get("max")),a=e.get("splitNumber");i.setExtent(n[0],n[1]),i.niceExtent(a,r,o);var s=e.get("minInterval");if(isFinite(s)&&!r&&!o&&"interval"===i.type){var l=i.getInterval(),u=Math.max(Math.abs(l),s)/l;n=i.getExtent(),i.setExtent(u*n[0],n[1]*u),i.niceExtent(a)}var l=e.get("interval");null!=l&&i.setInterval&&i.setInterval(l)},h.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new n(t.getCategories(),[1/0,-(1/0)]);case"value":return new r;default:return(o.getClass(e)||r).create(t)}},h.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)},h.getAxisLabelInterval=function(t,e,i,n){var r,o=0,a=0,s=1;e.length>40&&(s=Math.floor(e.length/40));for(var h=0;h1?s:o*s},h.getFormattedLabels=function(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",e)}}(e),s.map(n,e)):"function"==typeof e?s.map(r,function(n,r){return e("category"===t.type?i.getLabel(n):n,r)},this):n},t.exports=h},function(t,e,i){"use strict";var n=i(3),r=i(7),o=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n+o),t.lineTo(i-r,n+o),t.closePath()}}),a=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n),t.lineTo(i,n+o),t.lineTo(i-r,n),t.closePath()}}),s=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=n-o+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h);t.arc(i,l,a,Math.PI-h,2*Math.PI+h);var f=.6*a,p=.7*a;t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),l=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,o=e.y,a=n/3*2;t.moveTo(r,o),t.lineTo(r+a,o+i),t.lineTo(r,o+i/4*3),t.lineTo(r-a,o+i),t.lineTo(r,o),t.closePath()}}),h={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:a,pin:s,arrow:l,triangle:o},u={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var o=Math.min(i,n);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},c={};for(var d in h)c[d]=new h[d];var f=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e){var i=e.symbolType,n=c[i];"none"!==e.symbolType&&(n||(i="rect",n=c[i]),u[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(t,n.shape))}}),p=function(t){if("image"!==this.type){var e=this.style,i=this.shape;i&&"line"===i.symbolType?e.stroke=t:this.__isEmptyBrush?(e.stroke=t,e.fill="#fff"):(e.fill&&(e.fill=t),e.stroke&&(e.stroke=t)),this.dirty(!1)}},g={createSymbol:function(t,e,i,o,a,s){var l=0===t.indexOf("empty");l&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var h;return h=0===t.indexOf("image://")?new n.Image({style:{image:t.slice(8),x:e,y:i,width:o,height:a}}):0===t.indexOf("path://")?n.makePath(t.slice(7),{},new r(e,i,o,a)):new f({shape:{symbolType:t,x:e,y:i,width:o,height:a}}),h.__isEmptyBrush=l,h.setColor=p,h.setColor(s),h}};t.exports=g},function(t,e,i){function n(){this.group=new a,this.uid=s.getUID("viewChart")}function r(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;is;s++)r(t.getItemGraphicEl(a[s]),i);else if(o)for(var h=o instanceof Array?o:[o],s=0,l=h.length;l>s;s++){var n=t.indexOfName(h[s]);r(t.getItemGraphicEl(n),i)}else t.eachItemGraphicEl(function(t){r(t,i)})}var a=i(28),s=i(42),l=i(20);n.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){o(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){o(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var h=n.prototype;h.updateView=h.updateLayout=h.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},l.enableClassExtend(n),l.enableClassManagement(n,{registerWhenExtend:!0}),t.exports=n},function(t,e,i){var n=i(1),r=i(57),o=i(7),a=function(t){t=t||{},r.call(this,t);for(var e in t)this[e]=t[e];this._children=[],this.__storage=null,this.__dirty=!0};a.prototype={constructor:a,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof a&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,o=n.indexOf(r,t);return 0>o?this:(r.splice(o,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof a&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;ethis._ux||y(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(l.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(l.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(l.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=g(r)*i+t,this._xi=v(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(l.R,t,e,i,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();x&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;ae.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=r+o),o%=r,g-=o*u,v-=o*c;u>=0&&t>=g||0>u&&g>t;)n=this._dashIdx,i=a[n],g+=u*i,v+=c*i,this._dashIdx=(n+1)%y,u>0&&l>g||0>u&&g>l||s[n%2?"moveTo":"lineTo"](u>=0?f(g,t):p(g,t),c>=0?f(v,e):p(v,e));u=g-t,c=v-e,this._dashOffset=-m(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,o,a){var s,l,h,u,c,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._ctx,v=this._xi,y=this._yi,x=n.cubicAt,_=0,b=this._dashIdx,w=p.length,M=0;for(0>f&&(f=d+f),f%=d,s=0;1>s;s+=.1)l=x(v,t,i,o,s+.1)-x(v,t,i,o,s),h=x(y,e,r,a,s+.1)-x(y,e,r,a,s),_+=m(l*l+h*h);for(;w>b&&(M+=p[b],!(M>f));b++);for(s=(M-f)/_;1>=s;)u=x(v,t,i,o,s),c=x(y,e,r,a,s),b%2?g.moveTo(u,c):g.lineTo(u,c),s+=p[b]/_,b=(b+1)%w;b%2!==0&&g.lineTo(o,a),l=o-u,h=a-c,this._dashOffset=-m(l*l+h*h)},_dashedQuadraticTo:function(t,e,i,n){var r=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,x&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=d[0]=d[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,s=0,f=0;fd;){var f=s[d++];switch(1==d&&(n=s[d],r=s[d+1],e=n,i=r),f){case l.M:e=n=s[d++],i=r=s[d++],t.moveTo(n,r);break;case l.L:o=s[d++],a=s[d++],(y(o-n)>h||y(a-r)>u||d===c-1)&&(t.lineTo(o,a),n=o,r=a);break;case l.C:t.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.Q:t.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.A:var p=s[d++],m=s[d++],x=s[d++],_=s[d++],b=s[d++],w=s[d++],M=s[d++],S=s[d++],A=x>_?x:_,T=x>_?1:x/_,I=x>_?_/x:1,C=Math.abs(x-_)>.001,k=b+w;C?(t.translate(p,m),t.rotate(M),t.scale(T,I),t.arc(0,0,A,b,k,1-S),t.scale(1/T,1/I),t.rotate(-M),t.translate(-p,-m)):t.arc(p,m,A,b,k,1-S),1==d&&(e=g(b)*x+p,i=v(b)*_+m),n=g(k)*x+p,r=v(k)*_+m;break;case l.R:e=n=s[d],i=r=s[d+1],t.rect(s[d++],s[d++],s[d++],s[d++]);break;case l.Z:t.closePath(),n=e,r=i}}}},_.CMD=l,t.exports=_},function(t,e){var i=function(t){this.colorStops=t||[]};i.prototype={constructor:i,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},t.exports=i},function(t,e,i){function n(t,e,i,n){if(!e)return t;var s=r(e[0]),l=o.isArray(s)&&s.length||1;i=i||[],n=n||"extra";for(var h=0;l>h;h++)if(!t[h]){var u=i[h]||n+(h-i.length);t[h]=a(e,h)?{type:"ordinal",name:u}:u}return t}function r(t){return o.isArray(t)?t:o.isObject(t)?t.value:t}var o=i(1),a=n.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var a=r(t[i]);if(!o.isArray(a))return!1;var a=a[e];if(null!=a&&isFinite(a))return!1;if(o.isString(a)&&"-"!==a)return!0}return!1};t.exports=n},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=0;e=0)){var a=this.getShallow(o);null!=a&&(i[t[r][0]]=a)}}return i}}},function(t,e,i){function n(){this._extent=[1/0,-(1/0)],this._interval=0,this.init&&this.init.apply(this,arguments)}var r=i(20),o=n.prototype;o.parse=function(t){return t},o.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},o.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},o.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},o.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},o.getExtent=function(){return this._extent.slice()},o.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},o.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;io&&!isNaN(o)&&(o=+o)),o};return b.hasItemOption=!1,b.initData(t,w,M),b}function a(t){return"category"!==t&&"time"!==t}function s(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function l(t,e){var i=[];if(t&&t.categoryAxisModel){var n=t.categoryAxisModel.getCategories();if(n){var r=e.length;if(c.isArray(e[0])&&e[0].length>1){i=[];for(var o=0;r>o;o++)i[o]=n[e[o][t.categoryIndex||0]]}else i=n.slice(0)}}return i}var h=i(13),u=i(31),c=i(1),d=i(8),f=i(24),p=d.getDataItemValue,g=d.converDataValue,v={cartesian2d:function(t,e,i){var n=i.getComponent("xAxis",e.get("xAxisIndex")),r=i.getComponent("yAxis",e.get("yAxisIndex")),o=n.get("type"),l=r.get("type"),h=[{name:"x",type:s(o),stackable:a(o)},{name:"y",type:s(l),stackable:a(l)}],c="category"===o;return u(h,t,["x","y","z"]),{dimensions:h,categoryIndex:c?0:1,categoryAxisModel:c?n:"category"===l?r:null}},polar:function(t,e,i){var n=e.get("polarIndex")||0,r=function(t){return t.get("polarIndex")===n},o=i.findComponents({mainType:"angleAxis",filter:r})[0],l=i.findComponents({mainType:"radiusAxis",filter:r})[0],h=l.get("type"),c=o.get("type"),d=[{name:"radius",type:s(h),stackable:a(h)},{name:"angle",type:s(c),stackable:a(c)}],f="category"===c;return u(d,t,["radius","angle","value"]),{dimensions:d,categoryIndex:f?1:0,categoryAxisModel:f?o:"category"===h?l:null}},geo:function(t,e,i){return{dimensions:u([{name:"lng"},{name:"lat"}],t,["lng","lat","value"])}}};t.exports=o},function(t,e,i){"use strict";var n=i(3),r=i(1);i(53),i(101),i(2).extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new n.Rect({shape:t.coordinateSystem.getRect(),style:r.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0}))}})},function(t,e,i){function n(t){t=t||{},a.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new o(t.style),this._rect=null,this.__clipPaths=[]}var r=i(1),o=i(148),a=i(57),s=i(73);n.prototype={constructor:n,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?a.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new o(t),this.dirty(!1),this}},r.inherits(n,a),r.mixin(n,s),t.exports=n},function(t,e,i){var n=i(4),r=i(9),o=i(33),a=Math.floor,s=Math.ceil,l=o.extend({type:"interval",_interval:0,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval||this.niceTicks(),this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice()},getTicks:function(){this._interval||this.niceTicks();var t=this._interval,e=this._extent,i=[],r=1e4;if(t){var o=this._niceExtent;e[0]r)return[];e[1]>o[1]&&i.push(e[1])}return i},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(i=-i,e.reverse());var r=n.nice(i/t,!0),o=[n.round(s(e[0]/r)*r),n.round(a(e[1]/r)*r)];this._interval=r,this._niceExtent=o}},niceExtent:function(t,e,i){var r=this._extent;if(r[0]===r[1])if(0!==r[0]){var o=r[0]/2;r[0]-=o,r[1]+=o}else r[1]=1;var l=r[1]-r[0];isFinite(l)||(r[0]=0,r[1]=1),this.niceTicks(t);var h=this._interval;e||(r[0]=n.round(a(r[0]/h)*h)),i||(r[1]=n.round(s(r[1]/h)*h))}});l.create=function(){return new l},t.exports=l},function(t,e,i){function n(t){this.group=new o.Group,this._symbolCtor=t||a}function r(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}var o=i(3),a=i(49),s=n.prototype;s.updateData=function(t,e){var i=this.group,n=t.hostModel,a=this._data,s=this._symbolCtor,l={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis")};t.diff(a).add(function(n){var o=t.getItemLayout(n);if(r(t,n,e)){var a=new s(t,n,l);a.attr("position",o),t.setItemGraphicEl(n,a),i.add(a)}}).update(function(h,u){var c=a.getItemGraphicEl(u),d=t.getItemLayout(h);return r(t,h,e)?(c?(c.updateData(t,h,l),o.updateProps(c,{position:d},n)):(c=new s(t,h),c.attr("position",d)),i.add(c),void t.setItemGraphicEl(h,c)):void i.remove(c)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},s.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},s.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll())},t.exports=n},function(t,e,i){function n(t){var e={};return u(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function r(t,e,i,n){null!=i[e]&&null==i[t]&&(n[t]=null)}var o=i(1),a=i(11),s=i(2),l=i(8),h=i(175),u=o.each,c=l.eachAxisDim,d=s.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,angleAxisIndex:null,radiusAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0;var r=n(t);this.mergeDefaultAndTheme(t,i),this.doInit(r)},mergeOption:function(t){var e=n(t);o.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;a.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),r("start","startValue",t,e),r("end","endValue",t,e),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var o=this.dependentModels[e.axis][i],a=o.__dzAxisProxy||(o.__dzAxisProxy=new h(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();c(function(e){var i=e.axisIndex;t[i]=l.normalizeToArray(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;c(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option;if(t){var n="vertical"===e?{dim:"y",axisIndex:"yAxisIndex",axis:"yAxis"}:{dim:"x",axisIndex:"xAxisIndex",axis:"xAxis"};this.dependentModels[n.axis].length&&(i[n.axisIndex]=[0],t=!1)}t&&c(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;a>o;o++)"category"===r[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&c(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex);o.indexOf(n,r)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return c(function(n){var r=t.get(n.axisIndex),o=this.dependentModels[n.axis][r];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return c(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;c(function(n){u(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},setRawRange:function(t){u(["start","end","startValue","endValue"],function(e){this.option[e]=t[e]},this)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(){var t=this._axisProxies;for(var e in t)if(t.hasOwnProperty(e)&&t[e].hostedBy(this))return t[e];for(var e in t)if(t.hasOwnProperty(e)&&!t[e].hostedBy(this))return t[e]}});t.exports=d},function(t,e,i){var n=i(56);t.exports=n.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetInfo:function(){function t(t,e,i,n){for(var r,o=0;o=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,r,o){function a(t){h[t].entryCount--,0===h[t].entryCount&&u.push(t)}function s(t){c[t]=!0,a(t)}if(t.length){var l=i(e),h=l.graph,u=l.noEntryList,c={};for(n.each(t,function(t){c[t]=!0});u.length;){var d=u.pop(),f=h[d],p=!!c[d];p&&(r.call(o,d,f.originalDeps.slice()),delete c[d]),n.each(f.successor,p?s:a)}n.each(c,function(){throw new Error("Circle dependency may exists")})}}},t.exports=s},function(t,e){function i(t){for(var e=0;t>=u;)e|=1&t,t>>=1;return t+e}function n(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;i>o&&n(t[o],t[o-1])<0;)o++;r(t,e,o)}else for(;i>o&&n(t[o],t[o-1])>=0;)o++;return o-e}function r(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function o(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var o,a=t[n],s=e,l=n;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function a(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;s>l&&o(t,e[i+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[i+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])>0?a=u+1:l=u}return l}function s(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;s>l&&o(t,e[i+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=n-r;s>l&&o(t,e[i+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])<0?l=u:a=u+1}return l}function l(t,e){function i(t,e){u[y]=t,f[y]=e,y+=1}function n(){for(;y>1;){var t=y-2;if(t>=1&&f[t-1]<=f[t]+f[t+1]||t>=2&&f[t-2]<=f[t]+f[t-1])f[t-1]f[t+1])break;o(t)}}function r(){for(;y>1;){var t=y-2;t>0&&f[t-1]=r?l(n,r,o,c):h(n,r,o,c)))}function l(i,n,r,o){var l=0;for(l=0;n>l;l++)x[l]=t[i+l];var h=0,u=r,d=i;if(t[d++]=t[u++],0!==--o){if(1===n){for(l=0;o>l;l++)t[d+l]=t[u+l];return void(t[d+o]=x[h])}for(var f,g,v,m=p;;){f=0,g=0,v=!1;do if(e(t[u],x[h])<0){if(t[d++]=t[u++],g++,f=0,0===--o){v=!0;break}}else if(t[d++]=x[h++],f++,g=0,1===--n){v=!0;break}while(m>(f|g));if(v)break;do{if(f=s(t[u],x,h,n,0,e),0!==f){for(l=0;f>l;l++)t[d+l]=x[h+l];if(d+=f,h+=f,n-=f,1>=n){v=!0;break}}if(t[d++]=t[u++],0===--o){v=!0;break}if(g=a(x[h],t,u,o,0,e),0!==g){for(l=0;g>l;l++)t[d+l]=t[u+l];if(d+=g,u+=g,o-=g,0===o){v=!0;break}}if(t[d++]=x[h++],1===--n){v=!0;break}m--}while(f>=c||g>=c);if(v)break;0>m&&(m=0),m+=2}if(p=m,1>p&&(p=1),1===n){for(l=0;o>l;l++)t[d+l]=t[u+l];t[d+o]=x[h]}else{if(0===n)throw new Error;for(l=0;n>l;l++)t[d+l]=x[h+l]}}else for(l=0;n>l;l++)t[d+l]=x[h+l]}function h(i,n,r,o){var l=0;for(l=0;o>l;l++)x[l]=t[r+l];var h=i+n-1,u=o-1,d=r+o-1,f=0,g=0;if(t[d--]=t[h--],0!==--n){if(1===o){for(d-=n,h-=n,g=d+1,f=h+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];return void(t[d]=x[u])}for(var v=p;;){var m=0,y=0,_=!1;do if(e(x[u],t[h])<0){if(t[d--]=t[h--],m++,y=0,0===--n){_=!0;break}}else if(t[d--]=x[u--],y++,m=0,1===--o){_=!0;break}while(v>(m|y));if(_)break;do{if(m=n-s(x[u],t,i,n,n-1,e),0!==m){for(d-=m,h-=m,n-=m,g=d+1,f=h+1,l=m-1;l>=0;l--)t[g+l]=t[f+l];if(0===n){_=!0;break}}if(t[d--]=x[u--],1===--o){_=!0;break}if(y=o-a(t[h],x,0,o,o-1,e),0!==y){for(d-=y,u-=y,o-=y,g=d+1,f=u+1,l=0;y>l;l++)t[g+l]=x[f+l];if(1>=o){_=!0;break}}if(t[d--]=t[h--],0===--n){_=!0;break}v--}while(m>=c||y>=c);if(_)break;0>v&&(v=0),v+=2}if(p=v,1>p&&(p=1),1===o){for(d-=n,h-=n,g=d+1,f=h+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];t[d]=x[u]}else{if(0===o)throw new Error;for(f=d-(o-1),l=0;o>l;l++)t[f+l]=x[l]}}else for(f=d-(o-1),l=0;o>l;l++)t[f+l]=x[l]}var u,f,p=c,g=0,v=d,m=0,y=0;g=t.length,2*d>g&&(v=g>>>1);var x=[];m=120>g?5:1542>g?10:119151>g?19:40,u=[],f=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function h(t,e,r,a){r||(r=0),a||(a=t.length);var s=a-r;if(!(2>s)){var h=0;if(u>s)return h=n(t,r,a,e),void o(t,r,a,r+h,e);var c=new l(t,e),d=i(s);do{if(h=n(t,r,a,e),d>h){var f=s;f>d&&(f=d),o(t,r,r+f,r+h,e),h=f}c.pushRun(r,h),c.mergeRuns(),s-=h,r+=h}while(0!==s);c.forceMergeRuns()}}var u=32,c=7,d=256;t.exports=h},function(t,e,i){function n(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}var r=i(4),o=r.linearMap,a=i(1),s=[0,1],l=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};l.prototype={constructor:l,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){var t=this._extent.slice();return t},getPixelPrecision:function(t){return r.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count())),o(t,s,i,e)},coordToData:function(t,e){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count()));var a=o(t,i,s,e);return this.scale.scale(a)},getTicksCoords:function(){if(this.onBand){for(var t=this.getBands(),e=[],i=0;ia;a++)e.push([o*a/i+n,o*(a+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i}},t.exports=l},function(t,e){"use strict";function i(t){return t}function n(t,e,n,r){this._old=t,this._new=e,this._oldKeyGetter=n||i,this._newKeyGetter=r||i}function r(t,e,i){for(var n=0;nt;t++)this._add&&this._add(h[t]);else this._add&&this._add(h)}}},t.exports=n},function(t,e){t.exports=function(t,e,i,n,r){n.eachRawSeriesByType(t,function(t){var r=t.getData(),o=t.get("symbol")||e,a=t.get("symbolSize");r.setVisual({legendSymbol:i||o,symbol:o,symbolSize:a}),n.isSeriesFiltered(t)||("function"==typeof a&&r.each(function(e){var i=t.getRawValue(e),n=t.getDataParams(e);r.setItemVisual(e,"symbolSize",a(i,n))}),r.each(function(t){var e=r.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&r.setItemVisual(t,"symbol",i),null!=n&&r.setItemVisual(t,"symbolSize",n)}))})}},function(t,e,i){var n=i(34);t.exports=function(){if(0!==n.debugMode)if(1==n.debugMode)for(var t in arguments)throw new Error(arguments[t]);else if(n.debugMode>1)for(var t in arguments)console.log(arguments[t])}},function(t,e,i){function n(t){r.call(this,t)}var r=i(37),o=i(7),a=i(1),s=i(63),l=i(144),h=new l(50);n.prototype={constructor:n,type:"image",brush:function(t,e){var i,n=this.style,r=n.image;if(n.bind(t,e),i="string"==typeof r?this._image:r,!i&&r){var o=h.get(r);if(!o)return i=new Image,i.onload=function(){i.onload=null;for(var t=0;t0?"top":"bottom",n="center"):c(o-d)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&d>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,verticalAlign:r}}function o(t,e,i){var n,r,o=u(-t.rotation),a=i[0]>i[1],s="start"===e&&!a||"start"!==e&&a;return c(o-d/2)?(r=s?"bottom":"top",n="center"):c(o-1.5*d)?(r=s?"top":"bottom",n="center"):(r="middle",n=1.5*d>o&&o>d/2?s?"left":"right":s?"right":"left"),{rotation:o,textAlign:n,verticalAlign:r}}var a=i(1),s=i(3),l=i(12),h=i(4),u=h.remRadian,c=h.isRadianAroundZero,d=Math.PI,f=function(t,e){this.opt=e,this.axisModel=t,a.defaults(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new s.Group({position:e.position.slice(),rotation:e.rotation})};f.prototype={constructor:f,hasBuilder:function(t){return!!p[t]},add:function(t){p[t].call(this)},getGroup:function(){return this.group}};var p={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent();this.group.add(new s.Line({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:a.extend({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle()),strokeContainThreshold:t.strokeContainThreshold,silent:!!t.axisLineSilent,z2:1}))}},axisTick:function(){var t=this.axisModel;if(t.get("axisTick.show")){for(var e=t.axis,i=t.getModel("axisTick"),n=this.opt,r=i.getModel("lineStyle"),o=i.get("length"),a=v(i,n.labelInterval),l=e.getTicksCoords(),h=[],u=0;ud[1]?-1:1,p=["start"===l?d[0]-f*c:"end"===l?d[1]+f*c:(d[0]+d[1])/2,"middle"===l?t.labelOffset+h*c:0];a="middle"===l?r(t,t.rotation,h):o(t,l,d);var g=new s.Text({style:{text:i,textFont:u.getFont(),fill:u.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:a.textAlign,textVerticalAlign:a.verticalAlign},position:p,rotation:a.rotation,silent:e.get("silent"),z2:1});g.eventData=n(e),g.eventData.targetType="axisName",g.eventData.name=i,this.group.add(g)}}},g=f.ifIgnoreOnTick=function(t,e,i){var n,r=t.scale;return"ordinal"===r.type&&("function"==typeof i?(n=r.getTicks()[e],!i(n,r.getLabel(n))):e%(i+1))},v=f.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};t.exports=f},function(t,e,i){function n(t){return a.isObject(t)&&null!=t.value?t.value:t}function r(){return"category"===this.get("type")&&a.map(this.get("data"),n)}function o(){return s.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))}var a=i(1),s=i(25);t.exports={getFormattedLabels:o,getCategories:r}},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(10),o=i(1),a=i(68),s=r.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this._resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this._resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this._resetRange()},setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},getMin:function(){var t=this.option;return null!=t.rangeStart?t.rangeStart:t.min},getMax:function(){var t=this.option;return null!=t.rangeEnd?t.rangeEnd:t.max},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},_resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}});o.merge(s.prototype,i(51));var l={gridIndex:0};a("x",s,n,l),a("y",s,n,l),t.exports=s},function(t,e,i){function n(t,e,i){return i.getComponent("grid",t.get("gridIndex"))===e}function r(t){var e,i=t.model,n=i.getFormattedLabels(),r=1,o=n.length;o>40&&(r=Math.ceil(o/40));for(var a=0;o>a;a+=r)if(!t.isLabelIgnored(a)){var s=i.getTextRect(n[a]);e?e.union(s):e=s}return e}function o(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this._model=t}function a(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}var s=i(14),l=i(25),h=i(1),u=i(111),c=i(109),d=h.each,f=l.ifAxisCrossZero,p=l.niceScaleExtent;i(112);var g=o.prototype;g.type="grid",g.getRect=function(){return this._rect},g.update=function(t,e){function i(t){var e=n[t];for(var i in e){var r=e[i];if(r&&("category"===r.type||!f(r)))return!0}return!1}var n=this._axesMap;this._updateScale(t,this._model),d(n.x,function(t){p(t,t.model)}),d(n.y,function(t){p(t,t.model)}),d(n.x,function(t){i("y")&&(t.onZero=!1)}),d(n.y,function(t){i("x")&&(t.onZero=!1)}),this.resize(this._model,e)},g.resize=function(t,e){function i(){d(o,function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),a(t,e?n.x:n.y)})}var n=s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var o=this._axesList;i(),t.get("containLabel")&&(d(o,function(t){if(!t.model.get("axisLabel.inside")){var e=r(t);if(e){var i=t.isHorizontal()?"height":"width",o=t.model.get("axisLabel.margin");n[i]-=e[i]+o,"top"===t.position?n.y+=e.height+o:"left"===t.position&&(n.x+=e.width+o)}}}),i())},g.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)return i[n];return i[e]}},g.getCartesian=function(t,e){var i="x"+t+"y"+e;return this._coordsMap[i]},g._initCartesian=function(t,e,i){function r(i){return function(r,h){if(n(r,t,e)){var u=r.get("position");"x"===i?("top"!==u&&"bottom"!==u&&(u="bottom"),o[u]&&(u="top"===u?"bottom":"top")):("left"!==u&&"right"!==u&&(u="left"),o[u]&&(u="left"===u?"right":"left")),o[u]=!0;var d=new c(i,l.createScaleByModel(r),[0,0],r.get("type"),u),f="category"===d.type;d.onBand=f&&r.get("boundaryGap"),d.inverse=r.get("inverse"),d.onZero=r.get("axisLine.onZero"),r.axis=d,d.model=r,d.index=h,this._axesList.push(d),a[i][h]=d,s[i]++}}}var o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};return e.eachComponent("xAxis",r("x"),this),e.eachComponent("yAxis",r("y"),this),s.x&&s.y?(this._axesMap=a,void d(a.x,function(t,e){d(a.y,function(i,n){var r="x"+e+"y"+n,o=new u(r);o.grid=this,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)},this)},this)):(this._axesMap={},void(this._axesList=[]))},g._updateScale=function(t,e){function i(t,e,i){d(i.coordDimToDataDim(e.dim),function(i){e.scale.unionExtent(t.getDataExtent(i,"ordinal"!==e.scale.type))})}h.each(this._axesList,function(t){t.scale.setExtent(1/0,-(1/0))}),t.eachSeries(function(r){if("cartesian2d"===r.get("coordinateSystem")){var o=r.get("xAxisIndex"),a=r.get("yAxisIndex"),s=t.getComponent("xAxis",o),l=t.getComponent("yAxis",a);if(!n(s,e,t)||!n(l,e,t))return;var h=this.getCartesian(o,a),u=r.getData(),c=h.getAxis("x"),d=h.getAxis("y");"list"===u.type&&(i(u,c,r),i(u,d,r))}},this)},o.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,r){var a=new o(n,t,e);a.name="grid_"+r,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("cartesian2d"===e.get("coordinateSystem")){var n=e.get("xAxisIndex"),r=e.get("yAxisIndex"),o=t.getComponent("xAxis",n),a=i[o.get("gridIndex")];e.coordinateSystem=a.getCartesian(n,r)}}),i},o.dimensions=u.prototype.dimensions,i(24).register("cartesian2d",o),t.exports=o},function(t,e){t.exports=function(t,e){e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem;if(i){var n=i.dimensions;"singleAxis"===i.type?e.each(n[0],function(t,n){e.setItemLayout(n,isNaN(t)?[NaN,NaN]:i.dataToPoint(t))}):e.each(n,function(t,n,r){e.setItemLayout(r,isNaN(t)||isNaN(n)?[NaN,NaN]:i.dataToPoint([t,n]))},!0)}})}},function(t,e){t.exports={clearColorPalette:function(){this._colorIdx=0,this._colorNameMap={}},getColorFromPalette:function(t,e){e=e||this;var i=e._colorIdx||0,n=e._colorNameMap||(e._colorNameMap={});if(n[t])return n[t];var r=this.get("color",!0)||[];if(r.length){var o=r[i];return t&&(n[t]=o),e._colorIdx=(i+1)%r.length,o}}}},function(t,e,i){var n=i(28),r=i(42),o=i(20),a=function(){this.group=new n,this.uid=r.getUID("viewComponent")};a.prototype={constructor:a,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var s=a.prototype;s.updateView=s.updateLayout=s.updateVisual=function(t,e,i,n){},o.enableClassExtend(a),o.enableClassManagement(a,{registerWhenExtend:!0}),t.exports=a},function(t,e,i){"use strict";var n=i(61),r=i(21),o=i(83),a=i(160),s=i(1),l=function(t){o.call(this,t),r.call(this,t),a.call(this,t),this.id=t.id||n()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(s.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i.5?e:t}function s(t,e,i,n,r){var a=t.length;if(1==r)for(var s=0;a>s;s++)n[s]=o(t[s],e[s],i);else for(var l=t[0].length,s=0;a>s;s++)for(var h=0;l>h;h++)n[s][h]=o(t[s][h],e[s][h],i)}function l(t,e,i){var n=t.length,r=e.length;if(n!==r){var o=n>r;if(o)t.length=r;else for(var a=n;r>a;a++)t.push(1===i?e[a]:x.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;al;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function h(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;n>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function u(t,e,i,n,r,o,a,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=c(t[u],e[u],i[u],n[u],r,o,a);else for(var d=t[0].length,u=0;h>u;u++)for(var f=0;d>f;f++)s[u][f]=c(t[u][f],e[u][f],i[u][f],n[u][f],r,o,a)}function c(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function d(t){if(y(t)){var e=t.length;if(y(t[0])){for(var i=[],n=0;e>n;n++)i.push(x.call(t[n]));return i}return x.call(t)}return t}function f(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function p(t,e,i,n,r){var d=t._getter,p=t._setter,m="spline"===e,x=n.length;if(x){var _,b=n[0].value,w=y(b),M=!1,S=!1,A=w&&y(b[0])?2:1;n.sort(function(t,e){return t.time-e.time}),_=n[x-1].time;for(var T=[],I=[],C=n[0].value,k=!0,L=0;x>L;L++){T.push(n[L].time/_);var D=n[L].value;if(w&&h(D,C,A)||!w&&D===C||(k=!1),C=D,"string"==typeof D){var P=v.parse(D);P?(D=P,M=!0):S=!0}I.push(D)}if(!k){for(var O=I[x-1],L=0;x-1>L;L++)w?l(I[L],O,A):!isNaN(I[L])||isNaN(O)||S||M||(I[L]=O);w&&l(d(t._target,r),O,A);var z,E,R,N,B,V,F=0,H=0;if(M)var G=[0,0,0,0];var W=function(t,e){var i;if(H>e){for(z=Math.min(F+1,x-1),i=z;i>=0&&!(T[i]<=e);i--);i=Math.min(i,x-2)}else{for(i=F;x>i&&!(T[i]>e);i++);i=Math.min(i-1,x-2)}F=i,H=e;var n=T[i+1]-T[i];if(0!==n)if(E=(e-T[i])/n,m)if(N=I[i],R=I[0===i?i:i-1],B=I[i>x-2?x-1:i+1],V=I[i>x-3?x-1:i+2],w)u(R,N,B,V,E,E*E,E*E*E,d(t,r),A);else{var l;if(M)l=u(R,N,B,V,E,E*E,E*E*E,G,1),l=f(G);else{if(S)return a(N,B,E);l=c(R,N,B,V,E,E*E,E*E*E)}p(t,r,l)}else if(w)s(I[i],I[i+1],E,d(t,r),A);else{var l;if(M)s(I[i],I[i+1],E,G,1),l=f(G);else{if(S)return a(I[i],I[i+1],E);l=o(I[i],I[i+1],E)}p(t,r,l)}},Z=new g({target:t._target,life:_,loop:t._loop,delay:t._delay,onframe:W,ondestroy:i});return e&&"spline"!==e&&(Z.easing=e),Z}}}var g=i(136),v=i(17),m=i(1),y=m.isArrayLike,x=Array.prototype.slice,_=function(t,e,i,o){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||n,this._setter=o||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};_.prototype={when:function(t,e){var i=this._tracks;for(var n in e){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:d(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;i++)t[i].call(this)},start:function(t){var e,i=this,n=0,r=function(){n--,n||i._doneCallback()};for(var o in this._tracks){var a=p(this,t,r,this._tracks[o],o);a&&(this._clipList.push(a),n++,this.animation&&this.animation.addClip(a),e=a)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var n=0;nt&&(t+=i),t}}},function(t,e){var i=2311;t.exports=function(){return"zr_"+i++}},function(t,e,i){var n=i(150),r=i(149);t.exports={buildPath:function(t,e,i){var o=e.points,a=e.smooth;if(o&&o.length>=2){if(a&&"spline"!==a){var s=r(o,a,i,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var l=o.length,h=0;(i?l:l-1)>h;h++){var u=s[2*h],c=s[2*h+1],d=o[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],d[0],d[1])}}else{"spline"===a&&(o=n(o,i)),t.moveTo(o[0][0],o[0][1]);for(var h=1,f=o.length;f>h;h++)t.lineTo(o[h][0],o[h][1])}i&&t.closePath()}}}},function(t,e){t.exports={buildPath:function(t,e){var i,n,r,o,a=e.x,s=e.y,l=e.width,h=e.height,u=e.r;0>l&&(a+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=r=o=u:u instanceof Array?1===u.length?i=n=r=o=u[0]:2===u.length?(i=r=u[0],n=o=u[1]):3===u.length?(i=u[0],n=o=u[1],r=u[2]):(i=u[0],n=u[1],r=u[2],o=u[3]):i=n=r=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),n+r>h&&(c=n+r,n*=h/c,r*=h/c),i+o>h&&(c=i+o,i*=h/c,o*=h/c),t.moveTo(a+i,s),t.lineTo(a+l-n,s),0!==n&&t.quadraticCurveTo(a+l,s,a+l,s+n),t.lineTo(a+l,s+h-r),0!==r&&t.quadraticCurveTo(a+l,s+h,a+l-r,s+h),t.lineTo(a+o,s+h),0!==o&&t.quadraticCurveTo(a,s+h,a,s+h-o),t.lineTo(a,s+i),0!==i&&t.quadraticCurveTo(a,s,a+i,s)}}},function(t,e,i){var n=i(1);t.exports={updateSelectedMap:function(t){this._selectTargetMap=n.reduce(t||[],function(t,e){return t[e.name]=e,t},{})},select:function(t){var e=this._selectTargetMap,i=e[t],r=this.get("selectedMode");"single"===r&&n.each(e,function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t){var e=this._selectTargetMap[t];e&&(e.selected=!1)},toggleSelected:function(t){var e=this._selectTargetMap[t];return null!=e?(this[e.selected?"unSelect":"select"](t),e.selected):void 0},isSelected:function(t){var e=this._selectTargetMap[t];return e&&e.selected}}},function(t,e,i){function n(t){r.defaultEmphasis(t.label,r.LABEL_OPTIONS)}var r=i(8),o=i(1),a=i(11),s=i(9),l=s.addCommas,h=s.encodeHTML,u=i(2).extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},ifEnableAnimation:function(){if(a.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.ifEnableAnimation()},mergeOption:function(t,e,i,r){var a=this.constructor,s=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),l=t[s];if(!i||!i.data)return void(t[s]=null);if(l)l.mergeOption(i,e,!0);else{r&&n(i),o.each(i.data,function(t){t instanceof Array?(n(t[0]),n(t[1])):n(t)});var h={mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0};l=new a(i,this,e,h),l.__hostSeries=t}t[s]=l},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=o.isArray(i)?o.map(i,l).join(", "):l(i),r=e.getName(t),a=this.name;return(null!=i||r)&&(a+="
"),r&&(a+=h(r),null!=i&&(a+=" : ")),null!=i&&(a+=n),a},getData:function(){return this._data},setData:function(t){this._data=t}});o.mixin(u,r.dataFormatMixin),t.exports=u},function(t,e,i){t.exports=i(2).extendComponentView({type:"marker",init:function(){this.markerGroupMap={}},render:function(t,e,i){var n=this.markerGroupMap;for(var r in n)n[r].__keep=!1;var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this);for(var r in n)n[r].__keep||this.group.remove(n[r].group)},renderSeries:function(){}})},function(t,e,i){function n(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function r(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function o(t,e,i){var n=-1;do n=Math.max(l.getPrecision(t.get(e,i)),n),t=t.stackedOn;while(t);return n}function a(t,e,i,n,r,a){var s=[],l=v(e,n,t),h=e.indexOfNearest(n,l,!0);s[r]=e.get(i,h,!0),s[a]=e.get(n,h,!0);var u=o(e,n,h);return u>=0&&(s[a]=+s[a].toFixed(u)),s}var s=i(1),l=i(4),h=s.indexOf,u=s.curry,c={min:u(a,"min"),max:u(a,"max"),average:u(a,"average")},d=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!r(e)&&!s.isArray(e.coord)&&n){var o=n.dimensions,a=f(e,i,n,t);if(e=s.clone(e),e.type&&c[e.type]&&a.baseAxis&&a.valueAxis){var l=h(o,a.baseAxis.dim),u=h(o,a.valueAxis.dim);e.coord=c[e.type](i,a.baseDataDim,a.valueDataDim,l,u),e.value=e.coord[u]}else{for(var d=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],p=0;2>p;p++)if(c[d[p]]){var g=t.coordDimToDataDim(o[p])[0];d[p]=v(i,g,d[p])}e.coord=d}}return e},f=function(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(n.dataDimToCoordDim(r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0]):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0],r.valueDataDim=n.coordDimToDataDim(r.valueAxis.dim)[0]),r},p=function(t,e){return t&&t.containData&&e.coord&&!n(e)?t.containData(e.coord):!0},g=function(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value},v=function(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,r++)},!0),n/r}return t.getDataExtent(e,!0)["max"===i?1:0]};t.exports={dataTransform:d,dataFilter:p,dimValueGetter:g,getAxisInfo:f,numCalculate:v}},function(t,e,i){var n=i(78),r=i(1),o=i(10),a=i(14),s=["value","category","time","log"];t.exports=function(t,e,i,l){r.each(s,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,n){var s=this.layoutMode,l=s?a.getLayoutParams(e):{},h=n.getTheme();r.merge(e,h.get(o+"Axis")),r.merge(e,this.getDefaultOption()),e.type=i(t,e),s&&a.mergeLayoutParam(e,l,s)},defaultOption:r.mergeAll([{},n[o+"Axis"],l],!0)})}),o.registerSubTypeDefaulter(t+"Axis",r.curry(i,t))}},function(t,e){t.exports=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;rf;f++){var x=m(t,i,o,h,p[f]);c[0]=a(x,c[0]),d[0]=s(x,d[0])}for(y=v(e,n,l,u,g),f=0;y>f;f++){var _=m(e,n,l,u,g[f]);c[1]=a(_,c[1]),d[1]=s(_,d[1])}c[0]=a(t,c[0]),d[0]=s(t,d[0]),c[0]=a(h,c[0]),d[0]=s(h,d[0]),c[1]=a(e,c[1]),d[1]=s(e,d[1]),c[1]=a(u,c[1]),d[1]=s(u,d[1])},o.fromQuadratic=function(t,e,i,n,o,l,h,u){var c=r.quadraticExtremum,d=r.quadraticAt,f=s(a(c(t,i,o),1),0),p=s(a(c(e,n,l),1),0),g=d(t,i,o,f),v=d(e,n,l,p);h[0]=a(t,o,g),h[1]=a(e,l,v),u[0]=s(t,o,g),u[1]=s(e,l,v)},o.fromArc=function(t,e,i,r,o,a,s,p,g){var v=n.min,m=n.max,y=Math.abs(o-a);if(1e-4>y%f&&y>1e-4)return p[0]=t-i,p[1]=e-r,g[0]=t+i,void(g[1]=e+r);if(u[0]=h(o)*i+t,u[1]=l(o)*r+e,c[0]=h(a)*i+t,c[1]=l(a)*r+e,v(p,u,c),m(g,u,c),o%=f,0>o&&(o+=f),a%=f,0>a&&(a+=f),o>a&&!s?a+=f:a>o&&s&&(o+=f),s){var x=a;a=o,o=x}for(var _=0;a>_;_+=Math.PI/2)_>o&&(d[0]=h(_)*i+t,d[1]=l(_)*r+e,v(p,d,p),m(g,d,g))},t.exports=o},function(t,e,i){var n=i(37),r=i(1),o=i(18),a=function(t){n.call(this,t)};a.prototype={constructor:a,type:"text",brush:function(t,e){var i=this.style,n=i.x||0,r=i.y||0,a=i.text;if(null!=a&&(a+=""),i.bind(t,e),a){this.setTransform(t);var s,l=i.textAlign;if(i.textVerticalAlign){var h=o.getBoundingRect(a,t.font,i.textAlign,"top");switch(s="middle",i.textVerticalAlign){case"middle":r-=h.height/2-h.lineHeight/2;break;case"bottom":r-=h.height-h.lineHeight/2;break;default:r+=h.lineHeight/2}}else s=i.textBaseline;t.font=i.textFont||i.font,t.textAlign=l||"left",t.textAlign!==l&&(t.textAlign="left"),t.textBaseline=s||"alphabetic",t.textBaseline!==s&&(t.textBaseline="alphabetic");for(var u=o.measureText("国",t.font).width,c=a.split("\n"),d=0;d=0?parseFloat(t)/100*e:parseFloat(t):t}var r=i(18),o=i(7),a=new o,s=function(){};s.prototype={constructor:s,drawRectText:function(t,e,i){var o=this.style,s=o.text;if(null!=s&&(s+=""),s){t.save();var l,h,u=o.textPosition,c=o.textDistance,d=o.textAlign,f=o.textFont||o.font,p=o.textBaseline,g=o.textVerticalAlign;i=i||r.getBoundingRect(s,f,d,p);var v=this.transform;if(v&&(a.copy(e),a.applyTransform(v),e=a),u instanceof Array){if(l=e.x+n(u[0],e.width),h=e.y+n(u[1],e.height),d=d||"left",p=p||"top",g){switch(g){case"middle":h-=i.height/2-i.lineHeight/2;break;case"bottom":h-=i.height-i.lineHeight/2;break;default:h+=i.lineHeight/2}p="middle"}}else{var m=r.adjustTextPositionOnRect(u,e,i,c);l=m.x,h=m.y,d=d||m.textAlign,p=p||m.textBaseline}t.textAlign=d||"left",t.textBaseline=p||"alphabetic";var y=o.textFill,x=o.textStroke;y&&(t.fillStyle=y),x&&(t.strokeStyle=x),t.font=f,t.shadowBlur=o.textShadowBlur,t.shadowColor=o.textShadowColor||"transparent",t.shadowOffsetX=o.textShadowOffsetX,t.shadowOffsetY=o.textShadowOffsetY;for(var _=s.split("\n"),b=0;b<_.length;b++)y&&t.fillText(_[b],l,h),x&&t.strokeText(_[b],l,h),h+=i.lineHeight;t.restore()}}},t.exports=s},function(t,e,i){function n(t){delete c[t]}/*! +var y=i(12),x=i(122),_=i(88),b=i(23),w=i(123),M=i(10),S=i(15),A=i(57),T=i(27),I=i(3),C=i(77),k=i(1),L=i(17),P=i(22),D=i(44),O=k.each,z=1e3,E=5e3,R=1e3,N=2e3,B=3e3,V=4e3,F=5e3,G="__flag_in_main_process",H="_hasGradientOrPatternBg";r.prototype.on=n("on"),r.prototype.off=n("off"),r.prototype.one=n("one"),k.mixin(r,P);var W=a.prototype;W.getDom=function(){return this._dom},W.getZr=function(){return this._zr},W.setOption=function(t,e,i){this[G]=!0,this._model&&!e||(this._model=new x(null,null,this._theme,new w(this._api))),this._model.setOption(t,$),Z.prepareAndUpdate.call(this),this[G]=!1,this._flushPendingActions(),!i&&this._zr.refreshImmediately()},W.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},W.getModel=function(){return this._model},W.getOption=function(){return this._model.getOption()},W.getWidth=function(){return this._zr.getWidth()},W.getHeight=function(){return this._zr.getHeight()},W.getRenderedCanvas=function(t){if(y.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr,i=e.storage.getDisplayList();return k.each(i,function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},W.getDataURL=function(t){t=t||{};var e=t.excludeComponents,i=this._model,n=[],r=this;O(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a=this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return O(n,function(t){t.group.ignore=!1}),a},W.getConnectedDataURL=function(t){if(y.canvasSupported){var e=this.group,i=Math.min,n=Math.max,r=1/0;if(tt[e]){var a=r,o=r,s=-r,l=-r,h=[],u=t&&t.pixelRatio||1;for(var c in J){var d=J[c];if(d.group===e){var f=d.getRenderedCanvas(k.clone(t)),p=d.getDom().getBoundingClientRect();a=i(p.left,a),o=i(p.top,o),s=n(p.right,s),l=n(p.bottom,l),h.push({dom:f,left:p.left,top:p.top})}}a*=u,o*=u,s*=u,l*=u;var g=s-a,v=l-o,m=k.createCanvas();m.width=g,m.height=v;var x=C.init(m);return O(h,function(t){var e=new I.Image({style:{x:t.left*u-a,y:t.top*u-o,image:t.dom}});x.add(e)}),x.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}};var Z={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr,r=this._zr;if(e){e.restoreData(),n.create(this._model,this._api),h.call(this,e,i),u.call(this,e),n.update(e,i),d.call(this,e,t),f.call(this,e,t);var a=e.get("backgroundColor")||"transparent",o=r.painter;if(o.isSingleCanvas&&o.isSingleCanvas())r.configLayer(0,{clearColor:a});else{if(!y.canvasSupported){var s=L.parse(a);a=L.stringify(s,"rgb"),0===s[3]&&(a="transparent")}a.colorStops||a.image?(r.configLayer(0,{clearColor:a}),this[H]=!0,this._dom.style.background="transparent"):(this[H]&&r.configLayer(0,{clearColor:null}),this[H]=!1,this._dom.style.background=a)}}},updateView:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),d.call(this,e,t),s.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),d.call(this,e,t),s.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(c.call(this,e,t),s.call(this,"updateLayout",e,t))},highlight:function(t){o.call(this,"highlight",t)},downplay:function(t){o.call(this,"downplay",t)},prepareAndUpdate:function(t){var e=this._model;l.call(this,"component",e),l.call(this,"chart",e),Z.update.call(this,t)}};W.resize=function(){this[G]=!0,this._zr.resize();var t=this._model&&this._model.resetOption("media");Z[t?"prepareAndUpdate":"update"].call(this),this._loadingFX&&this._loadingFX.resize(),this[G]=!1,this._flushPendingActions()};var q=i(121);W.showLoading=function(t,e){k.isObject(t)&&(e=t,t="default"),this.hideLoading();var i=q(this._api,e),n=this._zr;this._loadingFX=i,n.add(i)},W.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},W.makeActionFromEvent=function(t){var e=k.extend({},t);return e.type=U[t.type],e},W.dispatchAction=function(t,e){var i=X[t.type];if(i){var n=i.actionInfo,r=n.update||"update";if(this[G])return void this._pendingActions.push(t);this[G]=!0;var a=[t],o=!1;t.batch&&(o=!0,a=k.map(t.batch,function(e){return e=k.defaults(k.extend({},e),t),e.batch=null,e}));for(var s,l=[],h="highlight"===t.type||"downplay"===t.type,u=0;u0?e.animateTo(i,l,u||0,h,a):(e.attr(i),a&&a())}else e.attr(i),a&&a()}var v=i(1),m=i(164),y=Math.round,x=i(6),_=i(17),b=i(19),w=i(5),M=(i(29),{});M.Group=i(34),M.Image=i(48),M.Text=i(75),M.Circle=i(155),M.Sector=i(161),M.Ring=i(160),M.Polygon=i(157),M.Polyline=i(158),M.Rect=i(159),M.Line=i(156),M.BezierCurve=i(154),M.Arc=i(153),M.CompoundPath=i(149),M.LinearGradient=i(86),M.RadialGradient=i(150),M.BoundingRect=i(7),M.extendShape=function(t){return x.extend(t)},M.extendPath=function(t,e){return m.extendFromString(t,e)},M.makePath=function(t,e,i,n){var r=m.createFromString(t,e),a=r.getBoundingRect();if(i){var o=a.width/a.height;if("center"===n){var s,l=i.height*o;l<=i.width?s=i.height:(l=i.width,s=l/o);var h=i.x+i.width/2,u=i.y+i.height/2;i.x=h-l/2,i.y=u-s/2,i.width=l,i.height=s}this.resizePath(r,i)}return r},M.mergePath=m.mergePath,M.resizePath=function(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}},M.subPixelOptimizeLine=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth;return y(2*i.x1)===y(2*i.x2)&&(i.x1=i.x2=e(i.x1,n,!0)),y(2*i.y1)===y(2*i.y2)&&(i.y1=i.y2=e(i.y1,n,!0)),t},M.subPixelOptimizeRect=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth,r=i.x,a=i.y,o=i.width,s=i.height;return i.x=e(i.x,n,!0),i.y=e(i.y,n,!0),i.width=Math.max(e(r+o,n,!1)-i.x,0===o?0:1),i.height=Math.max(e(a+s,n,!1)-i.y,0===s?0:1),t},M.subPixelOptimize=function(t,e,i){var n=y(2*t);return(n+y(e))%2===0?n/2:(n+(i?1:-1))/2},M.setHoverStyle=function(t,e){"group"===t.type?t.traverse(function(t){"group"!==t.type&&u(t,e)}):u(t,e),t.on("mouseover",c).on("mouseout",d),t.on("emphasis",f).on("normal",p)},M.setText=function(t,e,i){var n=e.getShallow("position")||"inside",r=n.indexOf("inside")>=0?"white":i,a=e.getModel("textStyle");v.extend(t,{textDistance:e.getShallow("distance")||5,textFont:a.getFont(),textPosition:n,textFill:a.getTextColor()||r})},M.updateProps=function(t,e,i,n,r){g(!0,t,e,i,n,r)},M.initProps=function(t,e,i,n,r){g(!1,t,e,i,n,r)},M.getTransform=function(t,e){for(var i=b.identity([]);t&&t!==e;)b.mul(i,t.getLocalTransform(),i),t=t.parent;return i},M.applyTransform=function(t,e,i){return i&&(e=b.invert([],e)),w.applyTransform([],t,e)},M.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return a=M.applyTransform(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},M.groupTransition=function(t,e,i,n){function r(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function a(t){var e={position:w.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=v.extend({},t.shape)),e}if(t&&e){var o=r(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=a(t);t.attr(a(e)),M.updateProps(t,n,i,t.dataIndex)}}})}},t.exports=M},function(t,e){function i(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}var n={},r=1e-4;n.linearMap=function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},n.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?i(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},n.round=function(t){return+(+t).toFixed(10)},n.asc=function(t){return t.sort(function(t,e){return t-e}),t},n.getPrecision=function(t){if(isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},n.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n);return Math.max(-r+a,0)},n.MAX_SAFE_INTEGER=9007199254740991,n.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},n.isRadianAroundZero=function(t){return t>-r&&r>t},n.parseDate=function(t){return t instanceof Date?t:new Date("string"==typeof t?new Date(t.replace(/-/g,"/"))-new Date("1970/01/01"):Math.round(t))},n.quantity=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},n.nice=function(t,e){var i,r=n.quantity(t),a=t/r;return i=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,i*r},t.exports=n},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(t,e){var n=new i(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},normalize:function(t,e){var i=n.len(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}};n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t.exports=n},function(t,e,i){function n(t){r.call(this,t),this.path=new o}var r=i(37),a=i(1),o=i(28),s=i(146),l=i(63),h=l.prototype.getCanvasPattern,u=Math.abs;n.prototype={constructor:n,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path,r=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,l=a&&!!o.colorStops,u=r&&!!s.colorStops,c=a&&!!o.image,d=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f=this.getBoundingRect();l&&(this._fillGradient=i.getGradient(t,o,f)),u&&(this._strokeGradient=i.getGradient(t,s,f))}l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=h.call(o,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=h.call(s,t));var p=i.lineDash,g=i.lineDashOffset,v=!!t.setLineDash,m=this.getGlobalScale();n.setScale(m[0],m[1]),this.__dirtyPath||p&&!v&&r?(n=this.path.beginPath(t),p&&!v&&(n.setLineDash(p),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),a&&n.fill(t),p&&v&&(t.setLineDash(p),t.lineDashOffset=g),r&&n.stroke(t),p&&v&&t.setLineDash([]),this.restoreTransform(t),(i.text||0===i.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),s.containStroke(a,o/l,t,e)))return!0}if(r.hasFill())return s.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(a.isObject(t))for(var n in t)i[n]=t[n];else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&u(t[0]-1)>1e-10&&u(t[3]-1)>1e-10?Math.sqrt(u(t[0]*t[3]-t[2]*t[1])):1}},n.extend=function(t){var e=function(e){n.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var a in i)!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(r[a]=i[a])}t.init&&t.init.call(this,e)};a.inherits(e,n);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},a.inherits(n,r),t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){this.x=t,this.y=e,this.width=i,this.height=n}var r=i(5),a=i(19),o=r.applyTransform,s=Math.min,l=Math.abs,h=Math.max;n.prototype={constructor:n,union:function(t){var e=s(t.x,this.x),i=s(t.y,this.y);this.width=h(t.x+t.width,this.x+this.width)-e,this.height=h(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[];return function(i){i&&(t[0]=this.x,t[1]=this.y,e[0]=this.x+this.width,e[1]=this.y+this.height,o(t,t,i),o(e,e,i),this.x=s(t[0],e[0]),this.y=s(t[1],e[1]),this.width=l(e[0]-t[0]),this.height=l(e[1]-t[1]))}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=a.create();return a.translate(r,r,[-e.x,-e.y]),a.scale(r,r,[i,n]),a.translate(r,r,[t.x,t.y]),r},intersect:function(t){var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(o>n||i>s||l>a||r>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new n(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},t.exports=n},function(t,e,i){var n=i(11),r=i(4),a=i(9),o=i(1),s=["x","y","z","radius","angle"],l={};l.createNameEach=function(t,e){t=t.slice();var i=o.map(t,l.capitalFirst);e=(e||[]).slice();var n=o.map(e,l.capitalFirst);return function(r,a){o.each(t,function(t,o){for(var s={name:t,capital:i[o]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function a(t,n){n.nodes.push(t),e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function o(t){!n(t,s)&&r(t,s)&&(a(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;a(i,s);var l;do l=!1,t(o);while(l);return s}},l.defaultEmphasis=function(t,e){if(t){var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{};o.each(e,function(t){var e=o.retrieve(i[t],n[t]);null!=e&&(i[t]=e)})}},l.LABEL_OPTIONS=["position","show","textStyle","distance","formatter"],l.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},l.isDataItemOption=function(t){return o.isObject(t)&&!(t instanceof Array)},l.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isFinite(t)||null==t||"-"===t||(t=+r.parseDate(t)),null==t||""===t?NaN:+t)},l.createDataFormatModel=function(t,e){var i=new a;return o.mixin(i,l.dataFormatMixin),i.seriesIndex=e.seriesIndex,i.name=e.name||"",i.mainType=e.mainType,i.subType=e.subType,i.getData=function(){return t},i},l.dataFormatMixin={getDataParams:function(t,e){var i=this.getData(e),n=this.seriesIndex,r=this.name,a=this.getRawValue(t,e),o=i.getRawIndex(t),s=i.getName(t,!0),l=i.getRawDataItem(t);return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:n,seriesName:r,name:s,dataIndex:o,data:l,dataType:e,value:a,color:i.getItemVisual(t,"color"),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,r){e=e||"normal";var a=this.getData(i),o=a.getItemModel(t),s=this.getDataParams(t,i);null!=r&&s.value instanceof Array&&(s.value=s.value[r]);var l=o.get(["label",e,"formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?n.formatTpl(l,s):void 0},getRawValue:function(t,e){var i=this.getData(e),n=i.getRawDataItem(t);return null!=n?!o.isObject(n)||n instanceof Array?n:n.value:void 0},formatTooltip:o.noop},l.mappingToExists=function(t,e){e=(e||[]).slice();var i=o.map(t||[],function(t,e){return{exist:t}});return o.each(e,function(t,n){if(o.isObject(t))for(var r=0;r=i.length&&i.push({option:t})}}),i},l.isIdInner=function(t){return o.isObject(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")},l.truncate=function(t,e,i){if(!t)return t;for(var n=0,r=0,a=t.length;a>r&&e>n;r++)n+=t.charCodeAt(r)>255?2:1;return a>r&&(t=t.slice(0,r)+(i||"")),t},l.compressBatches=function(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var a=t[n].seriesId,o=l.normalizeToArray(t[n].dataIndex),s=i&&i[a],h=0,u=o.length;u>h;h++){var c=o[h];s&&s[c]?s[c]=null:(e[a]||(e[a]={}))[c]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var a=n(t[r],!0);a.length&&i.push({seriesId:r,dataIndex:a})}return i}var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)]},t.exports=l},function(t,e,i){function n(t,e,i,n){this.parentModel=e,this.ecModel=i,this.option=t,this.init&&(arguments.length<=4?this.init(t,e,i,n):this.init.apply(this,arguments))}var r=i(1),a=i(20);n.prototype={constructor:n,init:null,mergeOption:function(t){r.merge(this.option,t,!0)},get:function(t,e){if(!t)return this.option;"string"==typeof t&&(t=t.split("."));for(var i=this.option,n=this.parentModel,r=0;r=0;r--)n=a.merge(n,t[r],!0);this.__defaultOption=n}return this.__defaultOption}});l.enableClassExtend(u,function(t,e,i,n){a.extend(this,n),this.uid=s.getUID("componentModel")}),l.enableClassManagement(u,{registerWhenExtend:!0}),s.enableSubTypeDefaulter(u),s.enableTopologicalTravel(u,n),a.mixin(u,i(126)),t.exports=u},function(t,e,i){function n(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function r(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function a(t){var e=t.length;return"number"==typeof t?[t,t,t,t]:2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function o(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function s(t,e){return"{"+t+(null==e?"":e)+"}"}function l(t,e){c.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars,r=0;ro;o++)for(var l=0;lt?"0"+t:t}var c=i(1),d=i(4),f=["a","b","c","d","e","f","g"];t.exports={normalizeCssArray:a,addCommas:n,toCamelCase:r,encodeHTML:o,formatTpl:l,formatTime:h}},function(t,e){function i(t){var e={},i={},n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/);return n&&(i.ie=!0,i.version=n[1]),n&&(i.ie=!0,i.version=n[1]),r&&(i.edge=!0,i.version=r[1]),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=10)}}var n={};n="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:i(navigator.userAgent),t.exports=n},function(t,e,i){(function(e){function n(t){return d.isArray(t)||(t=[t]),t}function r(t,e){var i=t.dimensions,n=new m(d.map(i,t.getDimensionInfo,t),t.hostModel);v(n,t);for(var r=n._storage={},a=t._storage,o=0;o=0?r[s]=new l.constructor(a[s].length):r[s]=a[s]}return n}var a="undefined",o="undefined"==typeof window?e:window,s=typeof o.Float64Array===a?Array:o.Float64Array,l=typeof o.Int32Array===a?Array:o.Int32Array,h={"float":s,"int":l,ordinal:Array,number:Array,time:Array},u=i(9),c=i(45),d=i(1),f=i(8),p=d.isObject,g=["stackedOn","hasItemOption","_nameList","_idList","_rawData"],v=function(t,e){d.each(g.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods},m=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;r0&&(w+="__ec__"+u[b]),u[b]++),w&&(l[c]=w)}this._nameList=e,this._idList=l},y.count=function(){return this.indices.length},y.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r)return NaN;var a=n[t]&&n[t][r];if(i){var o=this._dimensionInfos[t];if(o&&o.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(a>=0&&l>0||0>=a&&0>l)&&(a+=l),s=s.stackedOn}}return a},y.getValues=function(t,e,i){var n=[];d.isArray(t)||(i=e,e=t,t=this.dimensions);for(var r=0,a=t.length;a>r;r++)n.push(this.get(t[r],e,i));return n},y.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},y.getDataExtent=function(t,e){t=this.getDimension(t);var i=this._storage[t],n=this.getDimensionInfo(t);e=n&&n.stackable&&e;var r,a=(this._extent||(this._extent={}))[t+!!e];if(a)return a;if(i){for(var o=1/0,s=-(1/0),l=0,h=this.count();h>l;l++)r=this.get(t,l,e),o>r&&(o=r),r>s&&(s=r);return this._extent[t+!!e]=[o,s]}return[1/0,-(1/0)]},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,a=this.count();a>r;r++){var o=this.get(t,r,e);isNaN(o)||(n+=o)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var a=0,o=r.length;o>a;a++){var s=r[a];if(n[s]===e)return a}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var a=e[n];if(i[a]===t)return n}return-1},y.indexOfRawIndex=function(t){for(var e=this.indices,i=0,n=e.length-1;n>=i;){var r=(i+n)/2|0;if(e[r]t))return r;n=r-1}}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,r=n[t];if(r){for(var a=Number.MAX_VALUE,o=-1,s=0,l=this.count();l>s;s++){var h=e-this.get(t,s,i),u=Math.abs(h);(a>u||u===a&&h>0)&&(a=u,o=s)}return o}return-1},y.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},y.getRawDataItem=function(t){ +return this._rawData[this.getRawIndex(t)]},y.getName=function(t){return this._nameList[this.indices[t]]||""},y.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},y.each=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var a=[],o=t.length,s=this.indices;r=r||this;for(var l=0;lh;h++)a[h]=this.get(t[h],l,i);a[h]=l,e.apply(r,a)}},y.filterSelf=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var a=[],o=[],s=t.length,l=this.indices;r=r||this;for(var h=0;hc;c++)o[c]=this.get(t[c],h,i);o[c]=h,u=e.apply(r,o)}u&&a.push(l[h])}return this.indices=a,this._extent={},this},y.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},y.map=function(t,e,i,a){t=d.map(n(t),this.getDimension,this);var o=r(this,t),s=o.indices=this.indices,l=o._storage,h=[];return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(h[0]=n,n=h);for(var r=0;rg;g+=d){d>p-g&&(d=p-g,u.length=d);for(var v=0;d>v;v++){var m=l[g+v];u[v]=f[m],c[v]=m}var y=i(u),m=c[n(u,y)||0];f[m]=y,h.push(m)}return a},y.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new u(this._rawData[t],e,e&&e.ecModel)},y.diff=function(t){var e=this._idList,i=t&&t._idList;return new c(t?t.indices:[],this.indices,function(t){return i[t]||t+""},function(t){return e[t]||t+""})},y.getVisual=function(t){var e=this._visual;return e&&e[t]},y.setVisual=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},y.setLayout=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},y.getLayout=function(t){return this._layout[t]},y.getItemLayout=function(t){return this._itemLayouts[t]},y.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?d.extend(this._itemLayouts[t]||{},e):e},y.clearItemLayouts=function(){this._itemLayouts.length=0},y.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=i},y.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var x=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};y.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(x,e)),this._graphicEls[t]=e},y.getItemGraphicEl=function(t){return this._graphicEls[t]},y.eachItemGraphicEl=function(t,e){d.each(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},y.cloneShallow=function(){var t=d.map(this.dimensions,this.getDimensionInfo,this),e=new m(t,this.hostModel);return e._storage=this._storage,v(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=d.extend({},this._extent)),e},y.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(d.slice(arguments)))})},y.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],y.CHANGABLE_METHODS=["filterSelf"],t.exports=m}).call(e,function(){return this}())},function(t,e,i){"use strict";function n(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);u=a+v,u>n||l.newline?(a=0,u=v,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=o+m,c>r||l.newline?(a+=s+i,o=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=u+i:o=c+i)})}var r=i(1),a=i(7),o=i(4),s=i(11),l=o.parsePercent,h=r.each,u={},c=["left","right","top","bottom","width","height"];u.box=n,u.vbox=r.curry(n,"vertical"),u.hbox=r.curry(n,"horizontal"),u.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,a=l(t.x,n),o=l(t.y,r),h=l(t.x2,n),u=l(t.y2,r);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=r),i=s.normalizeCssArray(i||0),{width:Math.max(h-a-i[1]-i[3],0),height:Math.max(u-o-i[0]-i[2],0)}},u.getLayoutRect=function(t,e,i){i=s.normalizeCssArray(i||0);var n=e.width,r=e.height,o=l(t.left,n),h=l(t.top,r),u=l(t.right,n),c=l(t.bottom,r),d=l(t.width,n),f=l(t.height,r),p=i[2]+i[0],g=i[1]+i[3],v=t.aspect;switch(isNaN(d)&&(d=n-u-g-o),isNaN(f)&&(f=r-c-p-h),isNaN(d)&&isNaN(f)&&(v>n/r?d=.8*n:f=.8*r),null!=v&&(isNaN(d)&&(d=v*f),isNaN(f)&&(f=d/v)),isNaN(o)&&(o=n-u-d-g),isNaN(h)&&(h=r-c-f-p),t.left||t.right){case"center":o=n/2-d/2-i[3];break;case"right":o=n-d-g}switch(t.top||t.bottom){case"middle":case"center":h=r/2-f/2-i[0];break;case"bottom":h=r-f-p}o=o||0,h=h||0,isNaN(d)&&(d=n-o-(u||0)),isNaN(f)&&(f=r-h-(c||0));var m=new a(o+i[3],h+i[0],d,f);return m.margin=i,m},u.positionGroup=function(t,e,i,n){var a=t.getBoundingRect();e=r.extend(r.clone(e),{width:a.width,height:a.height}),e=u.getLayoutRect(e,i,n),t.attr("position",[e.x-a.x,e.y-a.y])},u.mergeLayoutParam=function(t,e,i){function n(n){var r={},s=0,l={},u=0,c=i.ignoreSize?1:2;if(h(n,function(e){l[e]=t[e]}),h(n,function(t){a(e,t)&&(r[t]=l[t]=e[t]),o(r,t)&&s++,o(l,t)&&u++}),u!==c&&s){if(s>=c)return r;for(var d=0;d',d=this.name;return"\x00-"===d&&(d=""),e?c+h(this.name)+" : "+o:(d&&h(d)+"
")+c+(s?h(s)+" : "+o:o)},ifEnableAnimation:function(){if(l.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()},getColorFromPalette:function(t,e){var i=this.ecModel,n=s.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipDataIndex:null});n.mixin(c,a.dataFormatMixin),n.mixin(c,s),t.exports=c},function(t,e,i){"use strict";function n(t){return t>-w&&w>t}function r(t){return t>w||-w>t}function a(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function o(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)}function s(t,e,i,r,a,o){var s=r+3*(e-i)-t,l=3*(i-2*e+t),h=3*(e-t),u=t-a,c=l*l-3*s*h,d=l*h-9*s*u,f=h*h-3*l*u,p=0;if(n(c)&&n(d))if(n(l))o[0]=0;else{var g=-h/l;g>=0&&1>=g&&(o[p++]=g)}else{var v=d*d-4*c*f;if(n(v)){var m=d/c,g=-l/s+m,y=-m/2;g>=0&&1>=g&&(o[p++]=g),y>=0&&1>=y&&(o[p++]=y)}else if(v>0){var x=b(v),w=c*l+1.5*s*(-d+x),M=c*l+1.5*s*(-d-x);w=0>w?-_(-w,A):_(w,A),M=0>M?-_(-M,A):_(M,A);var g=(-l-(w+M))/(3*s);g>=0&&1>=g&&(o[p++]=g)}else{var T=(2*c*l-3*s*d)/(2*b(c*c*c)),I=Math.acos(T)/3,C=b(c),k=Math.cos(I),g=(-l-2*C*k)/(3*s),y=(-l+C*(k+S*Math.sin(I)))/(3*s),L=(-l+C*(k-S*Math.sin(I)))/(3*s);g>=0&&1>=g&&(o[p++]=g),y>=0&&1>=y&&(o[p++]=y),L>=0&&1>=L&&(o[p++]=L)}}return p}function l(t,e,i,a,o){var s=6*i-12*e+6*t,l=9*e+3*a-3*t-9*i,h=3*e-3*t,u=0;if(n(l)){if(r(s)){var c=-h/s;c>=0&&1>=c&&(o[u++]=c)}}else{var d=s*s-4*l*h;if(n(d))o[0]=-s/(2*l);else if(d>0){var f=b(d),c=(-s+f)/(2*l),p=(-s-f)/(2*l);c>=0&&1>=c&&(o[u++]=c),p>=0&&1>=p&&(o[u++]=p)}}return u}function h(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-o)*r+o,u=(l-s)*r+s,c=(u-h)*r+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function u(t,e,i,n,r,o,s,l,h,u,c){var d,f,p,g,v,m=.005,y=1/0;T[0]=h,T[1]=u;for(var _=0;1>_;_+=.05)I[0]=a(t,i,r,s,_),I[1]=a(e,n,o,l,_),g=x(T,I),y>g&&(d=_,y=g);y=1/0;for(var w=0;32>w&&!(M>m);w++)f=d-m,p=d+m,I[0]=a(t,i,r,s,f),I[1]=a(e,n,o,l,f),g=x(I,T),f>=0&&y>g?(d=f,y=g):(C[0]=a(t,i,r,s,p),C[1]=a(e,n,o,l,p),v=x(C,T),1>=p&&y>v?(d=p,y=v):m*=.5);return c&&(c[0]=a(t,i,r,s,d),c[1]=a(e,n,o,l,d)),b(y)}function c(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function d(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function f(t,e,i,a,o){var s=t-2*e+i,l=2*(e-t),h=t-a,u=0;if(n(s)){if(r(l)){var c=-h/l;c>=0&&1>=c&&(o[u++]=c)}}else{var d=l*l-4*s*h;if(n(d)){var c=-l/(2*s);c>=0&&1>=c&&(o[u++]=c)}else if(d>0){var f=b(d),c=(-l+f)/(2*s),p=(-l-f)/(2*s);c>=0&&1>=c&&(o[u++]=c),p>=0&&1>=p&&(o[u++]=p)}}return u}function p(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function g(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}function v(t,e,i,n,r,a,o,s,l){var h,u=.005,d=1/0;T[0]=o,T[1]=s;for(var f=0;1>f;f+=.05){I[0]=c(t,i,r,f),I[1]=c(e,n,a,f);var p=x(T,I);d>p&&(h=f,d=p)}d=1/0;for(var g=0;32>g&&!(M>u);g++){var v=h-u,m=h+u;I[0]=c(t,i,r,v),I[1]=c(e,n,a,v);var p=x(I,T);if(v>=0&&d>p)h=v,d=p;else{C[0]=c(t,i,r,m),C[1]=c(e,n,a,m);var y=x(C,T);1>=m&&d>y?(h=m,d=y):u*=.5}}return l&&(l[0]=c(t,i,r,h),l[1]=c(e,n,a,h)),b(d)}var m=i(5),y=m.create,x=m.distSquare,_=Math.pow,b=Math.sqrt,w=1e-8,M=1e-4,S=b(3),A=1/3,T=y(),I=y(),C=y();t.exports={cubicAt:a,cubicDerivativeAt:o,cubicRootAt:s,cubicExtrema:l,cubicSubdivide:h,cubicProjectPoint:u,quadraticAt:c,quadraticDerivativeAt:d,quadraticRootAt:f,quadraticExtremum:p,quadraticSubdivide:g,quadraticProjectPoint:v}},function(t,e){function i(t){return t=Math.round(t),0>t?0:t>255?255:t}function n(t){return t=Math.round(t),0>t?0:t>360?360:t}function r(t){return 0>t?0:t>1?1:t}function a(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function o(t){return r(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function s(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function l(t,e,i){return t+(e-t)*i}function h(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in x)return x[e].slice();if("#"!==e.charAt(0)){var i=e.indexOf("("),n=e.indexOf(")");if(-1!==i&&n+1===e.length){var r=e.substr(0,i),s=e.substr(i+1,n-(i+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return;l=o(s.pop());case"rgb":if(3!==s.length)return;return[a(s[0]),a(s[1]),a(s[2]),l];case"hsla":if(4!==s.length)return;return s[3]=o(s[3]),u(s);case"hsl":if(3!==s.length)return;return u(s);default:return}}}else{if(4===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&4095>=h))return;return[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]}if(7===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&16777215>=h))return;return[(16711680&h)>>16,(65280&h)>>8,255&h,1]}}}}function u(t){var e=(parseFloat(t[0])%360+360)%360/360,n=o(t[1]),r=o(t[2]),a=.5>=r?r*(n+1):r+n-r*n,l=2*r-a,h=[i(255*s(l,a,e+1/3)),i(255*s(l,a,e)),i(255*s(l,a,e-1/3))];return 4===t.length&&(h[3]=t[3]),h}function c(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,h=(s+o)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+u-d:a===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function d(t,e){var i=h(t);if(i){for(var n=0;3>n;n++)0>e?i[n]=i[n]*(1-e)|0:i[n]=(255-i[n])*e+i[n]|0;return y(i,4===i.length?"rgba":"rgb")}}function f(t,e){var i=h(t);return i?((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1):void 0}function p(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[0,0,0,0];var r=t*(e.length-1),a=Math.floor(r),o=Math.ceil(r),s=e[a],h=e[o],u=r-a;return n[0]=i(l(s[0],h[0],u)),n[1]=i(l(s[1],h[1],u)),n[2]=i(l(s[2],h[2],u)),n[3]=i(l(s[3],h[3],u)),n}}function g(t,e,n){if(e&&e.length&&t>=0&&1>=t){var a=t*(e.length-1),o=Math.floor(a),s=Math.ceil(a),u=h(e[o]),c=h(e[s]),d=a-o,f=y([i(l(u[0],c[0],d)),i(l(u[1],c[1],d)),i(l(u[2],c[2],d)),r(l(u[3],c[3],d))],"rgba");return n?{color:f,leftIndex:o,rightIndex:s,value:a}:f}}function v(t,e,i,r){return t=h(t),t?(t=c(t),null!=e&&(t[0]=n(e)),null!=i&&(t[1]=o(i)),null!=r&&(t[2]=o(r)),y(u(t),"rgba")):void 0}function m(t,e){return t=h(t),t&&null!=e?(t[3]=r(e),y(t,"rgba")):void 0}function y(t,e){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}var x={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};t.exports={parse:h,lift:d,toHex:f,fastMapToColor:p,mapToColor:g,modifyHSL:v,modifyAlpha:m,stringify:y}},function(t,e,i){function n(t,e){var i=t+":"+e;if(h[i])return h[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;o>a;a++)r=Math.max(p.measureText(n[a],e).width,r);return u>c&&(u=0,h={}),u++,h[i]=r,r}function r(t,e,i,r){var a=((t||"")+"").split("\n").length,o=n(t,e),s=n("国",e),l=a*s,h=new f(0,0,o,l);switch(h.lineHeight=s,r){case"bottom":case"alphabetic":h.y-=s;break;case"middle":h.y-=s/2}switch(i){case"end":case"right":h.x-=h.width;break;case"center":h.x-=h.width/2}return h}function a(t,e,i,n){var r=e.x,a=e.y,o=e.height,s=e.width,l=i.height,h=o/2-l/2,u="left";switch(t){case"left":r-=n,a+=h,u="right";break;case"right":r+=n+s,a+=h,u="left";break;case"top":r+=s/2,a-=n+l,u="center";break;case"bottom":r+=s/2,a+=o+n,u="center";break;case"inside":r+=s/2,a+=h,u="center";break;case"insideLeft":r+=n,a+=h,u="left";break;case"insideRight":r+=s-n,a+=h,u="right";break;case"insideTop":r+=s/2,a+=n,u="center";break;case"insideBottom":r+=s/2,a+=o-l-n,u="center";break;case"insideTopLeft":r+=n,a+=n,u="left";break;case"insideTopRight":r+=s-n,a+=n,u="right";break;case"insideBottomLeft":r+=n,a+=o-l-n;break;case"insideBottomRight":r+=s-n,a+=o-l-n,u="right"}return{x:r,y:a,textAlign:u,textBaseline:"top"}}function o(t,e,i,r){if(!i)return"";r=d.defaults({ellipsis:"...",minCharacters:3,maxIterations:3,cnCharWidth:n("国",e),ascCharWidth:n("a",e)},r,!0),i-=n(r.ellipsis);for(var a=(t+"").split("\n"),o=0,l=a.length;l>o;o++)a[o]=s(a[o],e,i,r);return a.join("\n")}function s(t,e,i,r){for(var a=0;;a++){var o=n(t,e);if(i>o||a>=r.maxIterations){t+=r.ellipsis;break}var s=0===a?l(t,i,r):Math.floor(t.length*i/o);if(sr&&e>n;r++){var o=t.charCodeAt(r);n+=o>=0&&127>=o?i.ascCharWidth:i.cnCharWidth}return r}var h={},u=0,c=5e3,d=i(1),f=i(7),p={getWidth:n,getBoundingRect:r,adjustTextPositionOnRect:a,ellipsis:o,measureText:function(t,e){var i=d.getContext();return i.font=e,i.measureText(t)}};t.exports=p},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(){var t=new i(6);return n.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},rotate:function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t},scale:function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},invert:function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null}};t.exports=n},function(t,e,i){function n(t,e){var i=a.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function r(t,e,i){return this.superClass.prototype[e].apply(t,i)}var a=i(1),o={},s=".",l="___EC__COMPONENT__CONTAINER___",h=o.parseClassType=function(t){var e={main:"",sub:""};return t&&(t=t.split(s),e.main=t[0]||"",e.sub=t[1]||""),e};o.enableClassExtend=function(t,e){t.extend=function(i){var o=function(){e&&e.apply(this,arguments),t.apply(this,arguments)};return a.extend(o.prototype,i),o.extend=this.extend,o.superCall=n,o.superApply=r,a.inherits(o,this),o.superClass=this,o}},o.enableClassManagement=function(t,e){function i(t){var e=n[t.main];return e&&e[l]||(e=n[t.main]={},e[l]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(e=h(e),e.sub){if(e.sub!==l){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[l]&&(r=e?r[e]:null),i&&!r)throw new Error("Component "+t+"."+(e||"")+" not exists. Load it first.");return r},t.getClassesByMainType=function(t){t=h(t);var e=[],i=n[t.main];return i&&i[l]?a.each(i,function(t,i){i!==l&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=h(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return a.each(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=h(t);var e=n[t.main];return e&&e[l]},t.parseClassType=h,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t},o.setReadOnly=function(t,e){},t.exports=o},function(t,e,i){var n=i(134),r=i(38);i(135),i(133);var a=i(32),o=i(4),s=i(1),l=i(18),h={};h.getScaleExtent=function(t,e){var i=t.scale,n=i.getExtent(),r=n[1]-n[0];if("ordinal"===i.type)return isFinite(r)?n:[0,0];var a=e.getMin?e.getMin():e.get("min"),l=e.getMax?e.getMax():e.get("max"),h=e.getNeedCrossZero?e.getNeedCrossZero():!e.get("scale"),u=e.get("boundaryGap");s.isArray(u)||(u=[u||0,u||0]),u[0]=o.parsePercent(u[0],1),u[1]=o.parsePercent(u[1],1);var c=!0,d=!0;return null==a&&(a=n[0]-u[0]*r,c=!1),null==l&&(l=n[1]+u[1]*r,d=!1),"dataMin"===a&&(a=n[0]),"dataMax"===l&&(l=n[1]),h&&(a>0&&l>0&&!c&&(a=0),0>a&&0>l&&!d&&(l=0)),[a,l]},h.niceScaleExtent=function(t,e){var i=t.scale,n=h.getScaleExtent(t,e),r=null!=(e.getMin?e.getMin():e.get("min")),a=null!=(e.getMax?e.getMax():e.get("max")),o=e.get("splitNumber");i.setExtent(n[0],n[1]),i.niceExtent(o,r,a);var s=e.get("minInterval");if(isFinite(s)&&!r&&!a&&"interval"===i.type){var l=i.getInterval(),u=Math.max(Math.abs(l),s)/l;n=i.getExtent(),i.setExtent(u*n[0],n[1]*u),i.niceExtent(o)}var l=e.get("interval");null!=l&&i.setInterval&&i.setInterval(l)},h.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new n(t.getCategories(),[1/0,-(1/0)]);case"value":return new r;default:return(a.getClass(e)||r).create(t)}},h.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)},h.getAxisLabelInterval=function(t,e,i,n){var r,a=0,o=0,s=1;e.length>40&&(s=Math.floor(e.length/40));for(var h=0;h1?s:(a+1)*s-1},h.getFormattedLabels=function(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",e)}}(e),s.map(n,e)):"function"==typeof e?s.map(r,function(n,r){return e("category"===t.type?i.getLabel(n):n,r)},this):n},t.exports=h},function(t,e){var i=Array.prototype.slice,n=function(){this._$handlers={}};n.prototype={constructor:n,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var r=0;rr;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>3&&(e=i.call(e,1));for(var r=this._$handlers[t],a=r.length,o=0;a>o;){switch(n){case 1:r[o].h.call(r[o].ctx);break;case 2:r[o].h.call(r[o].ctx,e[1]);break;case 3:r[o].h.call(r[o].ctx,e[1],e[2]);break;default:r[o].h.apply(r[o].ctx,e)}r[o].one?(r.splice(o,1),a--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>4&&(e=i.call(e,1,e.length-1));for(var r=e[e.length-1],a=this._$handlers[t],o=a.length,s=0;o>s;){switch(n){case 1:a[s].h.call(r);break;case 2:a[s].h.call(r,e[1]);break;case 3:a[s].h.call(r,e[1],e[2]);break;default:a[s].h.apply(r,e)}a[s].one?(a.splice(s,1),o--):s++}}return this}},t.exports=n},function(t,e){"use strict";function i(){this._coordinateSystems=[]}var n={};i.prototype={constructor:i,create:function(t,e){var i=[];for(var r in n){var a=n[r].create(t,e);a&&(i=i.concat(a))}this._coordinateSystems=i},update:function(t,e){for(var i=this._coordinateSystems,n=0;n=0;if(n){var a="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];a&&r(t,a,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function o(t,e,i){h?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function s(t,e,i){h?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}var l=i(22),h="undefined"!=typeof window&&!!window.addEventListener,u=h?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};t.exports={clientToLocal:r,normalizeEvent:a,addEventListener:o,removeEventListener:s,stop:u,Dispatcher:l}},function(t,e){"use strict";var i={};t.exports={register:function(t,e){i[t]=e},get:function(t){return i[t]}}},function(t,e,i){"use strict";var n=i(3),r=i(7),a=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),o=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),s=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),d=Math.cos(h);t.arc(i,l,o,Math.PI-h,2*Math.PI+h);var f=.6*o,p=.7*o;t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),l=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),h={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:o,pin:s,arrow:l,triangle:a},u={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},c={};for(var d in h)c[d]=new h[d];var f=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e){var i=e.symbolType,n=c[i];"none"!==e.symbolType&&(n||(i="rect",n=c[i]),u[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(t,n.shape))}}),p=function(t){if("image"!==this.type){var e=this.style,i=this.shape;i&&"line"===i.symbolType?e.stroke=t:this.__isEmptyBrush?(e.stroke=t,e.fill="#fff"):(e.fill&&(e.fill=t),e.stroke&&(e.stroke=t)),this.dirty(!1)}},g={createSymbol:function(t,e,i,a,o,s){var l=0===t.indexOf("empty");l&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var h;return h=0===t.indexOf("image://")?new n.Image({style:{image:t.slice(8),x:e,y:i,width:a,height:o}}):0===t.indexOf("path://")?n.makePath(t.slice(7),{},new r(e,i,a,o)):new f({shape:{symbolType:t,x:e,y:i,width:a,height:o}}),h.__isEmptyBrush=l,h.setColor=p,h.setColor(s),h}};t.exports=g},function(t,e,i){function n(){this.group=new o,this.uid=s.getUID("viewChart")}function r(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;is;s++)r(t.getItemGraphicEl(o[s]),i);else if(a)for(var h=a instanceof Array?a:[a],s=0,l=h.length;l>s;s++){var n=t.indexOfName(h[s]);r(t.getItemGraphicEl(n),i)}else t.eachItemGraphicEl(function(t){r(t,i)})}var o=i(34),s=i(43),l=i(20);n.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){a(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){a(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var h=n.prototype;h.updateView=h.updateLayout=h.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},l.enableClassExtend(n),l.enableClassManagement(n,{registerWhenExtend:!0}),t.exports=n},function(t,e,i){"use strict";var n=i(16),r=i(5),a=i(74),o=i(7),s=i(33).devicePixelRatio,l={ +M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},h=[],u=[],c=[],d=[],f=Math.min,p=Math.max,g=Math.cos,v=Math.sin,m=Math.sqrt,y=Math.abs,x="undefined"!=typeof Float32Array,_=function(){this.data=[],this._len=0,this._ctx=null,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._ux=0,this._uy=0};_.prototype={constructor:_,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=y(1/s/t)||0,this._uy=y(1/s/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),this._len=0,this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=y(t-this._xi)>this._ux||y(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(l.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(l.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(l.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=g(r)*i+t,this._xi=v(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(l.R,t,e,i,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();x&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;oe.length&&(this._expandData(),e=this.data);for(var i=0;ia&&(a=r+a),a%=r,g-=a*u,v-=a*c;u>0&&t>=g||0>u&&g>=t||0==u&&(c>0&&e>=v||0>c&&v>=e);)n=this._dashIdx,i=o[n],g+=u*i,v+=c*i,this._dashIdx=(n+1)%y,u>0&&l>g||0>u&&g>l||c>0&&h>v||0>c&&v>h||s[n%2?"moveTo":"lineTo"](u>=0?f(g,t):p(g,t),c>=0?f(v,e):p(v,e));u=g-t,c=v-e,this._dashOffset=-m(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,a,o){var s,l,h,u,c,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._ctx,v=this._xi,y=this._yi,x=n.cubicAt,_=0,b=this._dashIdx,w=p.length,M=0;for(0>f&&(f=d+f),f%=d,s=0;1>s;s+=.1)l=x(v,t,i,a,s+.1)-x(v,t,i,a,s),h=x(y,e,r,o,s+.1)-x(y,e,r,o,s),_+=m(l*l+h*h);for(;w>b&&(M+=p[b],!(M>f));b++);for(s=(M-f)/_;1>=s;)u=x(v,t,i,a,s),c=x(y,e,r,o,s),b%2?g.moveTo(u,c):g.lineTo(u,c),s+=p[b]/_,b=(b+1)%w;b%2!==0&&g.lineTo(a,o),l=a-u,h=o-c,this._dashOffset=-m(l*l+h*h)},_dashedQuadraticTo:function(t,e,i,n){var r=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,x&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=d[0]=d[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,s=0,f=0;fd;){var f=s[d++];switch(1==d&&(n=s[d],r=s[d+1],e=n,i=r),f){case l.M:e=n=s[d++],i=r=s[d++],t.moveTo(n,r);break;case l.L:a=s[d++],o=s[d++],(y(a-n)>h||y(o-r)>u||d===c-1)&&(t.lineTo(a,o),n=a,r=o);break;case l.C:t.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.Q:t.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.A:var p=s[d++],m=s[d++],x=s[d++],_=s[d++],b=s[d++],w=s[d++],M=s[d++],S=s[d++],A=x>_?x:_,T=x>_?1:x/_,I=x>_?_/x:1,C=Math.abs(x-_)>.001,k=b+w;C?(t.translate(p,m),t.rotate(M),t.scale(T,I),t.arc(0,0,A,b,k,1-S),t.scale(1/T,1/I),t.rotate(-M),t.translate(-p,-m)):t.arc(p,m,A,b,k,1-S),1==d&&(e=g(b)*x+p,i=v(b)*_+m),n=g(k)*x+p,r=v(k)*_+m;break;case l.R:e=n=s[d],i=r=s[d+1],t.rect(s[d++],s[d++],s[d++],s[d++]);break;case l.Z:t.closePath(),n=e,r=i}}}},_.CMD=l,t.exports=_},function(t,e){var i=function(t){this.colorStops=t||[]};i.prototype={constructor:i,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},t.exports=i},function(t,e,i){function n(t,e,i,n){if(!e)return t;var s=r(e[0]),l=a.isArray(s)&&s.length||1;i=i||[],n=n||"extra";for(var h=0;l>h;h++)if(!t[h]){var u=i[h]||n+(h-i.length);t[h]=o(e,h)?{type:"ordinal",name:u}:u}return t}function r(t){return a.isArray(t)?t:a.isObject(t)?t.value:t}var a=i(1),o=n.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var o=r(t[i]);if(!a.isArray(o))return!1;var o=o[e];if(null!=o&&isFinite(o))return!1;if(a.isString(o)&&"-"!==o)return!0}return!1};t.exports=n},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=0;e=0)){var o=this.getShallow(a);null!=o&&(i[t[r][0]]=o)}}return i}}},function(t,e,i){function n(){this._extent=[1/0,-(1/0)],this._interval=0,this.init&&this.init.apply(this,arguments)}var r=i(20),a=n.prototype;a.parse=function(t){return t},a.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},a.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},a.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},a.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},a.getExtent=function(){return this._extent.slice()},a.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},a.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof o&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,a=n.indexOf(r,t);return 0>a?this:(r.splice(a,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof o&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&r(t)?function(t,e,i,n){return d.isDataItemOption(t)&&(x.hasItemOption=!0),n===y?i:g(p(t),m[n])}:function(t,e,i,n){var r=p(t),a=g(r&&r[n],m[n]);d.isDataItemOption(t)&&(x.hasItemOption=!0);var o=s&&s.categoryAxesModels;return o&&o[e]&&"string"==typeof a&&(b[e]=b[e]||o[e].getCategories(),a=c.indexOf(b[e],a),0>a&&!isNaN(a)&&(a=+a)),a};return x.hasItemOption=!1,x.initData(t,_,w),x}function o(t){return"category"!==t&&"time"!==t}function s(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function l(t,e){var i,n=[],r=t&&t.dimensions[t.categoryIndex];if(r&&(i=t.categoryAxesModels[r.name]),i){var a=i.getCategories();if(a){var o=e.length;if(c.isArray(e[0])&&e[0].length>1){n=[];for(var s=0;o>s;s++)n[s]=a[e[s][t.categoryIndex||0]]}else n=a.slice(0)}}return n}var h=i(13),u=i(30),c=i(1),d=i(8),f=i(23),p=d.getDataItemValue,g=d.converDataValue,v={cartesian2d:function(t,e,i){var n=i.getComponent("xAxis",e.get("xAxisIndex")),r=i.getComponent("yAxis",e.get("yAxisIndex")),a=n.get("type"),l=r.get("type"),h=[{name:"x",type:s(a),stackable:o(a)},{name:"y",type:s(l),stackable:o(l)}],c="category"===a,d="category"===l;u(h,t,["x","y","z"]);var f={};return c&&(f.x=n),d&&(f.y=r),{dimensions:h,categoryIndex:c?0:d?1:-1,categoryAxesModels:f}},polar:function(t,e,i){var n=e.get("polarIndex")||0,r=function(t){return t.get("polarIndex")===n},a=i.findComponents({mainType:"angleAxis",filter:r})[0],l=i.findComponents({mainType:"radiusAxis",filter:r})[0],h=l.get("type"),c=a.get("type"),d=[{name:"radius",type:s(h),stackable:o(h)},{name:"angle",type:s(c),stackable:o(c)}],f="category"===c,p="category"===h;u(d,t,["radius","angle","value"]);var g={};return p&&(g.radius=l),f&&(g.angle=a),{dimensions:d,categoryIndex:f?1:p?0:-1,categoryAxesModels:g}},geo:function(t,e,i){return{dimensions:u([{name:"lng"},{name:"lat"}],t,["lng","lat","value"])}}};t.exports=a},function(t,e,i){"use strict";var n=i(3),r=i(1);i(54),i(105),i(2).extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new n.Rect({shape:t.coordinateSystem.getRect(),style:r.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0}))}})},function(t,e,i){function n(t){t=t||{},o.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new a(t.style),this._rect=null,this.__clipPaths=[]}var r=i(1),a=i(64),o=i(58),s=i(76);n.prototype={constructor:n,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?o.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new a(t),this.dirty(!1),this}},r.inherits(n,o),r.mixin(n,s),t.exports=n},function(t,e,i){var n=i(4),r=i(11),a=i(32),o=Math.floor,s=Math.ceil,l=a.extend({type:"interval",_interval:0,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval||this.niceTicks(),this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice()},getTicks:function(){this._interval||this.niceTicks();var t=this._interval,e=this._extent,i=[],r=1e4;if(t){var a=this._niceExtent;e[0]r)return[];e[1]>a[1]&&i.push(e[1])}return i},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(i=-i,e.reverse());var r=n.nice(i/t,!0),a=[n.round(s(e[0]/r)*r),n.round(o(e[1]/r)*r)];this._interval=r,this._niceExtent=a}},niceExtent:function(t,e,i){var r=this._extent;if(r[0]===r[1])if(0!==r[0]){var a=r[0]/2;r[0]-=a,r[1]+=a}else r[1]=1;var l=r[1]-r[0];isFinite(l)||(r[0]=0,r[1]=1),this.niceTicks(t);var h=this._interval;e||(r[0]=n.round(o(r[0]/h)*h)),i||(r[1]=n.round(s(r[1]/h)*h))}});l.create=function(){return new l},t.exports=l},function(t,e,i){function n(t){this.group=new a.Group,this._symbolCtor=t||o}function r(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}var a=i(3),o=i(49),s=n.prototype;s.updateData=function(t,e){var i=this.group,n=t.hostModel,o=this._data,s=this._symbolCtor,l={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis")};t.diff(o).add(function(n){var a=t.getItemLayout(n);if(r(t,n,e)){var o=new s(t,n,l);o.attr("position",a),t.setItemGraphicEl(n,o),i.add(o)}}).update(function(h,u){var c=o.getItemGraphicEl(u),d=t.getItemLayout(h);return r(t,h,e)?(c?(c.updateData(t,h,l),a.updateProps(c,{position:d},n)):(c=new s(t,h),c.attr("position",d)),i.add(c),void t.setItemGraphicEl(h,c)):void i.remove(c)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},s.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},s.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll())},t.exports=n},function(t,e,i){function n(t){var e={};return u(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function r(t,e,i,n){null!=i[e]&&null==i[t]&&(n[t]=null)}var a=i(1),o=i(12),s=i(2),l=i(8),h=i(177),u=a.each,c=l.eachAxisDim,d=s.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,angleAxisIndex:null,radiusAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0;var r=n(t);this.mergeDefaultAndTheme(t,i),this.doInit(r)},mergeOption:function(t){var e=n(t);a.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;o.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),r("start","startValue",t,e),r("end","endValue",t,e),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var a=this.dependentModels[e.axis][i],o=a.__dzAxisProxy||(a.__dzAxisProxy=new h(e.name,i,this,r));t[e.name+"_"+i]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();c(function(e){var i=e.axisIndex;t[i]=l.normalizeToArray(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;c(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option;if(t){var n="vertical"===e?{dim:"y",axisIndex:"yAxisIndex",axis:"yAxis"}:{dim:"x",axisIndex:"xAxisIndex",axis:"xAxis"};this.dependentModels[n.axis].length&&(i[n.axisIndex]=[0],t=!1)}t&&c(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var a=0,o=r.length;o>a;a++)"category"===r[a].get("type")&&n.push(a);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&c(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex);a.indexOf(n,r)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return c(function(n){var r=t.get(n.axisIndex),a=this.dependentModels[n.axis][r];a&&a.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return c(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;c(function(n){u(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},setRawRange:function(t){u(["start","end","startValue","endValue"],function(e){this.option[e]=t[e]},this)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(){var t=this._axisProxies;for(var e in t)if(t.hasOwnProperty(e)&&t[e].hostedBy(this))return t[e];for(var e in t)if(t.hasOwnProperty(e)&&!t[e].hostedBy(this))return t[e]}});t.exports=d},function(t,e,i){var n=i(57);t.exports=n.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetInfo:function(){function t(t,e,i,n){for(var r,a=0;a=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){var t=this._extent.slice();return t},getPixelPrecision:function(t){return r.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count())),a(t,s,i,e)},coordToData:function(t,e){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count()));var o=a(t,i,s,e);return this.scale.scale(o)},getTicksCoords:function(){if(this.onBand){for(var t=this.getBands(),e=[],i=0;io;o++)e.push([a*o/i+n,a*(o+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i}},t.exports=l},function(t,e,i){var n=i(1),r=i(20),a=r.parseClassType,o=0,s={},l="_";s.getUID=function(t){return[t||"",o++,Math.random()].join(l)},s.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=a(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var o=a(i).main;t.hasSubTypes(i)&&e[o]&&(r=e[o](n))}return r},t},s.enableTopologicalTravel=function(t,e){function i(t){var i={},o=[];return n.each(t,function(s){var l=r(i,s),h=l.originalDeps=e(s),u=a(h,t);l.entryCount=u.length,0===l.entryCount&&o.push(s),n.each(u,function(t){n.indexOf(l.predecessor,t)<0&&l.predecessor.push(t);var e=r(i,t);n.indexOf(e.successor,t)<0&&e.successor.push(s)})}),{graph:i,noEntryList:o}}function r(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function a(t,e){var i=[];return n.each(t,function(t){n.indexOf(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,r,a){function o(t){h[t].entryCount--,0===h[t].entryCount&&u.push(t)}function s(t){c[t]=!0,o(t)}if(t.length){var l=i(e),h=l.graph,u=l.noEntryList,c={};for(n.each(t,function(t){c[t]=!0});u.length;){var d=u.pop(),f=h[d],p=!!c[d];p&&(r.call(a,d,f.originalDeps.slice()),delete c[d]),n.each(f.successor,p?s:o)}n.each(c,function(){throw new Error("Circle dependency may exists")})}}},t.exports=s},function(t,e){function i(t){for(var e=0;t>=u;)e|=1&t,t>>=1;return t+e}function n(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;r(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function r(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function a(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var a,o=t[n],s=e,l=n;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function o(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;s>l&&a(t,e[i+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[i+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[i+u])>0?o=u+1:l=u}return l}function s(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;s>l&&a(t,e[i+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}else{for(s=n-r;s>l&&a(t,e[i+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[i+u])<0?l=u:o=u+1}return l}function l(t,e){function i(t,e){u[y]=t,f[y]=e,y+=1}function n(){for(;y>1;){var t=y-2;if(t>=1&&f[t-1]<=f[t]+f[t+1]||t>=2&&f[t-2]<=f[t]+f[t-1])f[t-1]f[t+1])break;a(t)}}function r(){for(;y>1;){var t=y-2;t>0&&f[t-1]=r?l(n,r,a,c):h(n,r,a,c)))}function l(i,n,r,a){var l=0;for(l=0;n>l;l++)x[l]=t[i+l];var h=0,u=r,d=i;if(t[d++]=t[u++],0!==--a){if(1===n){for(l=0;a>l;l++)t[d+l]=t[u+l];return void(t[d+a]=x[h])}for(var f,g,v,m=p;;){f=0,g=0,v=!1;do if(e(t[u],x[h])<0){if(t[d++]=t[u++],g++,f=0,0===--a){v=!0;break}}else if(t[d++]=x[h++],f++,g=0,1===--n){v=!0;break}while(m>(f|g));if(v)break;do{if(f=s(t[u],x,h,n,0,e),0!==f){for(l=0;f>l;l++)t[d+l]=x[h+l];if(d+=f,h+=f,n-=f,1>=n){v=!0;break}}if(t[d++]=t[u++],0===--a){v=!0;break}if(g=o(x[h],t,u,a,0,e),0!==g){for(l=0;g>l;l++)t[d+l]=t[u+l];if(d+=g,u+=g,a-=g,0===a){v=!0;break}}if(t[d++]=x[h++],1===--n){v=!0;break}m--}while(f>=c||g>=c);if(v)break;0>m&&(m=0),m+=2}if(p=m,1>p&&(p=1),1===n){for(l=0;a>l;l++)t[d+l]=t[u+l];t[d+a]=x[h]}else{if(0===n)throw new Error;for(l=0;n>l;l++)t[d+l]=x[h+l]}}else for(l=0;n>l;l++)t[d+l]=x[h+l]}function h(i,n,r,a){var l=0;for(l=0;a>l;l++)x[l]=t[r+l];var h=i+n-1,u=a-1,d=r+a-1,f=0,g=0;if(t[d--]=t[h--],0!==--n){if(1===a){for(d-=n,h-=n,g=d+1,f=h+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];return void(t[d]=x[u])}for(var v=p;;){var m=0,y=0,_=!1;do if(e(x[u],t[h])<0){if(t[d--]=t[h--],m++,y=0,0===--n){_=!0;break}}else if(t[d--]=x[u--],y++,m=0,1===--a){_=!0;break}while(v>(m|y));if(_)break;do{if(m=n-s(x[u],t,i,n,n-1,e),0!==m){for(d-=m,h-=m,n-=m,g=d+1,f=h+1,l=m-1;l>=0;l--)t[g+l]=t[f+l];if(0===n){_=!0;break}}if(t[d--]=x[u--],1===--a){_=!0;break}if(y=a-o(t[h],x,0,a,a-1,e),0!==y){for(d-=y,u-=y,a-=y,g=d+1,f=u+1,l=0;y>l;l++)t[g+l]=x[f+l];if(1>=a){_=!0;break}}if(t[d--]=t[h--],0===--n){_=!0;break}v--}while(m>=c||y>=c);if(_)break;0>v&&(v=0),v+=2}if(p=v,1>p&&(p=1),1===a){for(d-=n,h-=n,g=d+1,f=h+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];t[d]=x[u]}else{if(0===a)throw new Error;for(f=d-(a-1),l=0;a>l;l++)t[f+l]=x[l]}}else for(f=d-(a-1),l=0;a>l;l++)t[f+l]=x[l]}var u,f,p=c,g=0,v=d,m=0,y=0;g=t.length,2*d>g&&(v=g>>>1);var x=[];m=120>g?5:1542>g?10:119151>g?19:40,u=[],f=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function h(t,e,r,o){r||(r=0),o||(o=t.length);var s=o-r;if(!(2>s)){var h=0;if(u>s)return h=n(t,r,o,e),void a(t,r,o,r+h,e);var c=new l(t,e),d=i(s);do{if(h=n(t,r,o,e),d>h){var f=s;f>d&&(f=d),a(t,r,r+f,r+h,e),h=f}c.pushRun(r,h),c.mergeRuns(),s-=h,r+=h}while(0!==s);c.forceMergeRuns()}}var u=32,c=7,d=256;t.exports=h},function(t,e){"use strict";function i(t){return t}function n(t,e,n,r){this._old=t,this._new=e,this._oldKeyGetter=n||i,this._newKeyGetter=r||i}function r(t,e,i){for(var n=0;nt;t++)this._add&&this._add(h[t]);else this._add&&this._add(h)}}},t.exports=n},function(t,e){t.exports=function(t,e,i,n,r){n.eachRawSeriesByType(t,function(t){var r=t.getData(),a=t.get("symbol")||e,o=t.get("symbolSize");r.setVisual({legendSymbol:i||a,symbol:a,symbolSize:o}),n.isSeriesFiltered(t)||("function"==typeof o&&r.each(function(e){var i=t.getRawValue(e),n=t.getDataParams(e);r.setItemVisual(e,"symbolSize",o(i,n))}),r.each(function(t){var e=r.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&r.setItemVisual(t,"symbol",i),null!=n&&r.setItemVisual(t,"symbolSize",n)}))})}},function(t,e,i){var n=i(33);t.exports=function(){if(0!==n.debugMode)if(1==n.debugMode)for(var t in arguments)throw new Error(arguments[t]);else if(n.debugMode>1)for(var t in arguments)console.log(arguments[t])}},function(t,e,i){function n(t){r.call(this,t)}var r=i(37),a=i(7),o=i(1),s=i(66),l=i(148),h=new l(50);n.prototype={constructor:n,type:"image",brush:function(t,e){var i,n=this.style,r=n.image;if(n.bind(t,this,e),i="string"==typeof r?this._image:r,!i&&r){var a=h.get(r);if(!a)return i=new Image,i.onload=function(){i.onload=null;for(var t=0;t0?"top":"bottom",n="center"):p(a-y)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&y>a?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,verticalAlign:r}}function o(t,e,i,n){var r,a,o=f(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return p(o-y/2)?(a=l?"bottom":"top",r="center"):p(o-1.5*y)?(a=l?"top":"bottom",r="center"):(a="middle",r=1.5*y>o&&o>y/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,verticalAlign:a}}var s=i(1),l=i(8),h=i(3),u=i(9),c=i(13),d=i(4),f=d.remRadian,p=d.isRadianAroundZero,g=i(5),v=g.applyTransform,m=s.retrieve,y=Math.PI,x=function(t,e){this.opt=e,this.axisModel=t,s.defaults(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new h.Group;var i=new h.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};x.prototype={constructor:x,hasBuilder:function(t){return!!_[t]},add:function(t){_[t].call(this)},getGroup:function(){return this.group}};var _={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(v(r,r,n),v(a,a,n)),this.group.add(new h.Line(h.subPixelOptimizeLine({anid:"line",shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:s.extend({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle()),strokeContainThreshold:t.strokeContainThreshold,silent:!!t.axisLineSilent,z2:1})))}},axisTick:function(){var t=this.axisModel;if(t.get("axisTick.show"))for(var e=t.axis,i=t.getModel("axisTick"),n=this.opt,r=i.getModel("lineStyle"),a=i.get("length"),o=w(i,n.labelInterval),l=e.getTicksCoords(),u=e.scale.getTicks(),c=[],d=[],f=this._transform,p=0;pg[1]?-1:1,x=["start"===u?g[0]-v*p:"end"===u?g[1]+v*p:(g[0]+g[1])/2,"middle"===u?t.labelOffset+d*p:0],_=e.get("nameRotate");null!=_&&(_=_*y/180),s="middle"===u?a(t,null!=_?_:t.rotation,d):o(t,u,_||0,g);var b=i,w=m(t.axisNameTruncateLength,e.get("nameTruncateLength")),M=m(t.axisNameTruncateEllipsis,e.get("nameTruncateEllipsis"));null!=w&&(b=l.truncate(i,w,M));var S=new h.Text({anid:"name",__fullText:i,__truncatedText:b,style:{text:b,textFont:f.getFont(),fill:f.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.textAlign,textVerticalAlign:s.verticalAlign},position:x,rotation:s.rotation,silent:e.get("silent"),z2:1});if(null!=w){S.dataIndex=0;var A=new c(["value"],e);A.initData([{value:i,tooltip:{formatter:r}}]),S.dataModel=l.createDataFormatModel(A,{mainType:"axis"})}S.eventData=n(e),S.eventData.targetType="axisName",S.eventData.name=i,this._dumbGroup.add(S),S.updateTransform(),this.group.add(S),S.decomposeTransform()}}},b=x.ifIgnoreOnTick=function(t,e,i){var n,r=t.scale;return"ordinal"===r.type&&("function"==typeof i?(n=r.getTicks()[e],!i(n,r.getLabel(n))):e%(i+1))},w=x.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};t.exports=x},function(t,e,i){function n(t){return o.isObject(t)&&null!=t.value?t.value:t}function r(){return"category"===this.get("type")&&o.map(this.get("data"),n)}function a(){return s.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))}var o=i(1),s=i(21);t.exports={getFormattedLabels:a,getCategories:r}},function(t,e,i){var n=i(81),r=i(1),a=i(10),o=i(14),s=["value","category","time","log"];t.exports=function(t,e,i,l){r.each(s,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var s=this.layoutMode,l=s?o.getLayoutParams(e):{},h=n.getTheme();r.merge(e,h.get(a+"Axis")),r.merge(e,this.getDefaultOption()),e.type=i(t,e),s&&o.mergeLayoutParam(e,l,s)},defaultOption:r.mergeAll([{},n[a+"Axis"],l],!0)})}),a.registerSubTypeDefaulter(t+"Axis",r.curry(i,t))}},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(10),a=i(1),o=i(52),s=r.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this._resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this._resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this._resetRange()},setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},getMin:function(){var t=this.option;return null!=t.rangeStart?t.rangeStart:t.min},getMax:function(){var t=this.option;return null!=t.rangeEnd?t.rangeEnd:t.max},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},_resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}});a.merge(s.prototype,i(51));var l={gridIndex:0};o("x",s,n,l),o("y",s,n,l),t.exports=s},function(t,e,i){function n(t,e,i){return i.getComponent("grid",t.get("gridIndex"))===e}function r(t){var e,i=t.model,n=i.getFormattedLabels(),r=1,a=n.length;a>40&&(r=Math.ceil(a/40));for(var o=0;a>o;o+=r)if(!t.isLabelIgnored(o)){var s=i.getTextRect(n[o]);e?e.union(s):e=s}return e}function a(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this._model=t}function o(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}var s=i(14),l=i(21),h=i(1),u=i(117),c=i(115),d=h.each,f=l.ifAxisCrossZero,p=l.niceScaleExtent;i(118);var g=a.prototype;g.type="grid",g.getRect=function(){return this._rect},g.update=function(t,e){function i(t){var e=n[t];for(var i in e){var r=e[i];if(r&&("category"===r.type||!f(r)))return!0}return!1}var n=this._axesMap;this._updateScale(t,this._model),d(n.x,function(t){p(t,t.model)}),d(n.y,function(t){p(t,t.model)}),d(n.x,function(t){i("y")&&(t.onZero=!1)}),d(n.y,function(t){i("x")&&(t.onZero=!1)}),this.resize(this._model,e)},g.resize=function(t,e){function i(){d(a,function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),o(t,e?n.x:n.y)})}var n=s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var a=this._axesList;i(),t.get("containLabel")&&(d(a,function(t){if(!t.model.get("axisLabel.inside")){var e=r(t);if(e){var i=t.isHorizontal()?"height":"width",a=t.model.get("axisLabel.margin");n[i]-=e[i]+a,"top"===t.position?n.y+=e.height+a:"left"===t.position&&(n.x+=e.width+a)}}}),i())},g.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)return i[n];return i[e]}},g.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}for(var n=0,r=this._coordsList;n.5?e:t}function s(t,e,i,n,r){var o=t.length;if(1==r)for(var s=0;o>s;s++)n[s]=a(t[s],e[s],i);else for(var l=t[0].length,s=0;o>s;s++)for(var h=0;l>h;h++)n[s][h]=a(t[s][h],e[s][h],i)}function l(t,e,i){var n=t.length,r=e.length;if(n!==r){var a=n>r;if(a)t.length=r;else for(var o=n;r>o;o++)t.push(1===i?e[o]:x.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;ol;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function h(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;n>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function u(t,e,i,n,r,a,o,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=c(t[u],e[u],i[u],n[u],r,a,o);else for(var d=t[0].length,u=0;h>u;u++)for(var f=0;d>f;f++)s[u][f]=c(t[u][f],e[u][f],i[u][f],n[u][f],r,a,o)}function c(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function d(t){if(y(t)){var e=t.length;if(y(t[0])){for(var i=[],n=0;e>n;n++)i.push(x.call(t[n]));return i}return x.call(t)}return t}function f(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function p(t,e,i,n,r){var d=t._getter,p=t._setter,m="spline"===e,x=n.length;if(x){var _,b=n[0].value,w=y(b),M=!1,S=!1,A=w&&y(b[0])?2:1;n.sort(function(t,e){return t.time-e.time}),_=n[x-1].time;for(var T=[],I=[],C=n[0].value,k=!0,L=0;x>L;L++){T.push(n[L].time/_);var P=n[L].value;if(w&&h(P,C,A)||!w&&P===C||(k=!1),C=P,"string"==typeof P){var D=v.parse(P);D?(P=D,M=!0):S=!0}I.push(P)}if(!k){for(var O=I[x-1],L=0;x-1>L;L++)w?l(I[L],O,A):!isNaN(I[L])||isNaN(O)||S||M||(I[L]=O);w&&l(d(t._target,r),O,A);var z,E,R,N,B,V,F=0,G=0;if(M)var H=[0,0,0,0];var W=function(t,e){var i;if(G>e){for(z=Math.min(F+1,x-1),i=z;i>=0&&!(T[i]<=e);i--);i=Math.min(i,x-2)}else{for(i=F;x>i&&!(T[i]>e);i++);i=Math.min(i-1,x-2)}F=i,G=e;var n=T[i+1]-T[i];if(0!==n)if(E=(e-T[i])/n,m)if(N=I[i],R=I[0===i?i:i-1],B=I[i>x-2?x-1:i+1],V=I[i>x-3?x-1:i+2],w)u(R,N,B,V,E,E*E,E*E*E,d(t,r),A);else{var l;if(M)l=u(R,N,B,V,E,E*E,E*E*E,H,1),l=f(H);else{if(S)return o(N,B,E);l=c(R,N,B,V,E,E*E,E*E*E)}p(t,r,l)}else if(w)s(I[i],I[i+1],E,d(t,r),A);else{var l;if(M)s(I[i],I[i+1],E,H,1),l=f(H);else{if(S)return o(I[i],I[i+1],E);l=a(I[i],I[i+1],E)}p(t,r,l)}},Z=new g({target:t._target,life:_,loop:t._loop,delay:t._delay,onframe:W,ondestroy:i});return e&&"spline"!==e&&(Z.easing=e),Z}}}var g=i(142),v=i(17),m=i(1),y=m.isArrayLike,x=Array.prototype.slice,_=function(t,e,i,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||n,this._setter=a||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};_.prototype={when:function(t,e){var i=this._tracks;for(var n in e){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:d(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;i++)t[i].call(this)},start:function(t){var e,i=this,n=0,r=function(){n--,n||i._doneCallback()};for(var a in this._tracks){var o=p(this,t,r,this._tracks[a],a);o&&(this._clipList.push(o),n++,this.animation&&this.animation.addClip(o),e=o)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var n=0;nt&&(t+=i),t}}},function(t,e){var i=2311;t.exports=function(){return i++}},function(t,e){var i=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};i.prototype.getCanvasPattern=function(t){return this._canvasPattern||(this._canvasPattern=t.createPattern(this.image,this.repeat))},t.exports=i},function(t,e){function i(t,e,i){var n=e.x,r=e.x2,a=e.y,o=e.y2;e.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y);var s=t.createLinearGradient(n,a,r,o);return s}function n(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=e.x,s=e.y,l=e.r;e.global||(o=o*n+i.x,s=s*r+i.y,l*=a);var h=t.createRadialGradient(o,s,0,o,s,l);return h}var r=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],a=function(t){this.extendFrom(t)};a.prototype={constructor:a,fill:"#000000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,textFill:"#000",textStroke:null,textPosition:"inside",textBaseline:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,blend:null,bind:function(t,e,i){for(var n=this,a=i&&i.style,o=!a,s=0;s0},extendFrom:function(t,e){if(t){var i=this;for(var n in t)!t.hasOwnProperty(n)||!e&&i.hasOwnProperty(n)||(i[n]=t[n])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var a="radial"===e.type?n:i,o=a(t,e,r),s=e.colorStops,l=0;l=2){if(o&&"spline"!==o){var s=r(a,o,i,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,h=0;(i?l:l-1)>h;h++){var u=s[2*h],c=s[2*h+1],d=a[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],d[0],d[1])}}else{"spline"===o&&(a=n(a,i)),t.moveTo(a[0][0],a[0][1]);for(var h=1,f=a.length;f>h;h++)t.lineTo(a[h][0],a[h][1])}i&&t.closePath()}}}},function(t,e){t.exports={buildPath:function(t,e){var i,n,r,a,o=e.x,s=e.y,l=e.width,h=e.height,u=e.r;0>l&&(o+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=r=a=u:u instanceof Array?1===u.length?i=n=r=a=u[0]:2===u.length?(i=r=u[0],n=a=u[1]):3===u.length?(i=u[0],n=a=u[1],r=u[2]):(i=u[0],n=u[1],r=u[2],a=u[3]):i=n=r=a=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),n+r>h&&(c=n+r,n*=h/c,r*=h/c),i+a>h&&(c=i+a,i*=h/c,a*=h/c),t.moveTo(o+i,s),t.lineTo(o+l-n,s),0!==n&&t.quadraticCurveTo(o+l,s,o+l,s+n),t.lineTo(o+l,s+h-r),0!==r&&t.quadraticCurveTo(o+l,s+h,o+l-r,s+h),t.lineTo(o+a,s+h),0!==a&&t.quadraticCurveTo(o,s+h,o,s+h-a),t.lineTo(o,s+i),0!==i&&t.quadraticCurveTo(o,s,o+i,s)}}},function(t,e,i){var n=i(1);t.exports={updateSelectedMap:function(t){this._selectTargetMap=n.reduce(t||[],function(t,e){return t[e.name]=e,t},{})},select:function(t){var e=this._selectTargetMap,i=e[t],r=this.get("selectedMode");"single"===r&&n.each(e,function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t){var e=this._selectTargetMap[t];e&&(e.selected=!1)},toggleSelected:function(t){var e=this._selectTargetMap[t];return null!=e?(this[e.selected?"unSelect":"select"](t),e.selected):void 0},isSelected:function(t){var e=this._selectTargetMap[t];return e&&e.selected}}},function(t,e,i){function n(t){r.defaultEmphasis(t.label,r.LABEL_OPTIONS)}var r=i(8),a=i(1),o=i(12),s=i(11),l=s.addCommas,h=s.encodeHTML,u=i(2).extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},ifEnableAnimation:function(){if(o.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.ifEnableAnimation()},mergeOption:function(t,e,i,r){var o=this.constructor,s=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),l=t[s];if(!i||!i.data)return void(t[s]=null);if(l)l.mergeOption(i,e,!0);else{r&&n(i),a.each(i.data,function(t){t instanceof Array?(n(t[0]),n(t[1])):n(t)});var h={mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0};l=new o(i,this,e,h),l.__hostSeries=t}t[s]=l},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=a.isArray(i)?a.map(i,l).join(", "):l(i),r=e.getName(t),o=this.name;return(null!=i||r)&&(o+="
"),r&&(o+=h(r),null!=i&&(o+=" : ")),null!=i&&(o+=n),o},getData:function(){return this._data},setData:function(t){this._data=t}});a.mixin(u,r.dataFormatMixin),t.exports=u},function(t,e,i){t.exports=i(2).extendComponentView({type:"marker",init:function(){this.markerGroupMap={}},render:function(t,e,i){var n=this.markerGroupMap;for(var r in n)n[r].__keep=!1;var a=this.type+"Model";e.eachSeries(function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)},this);for(var r in n)n[r].__keep||this.group.remove(n[r].group)},renderSeries:function(){}})},function(t,e,i){function n(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function r(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function a(t,e,i){var n=-1;do n=Math.max(l.getPrecision(t.get(e,i)),n),t=t.stackedOn;while(t);return n}function o(t,e,i,n,r,o){var s=[],l=v(e,n,t),h=e.indexOfNearest(n,l,!0);s[r]=e.get(i,h,!0),s[o]=e.get(n,h,!0);var u=a(e,n,h);return u>=0&&(s[o]=+s[o].toFixed(u)),s}var s=i(1),l=i(4),h=s.indexOf,u=s.curry,c={min:u(o,"min"),max:u(o,"max"),average:u(o,"average")},d=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!r(e)&&!s.isArray(e.coord)&&n){var a=n.dimensions,o=f(e,i,n,t);if(e=s.clone(e),e.type&&c[e.type]&&o.baseAxis&&o.valueAxis){var l=h(a,o.baseAxis.dim),u=h(a,o.valueAxis.dim);e.coord=c[e.type](i,o.baseDataDim,o.valueDataDim,l,u),e.value=e.coord[u]}else{for(var d=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],p=0;2>p;p++)if(c[d[p]]){var g=t.coordDimToDataDim(a[p])[0];d[p]=v(i,g,d[p])}e.coord=d}}return e},f=function(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(n.dataDimToCoordDim(r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0]):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0],r.valueDataDim=n.coordDimToDataDim(r.valueAxis.dim)[0]),r},p=function(t,e){return t&&t.containData&&e.coord&&!n(e)?t.containData(e.coord):!0},g=function(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value},v=function(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,r++)},!0),n/r}return t.getDataExtent(e,!0)["max"===i?1:0]};t.exports={dataTransform:d,dataFilter:p,dimValueGetter:g,getAxisInfo:f,numCalculate:v}},function(t,e){t.exports=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;rf;f++){var x=m(t,i,a,h,p[f]);c[0]=o(x,c[0]),d[0]=s(x,d[0])}for(y=v(e,n,l,u,g),f=0;y>f;f++){var _=m(e,n,l,u,g[f]);c[1]=o(_,c[1]),d[1]=s(_,d[1])}c[0]=o(t,c[0]),d[0]=s(t,d[0]),c[0]=o(h,c[0]),d[0]=s(h,d[0]),c[1]=o(e,c[1]),d[1]=s(e,d[1]),c[1]=o(u,c[1]),d[1]=s(u,d[1])},a.fromQuadratic=function(t,e,i,n,a,l,h,u){var c=r.quadraticExtremum,d=r.quadraticAt,f=s(o(c(t,i,a),1),0),p=s(o(c(e,n,l),1),0),g=d(t,i,a,f),v=d(e,n,l,p);h[0]=o(t,a,g),h[1]=o(e,l,v),u[0]=s(t,a,g),u[1]=s(e,l,v)},a.fromArc=function(t,e,i,r,a,o,s,p,g){var v=n.min,m=n.max,y=Math.abs(a-o);if(1e-4>y%f&&y>1e-4)return p[0]=t-i,p[1]=e-r,g[0]=t+i,void(g[1]=e+r);if(u[0]=h(a)*i+t,u[1]=l(a)*r+e,c[0]=h(o)*i+t,c[1]=l(o)*r+e,v(p,u,c),m(g,u,c),a%=f,0>a&&(a+=f),o%=f,0>o&&(o+=f),a>o&&!s?o+=f:o>a&&s&&(a+=f),s){var x=o;o=a,a=x}for(var _=0;o>_;_+=Math.PI/2)_>a&&(d[0]=h(_)*i+t,d[1]=l(_)*r+e,v(p,d,p),m(g,d,g))},t.exports=a},function(t,e,i){var n=i(37),r=i(1),a=i(18),o=function(t){n.call(this,t)};o.prototype={constructor:o,type:"text",brush:function(t,e){var i=this.style,n=i.x||0,r=i.y||0,o=i.text;if(null!=o&&(o+=""),i.bind(t,this,e),o){this.setTransform(t);var s,l=i.textAlign;if(i.textVerticalAlign){var h=a.getBoundingRect(o,t.font,i.textAlign,"top");switch(s="middle",i.textVerticalAlign){case"middle":r-=h.height/2-h.lineHeight/2;break;case"bottom":r-=h.height-h.lineHeight/2;break;default:r+=h.lineHeight/2}}else s=i.textBaseline;t.font=i.textFont||i.font,t.textAlign=l||"left",t.textAlign!==l&&(t.textAlign="left"),t.textBaseline=s||"alphabetic",t.textBaseline!==s&&(t.textBaseline="alphabetic");for(var u=a.measureText("国",t.font).width,c=o.split("\n"),d=0;d=0?parseFloat(t)/100*e:parseFloat(t):t}var r=i(18),a=i(7),o=new a,s=function(){};s.prototype={constructor:s,drawRectText:function(t,e,i){var a=this.style,s=a.text;if(null!=s&&(s+=""),s){t.save();var l,h,u=a.textPosition,c=a.textDistance,d=a.textAlign,f=a.textFont||a.font,p=a.textBaseline,g=a.textVerticalAlign;i=i||r.getBoundingRect(s,f,d,p);var v=this.transform;if(v&&(o.copy(e),o.applyTransform(v),e=o),u instanceof Array){if(l=e.x+n(u[0],e.width),h=e.y+n(u[1],e.height),d=d||"left",p=p||"top",g){switch(g){case"middle":h-=i.height/2-i.lineHeight/2;break;case"bottom":h-=i.height-i.lineHeight/2;break;default:h+=i.lineHeight/2}p="middle"}}else{var m=r.adjustTextPositionOnRect(u,e,i,c);l=m.x,h=m.y,d=d||m.textAlign,p=p||m.textBaseline}t.textAlign=d||"left",t.textBaseline=p||"alphabetic";var y=a.textFill,x=a.textStroke;y&&(t.fillStyle=y),x&&(t.strokeStyle=x),t.font=f,t.shadowBlur=a.textShadowBlur,t.shadowColor=a.textShadowColor||"transparent",t.shadowOffsetX=a.textShadowOffsetX,t.shadowOffsetY=a.textShadowOffsetY;for(var _=s.split("\n"),b=0;b<_.length;b++)y&&t.fillText(_[b],l,h),x&&t.strokeText(_[b],l,h),h+=i.lineHeight;t.restore()}}},t.exports=s},function(t,e,i){function n(t){delete c[t]}/*! * ZRender, a high performance 2d drawing library. * * Copyright (c) 2013, Baidu Inc. @@ -19,10 +19,10 @@ var k=function(){var t=C[1]/C[0];this.animateTo({scale:[Math.max(1.1*C[0],C[0]+3 * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt */ -var r=i(61),o=i(11),a=i(131),s=i(134),l=i(135),h=!o.canvasSupported,u={canvas:i(133)},c={},d={};d.version="3.1.0",d.init=function(t,e){var i=new f(r(),t,e);return c[i.id]=i,i},d.dispose=function(t){if(t)t.dispose();else{for(var e in c)c[e].dispose();c={}}return d},d.getInstance=function(t){return c[t]},d.registerPainter=function(t,e){u[t]=e};var f=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new s,c=i.renderer;if(h){if(!u.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");c="vml"}else c&&u[c]||(c="canvas");var d=new u[c](e,r,i);this.storage=r,this.painter=d,o.node||(this.handler=new a(d.getViewportRoot(),r,d)),this.animation=new l({stage:{update:function(){n._needsRefresh&&n.refreshImmediately(),n._needsRefreshHover&&n.refreshHoverImmediately()}}}),this.animation.start(),this._needsRefresh;var f=r.delFromMap,p=r.addToMap;r.delFromMap=function(t){var e=r.get(t);f.call(r,t),e&&e.removeSelfFromZr(n)},r.addToMap=function(t){p.call(r,t),t.addSelfToZr(n)}};f.prototype={constructor:f,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(){this.painter.resize(),this.handler&&this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e,i){var n=r();return this.painter.pathToImage(n,t,e,i)},setDefaultCursorStyle:function(t){this.handler&&this.handler.setDefaultCursorStyle(t)},on:function(t,e,i){this.handler&&this.handler.on(t,e,i)},off:function(t,e){this.handler&&this.handler.off(t,e)},trigger:function(t,e){this.handler&&this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler&&this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,n(this.id)}},t.exports=d},function(t,e,i){var n=i(2),r=i(1);t.exports=function(t,e){r.each(e,function(e){e.update="updateView",n.registerAction(e,function(i,n){var r={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name);var n=t.getData();n.each(function(e){var i=n.getName(e);r[i]=t.isSelected(i)||!1})}),{name:i.name,selected:r}})})}},function(t,e,i){function n(t){if(!t.target||!t.target.draggable){var e=t.offsetX,i=t.offsetY,n=this.rectProvider&&this.rectProvider();n&&n.contain(e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function r(t){if(this._dragging&&(d.stop(t.event),"pinch"!==t.gestureEvent)){if(f.isTaken(this._zr,"globalPan"))return;var e=t.offsetX,i=t.offsetY,n=e-this._x,r=i-this._y;this._x=e,this._y=i;var o=this.target;if(o){var a=o.position;a[0]+=n,a[1]+=r,o.dirty()}d.stop(t.event),this.trigger("pan",n,r)}}function o(t){this._dragging=!1}function a(t){var e=t.wheelDelta>0?1.1:1/1.1;l.call(this,t,e,t.offsetX,t.offsetY)}function s(t){if(!f.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;l.call(this,t,e,t.pinchX,t.pinchY)}}function l(t,e,i,n){var r=this.rectProvider&&this.rectProvider();if(r&&r.contain(i,n)){d.stop(t.event);var o=this.target,a=this.zoomLimit;if(o){var s=o.position,l=o.scale,h=this.zoom=this.zoom||1;if(h*=e,a){var u=a.min||0,c=a.max||1/0;h=Math.max(Math.min(c,h),u)}var f=h/this.zoom;this.zoom=h,s[0]-=(i-s[0])*(f-1),s[1]-=(n-s[1])*(f-1),l[0]*=f,l[1]*=f,o.dirty()}this.trigger("zoom",e,i,n)}}function h(t,e,i){this.target=e,this.rectProvider=i,this.zoomLimit,this.zoom,this._zr=t;var l=c.bind,h=l(n,this),d=l(r,this),f=l(o,this),p=l(a,this),g=l(s,this);u.call(this),this.enable=function(e){this.disable(),null==e&&(e=!0),e!==!0&&"move"!==e&&"pan"!==e||(t.on("mousedown",h),t.on("mousemove",d),t.on("mouseup",f)),e!==!0&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",p),t.on("pinch",g))},this.disable=function(){t.off("mousedown",h),t.off("mousemove",d),t.off("mouseup",f),t.off("mousewheel",p),t.off("pinch",g)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}var u=i(21),c=i(1),d=i(23),f=i(107);c.mixin(h,u),t.exports=h},function(t,e){t.exports=function(t,e,i,n,r){function o(t,e,i){var n=e.length?e.slice():[e,e];return e[0]>e[1]&&n.reverse(),0>t&&n[0]+t0&&n[1]+t>i[1]&&(t=i[1]-n[1]),t}return t?("rigid"===n?(t=o(t,e,i),e[0]+=t,e[1]+=t):(t=o(t,e[r],i),e[r]+=t,"push"===n&&e[0]>e[1]&&(e[1-r]=e[r])),e):e}},function(t,e,i){var n=i(1),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameTextStyle:{},nameGap:15,silent:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#333",width:1,type:"solid"}},axisTick:{show:!0,inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{color:"#333",fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},o=n.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{interval:"auto"},axisLabel:{interval:"auto"}},r),a=n.merge({boundaryGap:[0,0],splitNumber:5},r),s=n.defaults({scale:!0,min:"dataMin",max:"dataMax"},a),l=n.defaults({},a);l.scale=!0,t.exports={categoryAxis:o,valueAxis:a,timeAxis:s,logAxis:l}},,function(t,e,i){var n=i(30);t.exports=function(t,e,i){function r(t){var r=[e,"normal","color"],o=t.getData(),a=t.get(r)||t.getColorFromPalette(t.get("name"));o.setVisual("color",a),i.isSeriesFiltered(t)||("function"!=typeof a||a instanceof n||o.each(function(e){o.setItemVisual(e,"color",a(t.getDataParams(e)))}),o.each(function(t){var e=o.getItemModel(t),i=e.get(r,!0);null!=i&&o.setItemVisual(t,"color",i)}))}t?i.eachRawSeriesByType(t,r):i.eachRawSeries(r)}},function(t,e){t.exports=function(t,e,i,n,r,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(o-e)/(n-e);1!==s&&0!==s||(a=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?a:0}},function(t,e,i){"use strict";var n=i(1),r=i(30),o=function(t,e,i,n,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",r.call(this,o)};o.prototype={constructor:o},n.inherits(o,r),t.exports=o},function(t,e,i){"use strict";function n(t){return t>s||-s>t}var r=i(19),o=i(5),a=r.identity,s=5e-5,l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},h=l.prototype;h.transform=null,h.needLocalTransform=function(){return n(this.rotation)||n(this.position[0])||n(this.position[1])||n(this.scale[0]-1)||n(this.scale[1]-1)},h.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||r.create(),i?this.getLocalTransform(n):a(n),e&&(i?r.mul(n,t.transform,n):r.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,n)):void(n&&a(n))},h.getLocalTransform=function(t){t=t||[],a(t);var e=this.origin,i=this.scale,n=this.rotation,o=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),n&&r.rotate(t,t,n),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=o[0],t[5]+=o[1],t},h.setTransform=function(t){var e=this.transform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},h.restoreTransform=function(t){var e=this.invTransform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])};var u=[];h.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(r.mul(u,t.invTransform,e),e=u);var i=e[0]*e[0]+e[1]*e[1],o=e[2]*e[2]+e[3]*e[3],a=this.position,s=this.scale;n(i-1)&&(i=Math.sqrt(i)),n(o-1)&&(o=Math.sqrt(o)),e[0]<0&&(i=-i),e[3]<0&&(o=-o),a[0]=e[4],a[1]=e[5],s[0]=i,s[1]=o,this.rotation=Math.atan2(-e[1]/o,e[0]/i)}},h.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},h.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&o.applyTransform(i,i,n),i},h.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&o.applyTransform(i,i,n),i},t.exports=l},function(t,e,i){"use strict";function n(t){r.each(o,function(e){this[e]=r.bind(t[e],t)},this)}var r=i(1),o=["getDom","getZr","getWidth","getHeight","dispatchAction","on","off","getDataURL","getConnectedDataURL","getModel","getOption"];t.exports=n},function(t,e,i){var n=i(1);i(53),i(86),i(87);var r=i(114),o=i(2);o.registerLayout(n.curry(r,"bar")),o.registerVisual(function(t){t.eachSeriesByType("bar",function(t){var e=t.getData();e.setVisual("legendSymbol","roundRect")})}),i(36)},function(t,e,i){"use strict";var n=i(15),r=i(35);t.exports=n.extend({type:"series.bar",dependencies:["grid","polar"],getInitialData:function(t,e){return r(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),r=n.getLayout("offset"),o=n.getLayout("size"),a=e.getBaseAxis().isHorizontal()?0:1;return i[a]+=r+o/2,i}return[NaN,NaN]},brushSelector:"rect",defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,itemStyle:{normal:{barBorderColor:"#fff",barBorderWidth:0},emphasis:{barBorderColor:"#fff",barBorderWidth:0}}}})},function(t,e,i){"use strict";function n(t,e){var i=t.width>0?1:-1,n=t.height>0?1:-1;e=Math.min(e,Math.abs(t.width),Math.abs(t.height)),t.x+=i*e/2,t.y+=n*e/2,t.width-=i*e,t.height-=n*e}var r=i(1),o=i(3);r.extend(i(12).prototype,i(88)),t.exports=i(2).extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"===n&&this._renderOnCartesian(t,e,i),this.group},_renderOnCartesian:function(t,e,i){function a(e,i){var a=l.getItemLayout(e),s=l.getItemModel(e).get(p)||0;n(a,s);var h=new o.Rect({shape:r.extend({},a)});if(f){var u=h.shape,c=d?"height":"width",g={};u[c]=0,g[c]=a[c],o[i?"updateProps":"initProps"](h,{shape:g},t,e)}return h}var s=this.group,l=t.getData(),h=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),d=c.isHorizontal(),f=t.get("animation"),p=["itemStyle","normal","barBorderWidth"];l.diff(h).add(function(t){if(l.hasValue(t)){var e=a(t);l.setItemGraphicEl(t,e),s.add(e)}}).update(function(e,i){var r=h.getItemGraphicEl(i);if(!l.hasValue(e))return void s.remove(r);r||(r=a(e,!0));var u=l.getItemLayout(e),c=l.getItemModel(e).get(p)||0;n(u,c),o.updateProps(r,{shape:u},t,e),l.setItemGraphicEl(e,r),s.add(r)}).remove(function(e){var i=h.getItemGraphicEl(e);i&&(i.style.text="",o.updateProps(i,{shape:{width:0}},t,e,function(){s.remove(i)}))}).execute(),this._updateStyle(t,l,d),this._data=l},_updateStyle:function(t,e,i){function n(t,e,i,n,r){o.setText(t,e,i),t.text=n,"outside"===t.textPosition&&(t.textPosition=r)}e.eachItemGraphicEl(function(a,s){var l=e.getItemModel(s),h=e.getItemVisual(s,"color"),u=e.getItemVisual(s,"opacity"),c=e.getItemLayout(s),d=l.getModel("itemStyle.normal"),f=l.getModel("itemStyle.emphasis").getBarItemStyle();a.setShape("r",d.get("barBorderRadius")||0),a.useStyle(r.defaults({fill:h,opacity:u},d.getBarItemStyle()));var p=i?c.height>0?"bottom":"top":c.width>0?"left":"right",g=l.getModel("label.normal"),v=l.getModel("label.emphasis"),m=a.style;g.get("show")?n(m,g,h,r.retrieve(t.getFormattedLabel(s,"normal"),t.getRawValue(s)),p):m.text="",v.get("show")?n(f,v,h,r.retrieve(t.getFormattedLabel(s,"emphasis"),t.getRawValue(s)),p):f.text="",o.setHoverStyle(a,f)})},remove:function(t,e){var i=this.group;t.get("animation")?this._data&&this._data.eachItemGraphicEl(function(e){e.style.text="",o.updateProps(e,{shape:{width:0}},t,e.dataIndex,function(){i.remove(e)})}):i.removeAll()}})},function(t,e,i){t.exports={getBarItemStyle:i(32)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]])}},function(t,e,i){function n(t){return"_"+t+"Type"}function r(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){f.isArray(o)||(o=[o,o]);var a=h.createSymbol(r,-o[0]/2,-o[1]/2,o[0],o[1],n);return a.name=t,a}}function o(t){var e=new c({name:"line"});return a(e.shape,t),e}function a(t,e){var i=e[0],n=e[1],r=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,r&&(t.cpx1=r[0],t.cpy1=r[1])}function s(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),h=a.pointAt(s),c=u.sub([],h,l);if(u.normalize(c,c),e){e.attr("position",l);var d=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",h);var d=a.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",h);var f,p,g,v=5*r;if("end"===n.__position)f=[c[0]*v+h[0],c[1]*v+h[1]],p=c[0]>.8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,d=a.tangentAt(m),y=[d[1],-d[0]],x=a.pointAt(m);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]),f=[x[0]+y[0]*v,x[1]+y[1]*v],p="center",g="bottom";var _=-Math.atan2(d[1],d[0]);h[0].8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||p},position:f,scale:[r,r]})}}}}function l(t,e){d.Group.call(this),this._createLine(t,e)}var h=i(26),u=i(5),c=i(170),d=i(3),f=i(1),p=i(4),g=["fromSymbol","toSymbol"],v=l.prototype;v.beforeUpdate=s,v._createLine=function(t,e){var i=t.hostModel,a=t.getItemLayout(e),s=o(a);s.shape.percent=0,d.initProps(s,{shape:{percent:1}},i,e),this.add(s);var l=new d.Text({name:"label"});this.add(l),f.each(g,function(i){var o=r(i,t,e);this.add(o),this[n(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e)},v.updateData=function(t,e){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(e),l={shape:{}};a(l.shape,s),d.updateProps(o,l,i,e),f.each(g,function(i){var o=t.getItemVisual(e,i),a=n(i);if(this[a]!==o){var s=r(i,t,e);this.remove(this.childOfName(i)),this.add(s)}this[a]=o},this),this._updateCommonStl(t,e)},v._updateCommonStl=function(t,e){var i=t.hostModel,n=this.childOfName("line"),r=t.getItemModel(e),o=r.getModel("label.normal"),a=o.getModel("textStyle"),s=r.getModel("label.emphasis"),l=s.getModel("textStyle"),h=p.round(i.getRawValue(e)),u=t.getItemVisual(e,"color");isNaN(h)&&(h=t.getName(e)),n.useStyle(f.defaults({strokeNoScale:!0,fill:"none",stroke:u},r.getModel("lineStyle.normal").getLineStyle())),n.hoverStyle=r.getModel("lineStyle.emphasis").getLineStyle();var c=u||"#000",g=this.childOfName("label");g.setStyle({text:o.get("show")?f.retrieve(i.getFormattedLabel(e,"normal",t.dataType),h):"",textFont:a.getFont(),fill:a.getTextColor()||c}),g.hoverStyle={text:s.get("show")?f.retrieve(i.getFormattedLabel(e,"emphasis",t.dataType),h):"",textFont:l.getFont(),fill:l.getTextColor()||c},g.__textAlign=a.get("align"),g.__verticalAlign=a.get("baseline"),g.__position=o.get("position"),g.ignore=!g.style.text&&!g.hoverStyle.text,d.setHoverStyle(this)},v.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},v.setLinePoints=function(t){var e=this.childOfName("line");a(e.shape,t),e.dirty()},f.inherits(l,d.Group),t.exports=l},function(t,e,i){function n(t){return isNaN(t[0])||isNaN(t[1])}function r(t){return!n(t[0])&&!n(t[1])}function o(t){this._ctor=t||s,this.group=new a.Group}var a=i(3),s=i(89),l=o.prototype;l.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor;t.diff(e).add(function(e){if(r(t.getItemLayout(e))){var o=new n(t,e);t.setItemGraphicEl(e,o),i.add(o)}}).update(function(o,a){var s=e.getItemGraphicEl(a);return r(t.getItemLayout(o))?(s?s.updateData(t,o):s=new n(t,o),t.setItemGraphicEl(o,s),void i.add(s)):void i.remove(s)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},l.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},l.remove=function(){this.group.removeAll()},t.exports=o},function(t,e,i){var n=i(1),r=i(2),o=r.PRIORITY;i(92),i(93),r.registerVisual(n.curry(i(46),"line","circle","line")),r.registerLayout(n.curry(i(54),"line")),r.registerProcessor(o.PROCESSOR.STATISTIC,n.curry(i(126),"line")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return n(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},function(t,e,i){"use strict";function n(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function a(t){return t>=0?1:-1}function s(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=i.onZero?0:n.scale.getExtent()[0],o=n.dim,s="x"===o||"radius"===o?1:0;return e.mapArray([o],function(n,l){for(var h,u=e.stackedOn;u&&a(u.get(o,l))===a(n);){h=u;break}var c=[];return c[s]=e.get(i.dim,l),c[1-s]=h?h.get(o,l,!0):r,t.dataToPoint(c)},!0)}function l(t,e){return null!=e.dataIndex?e.dataIndex:null!=e.name?t.indexOfName(e.name):void 0}function h(t,e,i){var n=o(t.getAxis("x")),r=o(t.getAxis("y")),a=t.getBaseAxis().isHorizontal(),s=Math.min(n[0],n[1]),l=Math.min(r[0],r[1]),h=Math.max(n[0],n[1])-s,u=Math.max(r[0],r[1])-l,c=i.get("lineStyle.normal.width")||2,d=i.get("clipOverflow")?c/2:Math.max(h,u);a?(l-=d,u+=2*d):(s-=d,h+=2*d);var f=new m.Rect({shape:{x:s,y:l,width:h,height:u}});return e&&(f.shape[a?"width":"height"]=0,m.initProps(f,{shape:{width:h,height:u}},i)),f}function u(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),o=r.getExtent(),a=n.getExtent(),s=Math.PI/180,l=new m.Sector({shape:{cx:t.cx,cy:t.cy,r0:o[0],r:o[1],startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-a[0]*s,m.initProps(l,{shape:{endAngle:-a[1]*s}},i)),l}function c(t,e,i){return"polar"===t.type?u(t,e,i):h(t,e,i)}function d(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);a=new g(r,o),a.position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else x.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=l(r,n);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else x.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new y.Polyline({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new y.Polygon({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];return i&&i.isLabelIgnored?f.bind(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var o=this._polyline,a=this._polygon,s=t.hostModel,l=v(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,f=l.stackedOnNext;r&&(h=d(l.current,i,r),u=d(l.stackedOnCurrent,i,r),c=d(l.next,i,r),f=d(l.stackedOnNext,i,r)),o.shape.__points=l.current,o.shape.points=h,m.updateProps(o,{shape:{points:c}},s),a&&(a.setShape({points:h,stackedOnPoints:u}),m.updateProps(a,{shape:{points:c,stackedOnPoints:f,__points:l.next}},s));for(var p=[],g=l.status,y=0;y=0?1:-1}function n(t,e,n){for(var r,o=t.getBaseAxis(),a=t.getOtherAxis(o),s=o.onZero?0:a.scale.getExtent()[0],l=a.dim,h="x"===l||"radius"===l?1:0,u=e.stackedOn,c=e.get(l,n);u&&i(u.get(l,n))===i(c);){r=u;break}var d=[];return d[h]=e.get(o.dim,n),d[1-h]=r?r.get(l,n,!0):s,t.dataToPoint(d)}function r(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}t.exports=function(t,e,i,o,a,s){for(var l=r(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],v=s.dimensions,m=0;mw;w++){var M=e[b];if(b>=o||0>b)break;if(n(M)){if(x){b+=a;continue}break}if(b===i)t[a>0?"moveTo":"lineTo"](M[0],M[1]),c(f,M);else if(m>0){var S=b+a,A=e[S];if(x)for(;A&&n(e[S]);)S+=a,A=e[S];var T=.5,I=e[_],A=e[S];if(!A||n(A))c(p,M);else{n(A)&&!x&&(A=M),s.sub(d,A,I);var C,k;if("x"===y||"y"===y){var L="x"===y?0:1;C=Math.abs(M[L]-I[L]),k=Math.abs(M[L]-A[L])}else C=s.dist(M,I),k=s.dist(M,A);T=k/(k+C),u(p,M,d,-m*(1-T))}l(f,f,v),h(f,f,g),l(p,p,v),h(p,p,g),t.bezierCurveTo(f[0],f[1],p[0],p[1],M[0],M[1]),u(f,M,d,m*T)}else t.lineTo(M[0],M[1]);_=b,b+=a}return w}function o(t,e){var i=[1/0,1/0],n=[-(1/0),-(1/0)];if(e)for(var r=0;rn[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var a=i(6),s=i(5),l=s.min,h=s.max,u=s.scaleAndAdd,c=s.copy,d=[],f=[],p=[];t.exports={Polyline:a.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},buildPath:function(t,e){var i=e.points,a=0,s=i.length,l=o(i,e.smoothConstraint);if(e.connectNulls){for(;s>0&&n(i[s-1]);s--);for(;s>a&&n(i[a]);a++);}for(;s>a;)a+=r(t,i,a,s,s,1,l.min,l.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Polygon:a.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},buildPath:function(t,e){var i=e.points,a=e.stackedOnPoints,s=0,l=i.length,h=e.smoothMonotone,u=o(i,e.smoothConstraint),c=o(a,e.smoothConstraint);if(e.connectNulls){for(;l>0&&n(i[l-1]);l--);for(;l>s&&n(i[s]);s++);}for(;l>s;){var d=r(t,i,s,l,l,1,u.min,u.max,e.smooth,h,e.connectNulls);r(t,a,s+d-1,d,l,-1,c.min,c.max,e.stackedOnSmooth,h,e.connectNulls),s+=d+1,t.closePath()}}})}},function(t,e,i){var n=i(1),r=i(2);i(97),i(98),i(75)("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(n.curry(i(70),"pie")),r.registerLayout(n.curry(i(100),"pie")),r.registerProcessor(n.curry(i(69),"pie"))},function(t,e,i){"use strict";var n=i(13),r=i(1),o=i(8),a=i(31),s=i(64),l=i(2).extendSeriesModel({type:"series.pie",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){l.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=a(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},getDataParams:function(t){var e=this._data,i=l.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},_defaultLabelLine:function(t){o.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,avoidLabelOverlap:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationEasing:"cubicOut",data:[]}});r.mixin(l,s),t.exports=l},function(t,e,i){function n(t,e,i,n){var o=e.getData(),a=this.dataIndex,s=o.getName(a),l=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),o.each(function(t){r(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),l,i)})}function r(t,e,i,n,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=i?n:0,h=[a*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function o(t,e){function i(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function n(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}s.Group.call(this);var r=new s.Sector({z2:2}),o=new s.Polyline,a=new s.Text;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function a(t,e,i,n,r){var o=n.getModel("textStyle"),a="inside"===r||"inner"===r;return{fill:o.getTextColor()||(a?"#fff":t.getItemVisual(e,"color")),opacity:t.getItemVisual(e,"opacity"),textFont:o.getFont(),text:l.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var s=i(3),l=i(1),h=o.prototype;h.updateData=function(t,e,i){function n(){a.stopAnimation(!0),a.animateTo({shape:{r:c.r+10}},300,"elasticOut")}function o(){a.stopAnimation(!0),a.animateTo({shape:{r:c.r}},300,"elasticOut")}var a=this.childAt(0),h=t.hostModel,u=t.getItemModel(e),c=t.getItemLayout(e),d=l.extend({},c);d.label=null,i?(a.setShape(d),a.shape.endAngle=c.startAngle,s.updateProps(a,{shape:{endAngle:c.endAngle}},h,e)):s.updateProps(a,{shape:d},h,e);var f=u.getModel("itemStyle"),p=t.getItemVisual(e,"color");a.useStyle(l.defaults({lineJoin:"bevel",fill:p},f.getModel("normal").getItemStyle())),a.hoverStyle=f.getModel("emphasis").getItemStyle(),r(this,t.getItemLayout(e),u.get("selected"),h.get("selectedOffset"),h.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&h.ifEnableAnimation()&&a.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),s.setHoverStyle(this)},h._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),l=t.getItemLayout(e),h=l.label,u=t.getItemVisual(e,"color");s.updateProps(i,{shape:{points:h.linePoints||[[h.x,h.y],[h.x,h.y],[h.x,h.y]]}},r,e),s.updateProps(n,{style:{x:h.x,y:h.y}},r,e),n.attr({style:{textVerticalAlign:h.verticalAlign,textAlign:h.textAlign,textFont:h.font},rotation:h.rotation,origin:[h.x,h.y],z2:10});var c=o.getModel("label.normal"),d=o.getModel("label.emphasis"),f=o.getModel("labelLine.normal"),p=o.getModel("labelLine.emphasis"),g=c.get("position")||d.get("position");n.setStyle(a(t,e,"normal",c,g)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=a(t,e,"emphasis",d,g),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var v=f.get("smooth");v&&v===!0&&(v=.4), -i.setShape({smooth:v})},l.inherits(o,s.Group);var u=i(27).extend({type:"pie",init:function(){var t=new s.Group;this._sectorGroup=t},render:function(t,e,i,r){if(!r||r.from!==this.uid){var a=t.getData(),s=this._data,h=this.group,u=e.get("animation"),c=!s,d=l.curry(n,this.uid,t,u,i),f=t.get("selectedMode");if(a.diff(s).add(function(t){var e=new o(a,t);c&&e.eachChild(function(t){t.stopAnimation(!0)}),f&&e.on("click",d),a.setItemGraphicEl(t,e),h.add(e)}).update(function(t,e){var i=s.getItemGraphicEl(e);i.updateData(a,t),i.off("click"),f&&i.on("click",d),h.add(i),a.setItemGraphicEl(t,i)}).remove(function(t){var e=s.getItemGraphicEl(t);h.remove(e)}).execute(),u&&c&&a.count()>0){var p=a.getItemLayout(0),g=Math.max(i.getWidth(),i.getHeight())/2,v=l.bind(h.removeClipPath,h);h.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,v,t))}this._data=a}},_createClipPath:function(t,e,i,n,r,o,a){var l=new s.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return s.initProps(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),l}});t.exports=u},function(t,e,i){"use strict";function n(t,e,i,n,r,o,a){function s(e,i,n,r){for(var o=e;i>o;o++)if(t[o].y+=n,o>e&&i>o+1&&t[o+1].y>t[o].y+t[o].height)return void l(o,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,r,o){for(var a=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)u=t[g].y-c,0>u&&s(g,d,-u,r),c=t[g].y+t[g].height;0>a-c&&l(d-1,c-a);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);h(f,!1,e,i,n,r),h(p,!0,e,i,n,r)}function r(t,e,i,r,o,a){for(var s=[],l=[],h=0;hb?-1:1)*x,k=I;n=C+(0>b?-5:5),r=k,c=[[S,A],[T,I],[C,k]]}d=M?"center":b>0?"left":"right"}var L=g.getModel("textStyle").getFont(),D=g.get("rotate")?0>b?-_+Math.PI:-_:0,P=t.getFormattedLabel(i,"normal")||l.getName(i),O=o.getBoundingRect(P,L,d,"top");u=!!D,f.label={x:n,y:r,position:v,height:O.height,len:y,len2:x,linePoints:c,textAlign:d,verticalAlign:"middle",font:L,rotation:D},M||h.push(f.label)}),!u&&t.get("avoidLabelOverlap")&&r(h,a,s,e,i,n)}},function(t,e,i){var n=i(4),r=n.parsePercent,o=i(99),a=i(1),s=2*Math.PI,l=Math.PI/180;t.exports=function(t,e,i,h){e.eachSeriesByType(t,function(t){var e=t.get("center"),h=t.get("radius");a.isArray(h)||(h=[0,h]),a.isArray(e)||(e=[e,e]);var u=i.getWidth(),c=i.getHeight(),d=Math.min(u,c),f=r(e[0],u),p=r(e[1],c),g=r(h[0],d/2),v=r(h[1],d/2),m=t.getData(),y=-t.get("startAngle")*l,x=t.get("minAngle")*l,_=m.getSum("value"),b=Math.PI/(_||m.count())*2,w=t.get("clockwise"),M=t.get("roseType"),S=m.getDataExtent("value");S[0]=0;var A=s,T=0,I=y,C=w?1:-1;if(m.each("value",function(t,e){var i;i="area"!==M?0===_?b:t*b:s/(m.count()||1),x>i?(i=x,A-=x):T+=t;var r=I+C*i;m.setItemLayout(e,{angle:i,startAngle:I,endAngle:r,clockwise:w,cx:f,cy:p,r0:g,r:M?n.linearMap(t,S,[g,v]):v}),I=r},!0),s>A)if(.001>=A){var k=s/m.count();m.each(function(t){var e=m.getItemLayout(t);e.startAngle=y+C*t*k,e.endAngle=y+C*(t+1)*k})}else b=A/T,I=y,m.each("value",function(t,e){var i=m.getItemLayout(e),n=i.angle===x?x:t*b;i.startAngle=I,i.endAngle=I+C*n,I+=n});o(t,v,u,c)})}},function(t,e,i){"use strict";i(52),i(102)},function(t,e,i){function n(t,e){function i(t,e){var i=n.getAxis(t);return i.toGlobalCoord(i.dataToCoord(0))}var n=t.coordinateSystem,r=e.axis,o={},a=r.position,s=r.onZero?"onZero":a,l=r.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={x:{top:u[2],bottom:u[3]},y:{left:u[0],right:u[1]}};c.x.onZero=Math.max(Math.min(i("y"),c.x.bottom),c.x.top),c.y.onZero=Math.max(Math.min(i("x"),c.y.right),c.y.left),o.position=["y"===l?c.y[s]:u[0],"x"===l?c.x[s]:u[3]];var d={x:0,y:1};o.rotation=Math.PI/2*d[l];var f={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=f[a],r.onZero&&(o.labelOffset=c[l][a]-c[l].onZero),e.getModel("axisTick").get("inside")&&(o.tickDirection=-o.tickDirection),e.getModel("axisLabel").get("inside")&&(o.labelDirection=-o.labelDirection);var p=e.getModel("axisLabel").get("rotate");return o.labelRotation="top"===s?-p:p,o.labelInterval=r.getLabelInterval(),o.z2=1,o}var r=i(1),o=i(3),a=i(50),s=a.ifIgnoreOnTick,l=a.getInterval,h=["axisLine","axisLabel","axisTick","axisName"],u=["splitArea","splitLine"],c=i(2).extendComponentView({type:"axis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("grid",t.get("gridIndex")),o=n(i,t),s=new a(t,o);r.each(h,s.add,s),this.group.add(s.getGroup()),r.each(u,function(e){t.get(e+".show")&&this["_"+e](t,i,o.labelInterval)},this)}},_splitLine:function(t,e,i){var n=t.axis,a=t.getModel("splitLine"),h=a.getModel("lineStyle"),u=h.get("width"),c=h.get("color"),d=l(a,i);c=r.isArray(c)?c:[c];for(var f=e.coordinateSystem.getRect(),p=n.isHorizontal(),g=[],v=0,m=n.getTicksCoords(),y=[],x=[],_=0;_=0;r--){var o=i[r];if(o[n])break}if(0>r){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var s=a.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)},pop:function(t){var e=n(t),i=e[e.length-1];e.length>1&&e.pop();var r={};return o(i,function(t,i){for(var n=e.length-1;n>=0;n--){var t=e[n][i];if(t){r[i]=t;break}}}),r},clear:function(t){t[a]=null},count:function(t){return n(t).length}};t.exports=s},function(t,e,i){i(10).registerSubTypeDefaulter("dataZoom",function(t){return"slider"})},function(t,e){function i(t){return t[n]||(t[n]={})}var n="\x00_ec_interaction_mutex",r={take:function(t,e,n,r){var o=i(t),a=o[e];a&&a.onTakeAway&&a.onTakeAway(),o[e]={userKey:n,onTakeAway:r}},release:function(t,e,n){var r=i(t),o=r[e];o&&o.userKey===n&&(r[e]=null)},isTaken:function(t,e){return!!i(t)[e]}};t.exports=r},function(t,e,i){function n(t,e,i){r.positionGroup(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"))}var r=i(14),o=i(9),a=i(3);t.exports={layout:function(t,e,i){var o=r.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"));r.box(e.get("orient"),t,e.get("itemGap"),o.width,o.height),n(t,e,i)},addBackground:function(t,e){var i=o.normalizeCssArray(e.get("padding")),n=t.getBoundingRect(),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var s=new a.Rect({shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},style:r,silent:!0,z2:-1});a.subPixelOptimizeRect(s),t.add(s)}}},function(t,e,i){var n=i(1),r=i(44),o=i(113),a=function(t,e,i,n,o){r.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"};a.prototype={constructor:a,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),t},getLabelInterval:function(){var t=this._labelInterval;return t||(t=this._labelInterval=o(this)),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},toLocalCoord:null,toGlobalCoord:null},n.inherits(a,r),t.exports=a},function(t,e,i){"use strict";function n(t){return this._axes[t]}var r=i(1),o=function(t){this._axes={},this._dimList=[],this.name=t||""};o.prototype={constructor:o,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return r.map(this._dimList,n,this)},getAxesByScale:function(t){return t=t.toLowerCase(),r.filter(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;ri&&(i=Math.min(i,u),u-=i,t.width=i,c--)}),d=(u-s)/(c+(c-1)*h),d=Math.max(d,0);var f,p=0;a.each(i,function(t,e){t.width||(t.width=d),f=t,p+=t.width*(1+h)}),f&&(p-=f.width*h);var g=-p/2;a.each(i,function(t,i){r[e][i]=r[e][i]||{offset:g,width:t.width},g+=t.width*(1+h)})}),r}function o(t,e,i){var o=r(a.filter(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),s={};e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=n(t),l=o[r.index][a],h=l.offset,u=l.width,c=i.getOtherAxis(r),d=t.get("barMinHeight")||0,f=r.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=i.dataToPoints(e,!0);s[a]=s[a]||[],e.setLayout({offset:h,size:u}),e.each(c.dim,function(t,i){if(!isNaN(t)){s[a][i]||(s[a][i]={p:f,n:f});var n,r,o,l,g=t>=0?"p":"n",v=p[i],m=s[a][i][g];c.isHorizontal()?(n=m,r=v[1]+h,o=v[0]-m,l=u,Math.abs(o)o?-1:1)*d),s[a][i][g]+=o):(n=v[0]+h,r=m,o=u,l=v[1]-m,Math.abs(l)=l?-1:1)*d),s[a][i][g]+=l),e.setItemLayout(i,{x:n,y:r,width:o,height:l})}},!0)},this)}var a=i(1),s=i(4),l=s.parsePercent;t.exports=o},function(t,e,i){var n=i(3),r=i(1),o=Math.PI;t.exports=function(t,e){e=e||{},r.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new n.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),a=new n.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),s=new n.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut");var l=new n.Group;return l.add(a),l.add(s),l.add(i),l.resize=function(){var e=t.getWidth()/2,n=t.getHeight()/2;a.setShape({cx:e,cy:n});var r=a.shape.r;s.setShape({x:e-r,y:n-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},l.resize(),l}},function(t,e,i){function n(t,e){for(var i in e)_.hasClass(i)||("object"==typeof e[i]?t[i]=t[i]?c.merge(t[i],e[i],!1):c.clone(e[i]):null==t[i]&&(t[i]=e[i]))}function r(t){t=t,this.option={},this.option[w]=1,this._componentsMap={},this._seriesIndices=null,n(t,this._theme.option),c.merge(t,b,!1),this.mergeOption(t)}function o(t,e){c.isArray(e)||(e=e?[e]:[]);var i={};return p(e,function(e){i[e]=(t[e]||[]).slice()}),i}function a(t,e){var i={};p(e,function(t,e){var n=t.exist;n&&(i[n.id]=t)}),p(e,function(e,n){var r=e.option;if(c.assert(!r||null==r.id||!i[r.id]||i[r.id]===e,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&(i[r.id]=e),x(r)){var o=s(t,r,e.exist);e.keyInfo={mainType:t,subType:o}}}),p(e,function(t,e){var n=t.exist,r=t.option,o=t.keyInfo;if(x(r)){if(o.name=null!=r.name?r.name+"":n?n.name:"\x00-",n)o.id=n.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do o.id="\x00"+o.name+"\x00"+a++;while(i[o.id])}i[o.id]=t}})}function s(t,e,i){var n=e.type?e.type:i?i.subType:_.determineSubType(t,e);return n}function l(t){return v(t,function(t){return t.componentIndex})||[]}function h(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function u(t){}var c=i(1),d=i(8),f=i(12),p=c.each,g=c.filter,v=c.map,m=c.isArray,y=c.indexOf,x=c.isObject,_=i(10),b=i(118),w="\x00_ec_inner",M=f.extend({constructor:M,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new f(i),this._optionManager=n},setOption:function(t,e){c.assert(!(w in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption()},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):r.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&p(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,r){var s=d.normalizeToArray(t[e]),h=d.mappingToExists(n[e],s);a(e,h);var u=o(n,r);i[e]=[],n[e]=[],p(h,function(t,r){var o=t.exist,a=t.option;if(c.assert(x(a)||o,"Empty component definition"),a){var s=_.getClass(e,t.keyInfo.subType,!0);o&&o instanceof s?(o.mergeOption(a,this),o.optionUpdated(a,!1)):(o=new s(a,this,this,c.extend({dependentModels:u,componentIndex:r},t.keyInfo)),o.optionUpdated(null,!0))}else o.mergeOption({},this),o.optionUpdated({},!1);n[e][r]=o,i[e][r]=o.option},this),"series"===e&&(this._seriesIndices=l(n.series))}var i=this.option,n=this._componentsMap,r=[];p(t,function(t,e){null!=t&&(_.hasClass(e)?r.push(e):i[e]=null==i[e]?c.clone(t):c.merge(i[e],t,!0))}),_.topologicalTravel(r,_.getAllClassMainTypes(),e,this)},getOption:function(){var t=c.clone(this.option);return p(t,function(e,i){if(_.hasClass(i)){for(var e=d.normalizeToArray(e),n=e.length-1;n>=0;n--)d.isIdInner(e[n])&&e.splice(n,1);t[i]=e}}),delete t[w],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap[t];return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,o=this._componentsMap[e];if(!o||!o.length)return[];var a;if(null!=i)m(i)||(i=[i]),a=g(v(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=m(n);a=g(o,function(t){return s&&y(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=m(r);a=g(o,function(t){return l&&y(r,t.name)>=0||!l&&t.name===r})}return h(a,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(i)||t.hasOwnProperty(n))?{mainType:r,index:t[e],id:t[i],name:t[n]}:null}function i(e){return t.filter?g(e,t.filter):e}var n=t.query,r=t.mainType,o=e(n),a=o?this.queryComponents(o):this._componentsMap[r];return i(h(a,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,p(n,function(t,n){p(t,function(t,r){e.call(i,n,t,r)})});else if(c.isString(t))p(n[t],e,i);else if(x(t)){var r=this.findComponents(t);p(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){u(this),p(this._seriesIndices,function(i){var n=this._componentsMap.series[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){p(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,i){u(this),p(this._seriesIndices,function(n){var r=this._componentsMap.series[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return p(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return u(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){u(this);var i=g(this._componentsMap.series,t,e);this._seriesIndices=l(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=l(t.series);var e=[];p(t,function(t,i){e.push(i)}),_.topologicalTravel(e,_.getAllClassMainTypes(),function(e,i){p(t[e],function(t){t.restoreData()})})}});c.mixin(M,i(55)),t.exports=M},function(t,e,i){function n(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e){var i,n,r=[],o=[],a=t.timeline;if(t.baseOption&&(n=t.baseOption),(a||t.options)&&(n=n||{},r=(t.options||[]).slice()),t.media){n=n||{};var s=t.media;d(s,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))})}return n||(n=t),n.timeline||(n.timeline=a),d([n].concat(r).concat(h.map(o,function(t){return t.option})),function(t){d(e,function(e){e(t)})}),{baseOption:n,timelineOptions:r,mediaDefault:i,mediaList:o}}function o(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return h.each(t,function(t,e){var i=e.match(v);if(i&&i[1]&&i[2]){var o=i[1],s=i[2].toLowerCase();a(n[s],t,o)||(r=!1)}}),r}function a(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},d(e,function(e,i){if(null!=e){var n=t[i];if(c.hasClass(i)){e=u.normalizeToArray(e),n=u.normalizeToArray(n);var r=u.mappingToExists(n,e);t[i]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[i]=g(n,e,!0)}})}var h=i(1),u=i(8),c=i(10),d=h.each,f=h.clone,p=h.map,g=h.merge,v=/^(min|max)?(.+)$/;n.prototype={constructor:n,setOption:function(t,e){t=f(t,!0);var i=this._optionBackup,n=r.call(this,t,e);this._newBaseOption=n.baseOption,i?(l(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,f),this._mediaList=p(e.mediaList,f),this._mediaDefault=f(e.mediaDefault),this._currentMediaIndices=[],f(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=f(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,r=this._mediaDefault,a=[],l=[];if(!n.length&&!r)return l;for(var h=0,u=n.length;u>h;h++)o(n[h].query,e,i)&&a.push(h);return!a.length&&r&&(a=[-1]),a.length&&!s(a,this._currentMediaIndices)&&(l=p(a,function(t){return f(-1===t?r.option:n[t].option)})),this._currentMediaIndices=a,l}},t.exports=n},function(t,e){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||""),t.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],grid:{},textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},animation:!0,animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3}},function(t,e,i){t.exports={getAreaStyle:i(32)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]])}},function(t,e){t.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(t,e,i){var n=i(32)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getItemStyle:function(t){var e=n.call(this,t),i=this.getBorderLineDash();return i&&(e.lineDash=i),e},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){var n=i(32)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getLineStyle:function(t){var e=n.call(this,t),i=this.getLineDash();return i&&(e.lineDash=i),e},getLineDash:function(){var t=this.get("type");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){function n(t,e){return t&&t.getShallow(e)}var r=i(18);t.exports={getTextColor:function(){var t=this.ecModel;return this.getShallow("color")||t&&t.get("textStyle.color")},getFont:function(){var t=this.ecModel,e=t&&t.getModel("textStyle");return[this.getShallow("fontStyle")||n(e,"fontStyle"),this.getShallow("fontWeight")||n(e,"fontWeight"),(this.getShallow("fontSize")||n(e,"fontSize")||12)+"px",this.getShallow("fontFamily")||n(e,"fontFamily")||"sans-serif"].join(" ")},getTextRect:function(t){var e=this.get("textStyle")||{};return r.getBoundingRect(t,this.getFont(),e.align,e.baseline)},ellipsis:function(t,e,i){return r.ellipsis(t,this.getFont(),e,i)}}},function(t,e,i){function n(t,e){e=e.split(",");for(var i=t,n=0;ne&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var c;"string"==typeof r?c=i[r]:"function"==typeof r&&(c=r),c&&(e=e.downSample(s.dim,1/u,c,n),t.setData(e))}}},this)}},function(t,e,i){var n=i(1),r=i(33),o=i(4),a=i(38),s=r.prototype,l=a.prototype,h=Math.floor,u=Math.ceil,c=Math.pow,d=10,f=Math.log,p=r.extend({type:"log",getTicks:function(){return n.map(l.getTicks.call(this),function(t){return o.round(c(d,t))})},getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),c(d,t)},setExtent:function(t,e){t=f(t)/f(d),e=f(e)/f(d),l.setExtent.call(this,t,e)},getExtent:function(){var t=s.getExtent.call(this);return t[0]=c(d,t[0]),t[1]=c(d,t[1]),t},unionExtent:function(t){t[0]=f(t[0])/f(d),t[1]=f(t[1])/f(d),s.unionExtent.call(this,t)},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||0>=i)){var n=c(10,h(f(i/t)/Math.LN10)),r=t/i*n;.5>=r&&(n*=10);var a=[o.round(u(e[0]/n)*n),o.round(h(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:l.niceExtent});n.each(["contain","normalize"],function(t){p.prototype[t]=function(e){return e=f(e)/f(d),s[t].call(this,e)}}),p.create=function(){return new p},t.exports=p},function(t,e,i){var n=i(1),r=i(33),o=r.prototype,a=r.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?n.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),o.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return o.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(o.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},niceTicks:n.noop,niceExtent:n.noop});a.create=function(){return new a},t.exports=a},function(t,e,i){var n=i(1),r=i(4),o=i(9),a=i(38),s=a.prototype,l=Math.ceil,h=Math.floor,u=1e3,c=60*u,d=60*c,f=24*d,p=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][2]=0&&f():o>=0?f():i&&(c=setTimeout(f,-o)),h=l};return p.clear=function(){c&&(clearTimeout(c),c=null)},p; -}var o,a,s,l=(new Date).getTime(),h=0,u=0,c=null,d="function"==typeof t;if(e=e||0,d)return r();for(var f=[],p=0;p=0;r--)if(!n[r].silent&&n[r]!==i&&!n[r].ignore&&a(n[r],t,e))return n[r]}},f.mixin(A,v),f.mixin(A,p),t.exports=A},function(t,e,i){function n(){return!1}function r(t,e,i,n){var r=document.createElement(e),o=i.getWidth(),a=i.getHeight(),s=r.style;return s.position="absolute",s.left=0,s.top=0,s.width=o+"px",s.height=a+"px",r.width=o*n,r.height=a*n,r.setAttribute("data-zr-dom-id",t),r}var o=i(1),a=i(34),s=function(t,e,i){var s;i=i||a.devicePixelRatio,"string"==typeof t?s=r(t,"canvas",e,i):o.isObject(t)&&(s=t,t=s.id),this.id=t,this.dom=s;var l=s.style;l&&(s.onselectstart=n,l["-webkit-user-select"]="none",l["user-select"]="none",l["-webkit-touch-callout"]="none",l["-webkit-tap-highlight-color"]="rgba(0,0,0,0)"),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};s.prototype={constructor:s,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d");var t=this.dpr;1!=t&&this.ctx.scale(t,t)},createBackBuffer:function(){var t=this.dpr;this.domBack=r("back-"+this.id,"canvas",this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,o=this.domBack;r.width=t+"px",r.height=e+"px",n.width=t*i,n.height=e*i,1!=i&&this.ctx.scale(i,i),o&&(o.width=t*i,o.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e=this.dom,i=this.ctx,n=e.width,r=e.height,o=this.clearColor,a=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,n/l,r/l)),i.clearRect(0,0,n/l,r/l),o&&(i.save(),i.fillStyle=this.clearColor,i.fillRect(0,0,n/l,r/l),i.restore()),a){var h=this.domBack;i.save(),i.globalAlpha=s,i.drawImage(h,0,0,n/l,r/l),i.restore()}}},t.exports=s},function(t,e,i){"use strict";function n(t){return parseInt(t,10)}function r(t){return t?t.isBuildin?!0:"function"==typeof t.resize&&"function"==typeof t.refresh:!1}function o(t){t.__unusedCount++}function a(t){1==t.__unusedCount&&t.clear()}function s(t,e,i){return x.copy(t.getBoundingRect()),t.transform&&x.applyTransform(t.transform),_.width=e,_.height=i,!x.intersect(_)}function l(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;ir;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(r,1),a.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,m(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,m(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,d.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(o),this._doPaintList(t,e),this.eachBuildinLayer(a)},_doPaintList:function(t,e){function i(t){o.save(),o.globalAlpha=1,o.shadowBlur=0,n.__dirty=!0,o.drawImage(t.dom,0,0,u,c),o.restore(),n.ctx.restore()}for(var n,r,o,a,s,l,h=0,u=this._width,c=this._height,p=this._progress,g=0,v=t.length;v>g;g++){var m=t[g],x=this._singleCanvas?0:m.zlevel;r!==x&&(o&&o.restore(),a={},r=x,n=this.getLayer(r),n.isBuildin||f("ZLevel "+r+" has been used by unkown layer "+n.id),o=n.ctx,o.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear());var _=m.__frame;if(n.__dirty||e){if(_>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,y-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(p=l),s.__progress=p+1}_===p&&this._doPaintEl(m,s,!0,s.renderScope)}else s&&(i(s),s=null),this._doPaintEl(m,n,e,a);m.__dirty=!1}}s&&i(s),o&&o.restore(),this._furtherProgressive=!1,d.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&t.scale[0]&&t.scale[1]&&(!t.culling||!s(t,this._width,this._height))){var o=t.__clipPaths;(n.prevClipLayer!==e||l(o,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),h(o,r),n.prevClipLayer=e,n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new v("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&d.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,s=-1,l=this._domRoot;if(i[t])return void f("ZLevel "+t+" has been used already");if(!r(e))return void f("Layer of zlevel "+t+" is not valid");if(o>0&&t>n[0]){for(s=0;o-1>s&&!(n[s]t);s++);a=i[n[s]]}if(n.splice(s+1,0,t),a){var h=a.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nh;h++){var c=t[h],f=this._singleCanvas?0:c.zlevel,p=e[f],g=c.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||c.__dirty),g>=0){a!==g&&(a=g,l++);var m=c.__frame=l-1;if(!o){var x=Math.min(s,y-1);o=i[x],o||(o=i[x]=new v("progressive",this,this.dpr),o.initContext()),o.__maxProgress=0}o.__dirty=o.__dirty||c.__dirty,o.elCount++,o.__maxProgress=Math.max(o.__maxProgress,m),o.__maxProgress>=o.__progress&&(p.__dirty=!0)}else c.__frame=-1,o&&(o.__nextIdxNotProg=h,s++,o=null)}o&&(s++,o.__nextIdxNotProg=h),this.eachBuildinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,y),d.each(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?d.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&d.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(d.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;if(i.style.display="none",t=t||this._getWidth(),e=e||this._getHeight(),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers[n].resize(t,e);this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new v("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var i=this.storage.getDisplayList(!0),n={},r=0;rr;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,o.canvasSupported&&s(i,n)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n&&(n.parent=t,n.updateTransform(),e?(e=e.slice(),e.push(n)):e=[n]),t.isGroup){for(var r=t._children,o=0;oe;e++)this.delRoot(t[e]);else{var o;o="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,o);s>=0&&(this.delFromMap(o.id),this._roots.splice(s,1),o instanceof a&&o.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof a&&(t.__storage=this),t.dirty(),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,i=e[t];return i&&(delete e[t],i instanceof a&&(i.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:n},t.exports=l},function(t,e,i){"use strict";var n=i(1),r=i(23).Dispatcher,o=i(59),a=i(58),s=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time=0,r.call(this)};s.prototype={constructor:s,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ia;a++){var s=i[a],l=s.step(t);l&&(r.push(l),o.push(s))}for(var a=0;n>a;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;n=r.length;for(var a=0;n>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},start:function(){function t(){e._running&&(o(t),e._update())}var e=this;this._running=!0,this._time=(new Date).getTime(),o(t)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new a(t,e.loop,e.getter,e.setter);return i}},n.mixin(s,r),t.exports=s},function(t,e,i){function n(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=i(137);n.prototype={constructor:n,step:function(t){this._initialized||(this._startTime=(new Date).getTime()+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,o="function"==typeof n?n(e):e;return this.fire("frame",o),1==e?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(){var t=(new Date).getTime(),e=(t-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},t.exports=n},function(t,e){var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};t.exports=i},function(t,e,i){var n=i(60).normalizeRadian,r=2*Math.PI;t.exports={containStroke:function(t,e,i,o,a,s,l,h,u){if(0===l)return!1;var c=l;h-=t,u-=e;var d=Math.sqrt(h*h+u*u);if(d-c>i||i>d+c)return!1;if(Math.abs(o-a)%r<1e-4)return!0;if(s){var f=o;o=n(a),a=n(f)}else o=n(o),a=n(a);o>a&&(a+=r);var p=Math.atan2(u,h);return 0>p&&(p+=r),p>=o&&a>=p||p+r>=o&&a>=p+r}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,o,a,s,l,h,u,c){if(0===h)return!1;var d=h;if(c>e+d&&c>r+d&&c>a+d&&c>l+d||e-d>c&&r-d>c&&a-d>c&&l-d>c||u>t+d&&u>i+d&&u>o+d&&u>s+d||t-d>u&&i-d>u&&o-d>u&&s-d>u)return!1;var f=n.cubicProjectPoint(t,e,i,r,o,a,s,l,u,c,null);return d/2>=f}}},function(t,e){t.exports={containStroke:function(t,e,i,n,r,o,a){if(0===r)return!1;var s=r,l=0,h=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return Math.abs(o-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*o-a+h,c=u*u/(l*l+1);return s/2*s/2>=c}}},function(t,e,i){"use strict";function n(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>l||e>u&&n>u&&a>u&&l>u)return 0;var c=g.cubicRootAt(e,n,a,l,u,_);if(0===c)return 0;for(var d,f,p=0,v=-1,m=0;c>m;m++){var y=_[m],x=0===y||1===y?.5:1,w=g.cubicAt(t,i,o,s,y);h>w||(0>v&&(v=g.cubicExtrema(e,n,a,l,b),b[1]1&&r(),d=g.cubicAt(e,n,a,l,b[0]),v>1&&(f=g.cubicAt(e,n,a,l,b[1]))),p+=2==v?yd?x:-x:yf?x:-x:f>l?x:-x:yd?x:-x:d>l?x:-x)}return p}function a(t,e,i,n,r,o,a,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=g.quadraticRootAt(e,n,o,s,_);if(0===l)return 0;var h=g.quadraticExtremum(e,n,o);if(h>=0&&1>=h){for(var u=0,c=g.quadraticAt(e,n,o,h),d=0;l>d;d++){var f=0===_[d]||1===_[d]?.5:1,p=g.quadraticAt(t,i,r,_[d]);a>p||(u+=_[d]c?f:-f:c>o?f:-f)}return u}var f=0===_[0]||1===_[0]?.5:1,p=g.quadraticAt(t,i,r,_[0]);return a>p?0:e>o?f:-f}function s(t,e,i,n,r,o,a,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);_[0]=-l,_[1]=l;var h=Math.abs(n-r);if(1e-4>h)return 0;if(1e-4>h%y){n=0,r=y;var u=o?1:-1;return a>=_[0]+t&&a<=_[1]+t?u:0}if(o){var l=n;n=p(r),r=p(l)}else n=p(n),r=p(r);n>r&&(r+=y);for(var c=0,d=0;2>d;d++){var f=_[d];if(f+t>a){var g=Math.atan2(s,f),u=o?1:-1;0>g&&(g=y+g),(g>=n&&r>=g||g+y>=n&&r>=g+y)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),c+=u)}}return c}function l(t,e,i,r,l){for(var u=0,p=0,g=0,y=0,x=0,_=0;_1&&(i||(u+=v(p,g,y,x,r,l))),1==_&&(p=t[_],g=t[_+1],y=p,x=g),b){case h.M:y=t[_++],x=t[_++],p=y,g=x;break;case h.L:if(i){if(m(p,g,t[_],t[_+1],e,r,l))return!0}else u+=v(p,g,t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.C:if(i){if(c.containStroke(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else u+=o(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.Q:if(i){if(d.containStroke(p,g,t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else u+=a(p,g,t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.A:var w=t[_++],M=t[_++],S=t[_++],A=t[_++],T=t[_++],I=t[_++],C=(t[_++],1-t[_++]),k=Math.cos(T)*S+w,L=Math.sin(T)*A+M;_>1?u+=v(p,g,k,L,r,l):(y=k,x=L);var D=(r-w)*A/S+w;if(i){if(f.containStroke(w,M,A,T,T+I,C,e,D,l))return!0}else u+=s(w,M,A,T,T+I,C,D,l);p=Math.cos(T+I)*S+w,g=Math.sin(T+I)*A+M;break;case h.R:y=p=t[_++],x=g=t[_++];var P=t[_++],O=t[_++],k=y+P,L=x+O;if(i){if(m(y,x,k,x,e,r,l)||m(k,x,k,L,e,r,l)||m(k,L,y,L,e,r,l)||m(y,L,y,x,e,r,l))return!0}else u+=v(k,x,k,L,r,l),u+=v(y,L,y,x,r,l);break;case h.Z:if(i){if(m(p,g,y,x,e,r,l))return!0}else u+=v(p,g,y,x,r,l);p=y,g=x}}return i||n(g,x)||(u+=v(p,g,y,x,r,l)||0),0!==u}var h=i(29).CMD,u=i(140),c=i(139),d=i(142),f=i(138),p=i(60).normalizeRadian,g=i(16),v=i(81),m=u.containStroke,y=2*Math.PI,x=1e-4,_=[-1,-1,-1],b=[-1,-1];t.exports={contain:function(t,e,i){return l(t,0,!1,e,i)},containStroke:function(t,e,i,n){return l(t,e,!0,i,n)}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,o,a,s,l,h){if(0===s)return!1;var u=s;if(h>e+u&&h>r+u&&h>a+u||e-u>h&&r-u>h&&a-u>h||l>t+u&&l>i+u&&l>o+u||t-u>l&&i-u>l&&o-u>l)return!1;var c=n.quadraticProjectPoint(t,e,i,r,o,a,l,h,null);return u/2>=c}}},function(t,e,i){"use strict";function n(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var o=i(23),a=function(){this._track=[]};a.prototype={constructor:a,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,s=n.length;s>a;a++){var l=n[a],h=o.clientToLocal(i,l);r.points.push([h.zrX,h.zrY]),r.touches.push(l)}this._track.push(r)}},_recognize:function(t){for(var e in s)if(s.hasOwnProperty(e)){var i=s[e](this._track,t);if(i)return i}}};var s={pinch:function(t,e){var i=t.length;if(i){var o=(t[i-1]||{}).points,a=(t[i-2]||{}).points||o;if(a&&a.length>1&&o&&o.length>1){var s=n(o)/n(a);!isFinite(s)&&(s=1),e.pinchScale=s;var l=r(o);return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}};t.exports=a},function(t,e){var i=function(){this.head=null,this.tail=null,this._len=0},n=i.prototype;n.insert=function(t){var e=new r(t);return this.insertEntry(e),e},n.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._len++},n.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len};var r=function(t){this.value=t,this.next,this.prev},o=function(t){this._list=new i,this._map={},this._maxSize=t||10},a=o.prototype;a.put=function(t,e){var i=this._list,n=this._map;if(null==n[t]){var r=i.len();if(r>=this._maxSize&&r>0){var o=i.head;i.remove(o),delete n[o.key]}var a=i.insert(e);a.key=t,n[t]=a}},a.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},a.clear=function(){this._list.clear(),this._map={}},t.exports=o},function(t,e,i){var n=i(6);t.exports=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i0},extendFrom:function(t,e){if(t){var i=this;for(var n in t)!t.hasOwnProperty(n)||!e&&i.hasOwnProperty(n)||(i[n]=t[n])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},createLinearGradient:function(t,e,i){var n=e.x*i.width+i.x,r=e.x2*i.width+i.x,o=e.y*i.height+i.y,a=e.y2*i.height+i.y,s=t.createLinearGradient(n,o,r,a);return s},createRadialGradient:function(t,e,i){var n=i.width,r=i.height,o=Math.min(n,r),a=e.x*n+i.x,s=e.y*r+i.y,l=e.r*o,h=t.createRadialGradient(a,s,0,a,s,l);return h},getGradient:function(t,e,i){for(var n="radial"===e.type?"createRadialGradient":"createLinearGradient",r=this[n](t,e,i),o=e.colorStops,a=0;ay;y++)r(d,d,t[y]),o(f,f,t[y]);r(d,d,h[0]),o(f,f,h[1])}for(var y=0,x=t.length;x>y;y++){var _=t[y];if(i)u=t[y?y-1:x-1],c=t[(y+1)%x];else{if(0===y||y===x-1){p.push(n.clone(t[y]));continue}u=t[y-1],c=t[y+1]}n.sub(g,c,u),a(g,g,e);var b=s(_,u),w=s(_,c),M=b+w;0!==M&&(b/=M,w/=M),a(v,g,-b),a(m,g,w);var S=l([],_,v),A=l([],_,m);h&&(o(S,S,d),r(S,S,f),o(A,A,d),r(A,A,f)),p.push(S),p.push(A)}return i&&p.push(p.shift()),p}},function(t,e,i){function n(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}var r=i(5);t.exports=function(t,e){ -for(var i=t.length,o=[],a=0,s=1;i>s;s++)a+=r.distance(t[s-1],t[s]);var l=a/2;l=i>l?i:l;for(var s=0;l>s;s++){var h,u,c,d=s/(l-1)*(e?i:i-1),f=Math.floor(d),p=d-f,g=t[f%i];e?(h=t[(f-1+i)%i],u=t[(f+1)%i],c=t[(f+2)%i]):(h=t[0===f?f:f-1],u=t[f>i-2?i-1:f+1],c=t[f>i-3?i-1:f+2]);var v=p*p,m=p*v;o.push([n(h[0],g[0],u[0],c[0],p,v,m),n(h[1],g[1],u[1],c[1],p,v,m)])}return o}},function(t,e,i){t.exports=i(6).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),h=Math.sin(o);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,o,a,!s)}})},function(t,e,i){"use strict";function n(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?c:h)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?c:h)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?u:l)(t.x1,t.cpx1,t.x2,e),(i?u:l)(t.y1,t.cpy1,t.y2,e)]}var r=i(16),o=i(5),a=r.quadraticSubdivide,s=r.cubicSubdivide,l=r.quadraticAt,h=r.cubicAt,u=r.quadraticDerivativeAt,c=r.cubicDerivativeAt,d=[];t.exports=i(6).extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,l=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,f=e.percent;0!==f&&(t.moveTo(i,n),null==u||null==c?(1>f&&(a(i,l,r,f,d),l=d[1],r=d[2],a(n,h,o,f,d),h=d[1],o=d[2]),t.quadraticCurveTo(l,h,r,o)):(1>f&&(s(i,l,u,r,f,d),l=d[1],u=d[2],r=d[3],s(n,h,c,o,f,d),h=d[1],c=d[2],o=d[3]),t.bezierCurveTo(l,h,u,c,r,o)))},pointAt:function(t){return n(this.shape,t,!1)},tangentAt:function(t){var e=n(this.shape,t,!0);return o.normalize(e,e)}})},function(t,e,i){"use strict";t.exports=i(6).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.percent;0!==a&&(t.moveTo(i,n),1>a&&(r=i*(1-a)+r*a,o=n*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})},function(t,e,i){var n=i(62);t.exports=i(6).extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){n.buildPath(t,e,!0)}})},function(t,e,i){var n=i(62);t.exports=i(6).extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){n.buildPath(t,e,!1)}})},function(t,e,i){var n=i(63);t.exports=i(6).extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,o=e.width,a=e.height;e.r?n.buildPath(t,e):t.rect(i,r,o,a),t.closePath()}})},function(t,e,i){t.exports=i(6).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(a),u=Math.sin(a);t.moveTo(h*r+i,u*r+n),t.lineTo(h*o+i,u*o+n),t.arc(i,n,o,a,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,a,l),t.closePath()}})},function(t,e,i){"use strict";var n=i(58),r=i(1),o=r.isString,a=r.isFunction,s=r.isObject,l=i(47),h=function(){this.animators=[]};h.prototype={constructor:h,animate:function(t,e){var i,o=!1,a=this,s=this.__zr;if(t){var h=t.split("."),u=a;o="shape"===h[0];for(var c=0,d=h.length;d>c;c++)u&&(u=u[h[c]]);u&&(i=u)}else i=a;if(!i)return void l('Property "'+t+'" is not existed in element '+a.id);var f=a.animators,p=new n(i,e);return p.during(function(t){a.dirty(o)}).done(function(){f.splice(r.indexOf(f,p),1)}),f.push(p),s&&s.animation.addAnimator(p),p},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r){function s(){h--,h||r&&r()}o(i)?(r=n,n=i,i=0):a(n)?(r=n,n="linear",i=0):a(i)?(r=i,i=0):a(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i,n,r);var l=this.animators.slice(),h=l.length;h||r&&r();for(var u=0;u0&&this.animate(t,!1).when(null==n?500:n,a).delay(o||0),this}},t.exports=h},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}i.prototype={constructor:i,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this._dispatchProxy(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(r,o,t),this._dispatchProxy(e,"drag",t.event);var a=this.findHover(i,n,e),s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this._dispatchProxy(s,"dragleave",t.event),a&&a!==s&&this._dispatchProxy(a,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this._dispatchProxy(e,"dragend",t.event),this._dropTarget&&this._dispatchProxy(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},t.exports=i},function(t,e,i){function n(t,e,i,n,r,o,a,s,l,h,u){var g=l*(p/180),y=f(g)*(t-i)/2+d(g)*(e-n)/2,x=-1*d(g)*(t-i)/2+f(g)*(e-n)/2,_=y*y/(a*a)+x*x/(s*s);_>1&&(a*=c(_),s*=c(_));var b=(r===o?-1:1)*c((a*a*(s*s)-a*a*(x*x)-s*s*(y*y))/(a*a*(x*x)+s*s*(y*y)))||0,w=b*a*x/s,M=b*-s*y/a,S=(t+i)/2+f(g)*w-d(g)*M,A=(e+n)/2+d(g)*w+f(g)*M,T=m([1,0],[(y-w)/a,(x-M)/s]),I=[(y-w)/a,(x-M)/s],C=[(-1*y-w)/a,(-1*x-M)/s],k=m(I,C);v(I,C)<=-1&&(k=p),v(I,C)>=1&&(k=0),0===o&&k>0&&(k-=2*p),1===o&&0>k&&(k+=2*p),u.addData(h,S,A,a,s,T,k,g,o)}function r(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===v[0]&&v.shift();for(var m=0;mr;r++){var o=t[r];o.__dirty&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var s=new a(e);return s.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},s}}},function(t,e,i){function n(t,e){var i,n,o,u,c,d,f=t.data,p=r.M,g=r.C,v=r.L,m=r.R,y=r.A,x=r.Q;for(o=0,u=0;oc;c++){var d=s[c];d[0]=f[o++],d[1]=f[o++],a(d,d,e),f[u++]=d[0],f[u++]=d[1]}}}var r=i(29).CMD,o=i(5),a=o.applyTransform,s=[[],[],[]],l=Math.sqrt,h=Math.atan2;t.exports=n},function(t,e,i){if(!i(11).canvasSupported){var n,r="urn:schemas-microsoft-com:vml",o=window,a=o.document,s=!1;try{!a.namespaces.zrvml&&a.namespaces.add("zrvml",r),n=function(t){return a.createElement("')}}catch(l){n=function(t){return a.createElement("<"+t+' xmlns="'+r+'" class="zrvml">')}}var h=function(){if(!s){s=!0;var t=a.styleSheets;t.length<31?a.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};t.exports={doc:a,initVML:h,createNode:n}}},,,function(t,e,i){function n(t){A.call(this),this.zr=t,this.group=new I.Group,this._brushType,this._brushOption,this._containerRect=null,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._mounted=!1,this._uid="brushController_"+W++,this._handlers={},D(Z,function(t,e){this._handlers[e]=L(t,this)},this)}function r(t){var e=this.zr;if(p(this)){var i=T.bind(function(t){this.enableBrush(!1),t&&t()},this,t.onRelease);C.take(e,V,this._uid,i),e.setDefaultCursorStyle("crosshair")}D(this._handlers,function(t,i){e.on(i,t)}),this._brushType=t.brushType,this._brushOption=T.merge(T.clone(G),t,!0)}function o(){var t=this.zr;C.release(t,V,this._uid),t.setDefaultCursorStyle("default"),D(this._handlers,function(e,i){t.off(i,e)}),this._brushType=this._brushOption=null}function a(t){var e=q[t.brushType].createCover.call(this,t);return s(e),e.__brushOption=t,this.group.add(e),e}function s(t){t.traverse(function(t){t.z=R})}function l(t){var e=t.__brushOption,i=q[e.brushType];i.updateCoverShape.call(this,t),i.updateCommon.call(this,t)}function h(t,e){var i=this.group.transformCoordToLocal(t,e);return!this._containerRect||this._containerRect.contain(i[0],i[1])}function u(){D(this._covers,function(t){this.group.remove(t)},this),this._covers.length=0}function c(t){var e=P(this._covers,function(t){var e=t.__brushOption;return{brushType:e.brushType,range:T.clone(e.range)}});this.trigger("brush",e,!!t)}function d(){var t=this._track;if(!t.length)return!1;var e=t[t.length-1],i=t[0],n=e[0]-i[0],r=e[1]-i[1],o=E(n*n+r*r,.5);return o>N}function f(){var t=this.group,e=t.parent;e&&e.remove(t)}function p(t){return!t._containerRect}function g(){return P(this._track,function(t){return this.group.transformCoordToLocal(t[0],t[1])},this)}function v(){var t=g.call(this),e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function m(t,e){t.add(new I.Rect({name:"rect",style:e.brushStyle,silent:!0,draggable:!0,cursor:"move",drift:L(b,this,t,"nswe"),ondragend:L(c,this,!0)}))}function y(t){var e=t.__brushOption;t.childAt(0).useStyle(e.brushStyle);var i=e.transformable;t.childAt(0).attr({silent:!i,cursor:i?"move":"default"})}function x(t,e,i,n,r,o){t.childOfName(e).setShape({x:i,y:n,width:r,height:o})}function _(t,e,i,n){var r=[O(t,i),O(e,n)],o=[z(t,i),z(e,n)];return[[r[0],o[0]],[r[1],o[1]]]}function b(t,e,i,n){var r=t.__brushOption,o=r.range,a=[i,n];D(e.split(""),function(t){var e=F[t];o[e[0]][e[1]]+=a[e[0]]}),r.range=_(o[0][0],o[1][0],o[0][1],o[1][1]),l.call(this,t),c.call(this,!1)}function w(t,e,i){var n=t.__brushOption.range;D(n,function(t){t[0]+=e,t[1]+=i}),l.call(this,t),c.call(this,!1)}function M(t){var e=t.event;e.preventDefault&&e.preventDefault()}function S(t,e){var i=t.offsetX,n=t.offsetY,r=this._creatingCover,o=this._brushOption;if(h.call(this,i,n)&&(this._track.push([i,n]),d.call(this))){r||("single"===o.brushMode&&u.call(this),r=this._creatingCover=a.call(this,T.clone(o)),this._covers.push(r));var l=q[this._brushType],f=r.__brushOption;f.range=l.getCreatingRange.call(this,e),e&&(l.endCreating&&(l.endCreating.call(this,r),s(r)),l.updateCommon.call(this,r)),l.updateCoverShape.call(this,r),c.call(this,e)}e&&r&&(this._creatingCover=null)}var A=i(21),T=i(1),I=i(3),C=i(107),k=i(45),L=T.bind,D=T.each,P=T.map,O=Math.min,z=Math.max,E=Math.pow,R=1e4,N=2,B=6,V="globalPan",F={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},H={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},G={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.15)"},transformable:!0,brushMode:"single"},W=0;n.prototype={constructor:n,enableBrush:function(t){return this._mounted?(this._brushType&&o.call(this),t.brushType&&r.call(this,t),this):void 0},mount:function(t,e){return this._mounted=!0,f.call(this),this._containerRect=e!==!1?e||t.getBoundingRect():null,t.add(this.group),this},eachCover:function(t,e){D(this._covers,t,e)},updateCovers:function(t){function e(t,e){var i=t.__brushOption;return null!=i.id?i.id:s+e}function i(t,e){return null!=t.id?t.id:s+e}function n(e){u[e]=a.call(c,t[e]),l.call(c,u[e])}function r(e,i){var n=u[e]=h[i],r=t[e];r.brushType!==n.__brushOption.brushType&&(c.group.remove(n),n=a.call(c,r)),n.__brushOption=r,l.call(c,u[e])}function o(t){c.group.remove(h[t])}if(this._mounted){t=T.map(t,function(t){return T.merge(T.clone(G),t,!0)});var s="\x00-brush-index-",h=this._covers,u=this._covers=[],c=this;return new k(h,t,e,i).add(n).update(r).remove(o).execute(),this}},unmount:function(){return this.enableBrush(!1),f.call(this),this._covers=[],this._mounted=!1,this},dispose:function(){this.unmount(),this.off()}},T.mixin(n,A);var Z={mousedown:function(t){if(!t.target||!t.target.draggable){M(t);var e=t.offsetX,i=t.offsetY;h.call(this,e,i)&&(this._dragging=!0,this._track=[[e,i]])}},mousemove:function(t){this._dragging&&(M(t),S.call(this,t,!1))},mouseup:function(t){this._dragging&&(M(t),S.call(this,t,!0),this._dragging=!1,this._track=[])}},q={line:{createCover:function(t){var e=new I.Group;return m.call(this,e,t),e},getCreatingRange:function(){var t=v.call(this),e=O(t[0][0],t[1][0]),i=z(t[0][0],t[1][0]);return[e,i]},updateCoverShape:function(t){var e=t.__brushOption,i=e.range,n=e.brushStyle.width;t.childOfName("rect").setShape({x:i[0],y:-n/2,width:i[1]-i[0],height:n})},updateCommon:y},rect:{createCover:function(t){var e=new I.Group;return m.call(this,e,t),D(["w","e","n","s","se","sw","ne","nw"],function(t){e.add(new I.Rect({name:t,__cursor:H[t]+"-resize",style:{opacity:0},draggable:!0,drift:L(b,this,e,t),ondragend:L(c,this,!0)}))},this),e},getCreatingRange:function(){var t=v.call(this);return _(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t){var e=t.__brushOption,i=e.range,n=e.brushStyle.lineWidth||0,r=z(n,B),o=i[0][0],a=i[1][0],s=o-n/2,l=a-n/2,h=i[0][1],u=i[1][1],c=h-r+n/2,d=u-r+n/2,f=h-o,p=u-a,g=f+n,v=p+n;x(t,"rect",o,a,f,p),e.transformable&&(x(t,"w",s,l,r,v),x(t,"e",c,l,r,v),x(t,"n",s,l,g,r),x(t,"s",s,d,g,r),x(t,"nw",s,l,r,r),x(t,"ne",c,l,r,r),x(t,"sw",s,d,r,r),x(t,"se",c,d,r,r))},updateCommon:function(t){y.call(this,t);var e=t.__brushOption.transformable;D(["w","e","n","s","se","sw","ne","nw"],function(i){var n=t.childOfName(i);n.attr({silent:!e,cursor:e?n.__cursor:"default"})},this)}},polygon:{createCover:function(t){var e=new I.Group;return e.add(new I.Polyline({style:t.brushStyle,silent:!0})),e},getCreatingRange:function(t){return this._track.slice()},endCreating:function(t){t.remove(t.childAt(0)),t.add(new I.Polygon({draggable:!0,drift:L(w,this,t),ondragend:L(c,this,!0)}))},updateCoverShape:function(t){t.childAt(0).setShape({points:t.__brushOption.range})},updateCommon:y}};t.exports=n},,function(t,e,i){function n(){this.group=new r.Group,this._symbolEl=new a({})}var r=i(3),o=i(26),a=r.extendShape({shape:{points:null,sizes:null},symbolProxy:null,buildPath:function(t,e){for(var i=e.points,n=e.sizes,r=this.symbolProxy,o=r.shape,a=0;a=0;o--){var a=n[o],s=r[o],l=a[0]-s[0]/2,h=a[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return o}return-1}}),s=n.prototype;s.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray(function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i})}),e.symbolProxy=o.createSymbol(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)}),this.group.add(e)},s.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},s.remove=function(){this.group.removeAll()},t.exports=n},function(t,e,i){function n(t){return null==t.cpx1||null==t.cpy1}var r=i(3),o=i(5),a=r.Line.prototype,s=r.BezierCurve.prototype;t.exports=r.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(n(e)?a:s).buildPath(t,e)},pointAt:function(t){return n(this.shape)?a.pointAt.call(this,t):s.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=n(e)?[e.x2-e.x1,e.y2-e.y1]:s.tangentAt.call(this,t);return o.normalize(i,i)}})},function(t,e,i){var n=i(1),r=i(2);i(172),i(173),r.registerVisual(n.curry(i(46),"scatter","circle",null)),r.registerLayout(n.curry(i(54),"scatter")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.scatter",dependencies:["grid","polar"],getInitialData:function(t,e){var i=n(t.data,this,e);return i},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{normal:{opacity:.8}}}})},function(t,e,i){var n=i(39),r=i(169);i(2).extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new n,this._largeSymbolDraw=new r},render:function(t,e,i){var n=t.getData(),r=this._largeSymbolDraw,o=this._normalSymbolDraw,a=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?r:o;this._symbolDraw=s,s.updateData(n),a.add(s.group),a.remove(s===r?o.group:r.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)}})},function(t,e,i){i(106),i(40),i(41),i(180),i(181),i(176),i(177),i(104),i(103)},function(t,e,i){function n(t,e){var i=[1/0,-(1/0)];return h(e,function(e){var n=e.getData();n&&h(e.coordDimToDataDim(t),function(t){var e=n.getDataExtent(t);e[0]i[1]&&(i[1]=e[1])})},this),i}function r(t,e,i){var n=i.getAxisModel(),r=n.axis.scale,a=[0,100],s=[t.start,t.end],c=[];return e=e.slice(),o(e,n,r),h(["startValue","endValue"],function(e){c.push(null!=t[e]?r.parse(t[e]):null)}),h([0,1],function(t){var i=c[t],n=s[t];null!=n||null==i?(null==n&&(n=a[t]),i=r.parse(l.linearMap(n,a,e,!0))):n=l.linearMap(i,e,a,!0),c[t]=i,s[t]=n}),{valueWindow:u(c),percentWindow:u(s)}}function o(t,e,i){return h(["min","max"],function(n,r){var o=e.get(n,!0);null!=o&&(o+"").toLowerCase()!=="data"+n&&(t[r]=i.parse(o))}),e.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0)),t}function a(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=e||0===n[0]&&100===n[1],a=!e&&l.getPixelPrecision(r,[0,500]),s=!(e||20>a&&a>=0),h=e||o||s;i.setRange&&i.setRange(h?null:+r[0].toFixed(a),h?null:+r[1].toFixed(a))}}var s=i(1),l=i(4),h=s.each,u=l.asc,c=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this.ecModel=n,this._dataZoomModel=i};c.prototype={constructor:c,hostedBy:function(t){return this._dataZoomModel===t},getDataExtent:function(){return this._dataExtent.slice()},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[];return this.ecModel.eachSeries(function(e){this._axisIndex===e.get(this._dimName+"AxisIndex")&&t.push(e)},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,r=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(a=t)}),a},reset:function(t){if(t===this._dataZoomModel){var e=this._dataExtent=n(this._dimName,this.getTargetSeriesModels()),i=r(t.option,e,this);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,a(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,a(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow,a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&"category"===a.get("type")&&(r="empty"),h(n,function(t){var n=t.getData();n&&h(t.coordDimToDataDim(i),function(i){"empty"===r?t.setData(n.map(i,function(t){return e(t)?t:NaN})):n.filterSelf(i,e)})})}}},t.exports=c},function(t,e,i){t.exports=i(40).extend({type:"dataZoom.inside",defaultOption:{zoomLock:!1}})},function(t,e,i){function n(t,e,i,n){e=e.slice();var r=n.axisModels[0];if(r){var a=o(t,r,i),s=a.signal*(e[1]-e[0])*a.pixel/a.pixelLength;return h(s,e,[0,100],"rigid"),e}}function r(t,e,i,n,r,s){i=i.slice();var l=r.axisModels[0];if(l){var h=o(e,l,n),u=h.pixel-h.pixelStart,c=u/h.pixelLength*(i[1]-i[0])+i[0];return t=Math.max(t,0),i[0]=(i[0]-c)*t+c,i[1]=(i[1]-c)*t+c,a(i)}}function o(t,e,i){var n=e.axis,r=i.rectProvider(),o={};return"x"===n.dim?(o.pixel=t[0],o.pixelLength=r.width,o.pixelStart=r.x,o.signal=n.inverse?1:-1):(o.pixel=t[1],o.pixelLength=r.height,o.pixelStart=r.y,o.signal=n.inverse?-1:1),o}function a(t){var e=[0,100];return!(t[0]<=e[1])&&(t[0]=e[1]),!(t[1]<=e[1])&&(t[1]=e[1]),!(t[0]>=e[0])&&(t[0]=e[0]),!(t[1]>=e[0])&&(t[1]=e[0]),t}var s=i(41),l=i(1),h=i(77),u=i(182),c=l.bind,d=s.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){d.superApply(this,"render",arguments),u.shouldRecordRange(n,t.id)&&(this._range=t.getPercentRange());var r=this.getTargetInfo().cartesians,o=l.map(r,function(t){return u.generateCoordId(t.model)});l.each(r,function(e){var n=e.model;u.register(i,{coordId:u.generateCoordId(n),allCoordIds:o,coordinateSystem:n.coordinateSystem,dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:c(this._onPan,this,e),zoomGetRange:c(this._onZoom,this,e)})},this)},remove:function(){u.unregister(this.api,this.dataZoomModel.id),d.superApply(this,"remove",arguments),this._range=null},dispose:function(){u.unregister(this.api,this.dataZoomModel.id),d.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,r){return this._range=n([i,r],this._range,e,t)},_onZoom:function(t,e,i,n,o){var a=this.dataZoomModel;return a.option.zoomLock?this._range:this._range=r(1/i,[n,o],this._range,e,t,a)}});t.exports=d},function(t,e,i){var n=i(40);t.exports=n.extend({type:"dataZoom.select"})},function(t,e,i){t.exports=i(41).extend({type:"dataZoom.select"})},function(t,e,i){var n=i(40),r=n.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});t.exports=r},function(t,e,i){function n(t){return"x"===t?"y":"x"}var r=i(1),o=i(3),a=i(130),s=i(41),l=o.Rect,h=i(4),u=h.linearMap,c=i(14),d=i(77),f=h.asc,p=r.bind,g=r.each,v=7,m=1,y=30,x="horizontal",_="vertical",b=5,w=["line","bar","candlestick","scatter"],M=s.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){return M.superApply(this,"render",arguments),a.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){M.superApply(this,"remove",arguments),a.clear(this,"_dispatchZoomAction")},dispose:function(){M.superApply(this,"dispose",arguments),a.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new o.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===x?{right:n.width-i.x-i.width,top:n.height-y-v,width:i.width,height:y}:{right:v,top:i.y,width:y,height:i.height},a=c.getLayoutParams(t.option);r.each(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var s=c.getLayoutRect(a,n,t.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===_&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==x||r?i===x&&r?{scale:a?[-1,1]:[-1,-1]}:i!==_||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size;this._displayables.barGroup.add(new l({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():t.otherDim,s=n.getDataExtent(a),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var h=[0,e[1]],c=[0,e[0]],d=[[e[0],0],[0,0]],f=[],p=c[1]/(n.count()-1),g=0,v=Math.round(n.count()/e[0]);n.each([a],function(t,e){if(v>0&&e%v)return void(g+=p);var i=null==t||isNaN(t)||""===t?null:u(t,s,h,!0);null!=i&&(d.push([g,i]),f.push([g,i])),g+=p});var m=this.dataZoomModel;this._displayables.barGroup.add(new o.Polygon({shape:{points:d},style:r.defaults({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new o.Polyline({shape:{points:f},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,o=this.ecModel;return t.eachTargetAxis(function(a,s){var l=t.getAxisProxy(a.name,s).getTargetSeriesModels();r.each(l,function(t){if(!(i||e!==!0&&r.indexOf(w,t.get("type"))<0)){var l=n(a.name),h=o.getComponent(a.axis,s).axis;i={thisAxis:h,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:t.coordinateSystem.getOtherAxis(h).inverse}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,a=this.dataZoomModel;n.add(t.filler=new l({draggable:!0,cursor:"move",drift:p(this._onDragMove,this,"all"),ondragstart:p(this._showDataInfo,this,!0),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new l(o.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:m,fill:"rgba(0,0,0,0)"}})));var s=a.get("handleIcon");g([0,1],function(t){var r=o.makePath(s,{style:{strokeNoScale:!0},rectHover:!0,cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:p(this._onDragMove,this,t),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1)},{x:-.5,y:0,width:1,height:1},"center"),l=r.getBoundingRect();this._handleHeight=h.parsePercent(a.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,r.setStyle(a.getModel("handleStyle").getItemStyle());var u=a.get("handleColor");null!=u&&(r.style.fill=u),n.add(e[t]=r);var c=a.textStyleModel;this.group.add(i[t]=new o.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",fill:c.getTextColor(),textFont:c.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[u(t[0],[0,100],e,!0),u(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this._handleEnds,n=this._getViewExtent();d(e,i,n,"all"===t||this.dataZoomModel.get("zoomLock")?"rigid":"cross",t),this._range=f([u(i[0],n,[0,100],!0),u(i[1],n,[0,100],!0)])},_updateView:function(){var t=this._displayables,e=this._handleEnds,i=f(e.slice()),n=this._size;g([0,1],function(i){var r=t.handles[i],o=this._handleHeight;r.attr({scale:[o,o],position:[e[i],n[1]/2-o/2]})},this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:n[1]}),this._updateDataInfo()},_updateDataInfo:function(){function t(t){var e=o.getTransform(i.handles[t].parent,this.group),s=o.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+b,u=o.applyTransform([h[t]+(0===t?-l:l),this._size[1]/2],e);n[t].setStyle({x:u[0],y:u[1],textVerticalAlign:r===x?"middle":s,textAlign:r===x?s:"center",text:a[t]})}var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,a=["",""]; -if(e.get("showDetail")){var s,l;e.eachTargetAxis(function(t,i){s||(s=e.getAxisProxy(t.name,i).getDataValueWindow(),l=this.ecModel.getComponent(t.axis,i).axis)},this),s&&(a=[this._formatLabel(s[0],l),this._formatLabel(s[1],l)])}var h=f(this._handleEnds.slice());t.call(this,0),t.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter");if(r.isFunction(n))return n(t);var o=i.get("labelPrecision");return null!=o&&"auto"!==o||(o=e.getPixelPrecision()),t=null==t&&isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20)),r.isString(n)&&(t=n.replace("{value}",t)),t},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._applyBarTransform([e,i],!0);this._updateInterval(t,n[0]),this._updateView(),this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_applyBarTransform:function(t,e){var i=this._displayables.barGroup.getLocalTransform();return o.applyTransform(t,i,e)},_findCoordRect:function(){var t,e=this.getTargetInfo();if(e.cartesians.length)t=e.cartesians[0].model.coordinateSystem.getRect();else{var i=this.api.getWidth(),n=this.api.getHeight();t={x:.2*i,y:.2*n,width:.6*i,height:.6*n}}return t}});t.exports=M},function(t,e,i){function n(t){var e=t.getZr();return e[p]||(e[p]={})}function r(t,e,i){var n=new c(t.getZr());return n.enable(),n.on("pan",f(a,i)),n.on("zoom",f(s,i)),n}function o(t){u.each(t,function(e,i){e.count||(e.controller.off("pan").off("zoom"),delete t[i])})}function a(t,e,i){l(t,function(n){return n.panGetRange(t.controller,e,i)})}function s(t,e,i,n){l(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function l(t,e){var i=[];u.each(t.dataZoomInfos,function(t){var n=e(t);n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})}),t.dispatchAction(i)}function h(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var u=i(1),c=i(76),d=i(130),f=u.curry,p="\x00_ec_dataZoom_roams",g={register:function(t,e){var i=n(t),a=e.dataZoomId,s=e.coordId;u.each(i,function(t,i){var n=t.dataZoomInfos;n[a]&&u.indexOf(e.allCoordIds,s)<0&&(delete n[a],t.count--)}),o(i);var l=i[s];l||(l=i[s]={coordId:s,dataZoomInfos:{},count:0},l.controller=r(t,e,l),l.dispatchAction=u.curry(h,t));var c=e.coordinateSystem.getRect().clone();l.controller.rectProvider=function(){return c},d.createOrUpdate(l,"dispatchAction",e.throttleRate,"fixRate"),!l.dataZoomInfos[a]&&l.count++,l.dataZoomInfos[a]=e},unregister:function(t,e){var i=n(t);u.each(i,function(t){var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),o(i)},shouldRecordRange:function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].dataZoomId===e)return!1;return!0},generateCoordId:function(t){return t.type+"\x00_"+t.id}};t.exports=g},function(t,e,i){i(106),i(40),i(41),i(178),i(179),i(104),i(103)},function(t,e,i){i(185),i(187),i(186);var n=i(2);n.registerProcessor(i(188))},function(t,e,i){"use strict";var n=i(1),r=i(12),o=i(2).extendComponentModel({type:"legend",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){o.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:"top",align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0}});t.exports=o},function(t,e,i){function n(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function r(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function o(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var a=i(1),s=i(26),l=i(3),h=i(108),u=a.curry;t.exports=i(2).extendComponentView({type:"legend",init:function(){this._symbolTypeStore={}},render:function(t,e,i){var s=this.group;if(s.removeAll(),t.get("show")){var c=t.get("selectedMode"),d=t.get("align");"auto"===d&&(d="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left");var f={};a.each(t.getData(),function(a){var h=a.get("name");if(""===h||"\n"===h)return void s.add(new l.Group({newline:!0}));var p=e.getSeriesByName(h)[0];if(!f[h])if(p){var g=p.getData(),v=g.getVisual("color");"function"==typeof v&&(v=v(p.getDataParams(0)));var m=g.getVisual("legendSymbol")||"roundRect",y=g.getVisual("symbol"),x=this._createItem(h,a,t,m,y,d,v,c);x.on("click",u(n,h,i)).on("mouseover",u(r,p,"",i)).on("mouseout",u(o,p,"",i)),f[h]=!0}else e.eachRawSeries(function(e){if(!f[h]&&e.legendDataProvider){var s=e.legendDataProvider(),l=s.indexOfName(h);if(0>l)return;var p=s.getItemVisual(l,"color"),g="roundRect",v=this._createItem(h,a,t,g,null,d,p,c);v.on("click",u(n,h,i)).on("mouseover",u(r,e,h,i)).on("mouseout",u(o,e,h,i)),f[h]=!0}},this)},this),h.layout(s,t,i),h.addBackground(s,t)}},_createItem:function(t,e,i,n,r,o,a,h){var u=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.isSelected(t),p=new l.Group,g=e.getModel("textStyle"),v=e.get("icon");if(n=v||n,p.add(s.createSymbol(n,0,0,u,c,f?a:d)),!v&&r&&(r!==n||"none"==r)){var m=.8*c;"none"===r&&(r="circle"),p.add(s.createSymbol(r,(u-m)/2,(c-m)/2,m,m,f?a:d))}var y="left"===o?u+5:-5,x=o,_=i.get("formatter");"string"==typeof _&&_?t=_.replace("{name}",t):"function"==typeof _&&(t=_(t));var b=new l.Text({style:{text:t,x:y,y:c/2,fill:f?g.getTextColor():d,textFont:g.getFont(),textAlign:x,textVerticalAlign:"middle"}});return p.add(b),p.add(new l.Rect({shape:p.getBoundingRect(),invisible:!0})),p.eachChild(function(t){t.silent=!h}),this.group.add(p),l.setHoverStyle(p),p}})},function(t,e,i){function n(t,e,i){var n,r={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var s=i.getData();o.each(s,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);e in r?r[e]=r[e]&&n:r[e]=n}})}),{name:e.name,selected:r}}var r=i(2),o=i(1);r.registerAction("legendToggleSelect","legendselectchanged",o.curry(n,"toggleSelected")),r.registerAction("legendSelect","legendselected",o.curry(n,"select")),r.registerAction("legendUnSelect","legendunselected",o.curry(n,"unSelect"))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i=0&&(h=+h.toFixed(v)),p.coord[d]=g.coord[d]=h,n=[p,g,{type:o,valueIndex:n.valueIndex,value:h}]}return n=[c.dataTransform(t,n[0]),c.dataTransform(t,n[1]),l.extend({},n[2])],n[2].type=n[2].type||"",l.merge(n[2],n[0]),l.merge(n[2],n[1]),n};i(66).extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,o=e.__to;r.each(function(e){a(r,e,!0,t,i),a(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap[t.name].updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var o=e.getItemModel(i);a(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||x[r?0:1],symbol:o.get("symbol",!0)||y[r?0:1],color:o.get("itemStyle.normal.color")||u.getVisual("color")})}var o=t.coordinateSystem,h=t.name,u=t.getData(),c=this.markerGroupMap,f=c[h];f||(f=c[h]=new d),this.group.add(f.group);var p=s(o,t,e),g=p.from,v=p.to,m=p.line;e.__from=g,e.__to=v,e.setData(m);var y=e.get("symbol"),x=e.get("symbolSize");l.isArray(y)||(y=[y,y]),"number"==typeof x&&(x=[x,x]),p.from.each(function(t){r(g,t,!0),r(v,t,!1)}),m.each(function(t){var e=m.getItemModel(t).get("lineStyle.normal.color");m.setItemVisual(t,{color:e||g.getItemVisual(t,"color")}),m.setItemLayout(t,[g.getItemLayout(t),v.getItemLayout(t)]),m.setItemVisual(t,{fromSymbolSize:g.getItemVisual(t,"symbolSize"),fromSymbol:g.getItemVisual(t,"symbol"),toSymbolSize:v.getItemVisual(t,"symbolSize"),toSymbol:v.getItemVisual(t,"symbol")})}),f.updateData(m),p.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),f.__keep=!0,f.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){t.exports=i(65).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}})},function(t,e,i){function n(t,e,i){var n=e.coordinateSystem;t.each(function(r){var o,a=t.getItemModel(r),l=s.parsePercent(a.getShallow("x"),i.getWidth()),h=s.parsePercent(a.getShallow("y"),i.getHeight());if(isNaN(l)||isNaN(h)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var u=t.get(n.dimensions[0],r),c=t.get(n.dimensions[1],r);o=n.dataToPoint([u,c])}}else o=[l,h];isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h),t.setItemLayout(r,o)})}function r(t,e,i){var n;n=t?a.map(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new l(n,i),o=a.map(i.get("data"),a.curry(h.dataTransform,e));return t&&(o=a.filter(o,a.curry(h.dataFilter,t))),r.initData(o,null,t?h.dimValueGetter:function(t){return t.value}),r}var o=i(39),a=i(1),s=i(4),l=i(13),h=i(67);i(66).extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(n(e.getData(),t,i),this.markerGroupMap[t.name].updateLayout(e))},this)},renderSeries:function(t,e,i,a){var s=t.coordinateSystem,l=t.name,h=t.getData(),u=this.markerGroupMap,c=u[l];c||(c=u[l]=new o);var d=r(s,t,e);e.setData(d),n(e.getData(),t,a),d.each(function(t){var i=d.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),d.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||h.getVisual("color"),symbol:i.getShallow("symbol")})}),c.updateData(d),this.group.add(c.group),d.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),c.__keep=!0,c.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){"use strict";var n=i(2),r=i(3),o=i(14);n.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),n.extendComponentView({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),h=new r.Text({style:{text:t.get("text"),textFont:a.getFont(),fill:a.getTextColor(),textBaseline:"top"},z2:10}),u=h.getBoundingRect(),c=t.get("subtext"),d=new r.Text({style:{text:c,textFont:s.getFont(),fill:s.getTextColor(),y:u.height+t.get("itemGap"),textBaseline:"top"},z2:10}),f=t.get("link"),p=t.get("sublink");h.silent=!f,d.silent=!p,f&&h.on("click",function(){window.open(f,"_"+t.get("target"))}),p&&d.on("click",function(){window.open(p,"_"+t.get("subtarget"))}),n.add(h),c&&n.add(d);var g=n.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=o.getLayoutRect(v,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),"middle"===l&&(l="center"),"left"!==l&&"right"!==l&&"center"!==l&&(l="left"),"right"===l?m.x+=m.width:"center"===l&&(m.x+=m.width/2)),n.attr("position",[m.x,m.y]),h.setStyle("textAlign",l),d.setStyle("textAlign",l),g=n.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new r.Rect({shape:{x:g.x-y[3],y:g.y-y[0],width:g.width+y[1]+y[3],height:g.height+y[0]+y[2]},style:x,silent:!0});r.subPixelOptimizeRect(_),n.add(_)}}})},function(t,e,i){i(200),i(201),i(207),i(205),i(203),i(204),i(206),i(202)},function(t,e,i){var n=i(22),r=i(1),o=i(2).extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){o.superApply(this,"mergeDefaultAndTheme",arguments),r.each(this.option.feature,function(t,e){var i=n.get(e);i&&r.merge(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}});t.exports=o},function(t,e,i){(function(e){function n(t){return 0===t.indexOf("my")}var r=i(22),o=i(1),a=i(3),s=i(12),l=i(45),h=i(108),u=i(18);t.exports=i(2).extendComponentView({type:"toolbox",render:function(t,e,i){function c(o,a){var l,h=m[o],u=m[a],c=g[h],f=new s(c,t,t.ecModel);if(h&&!u){if(n(h))l={model:f,onclick:f.option.onclick,featureName:h};else{var p=r.get(h);if(!p)return;l=new p(f,e,i)}v[h]=l}else{if(l=v[u],!l)return;l.model=f,l.ecModel=e,l.api=i}return!h&&u?void(l.dispose&&l.dispose(e,i)):!f.get("show")||l.unusable?void(l.remove&&l.remove(e,i)):(d(f,l,h),f.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(l.render&&l.render(f,e,i)))}function d(n,r,s){var l=n.getModel("iconStyle"),h=r.getIcons?r.getIcons():n.get("icon"),u=n.get("title")||{};if("string"==typeof h){var c=h,d=u;h={},u={},h[s]=c,u[s]=d}var g=n.iconPaths={};o.each(h,function(s,h){var c=l.getModel("normal").getItemStyle(),d=l.getModel("emphasis").getItemStyle(),v={x:-p/2,y:-p/2,width:p,height:p},m=0===s.indexOf("image://")?(v.image=s.slice(8),new a.Image({style:v})):a.makePath(s.replace("path://",""),{style:c,hoverStyle:d,rectHover:!0},v,"center");a.setHoverStyle(m),t.get("showTitle")&&(m.__title=u[h],m.on("mouseover",function(){m.setStyle({text:u[h],textPosition:d.textPosition||"bottom",textFill:d.fill||d.stroke||"#000",textAlign:d.textAlign||"center"})}).on("mouseout",function(){m.setStyle({textFill:null})})),m.trigger(n.get("iconStatus."+h)||"normal"),f.add(m),m.on("click",o.bind(r.onclick,r,e,i,h)),g[h]=m})}var f=this.group;if(f.removeAll(),t.get("show")){var p=+t.get("itemSize"),g=t.get("feature")||{},v=this._features||(this._features={}),m=[];o.each(g,function(t,e){m.push(e)}),new l(this._featureNames||[],m).add(c).update(c).remove(o.curry(c,null)).execute(),this._featureNames=m,h.layout(f,t,i),h.addBackground(f,t),f.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=u.getBoundingRect(e,n.font),o=t.position[0]+f.position[0],a=t.position[1]+f.position[1]+p,s=!1;a+r.height>i.getHeight()&&(n.textPosition="top",s=!0);var l=s?-5-r.height:p+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",l],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,l],n.textAlign="left")}})}},remove:function(t,e){o.each(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){o.each(this._features,function(i){i.dispose&&i.dispose(t,e)})}})}).call(e,i(213))},function(t,e,i){"use strict";function n(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}var r=i(22),o=i(1);n.defaultOption={show:!0,type:["rect","polygon","keep","clear"],icon:{rect:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",polygon:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",keep:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",clear:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5"},title:{rect:"矩形选择",polygon:"圈选",keep:"保持选择",clear:"清除选择"}};var a=n.prototype;a.render=function(t,e,i){var n,r;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,r=t.brushOption.brushMode||"single"}),this._brushType=n,this._brushMode=r,o.each(t.get("type",!0),function(e){"clear"!==e&&"keep"!==e&&t.setIconStatus(e,e===n?"emphasis":"normal"),"keep"===e&&t.setIconStatus(e,"multiple"===r?"emphasis":"normal")})},a.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return o.each(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},a.onclick=function(t,e,i){var e=this.api,n=this._brushType,r=this._brushMode;"clear"===i?e.dispatchAction({type:"brush",brushRanges:[]}):e.dispatchAction({type:"enableBrush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===r?"single":"multiple":r}})},r.register("brush",n),t.exports=n},function(t,e,i){function n(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function r(t){var e=[];return p.each(t,function(t,i){var n=t.categoryAxis,r=t.valueAxis,o=r.dim,a=[" "].concat(p.map(t.series,function(t){return t.name})),s=[n.model.getCategories()];p.each(t.series,function(t){s.push(t.getRawData().mapArray(o,function(t){return t}))});for(var l=[a.join(m)],h=0;ha;a++)n[a]=arguments[a];i.push((o?o+m:"")+n.join(m))}),i.join("\n")}).join("\n\n"+v+"\n\n")}function a(t){var e=n(t);return{value:p.filter([r(e.seriesGroupByCategoryAxis),o(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+v+"\n\n"),meta:e.meta}}function s(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function l(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(m)>=0?!0:void 0}function h(t){for(var e=t.split(/\n+/g),i=s(e.shift()).split(y),n=[],r=p.map(i,function(t){return{name:t,data:[]}}),o=0;o1?"emphasis":"normal")}var h=i(1),u=i(4),c=i(167),d=i(7),f=i(28),p=i(105),g=h.each,v=u.asc;i(183);var m="\x00_ec_\x00toolbox-dataZoom_";n.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:{zoom:"区域缩放",back:"区域缩放还原"}};var y=n.prototype;y.render=function(t,e,i){l(t,e)},y.onclick=function(t,e,i){x[i].call(this)},y.remove=function(t,e){this._brushController.unmount()},y.dispose=function(t,e){var i=e.getZr();this._brushController.dispose(),this._controllerGroup&&i.remove(this._controllerGroup)};var x={zoom:function(){function t(){this.model.setIconStatus("zoom","normal"),this._isZoomActive=!1}var e=!this._isZoomActive,i=this._brushController;e?(this._isZoomActive=e,this.model.setIconStatus("zoom","emphasis"),i.enableBrush({brushType:"rect",brushStyle:{lineWidth:3,stroke:"#333",fill:"rgba(0,0,0,0.2)"},onRelease:h.bind(t,this)})):i.enableBrush(!1); -},back:function(){this._dispatchAction(p.pop(this.ecModel))}};y._onBrush=function(t,e){if(e&&t.length){var i=t[0];this._brushController.updateCovers([]);var n={},o=this.ecModel;o.eachComponent("grid",function(t,e){var l=t.coordinateSystem,h=r(l,o),u=a(i,h);if(u){var c=s(u,h,0,"x"),d=s(u,h,1,"y");c&&(n[c.dataZoomId]=c),d&&(n[d.dataZoomId]=d)}},this),p.push(o,n),this._dispatchAction(n)}},y._dispatchAction=function(t){var e=[];g(t,function(t){e.push(t)}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:h.clone(e,!0)})},i(22).register("dataZoom",n),i(2).registerPreprocessor(function(t){function e(t,e){if(e){var r=t+"Index",o=e[r];null==o||h.isArray(o)||(o=o===!1?[]:[o]),i(t,function(e,i){if(null==o||-1!==h.indexOf(o,i)){var a={type:"select",$fromToolbox:!0,id:m+t+i};a[r]=i,n.push(a)}})}}function i(e,i){var n=t[e];h.isArray(n)||(n=n?[n]:[]),g(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);h.isArray(n)||(t.dataZoom=n=[n]);var r=t.toolbox;if(r&&(h.isArray(r)&&(r=r[0]),r&&r.feature)){var o=r.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}}),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(1);n.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"},option:{},seriesIndex:{}};var o=n.prototype;o.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return r.each(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var a={line:function(t,e,i,n){return"bar"===t?r.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?r.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0):void 0},tiled:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:""},n.get("option.tiled")||{},!0):void 0}},s=[["line","bar"],["stack","tiled"]];o.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(a[i]){var l={series:[]},h=function(t){var e=t.subType,o=t.id,s=a[i](e,o,t,n);s&&(r.defaults(s,t.option),l.series.push(s));var h=t.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim,d=t.get(c+"AxisIndex"),f=c+"Axis";l[f]=l[f]||[];for(var p=0;d>=p;p++)l[f][d]=l[f][d]||{};l[f][d].boundaryGap="bar"===i}}};r.each(s,function(t){r.indexOf(t,i)>=0&&r.each(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},h),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l})}};var l=i(2);l.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),i(22).register("magicType",n),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(105);n.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:"还原"};var o=n.prototype;o.onclick=function(t,e,i){r.clear(t),e.dispatchAction({type:"restore",from:this.uid})},i(22).register("restore",n),i(2).registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),t.exports=n},function(t,e,i){function n(t){this.model=t}var r=i(11);n.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:"保存为图片",type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:["右键另存为图片"]},n.prototype.unusable=!r.canvasSupported;var o=n.prototype;o.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=i.get("type",!0)||"png";r.download=n+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(r.href=a,"function"==typeof MouseEvent){var s=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(s)}else{var l=i.get("lang"),h='',u=window.open();u.document.write(h)}},i(22).register("saveAsImage",n),t.exports=n},function(t,e,i){i(210),i(211),i(2).registerAction({type:"showTip",event:"showTip",update:"none"},function(){}),i(2).registerAction({type:"hideTip",event:"hideTip",update:"none"},function(){})},function(t,e,i){function n(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return l.map(g,function(t){return t+"transition:"+i}).join(";")}function r(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),d(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function o(t){t=t;var e=[],i=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.getModel("textStyle"),s=t.get("padding");return i&&e.push(n(i)),o&&(p.canvasSupported?e.push("background-Color:"+o):(e.push("background-Color:#"+h.toHex(o)),e.push("filter:alpha(opacity=70)"))),d(["width","color","radius"],function(i){var n="border-"+i,r=f(n),o=t.get(r);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(r(a)),null!=s&&e.push("padding:"+c.normalizeCssArray(s).join("px ")+"px"),e.join(";")+";"}function a(t,e){var i=document.createElement("div"),n=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r.enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(!r.enterable){var i=n.handler;u.normalizeEvent(t,e),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r.enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1},s(i,t)}function s(t,e){function i(t){n(t.target)&&t.preventDefault()}function n(i){for(;i&&i!==e;){if(i===t)return!0;i=i.parentNode}}u.addEventListener(e,"touchstart",i),u.addEventListener(e,"touchmove",i),u.addEventListener(e,"touchend",i)}var l=i(1),h=i(17),u=i(23),c=i(9),d=l.each,f=c.toCamelCase,p=i(11),g=["","-webkit-","-moz-","-o-"],v="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";a.prototype={constructor:a,enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=v+o(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){var e=this.el;e.innerHTML=t,e.style.display=t?"block":"none"},moveTo:function(t,e){var i=this.el.style;i.left=t+"px",i.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this.enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(l.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}},t.exports=a},function(t,e,i){i(2).extendComponentModel({type:"tooltip",defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove",alwaysShowContent:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:!0,animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",lineStyle:{color:"#555",width:1,type:"solid"},crossStyle:{color:"#555",width:1,type:"dashed",textStyle:{}},shadowStyle:{color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff",fontSize:14}}})},function(t,e,i){function n(t,e){if(!t||!e)return!1;var i=g.round;return i(t[0])===i(e[0])&&i(t[1])===i(e[1])}function r(t,e,i,n){return{x1:t,y1:e,x2:i,y2:n}}function o(t,e,i,n){return{x:t,y:e,width:i,height:n}}function a(t,e,i,n,r,o){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:o,clockwise:!0}}function s(t,e,i,n,r){var o=i.clientWidth,a=i.clientHeight,s=20;return t+o+s>n?t-=o+s:t+=s,e+a+s>r?e-=a+s:e+=s,[t,e]}function l(t,e,i){var n=i.clientWidth,r=i.clientHeight,o=5,a=0,s=0,l=e.width,h=e.height;switch(t){case"inside":a=e.x+l/2-n/2,s=e.y+h/2-r/2;break;case"top":a=e.x+l/2-n/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-n/2,s=e.y+h+o;break;case"left":a=e.x-n-o,s=e.y+h/2-r/2;break;case"right":a=e.x+l+o,s=e.y+h/2-r/2}return[a,s]}function h(t,e,i,n,r,o,a){var h=a.getWidth(),u=a.getHeight(),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),"function"==typeof t&&(t=t([e,i],r,n.el,c)),f.isArray(t))e=v(t[0],h),i=v(t[1],u);else if("string"==typeof t&&o){var d=l(t,c,n.el);e=d[0],i=d[1]}else{var d=s(e,i,n.el,h,u);e=d[0],i=d[1]}n.moveTo(e,i)}function u(t){var e=t.coordinateSystem,i=t.get("tooltip.trigger",!0);return!(!e||"cartesian2d"!==e.type&&"polar"!==e.type&&"singleAxis"!==e.type||"item"===i)}var c=i(209),d=i(3),f=i(1),p=i(9),g=i(4),v=g.parsePercent,m=i(11);i(2).extendComponentView({type:"tooltip",_axisPointers:{},init:function(t,e){if(!m.node){var i=new c(e.getDom(),e);this._tooltipContent=i,e.on("showTip",this._manuallyShowTip,this),e.on("hideTip",this._manuallyHideTip,this)}},render:function(t,e,i){if(!m.node){this.group.removeAll(),this._axisPointers={},this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastHover={};var n=this._tooltipContent;n.update(),n.enterable=t.get("enterable"),this._alwaysShowContent=t.get("alwaysShowContent"),this._seriesGroupByAxis=this._prepareAxisTriggerData(t,e);var r=this._crossText;if(r&&this.group.add(r),null!=this._lastX&&null!=this._lastY){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){o._manuallyShowTip({x:o._lastX,y:o._lastY})})}var a=this._api.getZr();a.off("click",this._tryShow),a.off("mousemove",this._mousemove),a.off("mouseout",this._hide),a.off("globalout",this._hide),"click"===t.get("triggerOn")?a.on("click",this._tryShow,this):(a.on("mousemove",this._mousemove,this),a.on("mouseout",this._hide,this),a.on("globalout",this._hide,this))}},_mousemove:function(t){var e=this._tooltipModel.get("showDelay"),i=this;clearTimeout(this._showTimeout),e>0?this._showTimeout=setTimeout(function(){i._tryShow(t)},e):this._tryShow(t)},_manuallyShowTip:function(t){if(t.from!==this.uid){var e=this._ecModel,i=t.seriesIndex,n=t.dataIndex,r=e.getSeriesByIndex(i),o=this._api;if(null==t.x||null==t.y){if(r||e.eachSeries(function(t){u(t)&&!r&&(r=t)}),r){var a=r.getData();null==n&&(n=a.indexOfName(t.name));var s,l,h=a.getItemGraphicEl(n),c=r.coordinateSystem;if(c&&c.dataToPoint){var d=c.dataToPoint(a.getValues(f.map(c.dimensions,function(t){return r.coordDimToDataDim(t)[0]}),n,!0));s=d&&d[0],l=d&&d[1]}else if(h){var p=h.getBoundingRect().clone();p.applyTransform(h.transform),s=p.x+p.width/2,l=p.y+p.height/2}null!=s&&null!=l&&this._tryShow({offsetX:s,offsetY:l,target:h,event:{}})}}else{var h=o.getZr().handler.findHover(t.x,t.y);this._tryShow({offsetX:t.x,offsetY:t.y,target:h,event:{}})}}},_manuallyHideTip:function(t){t.from!==this.uid&&this._hide()},_prepareAxisTriggerData:function(t,e){var i={};return e.eachSeries(function(t){if(u(t)){var e,n,r=t.coordinateSystem;"cartesian2d"===r.type?(e=r.getBaseAxis(),n=e.dim+e.index):"singleAxis"===r.type?(e=r.getAxis(),n=e.dim+e.type):(e=r.getBaseAxis(),n=e.dim+r.name),i[n]=i[n]||{coordSys:[],series:[]},i[n].coordSys.push(r),i[n].series.push(t)}},this),i},_tryShow:function(t){var e=t.target,i=this._tooltipModel,n=i.get("trigger"),r=this._ecModel,o=this._api;if(i)if(this._lastX=t.offsetX,this._lastY=t.offsetY,e&&null!=e.dataIndex){var a=e.dataModel||r.getSeriesByIndex(e.seriesIndex),s=e.dataIndex,l=a.getData().getItemModel(s);"axis"===(l.get("tooltip.trigger")||n)?this._showAxisTooltip(i,r,t):(this._ticket="",this._hideAxisPointer(),this._resetLastHover(),this._showItemTooltipContent(a,s,e.dataType,t)),o.dispatchAction({type:"showTip",from:this.uid,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex})}else"item"===n?this._hide():this._showAxisTooltip(i,r,t),"cross"===i.get("axisPointer.type")&&o.dispatchAction({type:"showTip",from:this.uid,x:t.offsetX,y:t.offsetY})},_showAxisTooltip:function(t,e,i){var r=t.getModel("axisPointer"),o=r.get("type");if("cross"===o){var a=i.target;if(a&&null!=a.dataIndex){var s=e.getSeriesByIndex(a.seriesIndex),l=a.dataIndex;this._showItemTooltipContent(s,l,a.dataType,i)}}this._showAxisPointer();var h=!0;f.each(this._seriesGroupByAxis,function(t){var e=t.coordSys,a=e[0],s=[i.offsetX,i.offsetY];if(!a.containPoint(s))return void this._hideAxisPointer(a.name);h=!1;var l=a.dimensions,u=a.pointToData(s,!0);s=a.dataToPoint(u);var c=a.getBaseAxis(),d=r.get("axis");"auto"===d&&(d=c.dim);var p=!1,g=this._lastHover;if("cross"===o)n(g.data,u)&&(p=!0),g.data=u;else{var v=f.indexOf(l,d);g.data===u[v]&&(p=!0),g.data=u[v]}"cartesian2d"!==a.type||p?"polar"!==a.type||p?"singleAxis"!==a.type||p||this._showSinglePointer(r,a,d,s):this._showPolarPointer(r,a,d,s):this._showCartesianPointer(r,a,d,s),"cross"!==o&&this._dispatchAndShowSeriesTooltipContent(a,t.series,s,u,p)},this),this._tooltipModel.get("show")||this._hideAxisPointer(),h&&this._hide()},_showCartesianPointer:function(t,e,i,n){function a(i,n,o){var a="x"===i?r(n[0],o[0],n[0],o[1]):r(o[0],n[1],o[1],n[1]),s=l._getPointerElement(e,t,i,a);u?d.updateProps(s,{shape:a},t):s.attr({shape:a})}function s(i,n,r){var a=e.getAxis(i),s=a.getBandWidth(),h=r[1]-r[0],c="x"===i?o(n[0]-s/2,r[0],s,h):o(r[0],n[1]-s/2,h,s),f=l._getPointerElement(e,t,i,c);u?d.updateProps(f,{shape:c},t):f.attr({shape:c})}var l=this,h=t.get("type"),u="cross"!==h&&"category"===e.getBaseAxis().type;if("cross"===h)a("x",n,e.getAxis("y").getGlobalExtent()),a("y",n,e.getAxis("x").getGlobalExtent()),this._updateCrossText(e,n,t);else{var c=e.getAxis("x"===i?"y":"x"),f=c.getGlobalExtent();"cartesian2d"===e.type&&("line"===h?a:s)(i,n,f)}},_showSinglePointer:function(t,e,i,n){function o(i,n,o){var s=e.getAxis(),h=s.orient,u="horizontal"===h?r(n[0],o[0],n[0],o[1]):r(o[0],n[1],o[1],n[1]),c=a._getPointerElement(e,t,i,u);l?d.updateProps(c,{shape:u},t):c.attr({shape:u})}var a=this,s=t.get("type"),l="cross"!==s&&"category"===e.getBaseAxis().type,h=e.getRect(),u=[h.y,h.y+h.height];o(i,n,u)},_showPolarPointer:function(t,e,i,n){function o(i,n,o){var a,s=e.pointToCoord(n);if("angle"===i){var h=e.coordToPoint([o[0],s[1]]),u=e.coordToPoint([o[1],s[1]]);a=r(h[0],h[1],u[0],u[1])}else a={cx:e.cx,cy:e.cy,r:s[0]};var c=l._getPointerElement(e,t,i,a);f?d.updateProps(c,{shape:a},t):c.attr({shape:a})}function s(i,n,r){var o,s=e.getAxis(i),h=s.getBandWidth(),u=e.pointToCoord(n),c=Math.PI/180;o="angle"===i?a(e.cx,e.cy,r[0],r[1],(-u[1]-h/2)*c,(-u[1]+h/2)*c):a(e.cx,e.cy,u[0]-h/2,u[0]+h/2,0,2*Math.PI);var p=l._getPointerElement(e,t,i,o);f?d.updateProps(p,{shape:o},t):p.attr({shape:o})}var l=this,h=t.get("type"),u=e.getAngleAxis(),c=e.getRadiusAxis(),f="cross"!==h&&"category"===e.getBaseAxis().type;if("cross"===h)o("angle",n,c.getExtent()),o("radius",n,u.getExtent()),this._updateCrossText(e,n,t);else{var p=e.getAxis("radius"===i?"angle":"radius"),g=p.getExtent();("line"===h?o:s)(i,n,g)}},_updateCrossText:function(t,e,i){var n=i.getModel("crossStyle"),r=n.getModel("textStyle"),o=this._tooltipModel,a=this._crossText;a||(a=this._crossText=new d.Text({style:{textAlign:"left",textVerticalAlign:"bottom"}}),this.group.add(a));var s=t.pointToData(e),l=t.dimensions;s=f.map(s,function(e,i){var n=t.getAxis(l[i]);return e="category"===n.type||"time"===n.type?n.scale.getLabel(e):p.addCommas(e.toFixed(n.getPixelPrecision()))}),a.setStyle({fill:r.getTextColor()||n.get("color"),textFont:r.getFont(),text:s.join(", "),x:e[0]+5,y:e[1]-5}),a.z=o.get("z"),a.zlevel=o.get("zlevel")},_getPointerElement:function(t,e,i,n){var r=this._tooltipModel,o=r.get("z"),a=r.get("zlevel"),s=this._axisPointers,l=t.name;if(s[l]=s[l]||{},s[l][i])return s[l][i];var h=e.get("type"),u=e.getModel(h+"Style"),c="shadow"===h,f=u[c?"getAreaStyle":"getLineStyle"](),p="polar"===t.type?c?"Sector":"radius"===i?"Circle":"Line":c?"Rect":"Line";c?f.stroke=null:f.fill=null;var g=s[l][i]=new d[p]({style:f,z:o,zlevel:a,silent:!0,shape:n});return this.group.add(g),g},_dispatchAndShowSeriesTooltipContent:function(t,e,i,n,r){var o=this._tooltipModel,a=this._tooltipContent,s=t.getBaseAxis(),l=f.map(e,function(t){return{seriesIndex:t.seriesIndex,dataIndex:t.getAxisTooltipDataIndex?t.getAxisTooltipDataIndex(t.coordDimToDataDim(s.dim),n,s):t.getData().indexOfNearest(t.coordDimToDataDim(s.dim)[0],n["x"===s.dim||"radius"===s.dim?0:1])}}),u=this._lastHover,c=this._api;if(u.payloadBatch&&!r&&c.dispatchAction({type:"downplay",batch:u.payloadBatch}),r||(c.dispatchAction({type:"highlight",batch:l}),u.payloadBatch=l),c.dispatchAction({type:"showTip",dataIndex:l[0].dataIndex,seriesIndex:l[0].seriesIndex,from:this.uid}),s&&o.get("showContent")&&o.get("show")){var d,g=o.get("formatter"),v=o.get("position"),m=f.map(e,function(t,e){return t.getDataParams(l[e].dataIndex)});a.show(o);var y=l[0].dataIndex;if(!r){if(this._ticket="",g){if("string"==typeof g)d=p.formatTpl(g,m);else if("function"==typeof g){var x=this,_="axis_"+t.name+"_"+y,b=function(t,e){t===x._ticket&&(a.setContent(e),h(v,i[0],i[1],a,m,null,c))};x._ticket=_,d=g(m,_,b)}}else{var w=e[0].getData().getName(y);d=(w?w+"
":"")+f.map(e,function(t,e){return t.formatTooltip(l[e].dataIndex,!0)}).join("
")}a.setContent(d)}h(v,i[0],i[1],a,m,null,c)}},_showItemTooltipContent:function(t,e,i,n){var r=this._api,o=t.getData(i),a=o.getItemModel(e),s=this._tooltipModel,l=this._tooltipContent,u=a.getModel("tooltip");if(u.parentModel?u.parentModel.parentModel=s:u.parentModel=this._tooltipModel,u.get("showContent")&&u.get("show")){var c,d=u.get("formatter"),f=u.get("position"),g=t.getDataParams(e,i);if(d){if("string"==typeof d)c=p.formatTpl(d,g);else if("function"==typeof d){var v=this,m="item_"+t.name+"_"+e,y=function(t,e){t===v._ticket&&(l.setContent(e),h(f,n.offsetX,n.offsetY,l,g,n.target,r))};v._ticket=m,c=d(g,m,y)}}else c=t.formatTooltip(e,!1,i);l.show(u),l.setContent(c),h(f,n.offsetX,n.offsetY,l,g,n.target,r)}},_showAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.show()})}else this.group.eachChild(function(t){t.show()}),this.group.show()},_resetLastHover:function(){var t=this._lastHover;t.payloadBatch&&this._api.dispatchAction({type:"downplay",batch:t.payloadBatch}),this._lastHover={}},_hideAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.hide()})}else this.group.children().length&&this.group.hide()},_hide:function(){clearTimeout(this._showTimeout),this._hideAxisPointer(),this._resetLastHover(),this._alwaysShowContent||this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._api.dispatchAction({type:"hideTip",from:this.uid}),this._lastX=this._lastY=null},dispose:function(t,e){if(!m.node){var i=e.getZr();this._tooltipContent.hide(),i.off("click",this._tryShow),i.off("mousemove",this._mousemove),i.off("mouseout",this._hide),i.off("globalout",this._hide),e.off("showTip",this._manuallyShowTip),e.off("hideTip",this._manuallyHideTip)}}})},,function(t,e){function i(){c&&h&&(c=!1,h.length?u=h.concat(u):d=-1,u.length&&n())}function n(){if(!c){var t=a(i);c=!0;for(var e=u.length;e;){for(h=u,u=[];++d1)for(var i=1;i=0?parseFloat(t)/100*e:parseFloat(t):t},E=function(t,e,i){var n=a.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=L(n[0],n[1],n[2]),t.opacity=i*n[3])},R=function(t){var e=a.parse(t);return[L(e[0],e[1],e[2]),e[3]]},N=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof f){var r,o=0,a=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){r="gradient";var d=i.transform,p=[n.x*u,n.y*c],g=[n.x2*u,n.y2*c];d&&(b(p,p,d),b(g,g,d));var v=g[0]-p[0],m=g[1]-p[1];o=180*Math.atan2(v,m)/Math.PI,0>o&&(o+=360),1e-6>o&&(o=0)}else{r="gradientradial";var p=[n.x*u,n.y*c],d=i.transform,y=i.scale,x=u,w=c;a=[(p[0]-h.x)/x,(p[1]-h.y)/w],d&&b(p,p,d),x/=y[0]*S,w/=y[1]*S;var M=_(x,w);s=0/M,l=2*n.r/M-s}var A=n.colorStops.slice();A.sort(function(t,e){return t.offset-e.offset});for(var T=A.length,I=[],C=[],k=0;T>k;k++){var L=A[k],D=R(L.color);C.push(L.offset*l+s+" "+D[0]),0!==k&&k!==T-1||I.push(D)}if(T>=2){var P=I[0][0],O=I[1][0],z=I[0][1]*e.opacity,N=I[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=P,t.color2=O,t.colors=C.join(","),t.opacity=N,t.opacity2=z}"radial"===r&&(t.focusposition=a.join(","))}else E(t,n,e.opacity)},B=function(t,e){null!=e.lineJoin&&(t.joinstyle=e.lineJoin),null!=e.miterLimit&&(t.miterlimit=e.miterLimit*S),null!=e.lineCap&&(t.endcap=e.lineCap),null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof f||E(t,e.stroke,e.opacity)},V=function(t,e,i,n){var r="fill"==e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof f&&P(t,o),o||(o=p.createNode(e)),r?N(o,i,n):B(o,i),D(t,o)):(t[r?"filled":"stroked"]="false",P(t,o))},F=[[],[],[]],H=function(t,e){var i,n,r,a,s,l,h=o.M,u=o.C,c=o.L,d=o.A,f=o.Q,p=[];for(a=0;a.01?H&&(G+=270/S):Math.abs(W-E)<1e-10?H&&z>G||!H&&G>z?T-=270/S:T+=270/S:H&&E>W||!H&&W>E?M+=270/S:M-=270/S),p.push(Z,g(((z-R)*D+k)*S-A),w,g(((E-N)*P+L)*S-A),w,g(((z+R)*D+k)*S-A),w,g(((E+N)*P+L)*S-A),w,g((G*D+k)*S-A),w,g((W*P+L)*S-A),w,g((M*D+k)*S-A),w,g((T*P+L)*S-A)),s=M,l=T;break;case o.R:var q=F[0],j=F[1];q[0]=t[a++],q[1]=t[a++],j[0]=q[0]+t[a++],j[1]=q[1]+t[a++],e&&(b(q,q,e),b(j,j,e)),q[0]=g(q[0]*S-A),j[0]=g(j[0]*S-A),q[1]=g(q[1]*S-A),j[1]=g(j[1]*S-A),p.push(" m ",q[0],w,q[1]," l ",j[0],w,q[1]," l ",j[0],w,j[1]," l ",q[0],w,j[1]);break;case o.Z:p.push(" x ")}if(i>0){p.push(n);for(var U=0;i>U;U++){var X=F[U];e&&b(X,X,e),p.push(g(X[0]*S-A),w,g(X[1]*S-A),i-1>U?w:"")}}}return p.join("")};d.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=p.createNode("shape"),C(i),this._vmlEl=i),V(i,"fill",e,this),V(i,"stroke",e,this);var n=this.transform,r=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(r&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];a*=v(m(s))}o.weight=a+"px"}var l=this.path;this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=H(l.data,this.transform),i.style.zIndex=O(this.zlevel,this.z,this.z2),D(t,i),e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},d.prototype.onRemove=function(t){P(t,this._vmlEl),this.removeRectText(t)},d.prototype.onAdd=function(t){D(t,this._vmlEl),this.appendRectText(t)};var G=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};u.prototype.brushVML=function(t){var e,i,n=this.style,r=n.image;if(G(r)){var o=r.src;if(o===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var a=r.runtimeStyle,s=a.width,l=a.height;a.width="auto",a.height="auto",e=r.width,i=r.height,a.width=s,a.height=l,this._imageSrc=o,this._imageWidth=e,this._imageHeight=i}r=o}else r===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(r){var h=n.x||0,u=n.y||0,c=n.width,d=n.height,f=n.sWidth,m=n.sHeight,y=n.sx||0,x=n.sy||0,S=f&&m,A=this._vmlEl;A||(A=p.doc.createElement("div"),C(A),this._vmlEl=A);var T,I=A.style,k=!1,L=1,P=1;if(this.transform&&(T=this.transform,L=v(T[0]*T[0]+T[1]*T[1]),P=v(T[2]*T[2]+T[3]*T[3]),k=T[1]||T[2]),k){var z=[h,u],E=[h+c,u],R=[h,u+d],N=[h+c,u+d];b(z,z,T),b(E,E,T),b(R,R,T),b(N,N,T);var B=_(z[0],E[0],R[0],N[0]),V=_(z[1],E[1],R[1],N[1]),F=[];F.push("M11=",T[0]/L,w,"M12=",T[2]/P,w,"M21=",T[1]/L,w,"M22=",T[3]/P,w,"Dx=",g(h*L+T[4]),w,"Dy=",g(u*P+T[5])),I.padding="0 "+g(B)+"px "+g(V)+"px 0",I.filter=M+".Matrix("+F.join("")+", SizingMethod=clip)"}else T&&(h=h*L+T[4],u=u*P+T[5]),I.filter="",I.left=g(h)+"px",I.top=g(u)+"px";var H=this._imageEl,W=this._cropEl;H||(H=p.doc.createElement("div"),this._imageEl=H);var Z=H.style;if(S){if(e&&i)Z.width=g(L*e*c/f)+"px",Z.height=g(P*i*d/m)+"px";else{var q=new Image,j=this;q.onload=function(){q.onload=null,e=q.width,i=q.height,Z.width=g(L*e*c/f)+"px",Z.height=g(P*i*d/m)+"px",j._imageWidth=e,j._imageHeight=i,j._imageSrc=r},q.src=r}W||(W=p.doc.createElement("div"),W.style.overflow="hidden",this._cropEl=W);var U=W.style;U.width=g((c+y*c/f)*L),U.height=g((d+x*d/m)*P),U.filter=M+".Matrix(Dx="+-y*c/f*L+",Dy="+-x*d/m*P+")",W.parentNode||A.appendChild(W),H.parentNode!=W&&W.appendChild(H)}else Z.width=g(L*c)+"px",Z.height=g(P*d)+"px",A.appendChild(H),W&&W.parentNode&&(A.removeChild(W),this._cropEl=null);var X="",Y=n.opacity;1>Y&&(X+=".Alpha(opacity="+g(100*Y)+") "),X+=M+".AlphaImageLoader(src="+r+", SizingMethod=scale)",Z.filter=X,A.style.zIndex=O(this.zlevel,this.z,this.z2),D(t,A),n.text&&this.drawRectText(t,this.getBoundingRect())}},u.prototype.onRemove=function(t){P(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},u.prototype.onAdd=function(t){D(t,this._vmlEl),this.appendRectText(t)};var W,Z="normal",q={},j=0,U=100,X=document.createElement("div"),Y=function(t){var e=q[t];if(!e){j>U&&(j=0,q={});var i,n=X.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(r){}e={style:n.fontStyle||Z,variant:n.fontVariant||Z,weight:n.fontWeight||Z,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},q[t]=e,j++}return e};s.measureText=function(t,e){var i=p.doc;W||(W=i.createElement("div"),W.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",p.doc.body.appendChild(W));try{W.style.font=e}catch(n){}return W.innerHTML="",W.appendChild(i.createTextNode(t)),{width:W.offsetWidth}};for(var $=new r,Q=function(t,e,i,n){var r=this.style,o=r.text;if(o){var a,l,h=r.textAlign,u=Y(r.textFont),c=u.style+" "+u.variant+" "+u.weight+" "+u.size+'px "'+u.family+'"',d=r.textBaseline,f=r.textVerticalAlign;i=i||s.getBoundingRect(o,c,h,d);var v=this.transform;if(v&&!n&&($.copy(e),$.applyTransform(v),e=$),n)a=e.x,l=e.y;else{var m=r.textPosition,y=r.textDistance;if(m instanceof Array)a=e.x+z(m[0],e.width),l=e.y+z(m[1],e.height),h=h||"left",d=d||"top";else{var x=s.adjustTextPositionOnRect(m,e,i,y);a=x.x,l=x.y,h=h||x.textAlign,d=d||x.textBaseline}}if(f){switch(f){case"middle":l-=i.height/2;break;case"bottom":l-=i.height}d="top"}var _=u.size;switch(d){case"hanging":case"top":l+=_/1.75;break;case"middle":break;default:l-=_/2.25}switch(h){case"left":break;case"center":a-=i.width/2; -break;case"right":a-=i.width}var M,S,A,T=p.createNode,I=this._textVmlEl;I?(A=I.firstChild,M=A.nextSibling,S=M.nextSibling):(I=T("line"),M=T("path"),S=T("textpath"),A=T("skew"),S.style["v-text-align"]="left",C(I),M.textpathok=!0,S.on=!0,I.from="0 0",I.to="1000 0.05",D(I,A),D(I,M),D(I,S),this._textVmlEl=I);var L=[a,l],P=I.style;v&&n?(b(L,L,v),A.on=!0,A.matrix=v[0].toFixed(3)+w+v[2].toFixed(3)+w+v[1].toFixed(3)+w+v[3].toFixed(3)+",0,0",A.offset=(g(L[0])||0)+","+(g(L[1])||0),A.origin="0 0",P.left="0px",P.top="0px"):(A.on=!1,P.left=g(a)+"px",P.top=g(l)+"px"),S.string=k(o);try{S.style.font=c}catch(E){}V(I,"fill",{fill:n?r.fill:r.textFill,opacity:r.opacity},this),V(I,"stroke",{stroke:n?r.stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash},this),I.style.zIndex=O(this.zlevel,this.z,this.z2),D(t,I)}},K=function(t){P(t,this._textVmlEl),this._textVmlEl=null},J=function(t){D(t,this._textVmlEl)},tt=[l,h,u,d,c],et=0;et0?1.1:1/1.1;l.call(this,t,e,t.offsetX,t.offsetY)}function s(t){if(!f.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;l.call(this,t,e,t.pinchX,t.pinchY)}}function l(t,e,i,n){var r=this.rectProvider&&this.rectProvider();if(r&&r.contain(i,n)){d.stop(t.event);var a=this.target,o=this.zoomLimit;if(a){var s=a.position,l=a.scale,h=this.zoom=this.zoom||1;if(h*=e,o){var u=o.min||0,c=o.max||1/0;h=Math.max(Math.min(c,h),u)}var f=h/this.zoom;this.zoom=h,s[0]-=(i-s[0])*(f-1),s[1]-=(n-s[1])*(f-1),l[0]*=f,l[1]*=f,a.dirty()}this.trigger("zoom",e,i,n)}}function h(t,e,i){this.target=e,this.rectProvider=i,this.zoomLimit,this.zoom,this._zr=t;var l=c.bind,h=l(n,this),d=l(r,this),f=l(a,this),p=l(o,this),g=l(s,this);u.call(this),this.enable=function(e){this.disable(),null==e&&(e=!0),e!==!0&&"move"!==e&&"pan"!==e||(t.on("mousedown",h),t.on("mousemove",d),t.on("mouseup",f)),e!==!0&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",p),t.on("pinch",g))},this.disable=function(){t.off("mousedown",h),t.off("mousemove",d),t.off("mouseup",f),t.off("mousewheel",p),t.off("pinch",g)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}var u=i(22),c=i(1),d=i(24),f=i(113);c.mixin(h,u),t.exports=h},function(t,e){t.exports=function(t,e,i,n,r){function a(t,e,i){var n=e.length?e.slice():[e,e];return e[0]>e[1]&&n.reverse(),0>t&&n[0]+t0&&n[1]+t>i[1]&&(t=i[1]-n[1]),t}return t?("rigid"===n?(t=a(t,e,i),e[0]+=t,e[1]+=t):(t=a(t,e[r],i),e[r]+=t,"push"===n&&e[0]>e[1]&&(e[1-r]=e[r])),e):e}},function(t,e,i){var n=i(1),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncateLength:null,nameTruncateEllipsis:"...",nameTextStyle:{},nameGap:15,silent:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#333",width:1,type:"solid"}},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},a=n.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{interval:"auto"},axisLabel:{interval:"auto"}},r),o=n.merge({boundaryGap:[0,0],splitNumber:5},r),s=n.defaults({scale:!0,min:"dataMin",max:"dataMax"},o),l=n.defaults({},o);l.scale=!0,t.exports={categoryAxis:a,valueAxis:o,timeAxis:s,logAxis:l}},function(t,e){var i={},n="\x00__throttleOriginMethod",r="\x00__throttleRate",a="\x00__throttleType";i.throttle=function(t,e,i){function n(){h=(new Date).getTime(),u=null,t.apply(o,s||[])}var r,a,o,s,l=0,h=0,u=null;e=e||0;var c=function(){r=(new Date).getTime(),o=this,s=arguments,a=r-(i?l:h)-e,clearTimeout(u),i?u=setTimeout(n,e):a>=0?n():u=setTimeout(n,-a),l=r};return c.clear=function(){u&&(clearTimeout(u),u=null)},c},i.createOrUpdate=function(t,e,o,s){var l=t[e];if(l){var h=l[n]||l,u=l[a],c=l[r];if(c!==o||u!==s){if(null==o||!s)return t[e]=h;l=t[e]=i.throttle(h,o,"debounce"===s),l[n]=h,l[a]=s,l[r]=o}return l}},i.clear=function(t,e){var i=t[e];i&&i[n]&&(t[e]=i[n])},t.exports=i},function(t,e){t.exports={containStroke:function(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0,h=t;if(o>e+s&&o>n+s||e-s>o&&n-s>o||a>t+s&&a>i+s||t-s>a&&i-s>a)return!1;if(t===i)return Math.abs(a-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*a-o+h,c=u*u/(l*l+1);return s/2*s/2>=c}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,a,o,s,l,h){if(0===s)return!1;var u=s;if(h>e+u&&h>r+u&&h>o+u||e-u>h&&r-u>h&&o-u>h||l>t+u&&l>i+u&&l>a+u||t-u>l&&i-u>l&&a-u>l)return!1;var c=n.quadraticProjectPoint(t,e,i,r,a,o,l,h,null);return u/2>=c}}},function(t,e){t.exports=function(t,e,i,n,r,a){if(a>e&&a>n||e>a&&n>a)return 0;if(n===e)return 0;var o=e>n?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(o=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?o:0}},function(t,e,i){"use strict";var n=i(1),r=i(29),a=function(t,e,i,n,a,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,r.call(this,a)};a.prototype={constructor:a},n.inherits(a,r),t.exports=a},function(t,e,i){"use strict";function n(t){return t>s||-s>t}var r=i(19),a=i(5),o=r.identity,s=5e-5,l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},h=l.prototype;h.transform=null,h.needLocalTransform=function(){return n(this.rotation)||n(this.position[0])||n(this.position[1])||n(this.scale[0]-1)||n(this.scale[1]-1)},h.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||r.create(),i?this.getLocalTransform(n):o(n),e&&(i?r.mul(n,t.transform,n):r.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,n)):void(n&&o(n))},h.getLocalTransform=function(t){t=t||[],o(t);var e=this.origin,i=this.scale,n=this.rotation,a=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),n&&r.rotate(t,t,n),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=a[0],t[5]+=a[1],t},h.setTransform=function(t){var e=this.transform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},h.restoreTransform=function(t){var e=this.invTransform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])};var u=[];h.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(r.mul(u,t.invTransform,e),e=u);var i=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],o=this.position,s=this.scale;n(i-1)&&(i=Math.sqrt(i)),n(a-1)&&(a=Math.sqrt(a)),e[0]<0&&(i=-i),e[3]<0&&(a=-a),o[0]=e[4],o[1]=e[5],s[0]=i,s[1]=a,this.rotation=Math.atan2(-e[1]/a,e[0]/i)}},h.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},h.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&a.applyTransform(i,i,n),i},h.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&a.applyTransform(i,i,n),i},t.exports=l},function(t,e,i){"use strict";function n(t){r.each(a,function(e){this[e]=r.bind(t[e],t)},this)}var r=i(1),a=["getDom","getZr","getWidth","getHeight","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption"];t.exports=n},function(t,e,i){var n=i(1);i(54),i(90),i(91);var r=i(120),a=i(2);a.registerLayout(n.curry(r,"bar")),a.registerVisual(function(t){t.eachSeriesByType("bar",function(t){var e=t.getData();e.setVisual("legendSymbol","roundRect")})}),i(36)},function(t,e,i){"use strict";var n=i(15),r=i(35);t.exports=n.extend({type:"series.bar",dependencies:["grid","polar"],getInitialData:function(t,e){return r(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),r=n.getLayout("offset"),a=n.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return i[o]+=r+a/2,i}return[NaN,NaN]},brushSelector:"rect",defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,itemStyle:{normal:{borderColor:"#fff",borderWidth:0},emphasis:{}}}})},function(t,e,i){"use strict";function n(t,e){var i=t.width>0?1:-1,n=t.height>0?1:-1;e=Math.min(e,Math.abs(t.width),Math.abs(t.height)),t.x+=i*e/2,t.y+=n*e/2,t.width-=i*e,t.height-=n*e}var r=i(1),a=i(3);r.extend(i(9).prototype,i(92)),t.exports=i(2).extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"===n&&this._renderOnCartesian(t,e,i),this.group},_renderOnCartesian:function(t,e,i){function o(e,i){var o=l.getItemLayout(e),s=l.getItemModel(e).get(p)||0;n(o,s);var h=new a.Rect({shape:r.extend({},o)});if(f){var u=h.shape,c=d?"height":"width",g={};u[c]=0,g[c]=o[c],a[i?"updateProps":"initProps"](h,{shape:g},t,e)}return h}var s=this.group,l=t.getData(),h=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),d=c.isHorizontal(),f=t.get("animation"),p=["itemStyle","normal","barBorderWidth"];l.diff(h).add(function(t){if(l.hasValue(t)){var e=o(t);l.setItemGraphicEl(t,e),s.add(e)}}).update(function(e,i){var r=h.getItemGraphicEl(i);if(!l.hasValue(e))return void s.remove(r);r||(r=o(e,!0));var u=l.getItemLayout(e),c=l.getItemModel(e).get(p)||0;n(u,c),a.updateProps(r,{shape:u},t,e),l.setItemGraphicEl(e,r),s.add(r)}).remove(function(e){var i=h.getItemGraphicEl(e);i&&(i.style.text="",a.updateProps(i,{shape:{width:0}},t,e,function(){s.remove(i)}))}).execute(),this._updateStyle(t,l,d),this._data=l},_updateStyle:function(t,e,i){function n(t,e,i,n,r){a.setText(t,e,i),t.text=n,"outside"===t.textPosition&&(t.textPosition=r)}e.eachItemGraphicEl(function(o,s){var l=e.getItemModel(s),h=e.getItemVisual(s,"color"),u=e.getItemVisual(s,"opacity"),c=e.getItemLayout(s),d=l.getModel("itemStyle.normal"),f=l.getModel("itemStyle.emphasis").getBarItemStyle();o.setShape("r",d.get("barBorderRadius")||0),o.useStyle(r.defaults({fill:h,opacity:u},d.getBarItemStyle()));var p=i?c.height>0?"bottom":"top":c.width>0?"left":"right",g=l.getModel("label.normal"),v=l.getModel("label.emphasis"),m=o.style;g.get("show")?n(m,g,h,r.retrieve(t.getFormattedLabel(s,"normal"),t.getRawValue(s)),p):m.text="",v.get("show")?n(f,v,h,r.retrieve(t.getFormattedLabel(s,"emphasis"),t.getRawValue(s)),p):f.text="",a.setHoverStyle(o,f)})},remove:function(t,e){var i=this.group;t.get("animation")?this._data&&this._data.eachItemGraphicEl(function(e){e.style.text="",a.updateProps(e,{shape:{width:0}},t,e.dataIndex,function(){i.remove(e)})}):i.removeAll()}})},function(t,e,i){var n=i(31)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getBarItemStyle:function(t){var e=n.call(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}}},function(t,e,i){function n(t){return"_"+t+"Type"}function r(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){f.isArray(a)||(a=[a,a]);var o=h.createSymbol(r,-a[0]/2,-a[1]/2,a[0],a[1],n);return o.name=t,o}}function a(t){var e=new c({name:"line"});return o(e.shape,t),e}function o(t,e){var i=e[0],n=e[1],r=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,r&&(t.cpx1=r[0],t.cpy1=r[1])}function s(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,a=this.parent;a;)a.scale&&(r/=a.scale[0]),a=a.parent;var o=t.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),h=o.pointAt(s),c=u.sub([],h,l);if(u.normalize(c,c),e){e.attr("position",l);var d=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",h);var d=o.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",h);var f,p,g,v=5*r;if("end"===n.__position)f=[c[0]*v+h[0],c[1]*v+h[1]],p=c[0]>.8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,d=o.tangentAt(m),y=[d[1],-d[0]],x=o.pointAt(m);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]),f=[x[0]+y[0]*v,x[1]+y[1]*v],p="center",g="bottom";var _=-Math.atan2(d[1],d[0]);h[0].8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||p},position:f,scale:[r,r]})}}}}function l(t,e,i){d.Group.call(this),this._createLine(t,e,i)}var h=i(26),u=i(5),c=i(172),d=i(3),f=i(1),p=i(4),g=["fromSymbol","toSymbol"],v=l.prototype;v.beforeUpdate=s,v._createLine=function(t,e,i){var o=t.hostModel,s=t.getItemLayout(e),l=a(s);l.shape.percent=0,d.initProps(l,{shape:{percent:1}},o,e),this.add(l);var h=new d.Text({name:"label"});this.add(h),f.each(g,function(i){var a=r(i,t,e);this.add(a),this[n(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},v.updateData=function(t,e,i){var a=t.hostModel,s=this.childOfName("line"),l=t.getItemLayout(e),h={shape:{}};o(h.shape,l),d.updateProps(s,h,a,e),f.each(g,function(i){var a=t.getItemVisual(e,i),o=n(i);if(this[o]!==a){this.remove(this.childOfName(i));var s=r(i,t,e);this.add(s)}this[o]=a},this),this._updateCommonStl(t,e,i)},v._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),a=i&&i.lineStyle,o=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle.normal").getLineStyle(),o=h.getModel("lineStyle.emphasis").getLineStyle(),s=h.getModel("label.normal"),l=h.getModel("label.emphasis")}var u=t.getItemVisual(e,"color");isNaN(c)&&(c=t.getName(e)),r.useStyle(f.defaults({strokeNoScale:!0,fill:"none",stroke:u},a)),r.hoverStyle=o;var c,g,v=s.getShallow("show"),m=l.getShallow("show"),y=this.childOfName("label");if((v||m)&&(c=p.round(n.getRawValue(e)),g=u||"#000"),v){var x=s.getModel("textStyle");y.setStyle({text:f.retrieve(n.getFormattedLabel(e,"normal",t.dataType),c),textFont:x.getFont(),fill:x.getTextColor()||g}),y.__textAlign=x.get("align"),y.__verticalAlign=x.get("baseline"),y.__position=s.get("position")}else y.setStyle("text","");if(m){var _=l.getModel("textStyle");y.hoverStyle={text:f.retrieve(n.getFormattedLabel(e,"emphasis",t.dataType),c),textFont:_.getFont(),fill:_.getTextColor()||g}}else y.hoverStyle={text:""};y.ignore=!v&&!m,d.setHoverStyle(this)},v.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},v.setLinePoints=function(t){var e=this.childOfName("line");o(e.shape,t),e.dirty()},f.inherits(l,d.Group),t.exports=l},function(t,e,i){function n(t){return isNaN(t[0])||isNaN(t[1])}function r(t){return!n(t[0])&&!n(t[1])}function a(t){this._ctor=t||s,this.group=new o.Group}var o=i(3),s=i(93),l=a.prototype;l.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,a=t.hostModel,o={lineStyle:a.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:a.getModel("lineStyle.emphasis").getLineStyle(),labelModel:a.getModel("label.normal"),hoverLabelModel:a.getModel("label.emphasis")};t.diff(e).add(function(e){if(r(t.getItemLayout(e))){var a=new n(t,e,o);t.setItemGraphicEl(e,a),i.add(a)}}).update(function(a,s){var l=e.getItemGraphicEl(s);return r(t.getItemLayout(a))?(l?l.updateData(t,a,o):l=new n(t,a,o),t.setItemGraphicEl(a,l),void i.add(l)):void i.remove(l)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},l.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},l.remove=function(){this.group.removeAll()},t.exports=a},function(t,e,i){var n=i(1),r=i(2),a=r.PRIORITY;i(96),i(97),r.registerVisual(n.curry(i(46),"line","circle","line")),r.registerLayout(n.curry(i(55),"line")),r.registerProcessor(a.PROCESSOR.STATISTIC,n.curry(i(132),"line")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return n(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},function(t,e,i){"use strict";function n(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function o(t){return t>=0?1:-1}function s(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=i.onZero?0:n.scale.getExtent()[0],a=n.dim,s="x"===a||"radius"===a?1:0;return e.mapArray([a],function(n,l){for(var h,u=e.stackedOn;u&&o(u.get(a,l))===o(n);){h=u;break}var c=[];return c[s]=e.get(i.dim,l),c[1-s]=h?h.get(a,l,!0):r,t.dataToPoint(c)},!0)}function l(t,e){return null!=e.dataIndex?e.dataIndex:null!=e.name?t.indexOfName(e.name):void 0}function h(t,e,i){var n=a(t.getAxis("x")),r=a(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),s=Math.min(n[0],n[1]),l=Math.min(r[0],r[1]),h=Math.max(n[0],n[1])-s,u=Math.max(r[0],r[1])-l,c=i.get("lineStyle.normal.width")||2,d=i.get("clipOverflow")?c/2:Math.max(h,u);o?(l-=d,u+=2*d):(s-=d,h+=2*d);var f=new x.Rect({shape:{x:s,y:l,width:h,height:u}});return e&&(f.shape[o?"width":"height"]=0,x.initProps(f,{shape:{width:h,height:u}},i)),f}function u(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),a=r.getExtent(),o=n.getExtent(),s=Math.PI/180,l=new x.Sector({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-o[0]*s,endAngle:-o[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-o[0]*s,x.initProps(l,{shape:{endAngle:-o[1]*s}},i)),l}function c(t,e,i){return"polar"===t.type?u(t,e,i):h(t,e,i)}function d(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,a=[],o=0;o=0;r--)if(i[r].dimension<2){n=i[r];break}if(n&&"cartesian2d"===e.type){var a=n.dimension,o=t.dimensions[a],s=t.getDataExtent(o),l=n.stops,h=[];l[0].interval&&l.sort(function(t,e){return t.interval[0]-e.interval[0]});for(var u=l[0],c=l[l.length-1],d=u.interval?f(u.interval[0],s):u.value,p=c.interval?f(c.interval[1],s):c.value,v=p-d,r=0;r=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);o=new m(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else b.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),a=l(r,n);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else b.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new _.Polyline({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new _.Polygon({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];return i&&i.isLabelIgnored?g.bind(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var a=this._polyline,o=this._polygon,s=t.hostModel,l=y(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,f=l.stackedOnNext;r&&(h=d(l.current,i,r),u=d(l.stackedOnCurrent,i,r),c=d(l.next,i,r),f=d(l.stackedOnNext,i,r)),a.shape.__points=l.current,a.shape.points=h,x.updateProps(a,{shape:{points:c}},s),o&&(o.setShape({points:h,stackedOnPoints:u}),x.updateProps(o,{shape:{points:c,stackedOnPoints:f,__points:l.next}},s));for(var p=[],g=l.status,v=0;v=0?1:-1}function n(t,e,n){for(var r,a=t.getBaseAxis(),o=t.getOtherAxis(a),s=a.onZero?0:o.scale.getExtent()[0],l=o.dim,h="x"===l||"radius"===l?1:0,u=e.stackedOn,c=e.get(l,n);u&&i(u.get(l,n))===i(c);){r=u;break}var d=[];return d[h]=e.get(a.dim,n),d[1-h]=r?r.get(l,n,!0):s,t.dataToPoint(d)}function r(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}t.exports=function(t,e,i,a,o,s){for(var l=r(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],v=s.dimensions,m=0;mw;w++){var M=e[b];if(b>=a||0>b)break;if(n(M)){if(x){b+=o;continue}break}if(b===i)t[o>0?"moveTo":"lineTo"](M[0],M[1]),c(f,M);else if(m>0){var S=b+o,A=e[S];if(x)for(;A&&n(e[S]);)S+=o,A=e[S];var T=.5,I=e[_],A=e[S];if(!A||n(A))c(p,M);else{n(A)&&!x&&(A=M),s.sub(d,A,I);var C,k;if("x"===y||"y"===y){var L="x"===y?0:1;C=Math.abs(M[L]-I[L]),k=Math.abs(M[L]-A[L])}else C=s.dist(M,I),k=s.dist(M,A);T=k/(k+C),u(p,M,d,-m*(1-T))}l(f,f,v),h(f,f,g),l(p,p,v),h(p,p,g),t.bezierCurveTo(f[0],f[1],p[0],p[1],M[0],M[1]),u(f,M,d,m*T)}else t.lineTo(M[0],M[1]);_=b,b+=o}return w}function a(t,e){var i=[1/0,1/0],n=[-(1/0),-(1/0)];if(e)for(var r=0;rn[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var o=i(6),s=i(5),l=s.min,h=s.max,u=s.scaleAndAdd,c=s.copy,d=[],f=[],p=[];t.exports={Polyline:o.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},buildPath:function(t,e){var i=e.points,o=0,s=i.length,l=a(i,e.smoothConstraint);if(e.connectNulls){for(;s>0&&n(i[s-1]);s--);for(;s>o&&n(i[o]);o++);}for(;s>o;)o+=r(t,i,o,s,s,1,l.min,l.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Polygon:o.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},buildPath:function(t,e){var i=e.points,o=e.stackedOnPoints,s=0,l=i.length,h=e.smoothMonotone,u=a(i,e.smoothConstraint),c=a(o,e.smoothConstraint);if(e.connectNulls){for(;l>0&&n(i[l-1]);l--);for(;l>s&&n(i[s]);s++);}for(;l>s;){var d=r(t,i,s,l,l,1,u.min,u.max,e.smooth,h,e.connectNulls);r(t,o,s+d-1,d,l,-1,c.min,c.max,e.stackedOnSmooth,h,e.connectNulls),s+=d+1,t.closePath()}}})}},function(t,e,i){var n=i(1),r=i(2);i(101),i(102),i(78)("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(n.curry(i(73),"pie")),r.registerLayout(n.curry(i(104),"pie")),r.registerProcessor(n.curry(i(71),"pie"))},function(t,e,i){"use strict";var n=i(13),r=i(1),a=i(8),o=i(30),s=i(67),l=i(2).extendSeriesModel({type:"series.pie",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){l.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=o(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},getDataParams:function(t){var e=this._data,i=l.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},_defaultLabelLine:function(t){a.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,avoidLabelOverlap:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationEasing:"cubicOut",data:[]}});r.mixin(l,s),t.exports=l},function(t,e,i){function n(t,e,i,n){var a=e.getData(),o=this.dataIndex,s=a.getName(o),l=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),a.each(function(t){r(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),l,i)})}function r(t,e,i,n,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=i?n:0,h=[o*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function a(t,e){function i(){a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore}function n(){a.ignore=a.normalIgnore,o.ignore=o.normalIgnore}s.Group.call(this);var r=new s.Sector({z2:2}),a=new s.Polyline,o=new s.Text;this.add(r), +this.add(a),this.add(o),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function o(t,e,i,n,r){var a=n.getModel("textStyle"),o="inside"===r||"inner"===r;return{fill:a.getTextColor()||(o?"#fff":t.getItemVisual(e,"color")),opacity:t.getItemVisual(e,"opacity"),textFont:a.getFont(),text:l.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var s=i(3),l=i(1),h=a.prototype;h.updateData=function(t,e,i){function n(){o.stopAnimation(!0),o.animateTo({shape:{r:c.r+10}},300,"elasticOut")}function a(){o.stopAnimation(!0),o.animateTo({shape:{r:c.r}},300,"elasticOut")}var o=this.childAt(0),h=t.hostModel,u=t.getItemModel(e),c=t.getItemLayout(e),d=l.extend({},c);d.label=null,i?(o.setShape(d),o.shape.endAngle=c.startAngle,s.updateProps(o,{shape:{endAngle:c.endAngle}},h,e)):s.updateProps(o,{shape:d},h,e);var f=u.getModel("itemStyle"),p=t.getItemVisual(e,"color");o.useStyle(l.defaults({lineJoin:"bevel",fill:p},f.getModel("normal").getItemStyle())),o.hoverStyle=f.getModel("emphasis").getItemStyle(),r(this,t.getItemLayout(e),u.get("selected"),h.get("selectedOffset"),h.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&h.ifEnableAnimation()&&o.on("mouseover",n).on("mouseout",a).on("emphasis",n).on("normal",a),this._updateLabel(t,e),s.setHoverStyle(this)},h._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,a=t.getItemModel(e),l=t.getItemLayout(e),h=l.label,u=t.getItemVisual(e,"color");s.updateProps(i,{shape:{points:h.linePoints||[[h.x,h.y],[h.x,h.y],[h.x,h.y]]}},r,e),s.updateProps(n,{style:{x:h.x,y:h.y}},r,e),n.attr({style:{textVerticalAlign:h.verticalAlign,textAlign:h.textAlign,textFont:h.font},rotation:h.rotation,origin:[h.x,h.y],z2:10});var c=a.getModel("label.normal"),d=a.getModel("label.emphasis"),f=a.getModel("labelLine.normal"),p=a.getModel("labelLine.emphasis"),g=c.get("position")||d.get("position");n.setStyle(o(t,e,"normal",c,g)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=o(t,e,"emphasis",d,g),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var v=f.get("smooth");v&&v===!0&&(v=.4),i.setShape({smooth:v})},l.inherits(a,s.Group);var u=i(27).extend({type:"pie",init:function(){var t=new s.Group;this._sectorGroup=t},render:function(t,e,i,r){if(!r||r.from!==this.uid){var o=t.getData(),s=this._data,h=this.group,u=e.get("animation"),c=!s,d=l.curry(n,this.uid,t,u,i),f=t.get("selectedMode");if(o.diff(s).add(function(t){var e=new a(o,t);c&&e.eachChild(function(t){t.stopAnimation(!0)}),f&&e.on("click",d),o.setItemGraphicEl(t,e),h.add(e)}).update(function(t,e){var i=s.getItemGraphicEl(e);i.updateData(o,t),i.off("click"),f&&i.on("click",d),h.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=s.getItemGraphicEl(t);h.remove(e)}).execute(),u&&c&&o.count()>0){var p=o.getItemLayout(0),g=Math.max(i.getWidth(),i.getHeight())/2,v=l.bind(h.removeClipPath,h);h.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,v,t))}this._data=o}},_createClipPath:function(t,e,i,n,r,a,o){var l=new s.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return s.initProps(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},o,a),l}});t.exports=u},function(t,e,i){"use strict";function n(t,e,i,n,r,a,o){function s(e,i,n,r){for(var a=e;i>a;a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void l(a,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,r,a){for(var o=a>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=o&&(d=o-10),!e&&o>=d&&(d=o+10),t[s].x=i+d*a,o=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)u=t[g].y-c,0>u&&s(g,d,-u,r),c=t[g].y+t[g].height;0>o-c&&l(d-1,c-o);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);h(f,!1,e,i,n,r),h(p,!0,e,i,n,r)}function r(t,e,i,r,a,o){for(var s=[],l=[],h=0;hb?-1:1)*x,k=I;n=C+(0>b?-5:5),r=k,c=[[S,A],[T,I],[C,k]]}d=M?"center":b>0?"left":"right"}var L=g.getModel("textStyle").getFont(),P=g.get("rotate")?0>b?-_+Math.PI:-_:0,D=t.getFormattedLabel(i,"normal")||l.getName(i),O=a.getBoundingRect(D,L,d,"top");u=!!P,f.label={x:n,y:r,position:v,height:O.height,len:y,len2:x,linePoints:c,textAlign:d,verticalAlign:"middle",font:L,rotation:P},M||h.push(f.label)}),!u&&t.get("avoidLabelOverlap")&&r(h,o,s,e,i,n)}},function(t,e,i){var n=i(4),r=n.parsePercent,a=i(103),o=i(1),s=2*Math.PI,l=Math.PI/180;t.exports=function(t,e,i,h){e.eachSeriesByType(t,function(t){var e=t.get("center"),h=t.get("radius");o.isArray(h)||(h=[0,h]),o.isArray(e)||(e=[e,e]);var u=i.getWidth(),c=i.getHeight(),d=Math.min(u,c),f=r(e[0],u),p=r(e[1],c),g=r(h[0],d/2),v=r(h[1],d/2),m=t.getData(),y=-t.get("startAngle")*l,x=t.get("minAngle")*l,_=m.getSum("value"),b=Math.PI/(_||m.count())*2,w=t.get("clockwise"),M=t.get("roseType"),S=m.getDataExtent("value");S[0]=0;var A=s,T=0,I=y,C=w?1:-1;if(m.each("value",function(t,e){var i;i="area"!==M?0===_?b:t*b:s/(m.count()||1),x>i?(i=x,A-=x):T+=t;var r=I+C*i;m.setItemLayout(e,{angle:i,startAngle:I,endAngle:r,clockwise:w,cx:f,cy:p,r0:g,r:M?n.linearMap(t,S,[g,v]):v}),I=r},!0),s>A)if(.001>=A){var k=s/m.count();m.each(function(t){var e=m.getItemLayout(t);e.startAngle=y+C*t*k,e.endAngle=y+C*(t+1)*k})}else b=A/T,I=y,m.each("value",function(t,e){var i=m.getItemLayout(e),n=i.angle===x?x:t*b;i.startAngle=I,i.endAngle=I+C*n,I+=n});a(t,v,u,c)})}},function(t,e,i){"use strict";i(53),i(106)},function(t,e,i){function n(t,e){function i(t,e){var i=n.getAxis(t);return i.toGlobalCoord(i.dataToCoord(0))}var n=t.coordinateSystem,r=e.axis,a={},o=r.position,s=r.onZero?"onZero":o,l=r.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={x:{top:u[2],bottom:u[3]},y:{left:u[0],right:u[1]}};c.x.onZero=Math.max(Math.min(i("y"),c.x.bottom),c.x.top),c.y.onZero=Math.max(Math.min(i("x"),c.y.right),c.y.left),a.position=["y"===l?c.y[s]:u[0],"x"===l?c.x[s]:u[3]],a.rotation=Math.PI/2*("x"===l?0:1);var d={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=d[o],r.onZero&&(a.labelOffset=c[l][o]-c[l].onZero),e.getModel("axisTick").get("inside")&&(a.tickDirection=-a.tickDirection),e.getModel("axisLabel").get("inside")&&(a.labelDirection=-a.labelDirection);var f=e.getModel("axisLabel").get("rotate");return a.labelRotation="top"===s?-f:f,a.labelInterval=r.getLabelInterval(),a.z2=1,a}var r=i(1),a=i(3),o=i(50),s=o.ifIgnoreOnTick,l=o.getInterval,h=["axisLine","axisLabel","axisTick","axisName"],u=["splitArea","splitLine"],c=i(2).extendComponentView({type:"axis",render:function(t,e){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new a.Group,this.group.add(this._axisGroup),t.get("show")){var s=e.getComponent("grid",t.get("gridIndex")),l=n(s,t),c=new o(t,l);r.each(h,c.add,c),this._axisGroup.add(c.getGroup()),r.each(u,function(e){t.get(e+".show")&&this["_"+e](t,s,l.labelInterval)},this),a.groupTransition(i,this._axisGroup,t)}},_splitLine:function(t,e,i){var n=t.axis,o=t.getModel("splitLine"),h=o.getModel("lineStyle"),u=h.get("color"),c=l(o,i);u=r.isArray(u)?u:[u];for(var d=e.coordinateSystem.getRect(),f=n.isHorizontal(),p=0,g=n.getTicksCoords(),v=n.scale.getTicks(),m=[],y=[],x=h.getLineStyle(),_=0;_=0;r--){var a=i[r];if(a[n])break}if(0>r){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var s=o.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)},pop:function(t){var e=n(t),i=e[e.length-1];e.length>1&&e.pop();var r={};return a(i,function(t,i){for(var n=e.length-1;n>=0;n--){var t=e[n][i];if(t){r[i]=t;break}}}),r},clear:function(t){t[o]=null},count:function(t){return n(t).length}};t.exports=s},function(t,e,i){i(10).registerSubTypeDefaulter("dataZoom",function(t){return"slider"})},function(t,e,i){function n(t){N.call(this),this._zr=t,this.group=new V.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+et++,this._handlers={},W(it,function(t,e){this._handlers[e]=B.bind(t,this)},this)}function r(t,e){var i=t._zr;t._enableGlobalPan||F.take(i,Q,t._uid),W(t._handlers,function(t,e){i.on(e,t)}),t._brushType=e.brushType,t._brushOption=B.merge(B.clone(tt),e,!0)}function a(t){var e=t._zr;F.release(e,Q,t._uid),W(t._handlers,function(t,i){e.off(i,t)}),t._brushType=t._brushOption=null}function o(t,e){var i=nt[e.brushType].createCover(t,e);return h(i),i.__brushOption=e,t.group.add(i),i}function s(t,e){var i=c(e);return i.endCreating&&(i.endCreating(t,e),h(e)),e}function l(t,e){var i=e.__brushOption;c(e).updateCoverShape(t,e,i.range,i)}function h(t){t.traverse(function(t){t.z=U,t.z2=U})}function u(t,e){c(e).updateCommon(t,e),l(t,e)}function c(t){return nt[t.__brushOption.brushType]}function d(t,e,i){var n=t._panels;if(!n)return!0;var r;return W(n,function(t){t.contain(e,i)&&(r=t)}),r}function f(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null!=n?i[n]:!0}function p(t){var e=t._covers,i=e.length;return W(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function g(t,e){var i=Z(t._covers,function(t){var e=t.__brushOption,i=B.clone(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function v(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],r=i[0]-n[0],a=i[1]-n[1],o=X(r*r+a*a,.5);return o>Y}function m(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function y(t,e,i,n){var r=new V.Group;return r.add(new V.Rect({name:"main",style:w(i),silent:!0,draggable:!0,cursor:"move",drift:H(t,e,r,"nswe"),ondragend:H(g,e,{isEnd:!0})})),W(n,function(i){r.add(new V.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:H(t,e,r,i),ondragend:H(g,e,{isEnd:!0})}))}),r}function x(t,e,i,n){var r=n.brushStyle.lineWidth||0,a=j(r,$),o=i[0][0],s=i[1][0],l=o-r/2,h=s-r/2,u=i[0][1],c=i[1][1],d=u-a+r/2,f=c-a+r/2,p=u-o,g=c-s,v=p+r,m=g+r;b(t,e,"main",o,s,p,g),n.transformable&&(b(t,e,"w",l,h,a,m),b(t,e,"e",d,h,a,m),b(t,e,"n",l,h,v,a),b(t,e,"s",l,f,v,a),b(t,e,"nw",l,h,a,a),b(t,e,"ne",d,h,a,a),b(t,e,"sw",l,f,a,a),b(t,e,"se",d,f,a,a))}function _(t,e){var i=e.__brushOption,n=i.transformable,r=e.childAt(0);r.useStyle(w(i)),r.attr({silent:!n,cursor:n?"move":"default"}),W(["w","e","n","s","se","sw","ne","nw"],function(i){var r=e.childOfName(i),a=A(t,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?J[a]+"-resize":null})})}function b(t,e,i,n,r,a,o){var s=e.childOfName(i);s&&s.setShape(L(k(t,e,[[n,r],[n+a,r+o]])))}function w(t){return B.defaults({strokeNoScale:!0},t.brushStyle)}function M(t,e,i,n){var r=[q(t,i),q(e,n)],a=[j(t,i),j(e,n)];return[[r[0],a[0]],[r[1],a[1]]]}function S(t){return V.getTransform(t.group)}function A(t,e){if(e.length>1){e=e.split("");var i=[A(t,e[0]),A(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=V.transformDirection(n[e],S(t));return r[i]}function T(t,e,i,n,r,a,o,s){var l=n.__brushOption,h=t(l.range),c=C(i,a,o);W(r.split(""),function(t){var e=K[t];h[e[0]][e[1]]+=c[e[0]]}),l.range=e(M(h[0][0],h[1][0],h[0][1],h[1][1])),u(i,n),g(i,{isEnd:!1})}function I(t,e,i,n,r){var a=e.__brushOption.range,o=C(t,i,n);W(a,function(t){t[0]+=o[0],t[1]+=o[1]}),u(t,e),g(t,{isEnd:!1})}function C(t,e,i){var n=t.group,r=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function k(t,e,i){var n=f(t,e);if(n===!0)return B.clone(i);var r=n.getBoundingRect();return B.map(i,function(t){var e=t[0];e=j(e,r.x),e=q(e,r.x+r.width);var i=t[1];return i=j(i,r.y),i=q(i,r.y+r.height),[e,i]})}function L(t){var e=q(t[0][0],t[1][0]),i=q(t[0][1],t[1][1]),n=j(t[0][0],t[1][0]),r=j(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:r-i}}function P(t,e){var i=e.offsetX,n=e.offsetY,r=t._zr;if(t._brushType){for(var a,o=t._panels,s=t._covers,l=0;lt[1]&&t.reverse(),t}function r(t,e){for(var i=!0,n=0;n=0){i=!1;for(var a=0;a=0?(i=n.getBoundingRect().clone(),i.applyTransform(s.getTransform(n))):i=n.grid.getRect().clone(),e.push({panelId:t.panelId,rect:i})}),e},h.makeCoordInfoList=function(t,e){var i=[];return l(u,function(n){var r=t[n+"Index"];null!=r&&"none"!==r&&("all"===r||o.isArray(r)||(r=[r]),e.eachComponent({mainType:n},function(t,e){if(!("all"!==r&&o.indexOf(r,e)<0)){var a,s;"xAxis"===n||"yAxis"===n?a=t.axis.grid:s=t.coordinateSystem;for(var l,h=0,u=i.length;u>h;h++){var d=i[h];if("yAxis"===n&&!d.yAxis&&d.xAxis){var f=a.getCartesian(d.xAxisIndex,e);if(f){s=f,l=d;break}}}!l&&i.push(l={}),l[n]=t,l[n+"Index"]=e,l.panelId=n+c+e,l.coordSys=s||a.getCartesian(l.xAxisIndex,l.yAxisIndex),l.coordSys?i[n+"Has"]=!0:i.pop()}}))}),i},h.controlSeries=function(t,e,i){var n=r(t,e.coordInfoList);return n===!0||n&&n.coordSys===i.coordinateSystem};var f={lineX:o.curry(a,"x"),lineY:o.curry(a,"y"),rect:function(t,e,i){var r=e.coordSys,a=r[d[t]]([i[0][0],i[1][0]]),o=r[d[t]]([i[0][1],i[1][1]]);return[n([a[0],o[0]]),n([a[1],o[1]])]},polygon:function(t,e,i){var n=e.coordSys;return o.map(i,n[d[t]],n)}};t.exports=h},function(t,e,i){function n(t){return t[r]||(t[r]={})}var r="\x00_ec_interaction_mutex",a={take:function(t,e,i){var r=n(t);r[e]=i},release:function(t,e,i){var r=n(t),a=r[e];a===i&&(r[e]=null)},isTaken:function(t,e){return!!n(t)[e]}};i(2).registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),t.exports=a},function(t,e,i){function n(t,e,i){r.positionGroup(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"))}var r=i(14),a=i(11),o=i(3);t.exports={layout:function(t,e,i){var a=r.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"));r.box(e.get("orient"),t,e.get("itemGap"),a.width,a.height),n(t,e,i)},addBackground:function(t,e){var i=a.normalizeCssArray(e.get("padding")),n=t.getBoundingRect(),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var s=new o.Rect({shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},style:r,silent:!0,z2:-1});o.subPixelOptimizeRect(s),t.add(s)}}},function(t,e,i){var n=i(1),r=i(42),a=i(119),o=function(t,e,i,n,a){r.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom"};o.prototype={constructor:o,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),t},getLabelInterval:function(){var t=this._labelInterval;return t||(t=this._labelInterval=a(this)),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},toLocalCoord:null,toGlobalCoord:null},n.inherits(o,r),t.exports=o},function(t,e,i){"use strict";function n(t){return this._axes[t]}var r=i(1),a=function(t){this._axes={},this._dimList=[],this.name=t||""};a.prototype={constructor:a,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return r.map(this._dimList,n,this)},getAxesByScale:function(t){return t=t.toLowerCase(),r.filter(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;ri&&(i=Math.min(i,u),u-=i,t.width=i,c--)}),d=(u-s)/(c+(c-1)*h),d=Math.max(d,0);var f,p=0;o.each(i,function(t,e){t.width||(t.width=d),f=t,p+=t.width*(1+h)}),f&&(p-=f.width*h);var g=-p/2;o.each(i,function(t,i){r[e][i]=r[e][i]||{offset:g,width:t.width},g+=t.width*(1+h)})}),r}function a(t,e,i){var a=r(o.filter(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),s={};e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),o=n(t),l=a[r.index][o],h=l.offset,u=l.width,c=i.getOtherAxis(r),d=t.get("barMinHeight")||0,f=r.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=i.dataToPoints(e,!0);s[o]=s[o]||[],e.setLayout({offset:h,size:u}),e.each(c.dim,function(t,i){if(!isNaN(t)){s[o][i]||(s[o][i]={p:f,n:f});var n,r,a,l,g=t>=0?"p":"n",v=p[i],m=s[o][i][g];c.isHorizontal()?(n=m,r=v[1]+h,a=v[0]-m,l=u,Math.abs(a)a?-1:1)*d),s[o][i][g]+=a):(n=v[0]+h,r=m,a=u,l=v[1]-m,Math.abs(l)=l?-1:1)*d),s[o][i][g]+=l),e.setItemLayout(i,{x:n,y:r,width:a,height:l})}},!0)},this)}var o=i(1),s=i(4),l=s.parsePercent;t.exports=a},function(t,e,i){var n=i(3),r=i(1),a=Math.PI;t.exports=function(t,e){e=e||{},r.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new n.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),o=new n.Arc({shape:{startAngle:-a/2,endAngle:-a/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),s=new n.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*a/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*a/2}).delay(300).start("circularInOut");var l=new n.Group;return l.add(o),l.add(s),l.add(i),l.resize=function(){var e=t.getWidth()/2,n=t.getHeight()/2;o.setShape({cx:e,cy:n});var r=o.shape.r;s.setShape({x:e-r,y:n-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},l.resize(),l}},function(t,e,i){function n(t,e){for(var i in e)_.hasClass(i)||("object"==typeof e[i]?t[i]=t[i]?c.merge(t[i],e[i],!1):c.clone(e[i]):null==t[i]&&(t[i]=e[i]))}function r(t){t=t,this.option={},this.option[w]=1,this._componentsMap={},this._seriesIndices=null,n(t,this._theme.option),c.merge(t,b,!1),this.mergeOption(t)}function a(t,e){c.isArray(e)||(e=e?[e]:[]);var i={};return p(e,function(e){i[e]=(t[e]||[]).slice()}),i}function o(t,e){var i={};p(e,function(t,e){var n=t.exist;n&&(i[n.id]=t)}),p(e,function(e,n){var r=e.option;if(c.assert(!r||null==r.id||!i[r.id]||i[r.id]===e,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&(i[r.id]=e),x(r)){var a=s(t,r,e.exist);e.keyInfo={mainType:t,subType:a}}}),p(e,function(t,e){var n=t.exist,r=t.option,a=t.keyInfo;if(x(r)){if(a.name=null!=r.name?r.name+"":n?n.name:"\x00-",n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(i[a.id])}i[a.id]=t}})}function s(t,e,i){var n=e.type?e.type:i?i.subType:_.determineSubType(t,e);return n}function l(t){return v(t,function(t){return t.componentIndex})||[]}function h(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function u(t){}var c=i(1),d=i(8),f=i(9),p=c.each,g=c.filter,v=c.map,m=c.isArray,y=c.indexOf,x=c.isObject,_=i(10),b=i(124),w="\x00_ec_inner",M=f.extend({constructor:M,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new f(i),this._optionManager=n},setOption:function(t,e){c.assert(!(w in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption()},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):r.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&p(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,r){var s=d.normalizeToArray(t[e]),h=d.mappingToExists(n[e],s);o(e,h);var u=a(n,r);i[e]=[],n[e]=[],p(h,function(t,r){var a=t.exist,o=t.option;if(c.assert(x(o)||a,"Empty component definition"),o){var s=_.getClass(e,t.keyInfo.subType,!0);a&&a instanceof s?(a.mergeOption(o,this),a.optionUpdated(o,!1)):(a=new s(o,this,this,c.extend({dependentModels:u,componentIndex:r},t.keyInfo)),a.optionUpdated(null,!0))}else a.mergeOption({},this),a.optionUpdated({},!1);n[e][r]=a,i[e][r]=a.option},this),"series"===e&&(this._seriesIndices=l(n.series))}var i=this.option,n=this._componentsMap,r=[];p(t,function(t,e){null!=t&&(_.hasClass(e)?r.push(e):i[e]=null==i[e]?c.clone(t):c.merge(i[e],t,!0))}),_.topologicalTravel(r,_.getAllClassMainTypes(),e,this)},getOption:function(){var t=c.clone(this.option);return p(t,function(e,i){if(_.hasClass(i)){for(var e=d.normalizeToArray(e),n=e.length-1;n>=0;n--)d.isIdInner(e[n])&&e.splice(n,1);t[i]=e}}),delete t[w],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap[t];return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,a=this._componentsMap[e];if(!a||!a.length)return[];var o;if(null!=i)m(i)||(i=[i]),o=g(v(i,function(t){return a[t]}),function(t){ +return!!t});else if(null!=n){var s=m(n);o=g(a,function(t){return s&&y(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=m(r);o=g(a,function(t){return l&&y(r,t.name)>=0||!l&&t.name===r})}return h(o,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(i)||t.hasOwnProperty(n))?{mainType:r,index:t[e],id:t[i],name:t[n]}:null}function i(e){return t.filter?g(e,t.filter):e}var n=t.query,r=t.mainType,a=e(n),o=a?this.queryComponents(a):this._componentsMap[r];return i(h(o,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,p(n,function(t,n){p(t,function(t,r){e.call(i,n,t,r)})});else if(c.isString(t))p(n[t],e,i);else if(x(t)){var r=this.findComponents(t);p(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){u(this),p(this._seriesIndices,function(i){var n=this._componentsMap.series[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){p(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,i){u(this),p(this._seriesIndices,function(n){var r=this._componentsMap.series[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return p(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return u(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){u(this);var i=g(this._componentsMap.series,t,e);this._seriesIndices=l(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=l(t.series);var e=[];p(t,function(t,i){e.push(i)}),_.topologicalTravel(e,_.getAllClassMainTypes(),function(e,i){p(t[e],function(t){t.restoreData()})})}});c.mixin(M,i(56)),t.exports=M},function(t,e,i){function n(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e,i){var n,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;d(l,function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))})}return r||(r=t),r.timeline||(r.timeline=s),d([r].concat(a).concat(h.map(o,function(t){return t.option})),function(t){d(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}function a(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return h.each(t,function(t,e){var i=e.match(v);if(i&&i[1]&&i[2]){var a=i[1],s=i[2].toLowerCase();o(n[s],t,a)||(r=!1)}}),r}function o(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},d(e,function(e,i){if(null!=e){var n=t[i];if(c.hasClass(i)){e=u.normalizeToArray(e),n=u.normalizeToArray(n);var r=u.mappingToExists(n,e);t[i]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[i]=g(n,e,!0)}})}var h=i(1),u=i(8),c=i(10),d=h.each,f=h.clone,p=h.map,g=h.merge,v=/^(min|max)?(.+)$/;n.prototype={constructor:n,setOption:function(t,e){t=f(t,!0);var i=this._optionBackup,n=r.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(l(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,f),this._mediaList=p(e.mediaList,f),this._mediaDefault=f(e.mediaDefault),this._currentMediaIndices=[],f(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=f(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,r=this._mediaDefault,o=[],l=[];if(!n.length&&!r)return l;for(var h=0,u=n.length;u>h;h++)a(n[h].query,e,i)&&o.push(h);return!o.length&&r&&(o=[-1]),o.length&&!s(o,this._currentMediaIndices)&&(l=p(o,function(t){return f(-1===t?r.option:n[t].option)})),this._currentMediaIndices=o,l}},t.exports=n},function(t,e){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||""),t.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],grid:{},textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:!0,animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3}},function(t,e,i){t.exports={getAreaStyle:i(31)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]])}},function(t,e){t.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(t,e,i){var n=i(31)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getItemStyle:function(t){var e=n.call(this,t),i=this.getBorderLineDash();return i&&(e.lineDash=i),e},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){var n=i(31)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getLineStyle:function(t){var e=n.call(this,t),i=this.getLineDash();return i&&(e.lineDash=i),e},getLineDash:function(){var t=this.get("type");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){function n(t,e){return t&&t.getShallow(e)}var r=i(18);t.exports={getTextColor:function(){var t=this.ecModel;return this.getShallow("color")||t&&t.get("textStyle.color")},getFont:function(){var t=this.ecModel,e=t&&t.getModel("textStyle");return[this.getShallow("fontStyle")||n(e,"fontStyle"),this.getShallow("fontWeight")||n(e,"fontWeight"),(this.getShallow("fontSize")||n(e,"fontSize")||12)+"px",this.getShallow("fontFamily")||n(e,"fontFamily")||"sans-serif"].join(" ")},getTextRect:function(t){var e=this.get("textStyle")||{};return r.getBoundingRect(t,this.getFont(),e.align,e.baseline)},ellipsis:function(t,e,i){return r.ellipsis(t,this.getFont(),e,i)}}},function(t,e,i){function n(t,e){e=e.split(",");for(var i=t,n=0;ne&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var c;"string"==typeof r?c=i[r]:"function"==typeof r&&(c=r),c&&(e=e.downSample(s.dim,1/u,c,n),t.setData(e))}}},this)}},function(t,e,i){var n=i(1),r=i(32),a=i(4),o=i(38),s=r.prototype,l=o.prototype,h=Math.floor,u=Math.ceil,c=Math.pow,d=10,f=Math.log,p=r.extend({type:"log",getTicks:function(){return n.map(l.getTicks.call(this),function(t){return a.round(c(d,t))})},getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),c(d,t)},setExtent:function(t,e){t=f(t)/f(d),e=f(e)/f(d),l.setExtent.call(this,t,e)},getExtent:function(){var t=s.getExtent.call(this);return t[0]=c(d,t[0]),t[1]=c(d,t[1]),t},unionExtent:function(t){t[0]=f(t[0])/f(d),t[1]=f(t[1])/f(d),s.unionExtent.call(this,t)},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||0>=i)){var n=c(10,h(f(i/t)/Math.LN10)),r=t/i*n;.5>=r&&(n*=10);var o=[a.round(u(e[0]/n)*n),a.round(h(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:l.niceExtent});n.each(["contain","normalize"],function(t){p.prototype[t]=function(e){return e=f(e)/f(d),s[t].call(this,e)}}),p.create=function(){return new p},t.exports=p},function(t,e,i){var n=i(1),r=i(32),a=r.prototype,o=r.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?n.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),a.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return a.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(a.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},niceTicks:n.noop,niceExtent:n.noop});o.create=function(){return new o},t.exports=o},function(t,e,i){var n=i(1),r=i(4),a=i(11),o=i(38),s=o.prototype,l=Math.ceil,h=Math.floor,u=1e3,c=60*u,d=60*c,f=24*d,p=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][2]=0;r--)if(!n[r].silent&&n[r]!==i&&!n[r].ignore&&o(n[r],t,e))return n[r]}},f.mixin(A,v),f.mixin(A,p),t.exports=A},function(t,e,i){function n(){return!1}function r(t,e,i,n){var r=document.createElement(e),a=i.getWidth(),o=i.getHeight(),s=r.style;return s.position="absolute",s.left=0,s.top=0,s.width=a+"px",s.height=o+"px",r.width=a*n,r.height=o*n,r.setAttribute("data-zr-dom-id",t),r}var a=i(1),o=i(33),s=i(64),l=i(63),h=function(t,e,i){var s;i=i||o.devicePixelRatio,"string"==typeof t?s=r(t,"canvas",e,i):a.isObject(t)&&(s=t,t=s.id),this.id=t,this.dom=s;var l=s.style;l&&(s.onselectstart=n,l["-webkit-user-select"]="none",l["user-select"]="none",l["-webkit-touch-callout"]="none",l["-webkit-tap-highlight-color"]="rgba(0,0,0,0)"),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};h.prototype={constructor:h,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d");var t=this.dpr;1!=t&&this.ctx.scale(t,t)},createBackBuffer:function(){var t=this.dpr;this.domBack=r("back-"+this.id,"canvas",this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,a=this.domBack;r.width=t+"px",r.height=e+"px",n.width=t*i,n.height=e*i,1!=i&&this.ctx.scale(i,i),a&&(a.width=t*i,a.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e=this.dom,i=this.ctx,n=e.width,r=e.height,a=this.clearColor,o=this.motionBlur&&!t,h=this.lastFrameAlpha,u=this.dpr;if(o&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,n/u,r/u)),i.clearRect(0,0,n/u,r/u),a){var c;a.colorStops?(c=a.__canvasGradient||s.getGradient(i,a,{x:0,y:0,width:n/u,height:r/u}),a.__canvasGradient=c):a.image&&(c=l.prototype.getCanvasPattern.call(a,i)),i.save(),i.fillStyle=c||a,i.fillRect(0,0,n/u,r/u),i.restore()}if(o){var d=this.domBack;i.save(),i.globalAlpha=h,i.drawImage(d,0,0,n/u,r/u),i.restore()}}},t.exports=h},function(t,e,i){"use strict";function n(t){return parseInt(t,10)}function r(t){return t?t.isBuildin?!0:"function"==typeof t.resize&&"function"==typeof t.refresh:!1}function a(t){t.__unusedCount++}function o(t){1==t.__unusedCount&&t.clear()}function s(t,e,i){return x.copy(t.getBoundingRect()),t.transform&&x.applyTransform(t.transform),_.width=e,_.height=i,!x.intersect(_)}function l(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;ir;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(r,1),o.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,m(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,m(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,d.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(a),this._doPaintList(t,e),this.eachBuildinLayer(o)},_doPaintList:function(t,e){function i(t){a.save(),a.globalAlpha=1,a.shadowBlur=0,n.__dirty=!0,a.drawImage(t.dom,0,0,u,c),a.restore(),n.ctx.restore()}for(var n,r,a,o,s,l,h=0,u=this._width,c=this._height,p=this._progress,g=0,v=t.length;v>g;g++){var m=t[g],x=this._singleCanvas?0:m.zlevel,_=m.__frame;if(0>_&&s&&(i(s),s=null),r!==x&&(a&&a.restore(),o={},r=x,n=this.getLayer(r),n.isBuildin||f("ZLevel "+r+" has been used by unkown layer "+n.id),a=n.ctx,a.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear()),n.__dirty||e){if(_>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,y-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(p=l),s.__progress=p+1}_===p&&this._doPaintEl(m,s,!0,s.renderScope)}else this._doPaintEl(m,n,e,o);m.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherProgressive=!1,d.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&t.scale[0]&&t.scale[1]&&(!t.culling||!s(t,this._width,this._height))){var a=t.__clipPaths;(n.prevClipLayer!==e||l(a,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),a&&(r.save(),h(a,r),n.prevClipLayer=e,n.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new v("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&d.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=null,s=-1,l=this._domRoot;if(i[t])return void f("ZLevel "+t+" has been used already");if(!r(e))return void f("Layer of zlevel "+t+" is not valid");if(a>0&&t>n[0]){for(s=0;a-1>s&&!(n[s]t);s++);o=i[n[s]]}if(n.splice(s+1,0,t),o){var h=o.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nh;h++){var c=t[h],f=this._singleCanvas?0:c.zlevel,p=e[f],g=c.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||c.__dirty),g>=0){o!==g&&(o=g,l++);var m=c.__frame=l-1;if(!a){var x=Math.min(s,y-1);a=i[x],a||(a=i[x]=new v("progressive",this,this.dpr),a.initContext()),a.__maxProgress=0}a.__dirty=a.__dirty||c.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,m),a.__maxProgress>=a.__progress&&(p.__dirty=!0)}else c.__frame=-1,a&&(a.__nextIdxNotProg=h,s++,a=null)}a&&(s++,a.__nextIdxNotProg=h),this.eachBuildinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,y),d.each(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?d.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&d.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(d.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;if(i.style.display="none",t=t||this._getWidth(),e=e||this._getHeight(),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers[n].resize(t,e);this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new v("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var i=this.storage.getDisplayList(!0),n={},r=0;rr;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,a.canvasSupported&&s(i,n)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n&&(n.parent=t,n.updateTransform(),e?(e=e.slice(),e.push(n)):e=[n]),t.isGroup){for(var r=t._children,a=0;ae;e++)this.delRoot(t[e]);else{var a;a="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,a);s>=0&&(this.delFromMap(a.id),this._roots.splice(s,1),a instanceof o&&a.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof o&&(t.__storage=this),t.dirty(),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,i=e[t];return i&&(delete e[t],i instanceof o&&(i.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:n},t.exports=l},function(t,e,i){"use strict";var n=i(1),r=i(24).Dispatcher,a=i(60),o=i(59),s=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time=0,r.call(this)};s.prototype={constructor:s,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;io;o++){var s=i[o],l=s.step(t);l&&(r.push(l),a.push(s))}for(var o=0;n>o;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(var o=0;n>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},start:function(){function t(){e._running&&(a(t),e._update())}var e=this;this._running=!0,this._time=(new Date).getTime(),a(t)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new o(t,e.loop,e.getter,e.setter);return i}},n.mixin(s,r),t.exports=s},function(t,e,i){function n(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=i(143);n.prototype={constructor:n,step:function(t){this._initialized||(this._startTime=(new Date).getTime()+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,a="function"==typeof n?n(e):e; +return this.fire("frame",a),1==e?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(){var t=(new Date).getTime(),e=(t-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},t.exports=n},function(t,e){var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};t.exports=i},function(t,e,i){var n=i(61).normalizeRadian,r=2*Math.PI;t.exports={containStroke:function(t,e,i,a,o,s,l,h,u){if(0===l)return!1;var c=l;h-=t,u-=e;var d=Math.sqrt(h*h+u*u);if(d-c>i||i>d+c)return!1;if(Math.abs(a-o)%r<1e-4)return!0;if(s){var f=a;a=n(o),o=n(f)}else a=n(a),o=n(o);a>o&&(o+=r);var p=Math.atan2(u,h);return 0>p&&(p+=r),p>=a&&o>=p||p+r>=a&&o>=p+r}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,a,o,s,l,h,u,c){if(0===h)return!1;var d=h;if(c>e+d&&c>r+d&&c>o+d&&c>l+d||e-d>c&&r-d>c&&o-d>c&&l-d>c||u>t+d&&u>i+d&&u>a+d&&u>s+d||t-d>u&&i-d>u&&a-d>u&&s-d>u)return!1;var f=n.cubicProjectPoint(t,e,i,r,a,o,s,l,u,c,null);return d/2>=f}}},function(t,e,i){"use strict";function n(t,e){return Math.abs(t-e)e&&u>n&&u>o&&u>l||e>u&&n>u&&o>u&&l>u)return 0;var c=g.cubicRootAt(e,n,o,l,u,_);if(0===c)return 0;for(var d,f,p=0,v=-1,m=0;c>m;m++){var y=_[m],x=0===y||1===y?.5:1,w=g.cubicAt(t,i,a,s,y);h>w||(0>v&&(v=g.cubicExtrema(e,n,o,l,b),b[1]1&&r(),d=g.cubicAt(e,n,o,l,b[0]),v>1&&(f=g.cubicAt(e,n,o,l,b[1]))),p+=2==v?yd?x:-x:yf?x:-x:f>l?x:-x:yd?x:-x:d>l?x:-x)}return p}function o(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||e>s&&n>s&&a>s)return 0;var l=g.quadraticRootAt(e,n,a,s,_);if(0===l)return 0;var h=g.quadraticExtremum(e,n,a);if(h>=0&&1>=h){for(var u=0,c=g.quadraticAt(e,n,a,h),d=0;l>d;d++){var f=0===_[d]||1===_[d]?.5:1,p=g.quadraticAt(t,i,r,_[d]);o>p||(u+=_[d]c?f:-f:c>a?f:-f)}return u}var f=0===_[0]||1===_[0]?.5:1,p=g.quadraticAt(t,i,r,_[0]);return o>p?0:e>a?f:-f}function s(t,e,i,n,r,a,o,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);_[0]=-l,_[1]=l;var h=Math.abs(n-r);if(1e-4>h)return 0;if(1e-4>h%y){n=0,r=y;var u=a?1:-1;return o>=_[0]+t&&o<=_[1]+t?u:0}if(a){var l=n;n=p(r),r=p(l)}else n=p(n),r=p(r);n>r&&(r+=y);for(var c=0,d=0;2>d;d++){var f=_[d];if(f+t>o){var g=Math.atan2(s,f),u=a?1:-1;0>g&&(g=y+g),(g>=n&&r>=g||g+y>=n&&r>=g+y)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),c+=u)}}return c}function l(t,e,i,r,l){for(var u=0,p=0,g=0,y=0,x=0,_=0;_1&&(i||(u+=v(p,g,y,x,r,l))),1==_&&(p=t[_],g=t[_+1],y=p,x=g),b){case h.M:y=t[_++],x=t[_++],p=y,g=x;break;case h.L:if(i){if(m(p,g,t[_],t[_+1],e,r,l))return!0}else u+=v(p,g,t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.C:if(i){if(c.containStroke(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else u+=a(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.Q:if(i){if(d.containStroke(p,g,t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else u+=o(p,g,t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.A:var w=t[_++],M=t[_++],S=t[_++],A=t[_++],T=t[_++],I=t[_++],C=(t[_++],1-t[_++]),k=Math.cos(T)*S+w,L=Math.sin(T)*A+M;_>1?u+=v(p,g,k,L,r,l):(y=k,x=L);var P=(r-w)*A/S+w;if(i){if(f.containStroke(w,M,A,T,T+I,C,e,P,l))return!0}else u+=s(w,M,A,T,T+I,C,P,l);p=Math.cos(T+I)*S+w,g=Math.sin(T+I)*A+M;break;case h.R:y=p=t[_++],x=g=t[_++];var D=t[_++],O=t[_++],k=y+D,L=x+O;if(i){if(m(y,x,k,x,e,r,l)||m(k,x,k,L,e,r,l)||m(k,L,y,L,e,r,l)||m(y,L,y,x,e,r,l))return!0}else u+=v(k,x,k,L,r,l),u+=v(y,L,y,x,r,l);break;case h.Z:if(i){if(m(p,g,y,x,e,r,l))return!0}else u+=v(p,g,y,x,r,l);p=y,g=x}}return i||n(g,x)||(u+=v(p,g,y,x,r,l)||0),0!==u}var h=i(28).CMD,u=i(83),c=i(145),d=i(84),f=i(144),p=i(61).normalizeRadian,g=i(16),v=i(85),m=u.containStroke,y=2*Math.PI,x=1e-4,_=[-1,-1,-1],b=[-1,-1];t.exports={contain:function(t,e,i){return l(t,0,!1,e,i)},containStroke:function(t,e,i,n){return l(t,e,!0,i,n)}}},function(t,e,i){"use strict";function n(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var a=i(24),o=function(){this._track=[]};o.prototype={constructor:o,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,s=n.length;s>o;o++){var l=n[o],h=a.clientToLocal(i,l);r.points.push([h.zrX,h.zrY]),r.touches.push(l)}this._track.push(r)}},_recognize:function(t){for(var e in s)if(s.hasOwnProperty(e)){var i=s[e](this._track,t);if(i)return i}}};var s={pinch:function(t,e){var i=t.length;if(i){var a=(t[i-1]||{}).points,o=(t[i-2]||{}).points||a;if(o&&o.length>1&&a&&a.length>1){var s=n(a)/n(o);!isFinite(s)&&(s=1),e.pinchScale=s;var l=r(a);return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}};t.exports=o},function(t,e){var i=function(){this.head=null,this.tail=null,this._len=0},n=i.prototype;n.insert=function(t){var e=new r(t);return this.insertEntry(e),e},n.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._len++},n.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len};var r=function(t){this.value=t,this.next,this.prev},a=function(t){this._list=new i,this._map={},this._maxSize=t||10},o=a.prototype;o.put=function(t,e){var i=this._list,n=this._map;if(null==n[t]){var r=i.len();if(r>=this._maxSize&&r>0){var a=i.head;i.remove(a),delete n[a.key]}var o=i.insert(e);o.key=t,n[t]=o}},o.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},o.clear=function(){this._list.clear(),this._map={}},t.exports=a},function(t,e,i){var n=i(6);t.exports=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;iy;y++)r(d,d,t[y]),a(f,f,t[y]);r(d,d,h[0]),a(f,f,h[1])}for(var y=0,x=t.length;x>y;y++){var _=t[y];if(i)u=t[y?y-1:x-1],c=t[(y+1)%x];else{if(0===y||y===x-1){p.push(n.clone(t[y]));continue}u=t[y-1],c=t[y+1]}n.sub(g,c,u),o(g,g,e);var b=s(_,u),w=s(_,c),M=b+w;0!==M&&(b/=M,w/=M),o(v,g,-b),o(m,g,w);var S=l([],_,v),A=l([],_,m);h&&(a(S,S,d),r(S,S,f),a(A,A,d),r(A,A,f)),p.push(S),p.push(A)}return i&&p.push(p.shift()),p}},function(t,e,i){function n(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}var r=i(5);t.exports=function(t,e){for(var i=t.length,a=[],o=0,s=1;i>s;s++)o+=r.distance(t[s-1],t[s]);var l=o/2;l=i>l?i:l;for(var s=0;l>s;s++){var h,u,c,d=s/(l-1)*(e?i:i-1),f=Math.floor(d),p=d-f,g=t[f%i];e?(h=t[(f-1+i)%i],u=t[(f+1)%i],c=t[(f+2)%i]):(h=t[0===f?f:f-1],u=t[f>i-2?i-1:f+1],c=t[f>i-3?i-1:f+2]);var v=p*p,m=p*v;a.push([n(h[0],g[0],u[0],c[0],p,v,m),n(h[1],g[1],u[1],c[1],p,v,m)])}return a}},function(t,e,i){t.exports=i(6).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,a,o,!s)}})},function(t,e,i){"use strict";function n(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?c:h)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?c:h)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?u:l)(t.x1,t.cpx1,t.x2,e),(i?u:l)(t.y1,t.cpy1,t.y2,e)]}var r=i(16),a=i(5),o=r.quadraticSubdivide,s=r.cubicSubdivide,l=r.quadraticAt,h=r.cubicAt,u=r.quadraticDerivativeAt,c=r.cubicDerivativeAt,d=[];t.exports=i(6).extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,l=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,f=e.percent;0!==f&&(t.moveTo(i,n),null==u||null==c?(1>f&&(o(i,l,r,f,d),l=d[1],r=d[2],o(n,h,a,f,d),h=d[1],a=d[2]),t.quadraticCurveTo(l,h,r,a)):(1>f&&(s(i,l,u,r,f,d),l=d[1],u=d[2],r=d[3],s(n,h,c,a,f,d),h=d[1],c=d[2],a=d[3]),t.bezierCurveTo(l,h,u,c,r,a)))},pointAt:function(t){return n(this.shape,t,!1)},tangentAt:function(t){var e=n(this.shape,t,!0);return a.normalize(e,e)}})},function(t,e,i){"use strict";t.exports=i(6).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(i,n),1>o&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})},function(t,e,i){var n=i(65);t.exports=i(6).extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){n.buildPath(t,e,!0)}})},function(t,e,i){var n=i(65);t.exports=i(6).extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){n.buildPath(t,e,!1)}})},function(t,e,i){var n=i(66);t.exports=i(6).extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,a=e.width,o=e.height;e.r?n.buildPath(t,e):t.rect(i,r,a,o),t.closePath()}})},function(t,e,i){t.exports=i(6).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(o),u=Math.sin(o);t.moveTo(h*r+i,u*r+n),t.lineTo(h*a+i,u*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}})},function(t,e,i){"use strict";var n=i(59),r=i(1),a=r.isString,o=r.isFunction,s=r.isObject,l=i(47),h=function(){this.animators=[]};h.prototype={constructor:h,animate:function(t,e){var i,a=!1,o=this,s=this.__zr;if(t){var h=t.split("."),u=o;a="shape"===h[0];for(var c=0,d=h.length;d>c;c++)u&&(u=u[h[c]]);u&&(i=u)}else i=o;if(!i)return void l('Property "'+t+'" is not existed in element '+o.id);var f=o.animators,p=new n(i,e);return p.during(function(t){o.dirty(a)}).done(function(){f.splice(r.indexOf(f,p),1)}),f.push(p),s&&s.animation.addAnimator(p),p},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r){function s(){h--,h||r&&r()}a(i)?(r=n,n=i,i=0):o(n)?(r=n,n="linear",i=0):o(i)?(r=i,i=0):o(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i,n,r);var l=this.animators.slice(),h=l.length;h||r&&r();for(var u=0;u0&&this.animate(t,!1).when(null==n?500:n,o).delay(a||0),this}},t.exports=h},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}i.prototype={constructor:i,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this._dispatchProxy(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this._dispatchProxy(e,"drag",t.event);var o=this.findHover(i,n,e),s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this._dispatchProxy(s,"dragleave",t.event),o&&o!==s&&this._dispatchProxy(o,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this._dispatchProxy(e,"dragend",t.event),this._dropTarget&&this._dispatchProxy(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},t.exports=i},function(t,e,i){function n(t,e,i,n,r,a,o,s,l,h,u){var g=l*(p/180),y=f(g)*(t-i)/2+d(g)*(e-n)/2,x=-1*d(g)*(t-i)/2+f(g)*(e-n)/2,_=y*y/(o*o)+x*x/(s*s);_>1&&(o*=c(_),s*=c(_));var b=(r===a?-1:1)*c((o*o*(s*s)-o*o*(x*x)-s*s*(y*y))/(o*o*(x*x)+s*s*(y*y)))||0,w=b*o*x/s,M=b*-s*y/o,S=(t+i)/2+f(g)*w-d(g)*M,A=(e+n)/2+d(g)*w+f(g)*M,T=m([1,0],[(y-w)/o,(x-M)/s]),I=[(y-w)/o,(x-M)/s],C=[(-1*y-w)/o,(-1*x-M)/s],k=m(I,C);v(I,C)<=-1&&(k=p),v(I,C)>=1&&(k=0),0===a&&k>0&&(k-=2*p),1===a&&0>k&&(k+=2*p),u.addData(h,S,A,o,s,T,k,g,a)}function r(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===v[0]&&v.shift();for(var m=0;mr;r++){var a=t[r];a.__dirty&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var s=new o(e);return s.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},s}}},function(t,e,i){function n(t,e){var i,n,a,u,c,d,f=t.data,p=r.M,g=r.C,v=r.L,m=r.R,y=r.A,x=r.Q;for(a=0,u=0;ac;c++){var d=s[c];d[0]=f[a++],d[1]=f[a++],o(d,d,e),f[u++]=d[0],f[u++]=d[1]}}}var r=i(28).CMD,a=i(5),o=a.applyTransform,s=[[],[],[]],l=Math.sqrt,h=Math.atan2;t.exports=n},function(t,e,i){if(!i(12).canvasSupported){var n,r="urn:schemas-microsoft-com:vml",a=window,o=a.document,s=!1;try{!o.namespaces.zrvml&&o.namespaces.add("zrvml",r),n=function(t){return o.createElement("')}}catch(l){n=function(t){return o.createElement("<"+t+' xmlns="'+r+'" class="zrvml">')}}var h=function(){if(!s){s=!0;var t=o.styleSheets;t.length<31?o.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};t.exports={doc:o,initVML:h,createNode:n}}},,,,,function(t,e,i){function n(){this.group=new r.Group,this._symbolEl=new o({})}var r=i(3),a=i(26),o=r.extendShape({shape:{points:null,sizes:null},symbolProxy:null,buildPath:function(t,e){for(var i=e.points,n=e.sizes,r=this.symbolProxy,a=r.shape,o=0;o=0;a--){var o=n[a],s=r[a],l=o[0]-s[0]/2,h=o[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return a}return-1}}),s=n.prototype;s.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray(function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i})}),e.symbolProxy=a.createSymbol(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)}),this.group.add(e)},s.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},s.remove=function(){this.group.removeAll()},t.exports=n},function(t,e,i){function n(t){return null==t.cpx1||null==t.cpy1}var r=i(3),a=i(5),o=r.Line.prototype,s=r.BezierCurve.prototype;t.exports=r.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(n(e)?o:s).buildPath(t,e)},pointAt:function(t){return n(this.shape)?o.pointAt.call(this,t):s.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=n(e)?[e.x2-e.x1,e.y2-e.y1]:s.tangentAt.call(this,t);return a.normalize(i,i)}})},function(t,e,i){var n=i(1),r=i(2);i(174),i(175),r.registerVisual(n.curry(i(46),"scatter","circle",null)),r.registerLayout(n.curry(i(55),"scatter")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.scatter",dependencies:["grid","polar"],getInitialData:function(t,e){var i=n(t.data,this,e);return i},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{normal:{opacity:.8}}}})},function(t,e,i){var n=i(39),r=i(171);i(2).extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new n,this._largeSymbolDraw=new r},render:function(t,e,i){var n=t.getData(),r=this._largeSymbolDraw,a=this._normalSymbolDraw,o=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?r:a;this._symbolDraw=s,s.updateData(n),o.add(s.group),o.remove(s===r?a.group:r.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)}})},function(t,e,i){i(110),i(40),i(41),i(182),i(183),i(178),i(179),i(108),i(107)},function(t,e,i){function n(t,e){var i=[1/0,-(1/0)];return h(e,function(e){var n=e.getData();n&&h(e.coordDimToDataDim(t),function(t){var e=n.getDataExtent(t);e[0]i[1]&&(i[1]=e[1])})},this),i}function r(t,e,i){var n=i.getAxisModel(),r=n.axis.scale,o=[0,100],s=[t.start,t.end],c=[];return e=e.slice(),a(e,n,r),h(["startValue","endValue"],function(e){c.push(null!=t[e]?r.parse(t[e]):null)}),h([0,1],function(t){var i=c[t],n=s[t];null!=n||null==i?(null==n&&(n=o[t]),i=r.parse(l.linearMap(n,o,e,!0))):n=l.linearMap(i,e,o,!0),c[t]=i,s[t]=n}),{valueWindow:u(c),percentWindow:u(s)}}function a(t,e,i){return h(["min","max"],function(n,r){var a=e.get(n,!0);null!=a&&(a+"").toLowerCase()!=="data"+n&&(t[r]=i.parse(a))}),e.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0)),t}function o(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var a=e||0===n[0]&&100===n[1],o=!e&&l.getPixelPrecision(r,[0,500]),s=!(e||20>o&&o>=0),h=e||a||s;i.setRange&&i.setRange(h?null:+r[0].toFixed(o),h?null:+r[1].toFixed(o))}}var s=i(1),l=i(4),h=s.each,u=l.asc,c=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this.ecModel=n,this._dataZoomModel=i};c.prototype={constructor:c,hostedBy:function(t){return this._dataZoomModel===t},getDataExtent:function(){return this._dataExtent.slice()},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[];return this.ecModel.eachSeries(function(e){this._axisIndex===e.get(this._dimName+"AxisIndex")&&t.push(e)},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,r=this.getAxisModel(),a="x"===i||"y"===i;a?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var o;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(o=t)}),o},reset:function(t){if(t===this._dataZoomModel){var e=this._dataExtent=n(this._dimName,this.getTargetSeriesModels()),i=r(t.option,e,this);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,o(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,o(this,!0))},filterData:function(t){function e(t){return t>=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow,o=this.getOtherAxisModel();t.get("$fromToolbox")&&o&&"category"===o.get("type")&&(r="empty"),h(n,function(t){var n=t.getData();n&&h(t.coordDimToDataDim(i),function(i){"empty"===r?t.setData(n.map(i,function(t){return e(t)?t:NaN})):n.filterSelf(i,e)})})}}},t.exports=c},function(t,e,i){t.exports=i(40).extend({type:"dataZoom.inside",defaultOption:{zoomLock:!1}})},function(t,e,i){function n(t,e,i,n){e=e.slice();var r=n.axisModels[0];if(r){var o=a(t,r,i),s=o.signal*(e[1]-e[0])*o.pixel/o.pixelLength;return h(s,e,[0,100],"rigid"),e}}function r(t,e,i,n,r,s){i=i.slice();var l=r.axisModels[0];if(l){var h=a(e,l,n),u=h.pixel-h.pixelStart,c=u/h.pixelLength*(i[1]-i[0])+i[0];return t=Math.max(t,0),i[0]=(i[0]-c)*t+c,i[1]=(i[1]-c)*t+c,o(i)}}function a(t,e,i){var n=e.axis,r=i.rectProvider(),a={};return"x"===n.dim?(a.pixel=t[0],a.pixelLength=r.width,a.pixelStart=r.x,a.signal=n.inverse?1:-1):(a.pixel=t[1],a.pixelLength=r.height,a.pixelStart=r.y,a.signal=n.inverse?-1:1),a}function o(t){var e=[0,100];return!(t[0]<=e[1])&&(t[0]=e[1]),!(t[1]<=e[1])&&(t[1]=e[1]),!(t[0]>=e[0])&&(t[0]=e[0]),!(t[1]>=e[0])&&(t[1]=e[0]),t}var s=i(41),l=i(1),h=i(80),u=i(184),c=l.bind,d=s.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){d.superApply(this,"render",arguments),u.shouldRecordRange(n,t.id)&&(this._range=t.getPercentRange());var r=this.getTargetInfo().cartesians,a=l.map(r,function(t){return u.generateCoordId(t.model)});l.each(r,function(e){var n=e.model;u.register(i,{coordId:u.generateCoordId(n),allCoordIds:a,coordinateSystem:n.coordinateSystem,dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:c(this._onPan,this,e),zoomGetRange:c(this._onZoom,this,e)})},this)},dispose:function(){u.unregister(this.api,this.dataZoomModel.id),d.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,r){return this._range=n([i,r],this._range,e,t)},_onZoom:function(t,e,i,n,a){var o=this.dataZoomModel;return o.option.zoomLock?this._range:this._range=r(1/i,[n,a],this._range,e,t,o)}});t.exports=d},function(t,e,i){var n=i(40);t.exports=n.extend({type:"dataZoom.select"})},function(t,e,i){t.exports=i(41).extend({type:"dataZoom.select"})},function(t,e,i){var n=i(40),r=n.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});t.exports=r},function(t,e,i){function n(t){return"x"===t?"y":"x"}var r=i(1),a=i(3),o=i(82),s=i(41),l=a.Rect,h=i(4),u=h.linearMap,c=i(14),d=i(80),f=h.asc,p=r.bind,g=r.each,v=7,m=1,y=30,x="horizontal",_="vertical",b=5,w=["line","bar","candlestick","scatter"],M=s.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){return M.superApply(this,"render",arguments),o.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){M.superApply(this,"remove",arguments),o.clear(this,"_dispatchZoomAction")},dispose:function(){M.superApply(this,"dispose",arguments),o.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new a.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},a=this._orient===x?{right:n.width-i.x-i.width,top:n.height-y-v,width:i.width,height:y}:{right:v,top:i.y,width:y,height:i.height},o=c.getLayoutParams(t.option);r.each(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=a[t])});var s=c.getLayoutRect(o,n,t.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===_&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==x||r?i===x&&r?{scale:o?[-1,1]:[-1,-1]}:i!==_||r?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size;this._displayables.barGroup.add(new l({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim,s=n.getDataExtent(o),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var h=[0,e[1]],c=[0,e[0]],d=[[e[0],0],[0,0]],f=[],p=c[1]/(n.count()-1),g=0,v=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(v>0&&e%v)return void(g+=p);var i=null==t||isNaN(t)||""===t?null:u(t,s,h,!0);null!=i&&(d.push([g,i]),f.push([g,i])),g+=p});var m=this.dataZoomModel;this._displayables.barGroup.add(new a.Polygon({shape:{points:d},style:r.defaults({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})), +this._displayables.barGroup.add(new a.Polyline({shape:{points:f},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o.name,s).getTargetSeriesModels();r.each(l,function(t){if(!(i||e!==!0&&r.indexOf(w,t.get("type"))<0)){var l=n(o.name),h=a.getComponent(o.axis,s).axis;i={thisAxis:h,series:t,thisDim:o.name,otherDim:l,otherAxisInverse:t.coordinateSystem.getOtherAxis(h).inverse}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;n.add(t.filler=new l({draggable:!0,cursor:"move",drift:p(this._onDragMove,this,"all"),ondragstart:p(this._showDataInfo,this,!0),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new l(a.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:m,fill:"rgba(0,0,0,0)"}})));var s=o.get("handleIcon");g([0,1],function(t){var r=a.makePath(s,{style:{strokeNoScale:!0},rectHover:!0,cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:p(this._onDragMove,this,t),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1)},{x:-.5,y:0,width:1,height:1},"center"),l=r.getBoundingRect();this._handleHeight=h.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var u=o.get("handleColor");null!=u&&(r.style.fill=u),n.add(e[t]=r);var c=o.textStyleModel;this.group.add(i[t]=new a.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",fill:c.getTextColor(),textFont:c.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[u(t[0],[0,100],e,!0),u(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this._handleEnds,n=this._getViewExtent();d(e,i,n,"all"===t||this.dataZoomModel.get("zoomLock")?"rigid":"cross",t),this._range=f([u(i[0],n,[0,100],!0),u(i[1],n,[0,100],!0)])},_updateView:function(){var t=this._displayables,e=this._handleEnds,i=f(e.slice()),n=this._size;g([0,1],function(i){var r=t.handles[i],a=this._handleHeight;r.attr({scale:[a,a],position:[e[i],n[1]/2-a/2]})},this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:n[1]}),this._updateDataInfo()},_updateDataInfo:function(){function t(t){var e=a.getTransform(i.handles[t].parent,this.group),s=a.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+b,u=a.applyTransform([h[t]+(0===t?-l:l),this._size[1]/2],e);n[t].setStyle({x:u[0],y:u[1],textVerticalAlign:r===x?"middle":s,textAlign:r===x?s:"center",text:o[t]})}var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,o=["",""];if(e.get("showDetail")){var s,l;e.eachTargetAxis(function(t,i){s||(s=e.getAxisProxy(t.name,i).getDataValueWindow(),l=this.ecModel.getComponent(t.axis,i).axis)},this),s&&(o=[this._formatLabel(s[0],l),this._formatLabel(s[1],l)])}var h=f(this._handleEnds.slice());t.call(this,0),t.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter");if(r.isFunction(n))return n(t);var a=i.get("labelPrecision");return null!=a&&"auto"!==a||(a=e.getPixelPrecision()),t=null==t&&isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20)),r.isString(n)&&(t=n.replace("{value}",t)),t},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._applyBarTransform([e,i],!0);this._updateInterval(t,n[0]),this._updateView(),this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_applyBarTransform:function(t,e){var i=this._displayables.barGroup.getLocalTransform();return a.applyTransform(t,i,e)},_findCoordRect:function(){var t,e=this.getTargetInfo();if(e.cartesians.length)t=e.cartesians[0].model.coordinateSystem.getRect();else{var i=this.api.getWidth(),n=this.api.getHeight();t={x:.2*i,y:.2*n,width:.6*i,height:.6*n}}return t}});t.exports=M},function(t,e,i){function n(t){var e=t.getZr();return e[p]||(e[p]={})}function r(t,e,i){var n=new c(t.getZr());return n.enable(),n.on("pan",f(o,i)),n.on("zoom",f(s,i)),n}function a(t){u.each(t,function(e,i){e.count||(e.controller.off("pan").off("zoom"),delete t[i])})}function o(t,e,i){l(t,function(n){return n.panGetRange(t.controller,e,i)})}function s(t,e,i,n){l(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function l(t,e){var i=[];u.each(t.dataZoomInfos,function(t){var n=e(t);n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})}),t.dispatchAction(i)}function h(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var u=i(1),c=i(79),d=i(82),f=u.curry,p="\x00_ec_dataZoom_roams",g={register:function(t,e){var i=n(t),o=e.dataZoomId,s=e.coordId;u.each(i,function(t,i){var n=t.dataZoomInfos;n[o]&&u.indexOf(e.allCoordIds,s)<0&&(delete n[o],t.count--)}),a(i);var l=i[s];l||(l=i[s]={coordId:s,dataZoomInfos:{},count:0},l.controller=r(t,e,l),l.dispatchAction=u.curry(h,t));var c=e.coordinateSystem.getRect().clone();l.controller.rectProvider=function(){return c},d.createOrUpdate(l,"dispatchAction",e.throttleRate,"fixRate"),!l.dataZoomInfos[o]&&l.count++,l.dataZoomInfos[o]=e},unregister:function(t,e){var i=n(t);u.each(i,function(t){var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),a(i)},shouldRecordRange:function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].dataZoomId===e)return!1;return!0},generateCoordId:function(t){return t.type+"\x00_"+t.id}};t.exports=g},function(t,e,i){i(110),i(40),i(41),i(180),i(181),i(108),i(107)},function(t,e,i){i(187),i(189),i(188);var n=i(2);n.registerProcessor(i(190))},function(t,e,i){"use strict";var n=i(1),r=i(9),a=i(2).extendComponentModel({type:"legend",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){a.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:"top",align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0}});t.exports=a},function(t,e,i){function n(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function r(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function a(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var o=i(1),s=i(26),l=i(3),h=i(114),u=o.curry;t.exports=i(2).extendComponentView({type:"legend",init:function(){this._symbolTypeStore={}},render:function(t,e,i){var s=this.group;if(s.removeAll(),t.get("show")){var c=t.get("selectedMode"),d=t.get("align");"auto"===d&&(d="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left");var f={};o.each(t.getData(),function(o){var h=o.get("name");if(""===h||"\n"===h)return void s.add(new l.Group({newline:!0}));var p=e.getSeriesByName(h)[0];if(!f[h])if(p){var g=p.getData(),v=g.getVisual("color");"function"==typeof v&&(v=v(p.getDataParams(0)));var m=g.getVisual("legendSymbol")||"roundRect",y=g.getVisual("symbol"),x=this._createItem(h,o,t,m,y,d,v,c);x.on("click",u(n,h,i)).on("mouseover",u(r,p,"",i)).on("mouseout",u(a,p,"",i)),f[h]=!0}else e.eachRawSeries(function(e){if(!f[h]&&e.legendDataProvider){var s=e.legendDataProvider(),l=s.indexOfName(h);if(0>l)return;var p=s.getItemVisual(l,"color"),g="roundRect",v=this._createItem(h,o,t,g,null,d,p,c);v.on("click",u(n,h,i)).on("mouseover",u(r,e,h,i)).on("mouseout",u(a,e,h,i)),f[h]=!0}},this)},this),h.layout(s,t,i),h.addBackground(s,t)}},_createItem:function(t,e,i,n,r,a,o,h){var u=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.isSelected(t),p=new l.Group,g=e.getModel("textStyle"),v=e.get("icon");if(n=v||n,p.add(s.createSymbol(n,0,0,u,c,f?o:d)),!v&&r&&(r!==n||"none"==r)){var m=.8*c;"none"===r&&(r="circle"),p.add(s.createSymbol(r,(u-m)/2,(c-m)/2,m,m,f?o:d))}var y="left"===a?u+5:-5,x=a,_=i.get("formatter");"string"==typeof _&&_?t=_.replace("{name}",t):"function"==typeof _&&(t=_(t));var b=new l.Text({style:{text:t,x:y,y:c/2,fill:f?g.getTextColor():d,textFont:g.getFont(),textAlign:x,textVerticalAlign:"middle"}});return p.add(b),p.add(new l.Rect({shape:p.getBoundingRect(),invisible:!0})),p.eachChild(function(t){t.silent=!h}),this.group.add(p),l.setHoverStyle(p),p}})},function(t,e,i){function n(t,e,i){var n,r={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var s=i.getData();a.each(s,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);e in r?r[e]=r[e]&&n:r[e]=n}})}),{name:e.name,selected:r}}var r=i(2),a=i(1);r.registerAction("legendToggleSelect","legendselectchanged",a.curry(n,"toggleSelected")),r.registerAction("legendSelect","legendselected",a.curry(n,"select")),r.registerAction("legendUnSelect","legendunselected",a.curry(n,"unSelect"))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i=0&&(h=+h.toFixed(v)),p.coord[d]=g.coord[d]=h,n=[p,g,{type:a,valueIndex:n.valueIndex,value:h}]}return n=[c.dataTransform(t,n[0]),c.dataTransform(t,n[1]),l.extend({},n[2])],n[2].type=n[2].type||"",l.merge(n[2],n[0]),l.merge(n[2],n[1]),n};i(69).extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,a=e.__to;r.each(function(e){o(r,e,!0,t,i),o(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap[t.name].updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var a=e.getItemModel(i);o(e,i,r,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||x[r?0:1],symbol:a.get("symbol",!0)||y[r?0:1],color:a.get("itemStyle.normal.color")||u.getVisual("color")})}var a=t.coordinateSystem,h=t.name,u=t.getData(),c=this.markerGroupMap,f=c[h];f||(f=c[h]=new d),this.group.add(f.group);var p=s(a,t,e),g=p.from,v=p.to,m=p.line;e.__from=g,e.__to=v,e.setData(m);var y=e.get("symbol"),x=e.get("symbolSize");l.isArray(y)||(y=[y,y]),"number"==typeof x&&(x=[x,x]),p.from.each(function(t){r(g,t,!0),r(v,t,!1)}),m.each(function(t){var e=m.getItemModel(t).get("lineStyle.normal.color");m.setItemVisual(t,{color:e||g.getItemVisual(t,"color")}),m.setItemLayout(t,[g.getItemLayout(t),v.getItemLayout(t)]),m.setItemVisual(t,{fromSymbolSize:g.getItemVisual(t,"symbolSize"),fromSymbol:g.getItemVisual(t,"symbol"),toSymbolSize:v.getItemVisual(t,"symbolSize"),toSymbol:v.getItemVisual(t,"symbol")})}),f.updateData(m),p.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),f.__keep=!0,f.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){t.exports=i(68).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}})},function(t,e,i){function n(t,e,i){var n=e.coordinateSystem;t.each(function(r){var a,o=t.getItemModel(r),l=s.parsePercent(o.get("x"),i.getWidth()),h=s.parsePercent(o.get("y"),i.getHeight());if(isNaN(l)||isNaN(h)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var u=t.get(n.dimensions[0],r),c=t.get(n.dimensions[1],r);a=n.dataToPoint([u,c])}}else a=[l,h];isNaN(l)||(a[0]=l),isNaN(h)||(a[1]=h),t.setItemLayout(r,a)})}function r(t,e,i){var n;n=t?o.map(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new l(n,i),a=o.map(i.get("data"),o.curry(h.dataTransform,e));return t&&(a=o.filter(a,o.curry(h.dataFilter,t))),r.initData(a,null,t?h.dimValueGetter:function(t){return t.value}),r}var a=i(39),o=i(1),s=i(4),l=i(13),h=i(70);i(69).extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(n(e.getData(),t,i),this.markerGroupMap[t.name].updateLayout(e))},this)},renderSeries:function(t,e,i,o){var s=t.coordinateSystem,l=t.name,h=t.getData(),u=this.markerGroupMap,c=u[l];c||(c=u[l]=new a);var d=r(s,t,e);e.setData(d),n(e.getData(),t,o),d.each(function(t){var i=d.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),d.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||h.getVisual("color"),symbol:i.getShallow("symbol")})}),c.updateData(d),this.group.add(c.group),d.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),c.__keep=!0,c.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){"use strict";var n=i(2),r=i(3),a=i(14);n.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),n.extendComponentView({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),h=t.get("textBaseline"),u=new r.Text({style:{text:t.get("text"),textFont:o.getFont(),fill:o.getTextColor()},z2:10}),c=u.getBoundingRect(),d=t.get("subtext"),f=new r.Text({style:{text:d,textFont:s.getFont(),fill:s.getTextColor(),y:c.height+t.get("itemGap"),textBaseline:"top"},z2:10}),p=t.get("link"),g=t.get("sublink");u.silent=!p,f.silent=!g,p&&u.on("click",function(){window.open(p,"_"+t.get("target"))}),g&&f.on("click",function(){window.open(g,"_"+t.get("subtarget"))}),n.add(u),d&&n.add(f);var v=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=v.width,m.height=v.height;var y=a.getLayoutRect(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),"middle"===l&&(l="center"),"right"===l?y.x+=y.width:"center"===l&&(y.x+=y.width/2)),h||(h=t.get("top")||t.get("bottom"),"center"===h&&(h="middle"),"bottom"===h?y.y+=y.height:"middle"===h&&(y.y+=y.height/2),h=h||"top"),n.attr("position",[y.x,y.y]);var x={textAlign:l,textVerticalAlign:h};u.setStyle(x),f.setStyle(x),v=n.getBoundingRect();var _=y.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var w=new r.Rect({shape:{x:v.x-_[3],y:v.y-_[0],width:v.width+_[1]+_[3],height:v.height+_[0]+_[2]},style:b,silent:!0});r.subPixelOptimizeRect(w),n.add(w)}}})},function(t,e,i){i(202),i(203),i(208),i(206),i(204),i(205),i(207)},function(t,e,i){var n=i(25),r=i(1),a=i(2).extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){a.superApply(this,"mergeDefaultAndTheme",arguments),r.each(this.option.feature,function(t,e){var i=n.get(e);i&&r.merge(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}});t.exports=a},function(t,e,i){(function(e){function n(t){return 0===t.indexOf("my")}var r=i(25),a=i(1),o=i(3),s=i(9),l=i(45),h=i(114),u=i(18);t.exports=i(2).extendComponentView({type:"toolbox",render:function(t,e,i,c){function d(a,o){var l,h=y[a],u=y[o],d=v[h],p=new s(d,t,t.ecModel);if(h&&!u){if(n(h))l={model:p,onclick:p.option.onclick,featureName:h};else{var g=r.get(h);if(!g)return;l=new g(p,e,i)}m[h]=l}else{if(l=m[u],!l)return;l.model=p,l.ecModel=e,l.api=i}return!h&&u?void(l.dispose&&l.dispose(e,i)):!p.get("show")||l.unusable?void(l.remove&&l.remove(e,i)):(f(p,l,h),p.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(l.render&&l.render(p,e,i,c)))}function f(n,r,s){var l=n.getModel("iconStyle"),h=r.getIcons?r.getIcons():n.get("icon"),u=n.get("title")||{};if("string"==typeof h){var c=h,d=u;h={},u={},h[s]=c,u[s]=d}var f=n.iconPaths={};a.each(h,function(s,h){var c=l.getModel("normal").getItemStyle(),d=l.getModel("emphasis").getItemStyle(),v={x:-g/2,y:-g/2,width:g,height:g},m=0===s.indexOf("image://")?(v.image=s.slice(8),new o.Image({style:v})):o.makePath(s.replace("path://",""),{style:c,hoverStyle:d,rectHover:!0},v,"center");o.setHoverStyle(m),t.get("showTitle")&&(m.__title=u[h],m.on("mouseover",function(){m.setStyle({text:u[h],textPosition:d.textPosition||"bottom",textFill:d.fill||d.stroke||"#000",textAlign:d.textAlign||"center"})}).on("mouseout",function(){m.setStyle({textFill:null})})),m.trigger(n.get("iconStatus."+h)||"normal"),p.add(m),m.on("click",a.bind(r.onclick,r,e,i,h)),f[h]=m})}var p=this.group;if(p.removeAll(),t.get("show")){var g=+t.get("itemSize"),v=t.get("feature")||{},m=this._features||(this._features={}),y=[];a.each(v,function(t,e){y.push(e)}),new l(this._featureNames||[],y).add(d).update(d).remove(a.curry(d,null)).execute(),this._featureNames=y,h.layout(p,t,i),h.addBackground(p,t),p.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=u.getBoundingRect(e,n.font),a=t.position[0]+p.position[0],o=t.position[1]+p.position[1]+g,s=!1;o+r.height>i.getHeight()&&(n.textPosition="top",s=!0);var l=s?-5-r.height:g+8;a+r.width/2>i.getWidth()?(n.textPosition=["100%",l],n.textAlign="right"):a-r.width/2<0&&(n.textPosition=[0,l],n.textAlign="left")}})}},updateView:function(t,e,i,n){a.each(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},updateLayout:function(t,e,i,n){a.each(this._features,function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)})},remove:function(t,e){a.each(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){a.each(this._features,function(i){i.dispose&&i.dispose(t,e)})}})}).call(e,i(214))},function(t,e,i){function n(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var a=r.getBaseAxis();if("category"===a.type){var o=a.dim+"_"+a.index;e[o]||(e[o]={categoryAxis:a,valueAxis:r.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),e[o].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function r(t){var e=[];return p.each(t,function(t,i){var n=t.categoryAxis,r=t.valueAxis,a=r.dim,o=[" "].concat(p.map(t.series,function(t){return t.name})),s=[n.model.getCategories()];p.each(t.series,function(t){s.push(t.getRawData().mapArray(a,function(t){return t}))});for(var l=[o.join(m)],h=0;ho;o++)n[o]=arguments[o];i.push((a?a+m:"")+n.join(m))}),i.join("\n")}).join("\n\n"+v+"\n\n")}function o(t){var e=n(t);return{value:p.filter([r(e.seriesGroupByCategoryAxis),a(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+v+"\n\n"),meta:e.meta}}function s(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function l(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(m)>=0?!0:void 0}function h(t){for(var e=t.split(/\n+/g),i=s(e.shift()).split(y),n=[],r=p.map(i,function(t){return{name:t,data:[]}}),a=0;a1?"emphasis":"normal")}function o(t,e,i,n){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=h.makeCoordInfoList(r(t.option),e),s=o.xAxisHas&&!o.yAxisHas?"lineX":!o.xAxisHas&&o.yAxisHas?"lineY":"rect";i._brushController.setPanels(h.makePanelOpts(o)).enableBrush(a?{brushType:s,brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}var s=i(1),l=i(111),h=i(112),u=i(109),c=s.each;i(185);var d="\x00_ec_\x00toolbox-dataZoom_";n.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:{zoom:"区域缩放",back:"区域缩放还原"}};var f=n.prototype;f.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,o(t,e,this,n),a(t,e)},f.onclick=function(t,e,i){p[i].call(this)},f.remove=function(t,e){this._brushController.unmount()},f.dispose=function(t,e){this._brushController.dispose()};var p={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(u.pop(this.ecModel))}};f._onBrush=function(t,e){function i(t,e,i){var r=n(t,i[t],o);r&&(a[r.id]={dataZoomId:r.id,startValue:e[0],endValue:e[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(r,a){var o=r.get(t+"Index");null!=o&&i.getComponent(t,o)===e&&(n=r)}),n}if(e.isEnd&&t.length){var a={},o=this.ecModel;this._brushController.updateCovers([]);var s=h.makeCoordInfoList(r(this.model.option),o),l=[];h.parseOutputRanges(t,s,o,l);var c=t[0],d=l[0],f=c.coordRange,p=c.brushType;if(d&&f)if("rect"===p)i("xAxis",f[0],d),i("yAxis",f[1],d);else{var g={lineX:"xAxis",lineY:"yAxis"};i(g[p],f,d)}u.push(o,a),this._dispatchZoomAction(a)}},f._dispatchZoomAction=function(t){var e=[];c(t,function(t,i){e.push(s.clone(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},i(25).register("dataZoom",n),i(2).registerPreprocessor(function(t){function e(t,e){if(e){var r=t+"Index",a=e[r];null==a||"all"==a||s.isArray(a)||(a=a===!1||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"==a||-1!==s.indexOf(a,i)){var o={type:"select",$fromToolbox:!0,id:d+t+i};o[r]=i,n.push(o)}})}}function i(e,i){var n=t[e];s.isArray(n)||(n=n?[n]:[]),c(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);s.isArray(n)||(t.dataZoom=n=[n]);var r=t.toolbox;if(r&&(s.isArray(r)&&(r=r[0]),r&&r.feature)){var a=r.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}}),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(1);n.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"},option:{},seriesIndex:{}};var a=n.prototype;a.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return r.each(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var o={line:function(t,e,i,n){return"bar"===t?r.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?r.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0):void 0},tiled:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:""},n.get("option.tiled")||{},!0):void 0}},s=[["line","bar"],["stack","tiled"]];a.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(o[i]){var l={series:[]},h=function(t){var e=t.subType,a=t.id,s=o[i](e,a,t,n);s&&(r.defaults(s,t.option),l.series.push(s));var h=t.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim,d=t.get(c+"AxisIndex"),f=c+"Axis";l[f]=l[f]||[];for(var p=0;d>=p;p++)l[f][d]=l[f][d]||{};l[f][d].boundaryGap="bar"===i}}};r.each(s,function(t){r.indexOf(t,i)>=0&&r.each(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},h),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l})}};var l=i(2);l.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),i(25).register("magicType",n),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(109);n.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:"还原"};var a=n.prototype;a.onclick=function(t,e,i){r.clear(t),e.dispatchAction({type:"restore",from:this.uid})},i(25).register("restore",n),i(2).registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),t.exports=n},function(t,e,i){function n(t){this.model=t}var r=i(12);n.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:"保存为图片",type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:["右键另存为图片"]},n.prototype.unusable=!r.canvasSupported;var a=n.prototype;a.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),a=i.get("type",!0)||"png";r.download=n+"."+a,r.target="_blank";var o=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(r.href=o,"function"==typeof MouseEvent){var s=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(s)}else{var l=i.get("lang"),h='',u=window.open();u.document.write(h)}},i(25).register("saveAsImage",n),t.exports=n},function(t,e,i){i(211),i(212),i(2).registerAction({type:"showTip",event:"showTip",update:"none"},function(){}),i(2).registerAction({type:"hideTip",event:"hideTip",update:"none"},function(){})},function(t,e,i){function n(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return l.map(g,function(t){return t+"transition:"+i}).join(";")}function r(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),d(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function a(t){t=t;var e=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.getModel("textStyle"),s=t.get("padding");return i&&e.push(n(i)),a&&(p.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+h.toHex(a)),e.push("filter:alpha(opacity=70)"))),d(["width","color","radius"],function(i){var n="border-"+i,r=f(n),a=t.get(r);null!=a&&e.push(n+":"+a+("color"===i?"":"px"))}),e.push(r(o)),null!=s&&e.push("padding:"+c.normalizeCssArray(s).join("px ")+"px"),e.join(";")+";"}function o(t,e){var i=document.createElement("div"),n=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r.enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(!r.enterable){var i=n.handler;u.normalizeEvent(t,e),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r.enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1},s(i,t)}function s(t,e){function i(t){n(t.target)&&t.preventDefault()}function n(i){for(;i&&i!==e;){if(i===t)return!0;i=i.parentNode}}u.addEventListener(e,"touchstart",i),u.addEventListener(e,"touchmove",i),u.addEventListener(e,"touchend",i)}var l=i(1),h=i(17),u=i(24),c=i(11),d=l.each,f=c.toCamelCase,p=i(12),g=["","-webkit-","-moz-","-o-"],v="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";o.prototype={constructor:o,enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=v+a(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){var e=this.el;e.innerHTML=t,e.style.display=t?"block":"none"},moveTo:function(t,e){var i=this.el.style;i.left=t+"px",i.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this.enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(l.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}},t.exports=o},function(t,e,i){i(2).extendComponentModel({type:"tooltip",defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove",alwaysShowContent:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:!0,animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",lineStyle:{color:"#555",width:1,type:"solid"},crossStyle:{color:"#555",width:1,type:"dashed",textStyle:{}},shadowStyle:{color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff",fontSize:14}}})},function(t,e,i){function n(t,e){if(!t||!e)return!1;var i=g.round;return i(t[0])===i(e[0])&&i(t[1])===i(e[1])}function r(t,e,i,n){return{x1:t,y1:e,x2:i,y2:n}}function a(t,e,i,n){return{x:t,y:e,width:i,height:n}}function o(t,e,i,n,r,a){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:a,clockwise:!0}}function s(t,e,i,n,r){var a=i.clientWidth,o=i.clientHeight,s=20;return t+a+s>n?t-=a+s:t+=s,e+o+s>r?e-=o+s:e+=s,[t,e]}function l(t,e,i){var n=i.clientWidth,r=i.clientHeight,a=5,o=0,s=0,l=e.width,h=e.height;switch(t){case"inside":o=e.x+l/2-n/2,s=e.y+h/2-r/2;break;case"top":o=e.x+l/2-n/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-n/2,s=e.y+h+a;break;case"left":o=e.x-n-a,s=e.y+h/2-r/2;break;case"right":o=e.x+l+a,s=e.y+h/2-r/2}return[o,s]}function h(t,e,i,n,r,a,o){var h=o.getWidth(),u=o.getHeight(),c=a&&a.getBoundingRect().clone();if(a&&c.applyTransform(a.transform),"function"==typeof t&&(t=t([e,i],r,n.el,c)),f.isArray(t))e=v(t[0],h),i=v(t[1],u);else if("string"==typeof t&&a){var d=l(t,c,n.el);e=d[0],i=d[1]}else{var d=s(e,i,n.el,h,u);e=d[0],i=d[1]}n.moveTo(e,i)}function u(t){var e=t.coordinateSystem,i=t.get("tooltip.trigger",!0);return!(!e||"cartesian2d"!==e.type&&"polar"!==e.type&&"singleAxis"!==e.type||"item"===i)}var c=i(210),d=i(3),f=i(1),p=i(11),g=i(4),v=g.parsePercent,m=i(12);i(2).extendComponentView({type:"tooltip",_axisPointers:{},init:function(t,e){if(!m.node){var i=new c(e.getDom(),e);this._tooltipContent=i,e.on("showTip",this._manuallyShowTip,this),e.on("hideTip",this._manuallyHideTip,this)}},render:function(t,e,i){if(!m.node){this.group.removeAll(),this._axisPointers={},this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastHover={};var n=this._tooltipContent;n.update(),n.enterable=t.get("enterable"),this._alwaysShowContent=t.get("alwaysShowContent"),this._seriesGroupByAxis=this._prepareAxisTriggerData(t,e);var r=this._crossText;if(r&&this.group.add(r),null!=this._lastX&&null!=this._lastY){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){a._manuallyShowTip({x:a._lastX,y:a._lastY})})}var o=this._api.getZr();o.off("click",this._tryShow),o.off("mousemove",this._mousemove),o.off("mouseout",this._hide),o.off("globalout",this._hide),"click"===t.get("triggerOn")?o.on("click",this._tryShow,this):(o.on("mousemove",this._mousemove,this),o.on("mouseout",this._hide,this),o.on("globalout",this._hide,this))}},_mousemove:function(t){var e=this._tooltipModel.get("showDelay"),i=this;clearTimeout(this._showTimeout),e>0?this._showTimeout=setTimeout(function(){i._tryShow(t)},e):this._tryShow(t)},_manuallyShowTip:function(t){if(t.from!==this.uid){var e=this._ecModel,i=t.seriesIndex,n=t.dataIndex,r=e.getSeriesByIndex(i),a=this._api;if(null==t.x||null==t.y){if(r||e.eachSeries(function(t){u(t)&&!r&&(r=t)}),r){var o=r.getData();null==n&&(n=o.indexOfName(t.name));var s,l,h=o.getItemGraphicEl(n),c=r.coordinateSystem;if(c&&c.dataToPoint){var d=c.dataToPoint(o.getValues(f.map(c.dimensions,function(t){return r.coordDimToDataDim(t)[0]}),n,!0));s=d&&d[0],l=d&&d[1]}else if(h){var p=h.getBoundingRect().clone();p.applyTransform(h.transform),s=p.x+p.width/2,l=p.y+p.height/2}null!=s&&null!=l&&this._tryShow({offsetX:s,offsetY:l,target:h,event:{}})}}else{var h=a.getZr().handler.findHover(t.x,t.y);this._tryShow({offsetX:t.x,offsetY:t.y,target:h,event:{}})}}},_manuallyHideTip:function(t){t.from!==this.uid&&this._hide()},_prepareAxisTriggerData:function(t,e){var i={};return e.eachSeries(function(t){if(u(t)){var e,n,r=t.coordinateSystem;"cartesian2d"===r.type?(e=r.getBaseAxis(),n=e.dim+e.index):"singleAxis"===r.type?(e=r.getAxis(),n=e.dim+e.type):(e=r.getBaseAxis(),n=e.dim+r.name),i[n]=i[n]||{coordSys:[],series:[]},i[n].coordSys.push(r),i[n].series.push(t)}},this),i},_tryShow:function(t){var e=t.target,i=this._tooltipModel,n=i.get("trigger"),r=this._ecModel,a=this._api;if(i)if(this._lastX=t.offsetX,this._lastY=t.offsetY,e&&null!=e.dataIndex){var o=e.dataModel||r.getSeriesByIndex(e.seriesIndex),s=e.dataIndex,l=o.getData().getItemModel(s);"axis"===(l.get("tooltip.trigger")||n)?this._showAxisTooltip(i,r,t):(this._ticket="",this._hideAxisPointer(),this._resetLastHover(),this._showItemTooltipContent(o,s,e.dataType,t)),a.dispatchAction({type:"showTip",from:this.uid,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex})}else"item"===n?this._hide():this._showAxisTooltip(i,r,t),"cross"===i.get("axisPointer.type")&&a.dispatchAction({type:"showTip",from:this.uid,x:t.offsetX,y:t.offsetY})},_showAxisTooltip:function(t,e,i){var r=t.getModel("axisPointer"),a=r.get("type");if("cross"===a){var o=i.target;if(o&&null!=o.dataIndex){var s=e.getSeriesByIndex(o.seriesIndex),l=o.dataIndex;this._showItemTooltipContent(s,l,o.dataType,i)}}this._showAxisPointer();var h=!0;f.each(this._seriesGroupByAxis,function(t){var e=t.coordSys,o=e[0],s=[i.offsetX,i.offsetY];if(!o.containPoint(s))return void this._hideAxisPointer(o.name);h=!1;var l=o.dimensions,u=o.pointToData(s,!0);s=o.dataToPoint(u);var c=o.getBaseAxis(),d=r.get("axis");"auto"===d&&(d=c.dim);var p=!1,g=this._lastHover;if("cross"===a)n(g.data,u)&&(p=!0),g.data=u;else{var v=f.indexOf(l,d);g.data===u[v]&&(p=!0),g.data=u[v]}"cartesian2d"!==o.type||p?"polar"!==o.type||p?"singleAxis"!==o.type||p||this._showSinglePointer(r,o,d,s):this._showPolarPointer(r,o,d,s):this._showCartesianPointer(r,o,d,s),"cross"!==a&&this._dispatchAndShowSeriesTooltipContent(o,t.series,s,u,p)},this),this._tooltipModel.get("show")||this._hideAxisPointer(),h&&this._hide()},_showCartesianPointer:function(t,e,i,n){function o(i,n,a){var o="x"===i?r(n[0],a[0],n[0],a[1]):r(a[0],n[1],a[1],n[1]),s=l._getPointerElement(e,t,i,o);u?d.updateProps(s,{shape:o},t):s.attr({shape:o})}function s(i,n,r){var o=e.getAxis(i),s=o.getBandWidth(),h=r[1]-r[0],c="x"===i?a(n[0]-s/2,r[0],s,h):a(r[0],n[1]-s/2,h,s),f=l._getPointerElement(e,t,i,c);u?d.updateProps(f,{shape:c},t):f.attr({shape:c})}var l=this,h=t.get("type"),u="cross"!==h&&"category"===e.getBaseAxis().type;if("cross"===h)o("x",n,e.getAxis("y").getGlobalExtent()),o("y",n,e.getAxis("x").getGlobalExtent()),this._updateCrossText(e,n,t);else{var c=e.getAxis("x"===i?"y":"x"),f=c.getGlobalExtent();"cartesian2d"===e.type&&("line"===h?o:s)(i,n,f)}},_showSinglePointer:function(t,e,i,n){function a(i,n,a){var s=e.getAxis(),h=s.orient,u="horizontal"===h?r(n[0],a[0],n[0],a[1]):r(a[0],n[1],a[1],n[1]),c=o._getPointerElement(e,t,i,u);l?d.updateProps(c,{shape:u},t):c.attr({shape:u})}var o=this,s=t.get("type"),l="cross"!==s&&"category"===e.getBaseAxis().type,h=e.getRect(),u=[h.y,h.y+h.height];a(i,n,u)},_showPolarPointer:function(t,e,i,n){function a(i,n,a){var o,s=e.pointToCoord(n);if("angle"===i){var h=e.coordToPoint([a[0],s[1]]),u=e.coordToPoint([a[1],s[1]]);o=r(h[0],h[1],u[0],u[1])}else o={cx:e.cx,cy:e.cy,r:s[0]};var c=l._getPointerElement(e,t,i,o);f?d.updateProps(c,{shape:o},t):c.attr({shape:o})}function s(i,n,r){var a,s=e.getAxis(i),h=s.getBandWidth(),u=e.pointToCoord(n),c=Math.PI/180;a="angle"===i?o(e.cx,e.cy,r[0],r[1],(-u[1]-h/2)*c,(-u[1]+h/2)*c):o(e.cx,e.cy,u[0]-h/2,u[0]+h/2,0,2*Math.PI);var p=l._getPointerElement(e,t,i,a);f?d.updateProps(p,{shape:a},t):p.attr({shape:a})}var l=this,h=t.get("type"),u=e.getAngleAxis(),c=e.getRadiusAxis(),f="cross"!==h&&"category"===e.getBaseAxis().type;if("cross"===h)a("angle",n,c.getExtent()),a("radius",n,u.getExtent()),this._updateCrossText(e,n,t);else{var p=e.getAxis("radius"===i?"angle":"radius"),g=p.getExtent();("line"===h?a:s)(i,n,g)}},_updateCrossText:function(t,e,i){var n=i.getModel("crossStyle"),r=n.getModel("textStyle"),a=this._tooltipModel,o=this._crossText;o||(o=this._crossText=new d.Text({style:{textAlign:"left",textVerticalAlign:"bottom"}}),this.group.add(o));var s=t.pointToData(e),l=t.dimensions;s=f.map(s,function(e,i){var n=t.getAxis(l[i]);return e="category"===n.type||"time"===n.type?n.scale.getLabel(e):p.addCommas(e.toFixed(n.getPixelPrecision()))}),o.setStyle({fill:r.getTextColor()||n.get("color"),textFont:r.getFont(),text:s.join(", "),x:e[0]+5,y:e[1]-5}),o.z=a.get("z"),o.zlevel=a.get("zlevel")},_getPointerElement:function(t,e,i,n){var r=this._tooltipModel,a=r.get("z"),o=r.get("zlevel"),s=this._axisPointers,l=t.name;if(s[l]=s[l]||{},s[l][i])return s[l][i];var h=e.get("type"),u=e.getModel(h+"Style"),c="shadow"===h,f=u[c?"getAreaStyle":"getLineStyle"](),p="polar"===t.type?c?"Sector":"radius"===i?"Circle":"Line":c?"Rect":"Line";c?f.stroke=null:f.fill=null;var g=s[l][i]=new d[p]({style:f,z:a,zlevel:o,silent:!0,shape:n});return this.group.add(g),g},_dispatchAndShowSeriesTooltipContent:function(t,e,i,n,r){var a=this._tooltipModel,o=this._tooltipContent,s=t.getBaseAxis(),l=f.map(e,function(t){return{seriesIndex:t.seriesIndex,dataIndex:t.getAxisTooltipDataIndex?t.getAxisTooltipDataIndex(t.coordDimToDataDim(s.dim),n,s):t.getData().indexOfNearest(t.coordDimToDataDim(s.dim)[0],n["x"===s.dim||"radius"===s.dim?0:1])}}),u=this._lastHover,c=this._api;if(u.payloadBatch&&!r&&c.dispatchAction({type:"downplay",batch:u.payloadBatch}),r||(c.dispatchAction({type:"highlight",batch:l}),u.payloadBatch=l),c.dispatchAction({type:"showTip",dataIndex:l[0].dataIndex,seriesIndex:l[0].seriesIndex,from:this.uid}),s&&a.get("showContent")&&a.get("show")){var d,g=a.get("formatter"),v=a.get("position"),m=f.map(e,function(t,e){return t.getDataParams(l[e].dataIndex)});o.show(a);var y=l[0].dataIndex;if(!r){if(this._ticket="",g){if("string"==typeof g)d=p.formatTpl(g,m);else if("function"==typeof g){var x=this,_="axis_"+t.name+"_"+y,b=function(t,e){t===x._ticket&&(o.setContent(e),h(v,i[0],i[1],o,m,null,c))};x._ticket=_,d=g(m,_,b)}}else{var w=e[0].getData().getName(y);d=(w?w+"
":"")+f.map(e,function(t,e){return t.formatTooltip(l[e].dataIndex,!0)}).join("
")}o.setContent(d)}h(v,i[0],i[1],o,m,null,c)}},_showItemTooltipContent:function(t,e,i,n){var r=this._api,a=t.getData(i),o=a.getItemModel(e),s=this._tooltipModel,l=this._tooltipContent,u=o.getModel("tooltip");if(u.parentModel?u.parentModel.parentModel=s:u.parentModel=this._tooltipModel,u.get("showContent")&&u.get("show")){var c,d=u.get("formatter"),f=u.get("position"),g=t.getDataParams(e,i);if(d){if("string"==typeof d)c=p.formatTpl(d,g);else if("function"==typeof d){var v=this,m="item_"+t.name+"_"+e,y=function(t,e){t===v._ticket&&(l.setContent(e),h(f,n.offsetX,n.offsetY,l,g,n.target,r))};v._ticket=m,c=d(g,m,y)}}else c=t.formatTooltip(e,!1,i);l.show(u),l.setContent(c),h(f,n.offsetX,n.offsetY,l,g,n.target,r)}},_showAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.show()})}else this.group.eachChild(function(t){t.show()}),this.group.show()},_resetLastHover:function(){var t=this._lastHover;t.payloadBatch&&this._api.dispatchAction({type:"downplay",batch:t.payloadBatch}),this._lastHover={}},_hideAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.hide()})}else this.group.children().length&&this.group.hide()},_hide:function(){clearTimeout(this._showTimeout),this._hideAxisPointer(),this._resetLastHover(),this._alwaysShowContent||this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._api.dispatchAction({type:"hideTip",from:this.uid}),this._lastX=this._lastY=null},dispose:function(t,e){if(!m.node){var i=e.getZr();this._tooltipContent.hide(),i.off("click",this._tryShow),i.off("mousemove",this._mousemove),i.off("mouseout",this._hide),i.off("globalout",this._hide),e.off("showTip",this._manuallyShowTip),e.off("hideTip",this._manuallyHideTip)}}})},,function(t,e){function i(){c&&h&&(c=!1,h.length?u=h.concat(u):d=-1,u.length&&n())}function n(){if(!c){var t=o(i);c=!0;for(var e=u.length;e;){for(h=u,u=[];++d1)for(var i=1;i=0?parseFloat(t)/100*e:parseFloat(t):t},E=function(t,e,i){var n=o.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=L(n[0],n[1],n[2]),t.opacity=i*n[3])},R=function(t){var e=o.parse(t);return[L(e[0],e[1],e[2]),e[3]]},N=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof f){var r,a=0,o=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){r="gradient";var d=i.transform,p=[n.x*u,n.y*c],g=[n.x2*u,n.y2*c];d&&(b(p,p,d),b(g,g,d));var v=g[0]-p[0],m=g[1]-p[1];a=180*Math.atan2(v,m)/Math.PI,0>a&&(a+=360),1e-6>a&&(a=0)}else{r="gradientradial";var p=[n.x*u,n.y*c],d=i.transform,y=i.scale,x=u,w=c;o=[(p[0]-h.x)/x,(p[1]-h.y)/w],d&&b(p,p,d),x/=y[0]*S,w/=y[1]*S;var M=_(x,w);s=0/M,l=2*n.r/M-s}var A=n.colorStops.slice();A.sort(function(t,e){return t.offset-e.offset});for(var T=A.length,I=[],C=[],k=0;T>k;k++){var L=A[k],P=R(L.color);C.push(L.offset*l+s+" "+P[0]),0!==k&&k!==T-1||I.push(P)}if(T>=2){var D=I[0][0],O=I[1][0],z=I[0][1]*e.opacity,N=I[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=a,t.color=D,t.color2=O,t.colors=C.join(","),t.opacity=N,t.opacity2=z}"radial"===r&&(t.focusposition=o.join(","))}else E(t,n,e.opacity)},B=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof f||E(t,e.stroke,e.opacity)},V=function(t,e,i,n){var r="fill"==e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof f&&D(t,a),a||(a=p.createNode(e)),r?N(a,i,n):B(a,i),P(t,a)):(t[r?"filled":"stroked"]="false",D(t,a))},F=[[],[],[]],G=function(t,e){var i,n,r,o,s,l,h=a.M,u=a.C,c=a.L,d=a.A,f=a.Q,p=[];for(o=0;o.01?G&&(H+=270/S):Math.abs(W-E)<1e-10?G&&z>H||!G&&H>z?T-=270/S:T+=270/S:G&&E>W||!G&&W>E?M+=270/S:M-=270/S),p.push(Z,g(((z-R)*P+k)*S-A),w,g(((E-N)*D+L)*S-A),w,g(((z+R)*P+k)*S-A),w,g(((E+N)*D+L)*S-A),w,g((H*P+k)*S-A),w,g((W*D+L)*S-A),w,g((M*P+k)*S-A),w,g((T*D+L)*S-A)),s=M,l=T;break;case a.R:var q=F[0],j=F[1];q[0]=t[o++],q[1]=t[o++],j[0]=q[0]+t[o++],j[1]=q[1]+t[o++],e&&(b(q,q,e),b(j,j,e)),q[0]=g(q[0]*S-A),j[0]=g(j[0]*S-A),q[1]=g(q[1]*S-A),j[1]=g(j[1]*S-A),p.push(" m ",q[0],w,q[1]," l ",j[0],w,q[1]," l ",j[0],w,j[1]," l ",q[0],w,j[1]);break;case a.Z:p.push(" x ")}if(i>0){p.push(n);for(var X=0;i>X;X++){var U=F[X];e&&b(U,U,e),p.push(g(U[0]*S-A),w,g(U[1]*S-A),i-1>X?w:"")}}}return p.join("")};d.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=p.createNode("shape"),C(i),this._vmlEl=i),V(i,"fill",e,this),V(i,"stroke",e,this);var n=this.transform,r=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var o=e.lineWidth;if(r&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];o*=v(m(s))}a.weight=o+"px"}var l=this.path;this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=G(l.data,this.transform),i.style.zIndex=O(this.zlevel,this.z,this.z2),P(t,i),e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},d.prototype.onRemove=function(t){D(t,this._vmlEl),this.removeRectText(t)},d.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)};var H=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};u.prototype.brushVML=function(t){var e,i,n=this.style,r=n.image;if(H(r)){var a=r.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var o=r.runtimeStyle,s=o.width,l=o.height;o.width="auto",o.height="auto",e=r.width,i=r.height,o.width=s,o.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}r=a}else r===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(r){var h=n.x||0,u=n.y||0,c=n.width,d=n.height,f=n.sWidth,m=n.sHeight,y=n.sx||0,x=n.sy||0,S=f&&m,A=this._vmlEl;A||(A=p.doc.createElement("div"),C(A),this._vmlEl=A);var T,I=A.style,k=!1,L=1,D=1;if(this.transform&&(T=this.transform,L=v(T[0]*T[0]+T[1]*T[1]),D=v(T[2]*T[2]+T[3]*T[3]),k=T[1]||T[2]),k){var z=[h,u],E=[h+c,u],R=[h,u+d],N=[h+c,u+d];b(z,z,T),b(E,E,T),b(R,R,T),b(N,N,T);var B=_(z[0],E[0],R[0],N[0]),V=_(z[1],E[1],R[1],N[1]),F=[];F.push("M11=",T[0]/L,w,"M12=",T[2]/D,w,"M21=",T[1]/L,w,"M22=",T[3]/D,w,"Dx=",g(h*L+T[4]),w,"Dy=",g(u*D+T[5])),I.padding="0 "+g(B)+"px "+g(V)+"px 0",I.filter=M+".Matrix("+F.join("")+", SizingMethod=clip)"}else T&&(h=h*L+T[4],u=u*D+T[5]),I.filter="",I.left=g(h)+"px",I.top=g(u)+"px";var G=this._imageEl,W=this._cropEl;G||(G=p.doc.createElement("div"),this._imageEl=G);var Z=G.style;if(S){if(e&&i)Z.width=g(L*e*c/f)+"px",Z.height=g(D*i*d/m)+"px";else{var q=new Image,j=this;q.onload=function(){q.onload=null,e=q.width,i=q.height,Z.width=g(L*e*c/f)+"px",Z.height=g(D*i*d/m)+"px",j._imageWidth=e,j._imageHeight=i,j._imageSrc=r},q.src=r}W||(W=p.doc.createElement("div"),W.style.overflow="hidden",this._cropEl=W);var X=W.style;X.width=g((c+y*c/f)*L),X.height=g((d+x*d/m)*D),X.filter=M+".Matrix(Dx="+-y*c/f*L+",Dy="+-x*d/m*D+")",W.parentNode||A.appendChild(W),G.parentNode!=W&&W.appendChild(G)}else Z.width=g(L*c)+"px",Z.height=g(D*d)+"px",A.appendChild(G),W&&W.parentNode&&(A.removeChild(W),this._cropEl=null);var U="",Y=n.opacity;1>Y&&(U+=".Alpha(opacity="+g(100*Y)+") "),U+=M+".AlphaImageLoader(src="+r+", SizingMethod=scale)", +Z.filter=U,A.style.zIndex=O(this.zlevel,this.z,this.z2),P(t,A),n.text&&this.drawRectText(t,this.getBoundingRect())}},u.prototype.onRemove=function(t){D(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},u.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)};var W,Z="normal",q={},j=0,X=100,U=document.createElement("div"),Y=function(t){var e=q[t];if(!e){j>X&&(j=0,q={});var i,n=U.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(r){}e={style:n.fontStyle||Z,variant:n.fontVariant||Z,weight:n.fontWeight||Z,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},q[t]=e,j++}return e};s.measureText=function(t,e){var i=p.doc;W||(W=i.createElement("div"),W.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",p.doc.body.appendChild(W));try{W.style.font=e}catch(n){}return W.innerHTML="",W.appendChild(i.createTextNode(t)),{width:W.offsetWidth}};for(var $=new r,Q=function(t,e,i,n){var r=this.style,a=r.text;if(a){var o,l,h=r.textAlign,u=Y(r.textFont),c=u.style+" "+u.variant+" "+u.weight+" "+u.size+'px "'+u.family+'"',d=r.textBaseline,f=r.textVerticalAlign;i=i||s.getBoundingRect(a,c,h,d);var v=this.transform;if(v&&!n&&($.copy(e),$.applyTransform(v),e=$),n)o=e.x,l=e.y;else{var m=r.textPosition,y=r.textDistance;if(m instanceof Array)o=e.x+z(m[0],e.width),l=e.y+z(m[1],e.height),h=h||"left",d=d||"top";else{var x=s.adjustTextPositionOnRect(m,e,i,y);o=x.x,l=x.y,h=h||x.textAlign,d=d||x.textBaseline}}if(f){switch(f){case"middle":l-=i.height/2;break;case"bottom":l-=i.height}d="top"}var _=u.size;switch(d){case"hanging":case"top":l+=_/1.75;break;case"middle":break;default:l-=_/2.25}switch(h){case"left":break;case"center":o-=i.width/2;break;case"right":o-=i.width}var M,S,A,T=p.createNode,I=this._textVmlEl;I?(A=I.firstChild,M=A.nextSibling,S=M.nextSibling):(I=T("line"),M=T("path"),S=T("textpath"),A=T("skew"),S.style["v-text-align"]="left",C(I),M.textpathok=!0,S.on=!0,I.from="0 0",I.to="1000 0.05",P(I,A),P(I,M),P(I,S),this._textVmlEl=I);var L=[o,l],D=I.style;v&&n?(b(L,L,v),A.on=!0,A.matrix=v[0].toFixed(3)+w+v[2].toFixed(3)+w+v[1].toFixed(3)+w+v[3].toFixed(3)+",0,0",A.offset=(g(L[0])||0)+","+(g(L[1])||0),A.origin="0 0",D.left="0px",D.top="0px"):(A.on=!1,D.left=g(o)+"px",D.top=g(l)+"px"),S.string=k(a);try{S.style.font=c}catch(E){}V(I,"fill",{fill:n?r.fill:r.textFill,opacity:r.opacity},this),V(I,"stroke",{stroke:n?r.stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash},this),I.style.zIndex=O(this.zlevel,this.z,this.z2),P(t,I)}},K=function(t){D(t,this._textVmlEl),this._textVmlEl=null},J=function(t){P(t,this._textVmlEl)},tt=[l,h,u,d,c],et=0;et} - */ - this._finalEvents = []; - Eventful.call(this); /** @@ -289,7 +283,8 @@ return /******/ (function(modules) { // webpackBootstrap // In case some people write `window.onresize = chart.resize` this.resize = zrUtil.bind(this.resize, this); - + // Can't dispatch action during rendering procedure + this._pendingActions = []; // Sort on demand function prioritySortFunc(a, b) { return a.prio - b.prio; @@ -324,9 +319,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.assert(!this[IN_MAIN_PROCESS], '`setOption` should not be called during main process.'); } - this[IN_MAIN_PROCESS] = 1; - - this._finalEvents = []; + this[IN_MAIN_PROCESS] = true; if (!this._model || notMerge) { this._model = new GlobalModel( @@ -338,11 +331,11 @@ return /******/ (function(modules) { // webpackBootstrap updateMethods.prepareAndUpdate.call(this); - !notRefreshImmediately && this._zr.refreshImmediately(); + this[IN_MAIN_PROCESS] = false; - this[IN_MAIN_PROCESS] = 0; + this._flushPendingActions(); - triggerFinalEvents.call(this); + !notRefreshImmediately && this._zr.refreshImmediately(); }; /** @@ -511,6 +504,7 @@ return /******/ (function(modules) { // webpackBootstrap var updateMethods = { + /** * @param {Object} payload * @private @@ -521,6 +515,7 @@ return /******/ (function(modules) { // webpackBootstrap var ecModel = this._model; var api = this._api; var coordSysMgr = this._coordSysMgr; + var zr = this._zr; // update before setOption if (!ecModel) { return; @@ -550,10 +545,10 @@ return /******/ (function(modules) { // webpackBootstrap // Set background var backgroundColor = ecModel.get('backgroundColor') || 'transparent'; - var painter = this._zr.painter; + var painter = zr.painter; // TODO all use clearColor ? if (painter.isSingleCanvas && painter.isSingleCanvas()) { - this._zr.configLayer(0, { + zr.configLayer(0, { clearColor: backgroundColor }); } @@ -566,8 +561,26 @@ return /******/ (function(modules) { // webpackBootstrap backgroundColor = 'transparent'; } } - backgroundColor = backgroundColor; - this._dom.style.backgroundColor = backgroundColor; + if (backgroundColor.colorStops || backgroundColor.image) { + // Gradient background + // FIXME Fixed layer? + zr.configLayer(0, { + clearColor: backgroundColor + }); + this[HAS_GRADIENT_OR_PATTERN_BG] = true; + + this._dom.style.background = 'transparent'; + } + else { + if (this[HAS_GRADIENT_OR_PATTERN_BG]) { + zr.configLayer(0, { + clearColor: null + }); + } + this[HAS_GRADIENT_OR_PATTERN_BG] = false; + + this._dom.style.background = backgroundColor; + } } // console.time && console.timeEnd('update'); @@ -698,9 +711,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.assert(!this[IN_MAIN_PROCESS], '`resize` should not be called during main process.'); } - this[IN_MAIN_PROCESS] = 1; - - this._finalEvents = []; + this[IN_MAIN_PROCESS] = true; this._zr.resize(); @@ -710,9 +721,9 @@ return /******/ (function(modules) { // webpackBootstrap // Resize loading effect this._loadingFX && this._loadingFX.resize(); - this[IN_MAIN_PROCESS] = 0; + this[IN_MAIN_PROCESS] = false; - triggerFinalEvents.call(this); + this._flushPendingActions(); }; var defaultLoadingEffect = __webpack_require__(92); @@ -752,16 +763,6 @@ return /******/ (function(modules) { // webpackBootstrap return payload; }; - function triggerFinalEvents() { - if (!this[IN_FINAL_EVENTS]) { // Avoid dead lock. - this[IN_FINAL_EVENTS] = 1; - each(this._finalEvents, function (eventObj) { - this.trigger(eventObj.type, eventObj); - }, this); - this[IN_FINAL_EVENTS] = 0; - } - } - /** * @pubilc * @param {Object} payload @@ -777,20 +778,22 @@ return /******/ (function(modules) { // webpackBootstrap var actionInfo = actionWrap.actionInfo; var updateMethod = actionInfo.update || 'update'; - if (true) { - zrUtil.assert( - updateMethod === 'none' || !this[IN_MAIN_PROCESS], - '`dispatchAction` should not be called during main process.' - + 'unless updateMathod is "none".' - ); - } + // if (__DEV__) { + // zrUtil.assert( + // !this[IN_MAIN_PROCESS], + // '`dispatchAction` should not be called during main process.' + // + 'unless updateMathod is "none".' + // ); + // } - var isFinalEvent = updateMethod === 'none' && this[IN_MAIN_PROCESS]; - if (!isFinalEvent) { - this[IN_MAIN_PROCESS] = 1; - this._finalEvents = []; + // May dispatchAction in rendering procedure + if (this[IN_MAIN_PROCESS]) { + this._pendingActions.push(payload); + return; } + this[IN_MAIN_PROCESS] = true; + var payloads = [payload]; var batched = false; // Batch action @@ -834,15 +837,19 @@ return /******/ (function(modules) { // webpackBootstrap eventObj = eventObjBatch[0]; } - if (!isFinalEvent) { - this[IN_MAIN_PROCESS] = 0; - if (!silent) { - this._messageCenter.trigger(eventObj.type, eventObj); - triggerFinalEvents.call(this); - } - } - else { - this._finalEvents.push(eventObj); + this[IN_MAIN_PROCESS] = false; + + !silent && this._messageCenter.trigger(eventObj.type, eventObj); + + this._flushPendingActions(); + + }; + + echartsProto._flushPendingActions = function () { + var pendingActions = this._pendingActions; + while (pendingActions.length) { + var payload = pendingActions.shift(); + this.dispatchAction(payload); } }; @@ -875,8 +882,12 @@ return /******/ (function(modules) { // webpackBootstrap chart[methodName](seriesModel, ecModel, api, payload); updateZ(seriesModel, chart); + + updateProgressiveAndBlend(seriesModel, chart); }, this); + // If use hover layer + updateHoverLayerStatus(this._zr, ecModel); } /** @@ -1025,7 +1036,6 @@ return /******/ (function(modules) { // webpackBootstrap chart.__alive = false; }, this); - var elCountAll = 0; // Render all charts ecModel.eachSeries(function (seriesModel, idx) { var chartView = this._chartsMap[seriesModel.__viewId]; @@ -1036,39 +1046,13 @@ return /******/ (function(modules) { // webpackBootstrap updateZ(seriesModel, chartView); - // Progressive configuration - var elCount = 0; - chartView.group.traverse(function (el) { - if (el.type !== 'group' && !el.ignore) { - elCount++; - } - }); - elCountAll += elCount; - - var frameDrawNum = +seriesModel.get('progressive'); - var needProgressive = elCount > seriesModel.get('progressiveThreshold') && frameDrawNum && !env.node; - if (needProgressive) { - chartView.group.traverse(function (el) { - // FIXME marker and other components - if (el.type !== 'group') { - el.progressive = needProgressive ? - Math.floor(elCount++ / frameDrawNum) : -1; - if (needProgressive) { - el.stopAnimation(true); - } - } - }); - } + updateProgressiveAndBlend(seriesModel, chartView); + }, this); // If use hover layer - if (elCountAll > ecModel.get('hoverLayerThreshold') && !env.node) { - this._zr.storage.traverse(function (el) { - if (el.type !== 'group') { - el.useHoverLayer = true; - } - }); - } + updateHoverLayerStatus(this._zr, ecModel); + // Remove groups of unrendered charts each(this._chartsViews, function (chart) { if (!chart.__alive) { @@ -1152,10 +1136,67 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.mixin(ECharts, Eventful); + function updateHoverLayerStatus(zr, ecModel) { + var storage = zr.storage; + var elCount = 0; + storage.traverse(function (el) { + if (!el.isGroup) { + elCount++; + } + }); + if (elCount > ecModel.get('hoverLayerThreshold') && !env.node) { + storage.traverse(function (el) { + if (!el.isGroup) { + el.useHoverLayer = true; + } + }); + } + } + /** + * Update chart progressive and blend. + * @param {module:echarts/model/Series|module:echarts/model/Component} model + * @param {module:echarts/view/Component|module:echarts/view/Chart} view + */ + function updateProgressiveAndBlend(seriesModel, chartView) { + // Progressive configuration + var elCount = 0; + chartView.group.traverse(function (el) { + if (el.type !== 'group' && !el.ignore) { + elCount++; + } + }); + var frameDrawNum = +seriesModel.get('progressive'); + var needProgressive = elCount > seriesModel.get('progressiveThreshold') && frameDrawNum && !env.node; + if (needProgressive) { + chartView.group.traverse(function (el) { + // FIXME marker and other components + if (!el.isGroup) { + el.progressive = needProgressive ? + Math.floor(elCount++ / frameDrawNum) : -1; + if (needProgressive) { + el.stopAnimation(true); + } + } + }); + } + + // Blend configration + var blendMode = seriesModel.get('blendMode') || null; + if (true) { + if (!env.canvasSupported && blendMode && blendMode !== 'source-over') { + console.warn('Only canvas support blendMode'); + } + } + chartView.group.traverse(function (el) { + // FIXME marker and other components + if (!el.isGroup) { + el.setStyle('blend', blendMode); + } + }); + } /** * @param {module:echarts/model/Series|module:echarts/model/Component} model * @param {module:echarts/view/Component|module:echarts/view/Chart} view - * @return {string} */ function updateZ(model, view) { var z = model.get('z'); @@ -1219,9 +1260,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * @type {number} */ - version: '3.1.10', + version: '3.2.0', dependencies: { - zrender: '3.1.0' + zrender: '3.1.1' } }; @@ -1531,9 +1572,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.createCanvas = creator; }; - echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, zrUtil.curry( - __webpack_require__(93), '', 'itemStyle' - )); + echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, __webpack_require__(93)); echarts.registerPreprocessor(__webpack_require__(94)); // Default action @@ -2983,6 +3022,7 @@ return /******/ (function(modules) { // webpackBootstrap var formatUtil = __webpack_require__(6); var nubmerUtil = __webpack_require__(7); + var Model = __webpack_require__(8); var zrUtil = __webpack_require__(4); var AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle']; @@ -3174,7 +3214,10 @@ return /******/ (function(modules) { // webpackBootstrap * @param {string|number|Date|Array|Object} dataItem */ modelUtil.isDataItemOption = function (dataItem) { - return zrUtil.isObject(dataItem) && !(dataItem instanceof Array); + return zrUtil.isObject(dataItem) + && !(dataItem instanceof Array); + // // markLine data can be array + // && !(dataItem[0] && zrUtil.isObject(dataItem[0]) && !(dataItem[0] instanceof Array)); }; /** @@ -3200,6 +3243,30 @@ return /******/ (function(modules) { // webpackBootstrap ? NaN : +value; // If string (like '-'), using '+' parse to NaN }; + /** + * Create a model proxy to be used in tooltip for edge data, markLine data, markPoint data. + * @param {module:echarts/data/List} data + * @param {Object} opt + * @param {string} [opt.seriesIndex] + * @param {Object} [opt.name] + * @param {Object} [opt.mainType] + * @param {Object} [opt.subType] + */ + modelUtil.createDataFormatModel = function (data, opt) { + var model = new Model(); + zrUtil.mixin(model, modelUtil.dataFormatMixin); + model.seriesIndex = opt.seriesIndex; + model.name = opt.name || ''; + model.mainType = opt.mainType; + model.subType = opt.subType; + + model.getData = function () { + return data; + }; + return model; + }; + + // PENDING A little ugly modelUtil.dataFormatMixin = { /** * Get params for formatter @@ -3380,6 +3447,33 @@ return /******/ (function(modules) { // webpackBootstrap && (cptOption.id + '').indexOf('\0_ec_\0') === 0; }; + /** + * Truncate text, if overflow. + * If not ASCII, count as tow ASCII length. + * Notice case: truncate('是', 1) => '是', not ''. + * + * @public + * @param {string} str + * @param {number} length Over the length, truncate. + * @param {string} [ellipsis='...'] + * @return {string} Result string. + */ + modelUtil.truncate = function (str, length, ellipsis) { + if (!str) { + return str; + } + + var count = 0; + for(var i = 0, l = str.length; i < l && count < length; i++) { + count += str.charCodeAt(i) > 255 ? 2 : 1; + } + if (i < l) { + str = str.slice(0, i) + (ellipsis || ''); + } + + return str; + }; + /** * A helper for removing duplicate items between batchA and batchB, * and in themselves, and categorize by series. @@ -3427,7 +3521,7 @@ return /******/ (function(modules) { // webpackBootstrap var dataIndices = mapToArray(map[i], true); dataIndices.length && result.push({seriesId: i, dataIndex: dataIndices}); } - }; + } } return result; } @@ -4800,8 +4894,14 @@ return /******/ (function(modules) { // webpackBootstrap */ create: function (x, y) { var out = new ArrayCtor(2); - out[0] = x || 0; - out[1] = y || 0; + if (x == null) { + x = 0; + } + if (y == null) { + y = 0; + } + out[0] = x; + out[1] = y; return out; }, @@ -6078,6 +6178,12 @@ return /******/ (function(modules) { // webpackBootstrap fontStyle: 'normal', fontWeight: 'normal' }, + + // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/ + // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + // Default is source-over + blendMode: null, + animation: true, animationDuration: 1000, animationDurationUpdate: 300, @@ -6085,7 +6191,7 @@ return /******/ (function(modules) { // webpackBootstrap animationEasingUpdate: 'cubicOut', animationThreshold: 2000, - // Progressive configuration + // Configuration for progressive/incremental rendering progressiveThreshold: 3000, progressive: 400, @@ -6138,7 +6244,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var echartsAPIList = [ - 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction', + 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption' ]; @@ -6158,7 +6264,6 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - // var zrUtil = require('zrender/lib/core/util'); var coordinateSystemCreators = {}; function CoordinateSystemManager() { @@ -6352,7 +6457,7 @@ return /******/ (function(modules) { // webpackBootstrap var oldOptionBackup = this._optionBackup; var newParsedOption = parseRawOption.call( - this, rawOption, optionPreprocessorFuncs + this, rawOption, optionPreprocessorFuncs, !oldOptionBackup ); this._newBaseOption = newParsedOption.baseOption; @@ -6472,7 +6577,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - function parseRawOption(rawOption, optionPreprocessorFuncs) { + function parseRawOption(rawOption, optionPreprocessorFuncs, isNew) { var timelineOptions = []; var mediaList = []; var mediaDefault; @@ -6526,7 +6631,7 @@ return /******/ (function(modules) { // webpackBootstrap })), function (option) { each(optionPreprocessorFuncs, function (preProcess) { - preProcess(option); + preProcess(option, isNew); }); } ); @@ -6682,6 +6787,11 @@ return /******/ (function(modules) { // webpackBootstrap // PENDING legendDataProvider: null, + /** + * Access path of color for visual + */ + visualColorAccessPath: 'itemStyle.normal.color', + init: function (option, parentModel, ecModel, extraOpt) { /** @@ -7533,17 +7643,17 @@ return /******/ (function(modules) { // webpackBootstrap */ - var idStart = 0x0907; + var idStart = 0x0907; + + module.exports = function () { + return idStart++; + }; - module.exports = function () { - return 'zr_' + (idStart++); - }; - /***/ }, /* 33 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { /** * 事件扩展 @@ -7554,8 +7664,6 @@ return /******/ (function(modules) { // webpackBootstrap var arrySlice = Array.prototype.slice; - var zrUtil = __webpack_require__(4); - var indexOf = zrUtil.indexOf; /** * 事件分发器 @@ -7588,8 +7696,10 @@ return /******/ (function(modules) { // webpackBootstrap _h[event] = []; } - if (indexOf(_h[event], event) >= 0) { - return this; + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return this; + } } _h[event].push({ @@ -7618,6 +7728,12 @@ return /******/ (function(modules) { // webpackBootstrap _h[event] = []; } + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return this; + } + } + _h[event].push({ h: handler, one: false, @@ -8683,12 +8799,14 @@ return /******/ (function(modules) { // webpackBootstrap var frame; if (percent < lastFramePercent) { // Start from next key + // PENDING start from lastFrame ? start = Math.min(lastFrame + 1, trackLen - 1); for (frame = start; frame >= 0; frame--) { if (kfPercents[frame] <= percent) { break; } } + // PENDING really need to do this ? frame = Math.min(frame, trackLen - 2); } else { @@ -10656,6 +10774,52 @@ return /******/ (function(modules) { // webpackBootstrap : (vertex[1] > 0 ? 'bottom' : 'top'); }; + /** + * Apply group transition animation from g1 to g2 + */ + graphic.groupTransition = function (g1, g2, animatableModel, cb) { + if (!g1 || !g2) { + return; + } + + function getElMap(g) { + var elMap = {}; + g.traverse(function (el) { + if (!el.isGroup && el.anid) { + elMap[el.anid] = el; + } + }); + return elMap; + } + function getAnimatableProps(el) { + var obj = { + position: vector.clone(el.position), + rotation: el.rotation + }; + if (el.shape) { + obj.shape = zrUtil.extend({}, el.shape); + } + return obj; + } + var elMap1 = getElMap(g1); + + g2.traverse(function (el) { + if (!el.isGroup && el.anid) { + var oldEl = elMap1[el.anid]; + if (oldEl) { + var newProp = getAnimatableProps(el); + el.attr(getAnimatableProps(oldEl)); + graphic.updateProps(el, newProp, animatableModel, el.dataIndex); + } + // else { + // if (el.previousProps) { + // graphic.updateProps + // } + // } + } + }); + }; + module.exports = graphic; @@ -11724,6 +11888,45 @@ return /******/ (function(modules) { // webpackBootstrap this.extendFrom(opts); }; + function createLinearGradient(ctx, obj, rect) { + // var size = + var x = obj.x; + var x2 = obj.x2; + var y = obj.y; + var y2 = obj.y2; + + if (!obj.global) { + x = x * rect.width + rect.x; + x2 = x2 * rect.width + rect.x; + y = y * rect.height + rect.y; + y2 = y2 * rect.height + rect.y; + } + + var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); + + return canvasGradient; + } + + function createRadialGradient(ctx, obj, rect) { + var width = rect.width; + var height = rect.height; + var min = Math.min(width, height); + + var x = obj.x; + var y = obj.y; + var r = obj.r; + if (!obj.global) { + x = x * width + rect.x; + y = y * height + rect.y; + r = r * min; + } + + var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); + + return canvasGradient; + } + + Style.prototype = { constructor: Style, @@ -11839,6 +12042,12 @@ return /******/ (function(modules) { // webpackBootstrap */ textShadowOffsetY: 0, + /** + * @type {string} + * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + */ + blend: null, + /** * @param {CanvasRenderingContext2D} ctx */ @@ -11866,6 +12075,10 @@ return /******/ (function(modules) { // webpackBootstrap if ((firstDraw || style.opacity !== prevStyle.opacity)) { ctx.globalAlpha = style.opacity == null ? 1 : style.opacity; } + + if ((firstDraw || style.blend !== prevStyle.blend)) { + ctx.globalCompositeOperation = style.blend || 'source-over'; + } if (this.hasStroke()) { var lineWidth = style.lineWidth; ctx.lineWidth = lineWidth / ( @@ -11926,35 +12139,9 @@ return /******/ (function(modules) { // webpackBootstrap return newStyle; }, - createLinearGradient: function (ctx, obj, rect) { - // var size = - var x = obj.x * rect.width + rect.x; - var x2 = obj.x2 * rect.width + rect.x; - var y = obj.y * rect.height + rect.y; - var y2 = obj.y2 * rect.height + rect.y; - - var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); - - return canvasGradient; - }, - - createRadialGradient: function (ctx, obj, rect) { - var width = rect.width; - var height = rect.height; - var min = Math.min(width, height); - - var x = obj.x * width + rect.x; - var y = obj.y * height + rect.y; - var r = obj.r * min; - - var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); - - return canvasGradient; - }, - getGradient: function (ctx, obj, rect) { - var method = obj.type === 'radial' ? 'createRadialGradient' : 'createLinearGradient'; - var canvasGradient = this[method](ctx, obj, rect); + var method = obj.type === 'radial' ? createRadialGradient : createLinearGradient; + var canvasGradient = method(ctx, obj, rect); var colorStops = obj.colorStops; for (var i = 0; i < colorStops.length; i++) { canvasGradient.addColorStop( @@ -11973,6 +12160,9 @@ return /******/ (function(modules) { // webpackBootstrap } } + // Provide for others + Style.getGradient = styleProto.getGradient; + module.exports = Style; @@ -12544,14 +12734,15 @@ return /******/ (function(modules) { // webpackBootstrap x -= offset * dx; y -= offset * dy; - while ((dx >= 0 && x <= x1) || (dx < 0 && x > x1)) { + while ((dx > 0 && x <= x1) || (dx < 0 && x >= x1) + || (dx == 0 && ((dy > 0 && y <= y1) || (dy < 0 && y >= y1)))) { idx = this._dashIdx; dash = lineDash[idx]; x += dx * dash; y += dy * dash; this._dashIdx = (idx + 1) % nDash; // Skip positive offset - if ((dx > 0 && x < x0) || (dx < 0 && x > x0)) { + if ((dx > 0 && x < x0) || (dx < 0 && x > x0) || (dy > 0 && y < y0) || (dy < 0 && y > y0)) { continue; } ctx[idx % 2 ? 'moveTo' : 'lineTo']( @@ -14520,7 +14711,7 @@ return /******/ (function(modules) { // webpackBootstrap var image; // Must bind each time - style.bind(ctx, prevEl); + style.bind(ctx, this, prevEl); // style.image is a url string if (typeof src === 'string') { @@ -14966,7 +15157,7 @@ return /******/ (function(modules) { // webpackBootstrap text != null && (text += ''); // Always bind style - style.bind(ctx, prevEl); + style.bind(ctx, this, prevEl); if (text) { @@ -15867,8 +16058,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [x2=1] * @param {number} [y2=0] * @param {Array.} colorStops + * @param {boolean} [globalCoord=false] */ - var LinearGradient = function (x, y, x2, y2, colorStops) { + var LinearGradient = function (x, y, x2, y2, colorStops, globalCoord) { this.x = x == null ? 0 : x; this.y = y == null ? 0 : y; @@ -15880,6 +16072,9 @@ return /******/ (function(modules) { // webpackBootstrap // Can be cloned this.type = 'linear'; + // If use global coord + this.global = globalCoord || false; + Gradient.call(this, colorStops); }; @@ -15910,8 +16105,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [y=0.5] * @param {number} [r=0.5] * @param {Array.} [colorStops] + * @param {boolean} [globalCoord=false] */ - var RadialGradient = function (x, y, r, colorStops) { + var RadialGradient = function (x, y, r, colorStops, globalCoord) { this.x = x == null ? 0.5 : x; this.y = y == null ? 0.5 : y; @@ -15921,6 +16117,9 @@ return /******/ (function(modules) { // webpackBootstrap // Can be cloned this.type = 'radial'; + // If use global coord + this.global = globalCoord || false; + Gradient.call(this, colorStops); }; @@ -15968,7 +16167,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * @type {string} */ - zrender.version = '3.1.0'; + zrender.version = '3.1.1'; /** * Initializing a zrender instance @@ -16277,10 +16476,10 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set default cursor - * @param {string} cursorStyle 例如 crosshair + * @param {string} [cursorStyle='default'] 例如 crosshair */ - setDefaultCursorStyle: function (cursorStyle) { - this.handler && this.handler.setDefaultCursorStyle(cursorStyle); + setCursorStyle: function (cursorStyle) { + this.handler && this.handler.setCursorStyle(cursorStyle); }, /** @@ -16422,7 +16621,7 @@ return /******/ (function(modules) { // webpackBootstrap this._hovered = hovered; - this.root.style.cursor = hovered ? hovered.cursor : this._defaultCursorStyle; + this.root.style.cursor = hovered ? hovered.cursor : 'default'; // Mouse out on previous hovered element if (lastHovered && hovered !== lastHovered && lastHovered.__zr) { this._dispatchProxy(lastHovered, 'mouseout', event); @@ -16654,12 +16853,6 @@ return /******/ (function(modules) { // webpackBootstrap */ this._lastY; - /** - * @private - * @type {string} - */ - this._defaultCursorStyle = 'default'; - /** * @private * @type {module:zrender/core/GestureMgr} @@ -16751,10 +16944,10 @@ return /******/ (function(modules) { // webpackBootstrap /** * 设置默认的cursor style - * @param {string} cursorStyle 例如 crosshair + * @param {string} [cursorStyle='default'] 例如 crosshair */ - setDefaultCursorStyle: function (cursorStyle) { - this._defaultCursorStyle = cursorStyle; + setCursorStyle: function (cursorStyle) { + this.root.style.cursor = cursorStyle || 'default'; }, /** @@ -17231,6 +17424,7 @@ return /******/ (function(modules) { // webpackBootstrap // if (a.z2 === b.z2) { // // FIXME Slow has renderidx compare // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement + // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012 // return a.__renderidx - b.__renderidx; // } return a.z2 - b.z2; @@ -18841,6 +19035,15 @@ return /******/ (function(modules) { // webpackBootstrap var el = list[i]; var elZLevel = this._singleCanvas ? 0 : el.zlevel; + var elFrame = el.__frame; + + // Flush at current context + // PENDING + if (elFrame < 0 && currentProgressiveLayer) { + flushProgressiveLayer(currentProgressiveLayer); + currentProgressiveLayer = null; + } + // Change draw layer if (currentZLevel !== elZLevel) { if (ctx) { @@ -18872,8 +19075,6 @@ return /******/ (function(modules) { // webpackBootstrap } } - var elFrame = el.__frame; - if (!(currentLayer.__dirty || paintAll)) { continue; } @@ -18913,10 +19114,6 @@ return /******/ (function(modules) { // webpackBootstrap } } else { - if (currentProgressiveLayer) { - flushProgressiveLayer(currentProgressiveLayer); - currentProgressiveLayer = null; - } this._doPaintEl(el, currentLayer, paintAll, scope); } @@ -19468,6 +19665,8 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(4); var config = __webpack_require__(41); + var Style = __webpack_require__(47); + var Pattern = __webpack_require__(59); function returnFalse() { return false; @@ -19636,7 +19835,7 @@ return /******/ (function(modules) { // webpackBootstrap var width = dom.width; var height = dom.height; - var haveClearColor = this.clearColor; + var clearColor = this.clearColor; var haveMotionBLur = this.motionBlur && !clearAll; var lastFrameAlpha = this.lastFrameAlpha; @@ -19656,9 +19855,26 @@ return /******/ (function(modules) { // webpackBootstrap } ctx.clearRect(0, 0, width / dpr, height / dpr); - if (haveClearColor) { + if (clearColor) { + var clearColorGradientOrPattern; + // Gradient + if (clearColor.colorStops) { + // Cache canvas gradient + clearColorGradientOrPattern = clearColor.__canvasGradient || Style.getGradient(ctx, clearColor, { + x: 0, + y: 0, + width: width / dpr, + height: height / dpr + }); + + clearColor.__canvasGradient = clearColorGradientOrPattern; + } + // Pattern + else if (clearColor.image) { + clearColorGradientOrPattern = Pattern.prototype.getCanvasPattern.call(clearColor, ctx); + } ctx.save(); - ctx.fillStyle = this.clearColor; + ctx.fillStyle = clearColorGradientOrPattern || clearColor; ctx.fillRect(0, 0, width / dpr, height / dpr); ctx.restore(); } @@ -19785,9 +20001,9 @@ return /******/ (function(modules) { // webpackBootstrap var Gradient = __webpack_require__(61); - module.exports = function (seriesType, styleType, ecModel) { + module.exports = function (ecModel) { function encodeColor(seriesModel) { - var colorAccessPath = [styleType, 'normal', 'color']; + var colorAccessPath = (seriesModel.visualColorAccessPath || 'itemStyle.normal.color').split('.'); var data = seriesModel.getData(); var color = seriesModel.get(colorAccessPath) // Set in itemStyle || seriesModel.getColorFromPalette(seriesModel.get('name')); // Default color @@ -19815,8 +20031,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } } - seriesType ? ecModel.eachRawSeriesByType(seriesType, encodeColor) - : ecModel.eachRawSeries(encodeColor); + ecModel.eachRawSeries(encodeColor); }; @@ -20309,13 +20524,15 @@ return /******/ (function(modules) { // webpackBootstrap // Use the name in option and create id for (var i = 0; i < data.length; i++) { - var id = ''; if (!nameList[i]) { - nameList[i] = data[i].name; - // Try using the id in option - id = data[i].id; + if (data[i] && data[i].name != null) { + nameList[i] = data[i].name; + } } var name = nameList[i] || ''; + // Try using the id in option + var id = data[i] && data[i].id; + if (!id && name) { // Use name as id and add counter to avoid same name nameRepeatCount[name] = nameRepeatCount[name] || 0; @@ -20427,6 +20644,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {boolean} stack */ listProto.getDataExtent = function (dim, stack) { + dim = this.getDimension(dim); var dimData = this._storage[dim]; var dimInfo = this.getDimensionInfo(dim); stack = (dimInfo && dimInfo.stackable) && stack; @@ -20518,6 +20736,32 @@ return /******/ (function(modules) { // webpackBootstrap return -1; }; + /** + * Retreive the index with given raw data index + * @param {number} idx + * @param {number} name + * @return {number} + */ + listProto.indexOfRawIndex = function (rawIndex) { + // Indices are ascending + var indices = this.indices; + var left = 0; + var right = indices.length - 1; + while (left <= right) { + var mid = (left + right) / 2 | 0; + if (indices[mid] < rawIndex) { + left = mid + 1; + } + else if (indices[mid] > rawIndex) { + right = mid - 1; + } + else { + return mid; + } + } + return -1; + }; + /** * Retreive the index of nearest value * @param {string} dim @@ -21396,24 +21640,21 @@ return /******/ (function(modules) { // webpackBootstrap var creator = creators[coordSysName]; var registeredCoordSys = CoordinateSystem.get(coordSysName); // FIXME - var result = creator && creator(data, seriesModel, ecModel); - var dimensions = result && result.dimensions; + var axesInfo = creator && creator(data, seriesModel, ecModel); + var dimensions = axesInfo && axesInfo.dimensions; if (!dimensions) { // Get dimensions from registered coordinate system dimensions = (registeredCoordSys && registeredCoordSys.dimensions) || ['x', 'y']; dimensions = completeDimensions(dimensions, data, dimensions.concat(['value'])); } - var categoryAxisModel = result && result.categoryAxisModel; - var categories; - - var categoryDimIndex = dimensions[0].type === 'ordinal' - ? 0 : (dimensions[1].type === 'ordinal' ? 1 : -1); + var categoryIndex = axesInfo ? axesInfo.categoryIndex : -1; var list = new List(dimensions, seriesModel); - var nameList = createNameList(result, data); + var nameList = createNameList(axesInfo, data); - var dimValueGetter = (categoryAxisModel && ifNeedCompleteOrdinalData(data)) + var categories = {}; + var dimValueGetter = (categoryIndex >= 0 && ifNeedCompleteOrdinalData(data)) ? function (itemOpt, dimName, dataIndex, dimIndex) { // If any dataItem is like { value: 10 } if (modelUtil.isDataItemOption(itemOpt)) { @@ -21421,7 +21662,7 @@ return /******/ (function(modules) { // webpackBootstrap } // Use dataIndex as ordinal value in categoryAxis - return dimIndex === categoryDimIndex + return dimIndex === categoryIndex ? dataIndex : converDataValue(getDataItemValue(itemOpt), dimensions[dimIndex]); } @@ -21433,12 +21674,14 @@ return /******/ (function(modules) { // webpackBootstrap list.hasItemOption = true; } - if (categoryDimIndex === dimIndex) { + var categoryAxesModels = axesInfo && axesInfo.categoryAxesModels; + if (categoryAxesModels && categoryAxesModels[dimName]) { // If given value is a category string if (typeof val === 'string') { // Lazy get categories - categories = categories || categoryAxisModel.getCategories(); - val = zrUtil.indexOf(categories, val); + categories[dimName] = categories[dimName] + || categoryAxesModels[dimName].getCategories(); + val = zrUtil.indexOf(categories[dimName], val); if (val < 0 && !isNaN(val)) { // In case some one write '1', '2' istead of 1, 2 val = +val; @@ -21468,7 +21711,6 @@ return /******/ (function(modules) { // webpackBootstrap /** * Creaters for each coord system. - * @return {Object} {dimensions, categoryAxisModel}; */ var creators = { @@ -21503,15 +21745,21 @@ return /******/ (function(modules) { // webpackBootstrap ]; var isXAxisCateogry = xAxisType === 'category'; + var isYAxisCategory = yAxisType === 'category'; completeDimensions(dimensions, data, ['x', 'y', 'z']); + var categoryAxesModels = {}; + if (isXAxisCateogry) { + categoryAxesModels.x = xAxisModel; + } + if (isYAxisCategory) { + categoryAxesModels.y = yAxisModel; + } return { dimensions: dimensions, - categoryIndex: isXAxisCateogry ? 0 : 1, - categoryAxisModel: isXAxisCateogry - ? xAxisModel - : (yAxisType === 'category' ? yAxisModel : null) + categoryIndex: isXAxisCateogry ? 0 : (isYAxisCategory ? 1 : -1), + categoryAxesModels: categoryAxesModels }; }, @@ -21554,15 +21802,21 @@ return /******/ (function(modules) { // webpackBootstrap } ]; var isAngleAxisCateogry = angleAxisType === 'category'; + var isRadiusAxisCateogry = radiusAxisType === 'category'; completeDimensions(dimensions, data, ['radius', 'angle', 'value']); + var categoryAxesModels = {}; + if (isRadiusAxisCateogry) { + categoryAxesModels.radius = radiusAxisModel; + } + if (isAngleAxisCateogry) { + categoryAxesModels.angle = angleAxisModel; + } return { dimensions: dimensions, - categoryIndex: isAngleAxisCateogry ? 1 : 0, - categoryAxisModel: isAngleAxisCateogry - ? angleAxisModel - : (radiusAxisType === 'category' ? radiusAxisModel : null) + categoryIndex: isAngleAxisCateogry ? 1 : (isRadiusAxisCateogry ? 0 : -1), + categoryAxesModels: categoryAxesModels }; }, @@ -21581,9 +21835,15 @@ return /******/ (function(modules) { // webpackBootstrap function createNameList(result, data) { var nameList = []; - if (result && result.categoryAxisModel) { + var categoryDim = result && result.dimensions[result.categoryIndex]; + var categoryAxisModel; + if (categoryDim) { + categoryAxisModel = result.categoryAxesModels[categoryDim.name]; + } + + if (categoryAxisModel) { // FIXME Two category axis - var categories = result.categoryAxisModel.getCategories(); + var categories = categoryAxisModel.getCategories(); if (categories) { var dataLen = data.length; // Ordered data is given explicitly like @@ -21896,6 +22156,93 @@ return /******/ (function(modules) { // webpackBootstrap return stepPoints; } + function clamp(number, extent) { + return Math.max(Math.min(number, extent[1]), extent[0]); + } + + function getVisualGradient(data, coordSys) { + var visualMetaList = data.getVisual('visualMeta'); + if (!visualMetaList || !visualMetaList.length) { + return; + } + + var visualMeta; + for (var i = visualMetaList.length - 1; i >= 0; i--) { + // Can only be x or y + if (visualMetaList[i].dimension < 2) { + visualMeta = visualMetaList[i]; + break; + } + } + if (!visualMeta || coordSys.type !== 'cartesian2d') { + if (true) { + console.warn('Visual map on line style only support x or y dimension.'); + } + return; + } + var dimension = visualMeta.dimension; + var dimName = data.dimensions[dimension]; + var dataExtent = data.getDataExtent(dimName); + + var stops = visualMeta.stops; + + var colorStops = []; + if (stops[0].interval) { + stops.sort(function (a, b) { + return a.interval[0] - b.interval[0]; + }); + } + + var firstStop = stops[0]; + var lastStop = stops[stops.length - 1]; + // Interval can be infinity in piecewise case + var min = firstStop.interval ? clamp(firstStop.interval[0], dataExtent) : firstStop.value; + var max = lastStop.interval ? clamp(lastStop.interval[1], dataExtent) : lastStop.value; + var stopsSpan = max - min; + for (var i = 0; i < stops.length; i++) { + // Piecewise + if (stops[i].interval) { + if (stops[i].interval[1] === stops[i].interval[0]) { + continue; + } + colorStops.push({ + // Make sure offset is between 0 and 1 + offset: (clamp(stops[i].interval[0], dataExtent) - min) / stopsSpan, + color: stops[i].color + }, { + offset: (clamp(stops[i].interval[1], dataExtent) - min) / stopsSpan, + color: stops[i].color + }); + } + // Continous + else { + // if (i > 0 && stops[i].value === stops[i - 1].value) { + // continue; + // } + colorStops.push({ + offset: (stops[i].value - min) / stopsSpan, + color: stops[i].color + }); + } + } + var gradient = new graphic.LinearGradient( + 0, 0, 0, 0, colorStops, true + ); + var axis = coordSys.getAxis(dimName); + + var start = Math.round(axis.toGlobalCoord(axis.dataToCoord(min))); + var end = Math.round(axis.toGlobalCoord(axis.dataToCoord(max))); + zrUtil.each(colorStops, function (colorStop) { + // Make sure each offset has rounded px to avoid not sharp edge + colorStop.offset = (Math.round(colorStop.offset * (end - start) + start) - start) / (end - start); + }); + + gradient[dimName] = start; + gradient[dimName + '2'] = end; + + return gradient; + } + module.exports = ChartView.extend({ type: 'line', @@ -22026,12 +22373,13 @@ return /******/ (function(modules) { // webpackBootstrap } } + var visualColor = getVisualGradient(data, coordSys) || data.getVisual('color'); polyline.useStyle(zrUtil.defaults( // Use color in lineStyle first lineStyleModel.getLineStyle(), { fill: 'none', - stroke: data.getVisual('color'), + stroke: visualColor, lineJoin: 'bevel' } )); @@ -22051,7 +22399,7 @@ return /******/ (function(modules) { // webpackBootstrap polygon.useStyle(zrUtil.defaults( areaStyleModel.getAreaStyle(), { - fill: data.getVisual('color'), + fill: visualColor, opacity: 0.7, lineJoin: 'bevel' } @@ -22082,7 +22430,7 @@ return /******/ (function(modules) { // webpackBootstrap var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload); - if (dataIndex != null && dataIndex >= 0) { + if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) { var symbol = data.getItemGraphicEl(dataIndex); if (!symbol) { // Create a temporary symbol if it is not exists @@ -23944,8 +24292,20 @@ return /******/ (function(modules) { // webpackBootstrap }; gridProto.getCartesian = function (xAxisIndex, yAxisIndex) { - var key = 'x' + xAxisIndex + 'y' + yAxisIndex; - return this._coordsMap[key]; + if (xAxisIndex != null && yAxisIndex != null) { + var key = 'x' + xAxisIndex + 'y' + yAxisIndex; + return this._coordsMap[key]; + } + else { + // When only xAxisIndex or yAxisIndex given, find its first cartesian. + for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) { + if (coordList[i].getAxis('x').index === xAxisIndex + || coordList[i].getAxis('y').index === yAxisIndex + ) { + return coordList[i]; + } + } + } }; /** @@ -24046,6 +24406,9 @@ return /******/ (function(modules) { // webpackBootstrap // Inject axisModel into axis axis.model = axisModel; + // Inject grid info axis + axis.grid = this; + // Index of axis, can be used as key axis.index = idx; @@ -24335,6 +24698,7 @@ return /******/ (function(modules) { // webpackBootstrap // Simple optimization for large amount of labels step = Math.floor(labels.length / 40); } + for (var i = 0; i < tickCoords.length; i += step) { var tickCoord = tickCoords[i]; var rect = textContain.getBoundingRect( @@ -24342,7 +24706,7 @@ return /******/ (function(modules) { // webpackBootstrap ); rect[isAxisHorizontal ? 'x' : 'y'] += tickCoord; // FIXME Magic number 1.5 - rect[isAxisHorizontal ? 'width' : 'height'] *= 1.5; + rect[isAxisHorizontal ? 'width' : 'height'] *= 1.3; if (!textSpaceTakenRect) { textSpaceTakenRect = rect.clone(); } @@ -24360,7 +24724,7 @@ return /******/ (function(modules) { // webpackBootstrap if (autoLabelInterval === 0 && step > 1) { return step; } - return autoLabelInterval * step; + return (autoLabelInterval + 1) * step - 1; }; /** @@ -25986,16 +26350,23 @@ return /******/ (function(modules) { // webpackBootstrap z: 0, // 二级层叠 // 反向坐标轴 inverse: false, + // 坐标轴名字,默认为空 name: '', // 坐标轴名字位置,支持'start' | 'middle' | 'end' nameLocation: 'end', + // 坐标轴名字旋转,degree。 + nameRotate: null, // Adapt to axis rotate, when nameLocation is 'middle'. + nameTruncateLength: null, // truncate text when characters more than the given number. + nameTruncateEllipsis: '...', // 坐标轴文字样式,默认取全局样式 nameTextStyle: {}, // 文字与轴线距离 nameGap: 15, + // 是否能触发鼠标事件 silent: true, + // 坐标轴线 axisLine: { // 默认显示,属性show控制显示与否 @@ -26018,7 +26389,6 @@ return /******/ (function(modules) { // webpackBootstrap length: 5, // 属性lineStyle控制线条样式 lineStyle: { - color: '#333', width: 1 } }, @@ -26032,7 +26402,6 @@ return /******/ (function(modules) { // webpackBootstrap // formatter: null, // 其余属性默认使用全局文本样式,详见TEXTSTYLE textStyle: { - color: '#333', fontSize: 12 } }, @@ -26195,6 +26564,11 @@ return /******/ (function(modules) { // webpackBootstrap this.group.removeAll(); + var oldAxisGroup = this._axisGroup; + this._axisGroup = new graphic.Group(); + + this.group.add(this._axisGroup); + if (!axisModel.get('show')) { return; } @@ -26207,13 +26581,15 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder); - this.group.add(axisBuilder.getGroup()); + this._axisGroup.add(axisBuilder.getGroup()); zrUtil.each(selfBuilderAttrs, function (name) { - if (axisModel.get(name +'.show')) { + if (axisModel.get(name + '.show')) { this['_' + name](axisModel, gridModel, layout.labelInterval); } }, this); + + graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel); }, /** @@ -26227,7 +26603,6 @@ return /******/ (function(modules) { // webpackBootstrap var splitLineModel = axisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); - var lineWidth = lineStyleModel.get('width'); var lineColors = lineStyleModel.get('color'); var lineInterval = getInterval(splitLineModel, labelInterval); @@ -26237,13 +26612,16 @@ return /******/ (function(modules) { // webpackBootstrap var gridRect = gridModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); - var splitLines = []; var lineCount = 0; var ticksCoords = axis.getTicksCoords(); + var ticks = axis.scale.getTicks(); var p1 = []; var p2 = []; + // Simple optimization + // Batching the lines if color are the same + var lineStyle = lineStyleModel.getLineStyle(); for (var i = 0; i < ticksCoords.length; i++) { if (ifIgnoreOnTick(axis, i, lineInterval)) { continue; @@ -26265,31 +26643,20 @@ return /******/ (function(modules) { // webpackBootstrap } var colorIndex = (lineCount++) % lineColors.length; - splitLines[colorIndex] = splitLines[colorIndex] || []; - splitLines[colorIndex].push(new graphic.Line(graphic.subPixelOptimizeLine({ + this._axisGroup.add(new graphic.Line(graphic.subPixelOptimizeLine({ + anid: 'line_' + ticks[i], + shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, - style: { - lineWidth: lineWidth - }, - silent: true - }))); - } - - // Simple optimization - // Batching the lines if color are the same - var lineStyle = lineStyleModel.getLineStyle(); - for (var i = 0; i < splitLines.length; i++) { - this.group.add(graphic.mergePath(splitLines[i], { style: zrUtil.defaults({ - stroke: lineColors[i % lineColors.length] + stroke: lineColors[colorIndex] }, lineStyle), silent: true - })); + }))); } }, @@ -26308,15 +26675,16 @@ return /******/ (function(modules) { // webpackBootstrap var gridRect = gridModel.coordinateSystem.getRect(); var ticksCoords = axis.getTicksCoords(); + var ticks = axis.scale.getTicks(); var prevX = axis.toGlobalCoord(ticksCoords[0]); var prevY = axis.toGlobalCoord(ticksCoords[0]); - var splitAreaRects = []; var count = 0; var areaInterval = getInterval(splitAreaModel, labelInterval); + var areaStyle = areaStyleModel.getAreaStyle(); areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors]; for (var i = 1; i < ticksCoords.length; i++) { @@ -26344,32 +26712,24 @@ return /******/ (function(modules) { // webpackBootstrap } var colorIndex = (count++) % areaColors.length; - splitAreaRects[colorIndex] = splitAreaRects[colorIndex] || []; - splitAreaRects[colorIndex].push(new graphic.Rect({ + this._axisGroup.add(new graphic.Rect({ + anid: 'area_' + ticks[i], + shape: { x: x, y: y, width: width, height: height }, + style: zrUtil.defaults({ + fill: areaColors[colorIndex] + }, areaStyle), silent: true })); prevX = x + width; prevY = y + height; } - - // Simple optimization - // Batching the rects if color are the same - var areaStyle = areaStyleModel.getAreaStyle(); - for (var i = 0; i < splitAreaRects.length; i++) { - this.group.add(graphic.mergePath(splitAreaRects[i], { - style: zrUtil.defaults({ - fill: areaColors[i % areaColors.length] - }, areaStyle), - silent: true - })); - } } }); @@ -26415,8 +26775,7 @@ return /******/ (function(modules) { // webpackBootstrap ]; // Axis rotation - var r = {x: 0, y: 1}; - layout.rotation = Math.PI / 2 * r[axisDim]; + layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim var dirMap = {top: -1, bottom: 1, left: -1, right: 1}; @@ -26454,11 +26813,16 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); + var modelUtil = __webpack_require__(5); var graphic = __webpack_require__(43); var Model = __webpack_require__(8); + var List = __webpack_require__(96); var numberUtil = __webpack_require__(7); var remRadian = numberUtil.remRadian; var isRadianAroundZero = numberUtil.isRadianAroundZero; + var vec2 = __webpack_require__(16); + var v2ApplyTransform = vec2.applyTransform; + var retrieve = zrUtil.retrieve; var PI = Math.PI; @@ -26501,7 +26865,10 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [opt.tickDirection=1] 1 or -1 * @param {number} [opt.labelDirection=1] 1 or -1 * @param {number} [opt.labelOffset=0] Usefull when onZero. + * @param {string} [opt.axisLabelShow] default get from axisModel. * @param {string} [opt.axisName] default get from axisModel. + * @param {string} [opt.axisNameTruncateLength] default get from axisModel. + * @param {string} [opt.axisNameTruncateEllipsis] default get from axisModel. * @param {number} [opt.labelRotation] by degree, default get from axisModel. * @param {number} [opt.labelInterval] Default label interval when label * interval from model is null or 'auto'. @@ -26535,10 +26902,21 @@ return /******/ (function(modules) { // webpackBootstrap /** * @readOnly */ - this.group = new graphic.Group({ + this.group = new graphic.Group(); + + // FIXME Not use a seperate text group? + var dumbGroup = new graphic.Group({ position: opt.position.slice(), rotation: opt.rotation }); + + // this.group.add(dumbGroup); + // this._dumbGroup = dumbGroup; + + dumbGroup.updateTransform(); + this._transform = dumbGroup.transform; + + this._dumbGroup = dumbGroup; }; AxisBuilder.prototype = { @@ -26574,12 +26952,24 @@ return /******/ (function(modules) { // webpackBootstrap var extent = this.axisModel.axis.getExtent(); - this.group.add(new graphic.Line({ + var matrix = this._transform; + var pt1 = [extent[0], 0]; + var pt2 = [extent[1], 0]; + if (matrix) { + v2ApplyTransform(pt1, pt1, matrix); + v2ApplyTransform(pt2, pt2, matrix); + } + + this.group.add(new graphic.Line(graphic.subPixelOptimizeLine({ + + // Id for animation + anid: 'line', + shape: { - x1: extent[0], - y1: 0, - x2: extent[1], - y2: 0 + x1: pt1[0], + y1: pt1[1], + x2: pt2[0], + y2: pt2[1] }, style: zrUtil.extend( {lineCap: 'round'}, @@ -26588,7 +26978,7 @@ return /******/ (function(modules) { // webpackBootstrap strokeContainThreshold: opt.strokeContainThreshold, silent: !!opt.axisLineSilent, z2: 1 - })); + }))); }, /** @@ -26609,8 +26999,11 @@ return /******/ (function(modules) { // webpackBootstrap var tickLen = tickModel.get('length'); var tickInterval = getInterval(tickModel, opt.labelInterval); var ticksCoords = axis.getTicksCoords(); - var tickLines = []; + var ticks = axis.scale.getTicks(); + var pt1 = []; + var pt2 = []; + var matrix = this._transform; for (var i = 0; i < ticksCoords.length; i++) { // Only ordinal scale support tick interval if (ifIgnoreOnTick(axis, i, tickInterval)) { @@ -26619,26 +27012,37 @@ return /******/ (function(modules) { // webpackBootstrap var tickCoord = ticksCoords[i]; - // Tick line - tickLines.push(new graphic.Line(graphic.subPixelOptimizeLine({ + pt1[0] = tickCoord; + pt1[1] = 0; + pt2[0] = tickCoord; + pt2[1] = opt.tickDirection * tickLen; + + if (matrix) { + v2ApplyTransform(pt1, pt1, matrix); + v2ApplyTransform(pt2, pt2, matrix); + } + // Tick line, Not use group transform to have better line draw + this.group.add(new graphic.Line(graphic.subPixelOptimizeLine({ + + // Id for animation + anid: 'tick_' + ticks[i], + shape: { - x1: tickCoord, - y1: 0, - x2: tickCoord, - y2: opt.tickDirection * tickLen - }, - style: { - lineWidth: lineStyleModel.get('width') + x1: pt1[0], + y1: pt1[1], + x2: pt2[0], + y2: pt2[1] }, + style: zrUtil.defaults( + lineStyleModel.getLineStyle(), + { + stroke: axisModel.get('axisLine.lineStyle.color') + } + ), + z2: 2, silent: true }))); } - - this.group.add(graphic.mergePath(tickLines, { - style: lineStyleModel.getLineStyle(), - z2: 2, - silent: true - })); }, /** @@ -26647,13 +27051,14 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ axisLabel: function () { + var opt = this.opt; var axisModel = this.axisModel; + var show = retrieve(opt.axisLabelShow, axisModel.get('axisLabel.show')); - if (!axisModel.get('axisLabel.show')) { + if (!show) { return; } - var opt = this.opt; var axis = axisModel.axis; var labelModel = axisModel.getModel('axisLabel'); var textStyleModel = labelModel.getModel('textStyle'); @@ -26662,10 +27067,7 @@ return /******/ (function(modules) { // webpackBootstrap var labels = axisModel.getFormattedLabels(); // Special label rotate. - var labelRotation = opt.labelRotation; - if (labelRotation == null) { - labelRotation = labelModel.get('rotate') || 0; - } + var labelRotation = retrieve(opt.labelRotation, labelModel.get('rotate')) || 0; // To radian. labelRotation = labelRotation * PI / 180; @@ -26685,7 +27087,8 @@ return /******/ (function(modules) { // webpackBootstrap categoryData[i].textStyle, textStyleModel, axisModel.ecModel ); } - var textColor = itemTextStyleModel.getTextColor(); + var textColor = itemTextStyleModel.getTextColor() + || axisModel.get('axisLine.lineStyle.color'); var tickCoord = axis.dataToCoord(ticks[i]); var pos = [ @@ -26695,6 +27098,10 @@ return /******/ (function(modules) { // webpackBootstrap var labelBeforeFormat = axis.scale.getLabel(ticks[i]); var textEl = new graphic.Text({ + + // Id for animation + anid: 'label_' + ticks[i], + style: { text: labels[i], textAlign: itemTextStyleModel.get('align', true) || labelLayout.textAlign, @@ -26712,8 +27119,15 @@ return /******/ (function(modules) { // webpackBootstrap textEl.eventData.targetType = 'axisLabel'; textEl.eventData.value = labelBeforeFormat; + + // FIXME + this._dumbGroup.add(textEl); + textEl.updateTransform(); + textEls.push(textEl); this.group.add(textEl); + + textEl.decomposeTransform(); } function isTwoLabelOverlapped(current, next) { @@ -26752,12 +27166,7 @@ return /******/ (function(modules) { // webpackBootstrap axisName: function () { var opt = this.opt; var axisModel = this.axisModel; - - var name = this.opt.axisName; - // If name is '', do not get name from axisMode. - if (name == null) { - name = axisModel.get('name'); - } + var name = retrieve(opt.axisName, axisModel.get('name')); if (!name) { return; @@ -26782,16 +27191,46 @@ return /******/ (function(modules) { // webpackBootstrap var labelLayout; + var nameRotation = axisModel.get('nameRotate'); + if (nameRotation != null) { + nameRotation = nameRotation * PI / 180; // To radian. + } + if (nameLocation === 'middle') { - labelLayout = innerTextLayout(opt, opt.rotation, nameDirection); + labelLayout = innerTextLayout( + opt, + nameRotation != null ? nameRotation : opt.rotation, // Adapt to axis. + nameDirection + ); } else { - labelLayout = endTextLayout(opt, nameLocation, extent); + labelLayout = endTextLayout( + opt, nameLocation, nameRotation || 0, extent + ); + } + + var truncatedText = name; + var truncateLength = retrieve( + opt.axisNameTruncateLength, axisModel.get('nameTruncateLength') + ); + var truncateEllipsis = retrieve( + opt.axisNameTruncateEllipsis, axisModel.get('nameTruncateEllipsis') + ); + + if (truncateLength != null) { + truncatedText = modelUtil.truncate(name, truncateLength, truncateEllipsis); } var textEl = new graphic.Text({ + + // Id for animation + anid: 'name', + + __fullText: name, + __truncatedText: truncatedText, + style: { - text: name, + text: truncatedText, textFont: textStyleModel.getFont(), fill: textStyleModel.getTextColor() || axisModel.get('axisLine.lineStyle.color'), @@ -26804,15 +27243,33 @@ return /******/ (function(modules) { // webpackBootstrap z2: 1 }); + // Make truncate tooltip show. + if (truncateLength != null) { + textEl.dataIndex = 0; + var data = new List(['value'], axisModel); + data.initData([{value: name, tooltip: {formatter: tooltipFormatter}}]); + textEl.dataModel = modelUtil.createDataFormatModel(data, {mainType: 'axis'}); + } + textEl.eventData = makeAxisEventDataBase(axisModel); textEl.eventData.targetType = 'axisName'; textEl.eventData.name = name; + // FIXME + this._dumbGroup.add(textEl); + textEl.updateTransform(); + this.group.add(textEl); + + textEl.decomposeTransform(); } }; + function tooltipFormatter(params) { + return params.value; + } + /** * @inner */ @@ -26850,8 +27307,8 @@ return /******/ (function(modules) { // webpackBootstrap /** * @inner */ - function endTextLayout(opt, textPosition, extent) { - var rotationDiff = remRadian(-opt.rotation); + function endTextLayout(opt, textPosition, textRotate, extent) { + var rotationDiff = remRadian(textRotate - opt.rotation); var textAlign; var verticalAlign; var inverse = extent[0] > extent[1]; @@ -27017,17 +27474,11 @@ return /******/ (function(modules) { // webpackBootstrap normal: { // color: '各异', // 柱条边线 - barBorderColor: '#fff', + borderColor: '#fff', // 柱条边线线宽,单位px,默认为1 - barBorderWidth: 0 + borderWidth: 0 }, - emphasis: { - // color: '各异', - // 柱条边线 - barBorderColor: '#fff', - // 柱条边线线宽,单位px,默认为1 - barBorderWidth: 0 - } + emphasis: {} } } }); @@ -27257,22 +27708,32 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { + + + var getBarItemStyle = __webpack_require__(11)( + [ + ['fill', 'color'], + ['stroke', 'borderColor'], + ['lineWidth', 'borderWidth'], + // Compatitable with 2 + ['stroke', 'barBorderColor'], + ['lineWidth', 'barBorderWidth'], + ['opacity'], + ['shadowBlur'], + ['shadowOffsetX'], + ['shadowOffsetY'], + ['shadowColor'] + ] + ); module.exports = { - getBarItemStyle: __webpack_require__(11)( - [ - ['fill', 'color'], - ['stroke', 'borderColor'], - ['lineWidth', 'borderWidth'], - // Compatitable with 2 - ['stroke', 'barBorderColor'], - ['lineWidth', 'barBorderWidth'], - ['opacity'], - ['shadowBlur'], - ['shadowOffsetX'], - ['shadowOffsetY'], - ['shadowColor'] - ] - ) + getBarItemStyle: function (excludes) { + var style = getBarItemStyle.call(this, excludes); + if (this.getBorderLineDash) { + var lineDash = this.getBorderLineDash(); + lineDash && (style.lineDash = lineDash); + } + return style; + } }; @@ -29537,7 +29998,7 @@ return /******/ (function(modules) { // webpackBootstrap var value = this.getRawValue(dataIndex); var coordSys = this.coordinateSystem; var indicatorAxes = coordSys.getIndicatorAxes(); - return this._data.getName(dataIndex) + '
' + return (this._data.getName(dataIndex) == '' ? this.name : this._data.getName(dataIndex)) + '
' + zrUtil.map(indicatorAxes, function (axis, idx) { return axis.name + ' : ' + value[idx]; }).join('
'); @@ -30006,15 +30467,16 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} dataIndex */ formatTooltip: function (dataIndex) { - var data = this._data; + // FIXME orignalData and data is a bit confusing + var data = this.getData(); var formattedValue = addCommas(this.getRawValue(dataIndex)); var name = data.getName(dataIndex); var seriesGroup = this.seriesGroup; var seriesNames = []; for (var i = 0; i < seriesGroup.length; i++) { - var otherIndex = seriesGroup[i].getData().indexOfName(name); - if (!isNaN(seriesGroup[i].getRawValue(otherIndex))) { + var otherIndex = seriesGroup[i].originalData.indexOfName(name); + if (!isNaN(seriesGroup[i].originalData.get('value', otherIndex))) { seriesNames.push( encodeHTML(seriesGroup[i].name) ); @@ -30038,6 +30500,10 @@ return /******/ (function(modules) { // webpackBootstrap left: 'center', // 'center' | 'top' | 'bottom' | 'x%' | {number} top: 'center', + + // Aspect is width / height. Inited to be geoJson bbox aspect + // This parameter is used for scale this aspect + aspectScale: 0.75, // right // bottom // width: @@ -30087,7 +30553,7 @@ return /******/ (function(modules) { // webpackBootstrap }, // 也是选中样式 emphasis: { - areaColor: 'rgba(255,215, 0, 0.8)' + areaColor: 'rgba(255,215,0,0.8)' } } }, @@ -30128,8 +30594,9 @@ return /******/ (function(modules) { // webpackBootstrap var rect = this.getBoundingRect(); var boxLayoutOption = geoModel.getBoxLayoutParams(); + var aspectScale = geoModel.get('aspectScale') || 0.75; // 0.75 rate - boxLayoutOption.aspect = rect.width / rect.height * 0.75; + boxLayoutOption.aspect = rect.width / rect.height * aspectScale; var viewRect = layout.getLayoutRect(boxLayoutOption, { width: api.getWidth(), @@ -31918,7 +32385,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 174 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { @@ -31926,23 +32393,16 @@ return /******/ (function(modules) { // webpackBootstrap var interactionMutex = { - take: function (zr, resourceKey, userKey, onTakeAway) { + take: function (zr, resourceKey, userKey) { var store = getStore(zr); - var record = store[resourceKey]; - - record && record.onTakeAway && record.onTakeAway(); - - store[resourceKey] = { - userKey: userKey, - onTakeAway: onTakeAway - }; + store[resourceKey] = userKey; }, release: function (zr, resourceKey, userKey) { var store = getStore(zr); - var record = store[resourceKey]; + var uKey = store[resourceKey]; - if (record && (record.userKey === userKey)) { + if (uKey === userKey) { store[resourceKey] = null; } }, @@ -31956,6 +32416,18 @@ return /******/ (function(modules) { // webpackBootstrap return zr[ATTR] || (zr[ATTR] = {}); } + /** + * payload: { + * type: 'takeGlobalCursor', + * key: 'dataZoomSelect', or 'brush', or ..., + * If no userKey, release global cursor. + * } + */ + __webpack_require__(1).registerAction( + {type: 'takeGlobalCursor', event: 'globalCursorTaken', update: 'update'}, + function () {} + ); + module.exports = interactionMutex; @@ -34773,8 +35245,8 @@ return /******/ (function(modules) { // webpackBootstrap * Visual for only each piece can be specified. * @param {Array.=} [option.categories] ['cate1', 'cate2'] * required when mappingMethod is 'category'. - * If no option.categories, it represents - * categories is [0, 1, 2, ...]. + * If no option.categories, categories is set + * as [0, 1, 2, ...]. * @param {boolean} [option.loop=false] Whether loop mapping when mappingMethod is 'category'. * @param {(Array|Object|*)} [option.visual] Visual data. * when mappingMethod is 'category', @@ -35033,7 +35505,7 @@ return /******/ (function(modules) { // webpackBootstrap visualArr.push(visual); } - var doNotNeedPair = {'color': 1, 'symbol': 1}; + var doNotNeedPair = {color: 1, symbol: 1}; if (!isCategory && visualArr.length === 1 @@ -35124,7 +35596,7 @@ return /******/ (function(modules) { // webpackBootstrap piecewise: function (value) { var pieceList = this.option.pieceList; - var pieceIndex = VisualMapping.findPieceIndex(value, pieceList); + var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true); if (pieceIndex != null) { return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true); } @@ -35255,42 +35727,76 @@ return /******/ (function(modules) { // webpackBootstrap }; /** - * @public {Array.} [{value: ..., interval: [min, max]}, ...] + * @param {number} value + * @param {Array.} pieceList [{value: ..., interval: [min, max]}, ...] + * Always from small to big. + * @param {boolean} [findClosestWhenOutside=false] * @return {number} index */ - VisualMapping.findPieceIndex = function (value, pieceList) { - // value has high priority. + VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) { + var possibleI; + var abs = Infinity; + + // value has the higher priority. for (var i = 0, len = pieceList.length; i < len; i++) { - var piece = pieceList[i]; - if (piece.value != null && piece.value === value) { - return i; + var pieceValue = pieceList[i].value; + if (pieceValue != null) { + if (pieceValue === value) { + return i; + } + findClosestWhenOutside && updatePossible(pieceValue, i); } } for (var i = 0, len = pieceList.length; i < len; i++) { var piece = pieceList[i]; var interval = piece.interval; + var close = piece.close; + if (interval) { if (interval[0] === -Infinity) { - if (value < interval[1]) { + if (littleThan(close[1], value, interval[1])) { return i; } } else if (interval[1] === Infinity) { - if (interval[0] < value) { + if (littleThan(close[0], interval[0], value)) { return i; } } else if ( - piece.interval[0] <= value - && value <= piece.interval[1] + littleThan(close[0], interval[0], value) + && littleThan(close[1], value, interval[1]) ) { return i; } + findClosestWhenOutside && updatePossible(interval[0], i); + findClosestWhenOutside && updatePossible(interval[1], i); + } + } + + if (findClosestWhenOutside) { + return value === Infinity + ? pieceList.length - 1 + : value === -Infinity + ? 0 + : possibleI; + } + + function updatePossible(val, index) { + var newAbs = Math.abs(val - value); + if (newAbs < abs) { + abs = newAbs; + possibleI = index; } } + }; + function littleThan(close, a, b) { + return close ? a <= b : a < b; + } + module.exports = VisualMapping; @@ -36887,6 +37393,7 @@ return /******/ (function(modules) { // webpackBootstrap }); var node = graph.getNodeByIndex(dataIndex); + fadeInItem(node, nodeOpacityPath); zrUtil.each(node.edges, function (edge) { if (edge.dataIndex < 0) { return; @@ -37059,12 +37566,21 @@ return /******/ (function(modules) { // webpackBootstrap var group = this.group; var LineCtor = this._ctor; + var hostModel = lineData.hostModel; + + var seriesScope = { + lineStyle: hostModel.getModel('lineStyle.normal').getLineStyle(), + hoverLineStyle: hostModel.getModel('lineStyle.emphasis').getLineStyle(), + labelModel: hostModel.getModel('label.normal'), + hoverLabelModel: hostModel.getModel('label.emphasis') + }; + lineData.diff(oldLineData) .add(function (idx) { if (!lineNeedsDraw(lineData.getItemLayout(idx))) { return; } - var lineGroup = new LineCtor(lineData, idx); + var lineGroup = new LineCtor(lineData, idx, seriesScope); lineData.setItemGraphicEl(idx, lineGroup); @@ -37078,10 +37594,10 @@ return /******/ (function(modules) { // webpackBootstrap } if (!lineGroup) { - lineGroup = new LineCtor(lineData, newIdx); + lineGroup = new LineCtor(lineData, newIdx, seriesScope); } else { - lineGroup.updateData(lineData, newIdx); + lineGroup.updateData(lineData, newIdx, seriesScope); } lineData.setItemGraphicEl(newIdx, lineGroup); @@ -37285,10 +37801,10 @@ return /******/ (function(modules) { // webpackBootstrap * @extends {module:zrender/graphic/Group} * @alias {module:echarts/chart/helper/Line} */ - function Line(lineData, idx) { + function Line(lineData, idx, seriesScope) { graphic.Group.call(this); - this._createLine(lineData, idx); + this._createLine(lineData, idx, seriesScope); } var lineProto = Line.prototype; @@ -37296,7 +37812,7 @@ return /******/ (function(modules) { // webpackBootstrap // Update symbol position and rotation lineProto.beforeUpdate = updateSymbolAndLabelBeforeLineUpdate; - lineProto._createLine = function (lineData, idx) { + lineProto._createLine = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var linePoints = lineData.getItemLayout(idx); @@ -37324,10 +37840,10 @@ return /******/ (function(modules) { // webpackBootstrap this[makeSymbolTypeKey(symbolCategory)] = lineData.getItemVisual(idx, symbolCategory); }, this); - this._updateCommonStl(lineData, idx); + this._updateCommonStl(lineData, idx, seriesScope); }; - lineProto.updateData = function (lineData, idx) { + lineProto.updateData = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); @@ -37343,28 +37859,37 @@ return /******/ (function(modules) { // webpackBootstrap var key = makeSymbolTypeKey(symbolCategory); // Symbol changed if (this[key] !== symbolType) { - var symbol = createSymbol(symbolCategory, lineData, idx); this.remove(this.childOfName(symbolCategory)); + var symbol = createSymbol(symbolCategory, lineData, idx); this.add(symbol); } this[key] = symbolType; }, this); - this._updateCommonStl(lineData, idx); + this._updateCommonStl(lineData, idx, seriesScope); }; - lineProto._updateCommonStl = function (lineData, idx) { + lineProto._updateCommonStl = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); - var itemModel = lineData.getItemModel(idx); - var labelModel = itemModel.getModel('label.normal'); - var textStyleModel = labelModel.getModel('textStyle'); - var labelHoverModel = itemModel.getModel('label.emphasis'); - var textStyleHoverModel = labelHoverModel.getModel('textStyle'); + var lineStyle = seriesScope && seriesScope.lineStyle; + var hoverLineStyle = seriesScope && seriesScope.hoverLineStyle; + var labelModel = seriesScope && seriesScope.labelModel; + var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel; + + // Optimization for large dataset + if (!seriesScope || lineData.hasItemOption) { + var itemModel = lineData.getItemModel(idx); + + lineStyle = itemModel.getModel('lineStyle.normal').getLineStyle(); + hoverLineStyle = itemModel.getModel('lineStyle.emphasis').getLineStyle(); + + labelModel = itemModel.getModel('label.normal'); + hoverLabelModel = itemModel.getModel('label.emphasis'); + } - var defaultText = numberUtil.round(seriesModel.getRawValue(idx)); var visualColor = lineData.getItemVisual(idx, 'color'); if (isNaN(defaultText)) { // Use name @@ -37376,37 +37901,57 @@ return /******/ (function(modules) { // webpackBootstrap fill: 'none', stroke: visualColor }, - itemModel.getModel('lineStyle.normal').getLineStyle() + lineStyle )); - line.hoverStyle = itemModel.getModel('lineStyle.emphasis').getLineStyle(); - var defaultColor = visualColor || '#000'; + line.hoverStyle = hoverLineStyle; + + var showLabel = labelModel.getShallow('show'); + var hoverShowLabel = hoverLabelModel.getShallow('show'); + var defaultText; var label = this.childOfName('label'); + var defaultLabelColor; + if (showLabel || hoverShowLabel) { + defaultText = numberUtil.round(seriesModel.getRawValue(idx)); + defaultLabelColor = visualColor || '#000'; + } // label.afterUpdate = lineAfterUpdate; - label.setStyle({ - text: labelModel.get('show') - ? zrUtil.retrieve( - seriesModel.getFormattedLabel(idx, 'normal', lineData.dataType), - defaultText - ) - : '', - textFont: textStyleModel.getFont(), - fill: textStyleModel.getTextColor() || defaultColor - }); - label.hoverStyle = { - text: labelHoverModel.get('show') - ? zrUtil.retrieve( - seriesModel.getFormattedLabel(idx, 'emphasis', lineData.dataType), - defaultText - ) - : '', - textFont: textStyleHoverModel.getFont(), - fill: textStyleHoverModel.getTextColor() || defaultColor - }; - label.__textAlign = textStyleModel.get('align'); - label.__verticalAlign = textStyleModel.get('baseline'); - label.__position = labelModel.get('position'); + if (showLabel) { + var textStyleModel = labelModel.getModel('textStyle'); + label.setStyle({ + text: zrUtil.retrieve( + seriesModel.getFormattedLabel(idx, 'normal', lineData.dataType), + defaultText + ), + textFont: textStyleModel.getFont(), + fill: textStyleModel.getTextColor() || defaultLabelColor + }); + + label.__textAlign = textStyleModel.get('align'); + label.__verticalAlign = textStyleModel.get('baseline'); + label.__position = labelModel.get('position'); + } + else { + label.setStyle('text', ''); + } + if (hoverShowLabel) { + var textStyleHoverModel = hoverLabelModel.getModel('textStyle'); + + label.hoverStyle = { + text: zrUtil.retrieve( + seriesModel.getFormattedLabel(idx, 'emphasis', lineData.dataType), + defaultText + ), + textFont: textStyleHoverModel.getFont(), + fill: textStyleHoverModel.getTextColor() || defaultLabelColor + }; + } + else { + label.hoverStyle = { + text: '' + }; + } - label.ignore = !label.style.text && !label.hoverStyle.text; + label.ignore = !showLabel && !hoverShowLabel; graphic.setHoverStyle(this); }; @@ -38405,6 +38950,7 @@ return /******/ (function(modules) { // webpackBootstrap }, axisLabel: { show: true, + distance: 5, // formatter: null, textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: 'auto' @@ -38662,12 +39208,13 @@ return /******/ (function(modules) { // webpackBootstrap numberUtil.round(i / splitNumber * (maxVal - minVal) + minVal), labelModel.get('formatter') ); + var distance = labelModel.get('distance'); var text = new graphic.Text({ style: { text: label, - x: unitX * (r - splitLineLen - 5) + cx, - y: unitY * (r - splitLineLen - 5) + cy, + x: unitX * (r - splitLineLen - distance) + cx, + y: unitY * (r - splitLineLen - distance) + cy, fill: textStyleModel.getTextColor(), textFont: textStyleModel.getFont(), textVerticalAlign: unitY < -0.4 ? 'top' : (unitY > 0.4 ? 'bottom' : 'middle'), @@ -39463,10 +40010,50 @@ return /******/ (function(modules) { // webpackBootstrap __webpack_require__(229); var echarts = __webpack_require__(1); + var zrUtil = __webpack_require__(4); + + var CLICK_THRESHOLD = 5; // > 4 // Parallel view echarts.extendComponentView({ - type: 'parallel' + type: 'parallel', + + render: function (parallelModel, ecModel, api) { + var zr = api.getZr(); + + if (!this.__onMouseDown) { + // FIXME + // click: mousemove check. otherwise confilct with drag brush. + var mousedownPoint; + zr.on('mousedown', this.__onMouseDown = function (e) { + mousedownPoint = [e.offsetX, e.offsetY]; + }); + zr.on('mouseup', this.__onMouseUp = function (e) { + var point = [e.offsetX, e.offsetY]; + var dist = Math.pow(mousedownPoint[0] - point[0], 2) + + Math.pow(mousedownPoint[1] - point[1], 2); + + if (!parallelModel.get('axisExpandable') || dist > CLICK_THRESHOLD) { + return; + } + + var coordSys = parallelModel.coordinateSystem; + var closestDim = coordSys.findClosestAxisDim(point); + if (closestDim) { + var axisIndex = zrUtil.indexOf(coordSys.dimensions, closestDim); + api.dispatchAction({ + type: 'parallelAxisExpand', + axisExpandCenter: axisIndex + }); + } + }); + } + }, + + dispose: function (ecModel, api) { + api.getZr().off(this.__onMouseDown); + api.getZr().off(this.__onMouseUp); + } }); echarts.registerPreprocessor( @@ -39530,8 +40117,8 @@ return /******/ (function(modules) { // webpackBootstrap var axisHelper = __webpack_require__(113); var zrUtil = __webpack_require__(4); var ParallelAxis = __webpack_require__(226); + var graphic = __webpack_require__(43); var matrix = __webpack_require__(17); - var vector = __webpack_require__(16); var each = zrUtil.each; @@ -39688,8 +40275,62 @@ return /******/ (function(modules) { // webpackBootstrap axis.setExtent(axisExtent[idx], axisExtent[1 - idx]); }); + var axisExpandable = parallelModel.get('axisExpandable'); + var axisExpandWidth = parallelModel.get('axisExpandWidth'); + var axisExpandCenter = parallelModel.get('axisExpandCenter'); + var axisExpandCount = parallelModel.get('axisExpandCount') || 0; + var axisExpandWindow; + + if (axisExpandCenter != null) { + // Clamp + var left = Math.max(0, Math.floor(axisExpandCenter - (axisExpandCount - 1) / 2)); + var right = left + axisExpandCount - 1; + if (right >= dimensions.length) { + right = dimensions.length - 1; + left = Math.max(0, Math.floor(right - axisExpandCount + 1)); + } + axisExpandWindow = [left, right]; + } + + var getAxisPosition = (axisExpandable && axisExpandWindow && axisExpandWidth) + ? function getAxisPosition(axisIndex, layoutLength, axisCount) { + var peekIntervalCount = axisExpandWindow[1] - axisExpandWindow[0]; + var otherWidth = ( + layoutLength - axisExpandWidth * peekIntervalCount + ) / (axisCount - 1 - peekIntervalCount); + + var posToWindow = compareToWindow(axisIndex); + + if (posToWindow < 0) { + return (axisIndex - 1) * otherWidth; + } + else if (posToWindow === 0) { + return axisExpandWindow[0] * otherWidth + + (axisIndex - axisExpandWindow[0]) * axisExpandWidth; + } + else if (axisIndex === axisCount - 1) { + return layoutLength; + } + else { + return axisExpandWindow[0] * otherWidth + + peekIntervalCount * axisExpandWidth + + (axisIndex - axisExpandWindow[1]) * otherWidth; + } + } + : function (axisIndex, layoutLength, axisCount) { + return layoutLength * axisIndex / (axisCount - 1); + }; + + function compareToWindow(axisIndex) { + return axisIndex < axisExpandWindow[0] + ? -1 + : axisIndex > axisExpandWindow[1] + ? 1 + : 0; + } + each(dimensions, function (dim, idx) { - var pos = layoutLength * idx / (dimensions.length - 1); + var pos = getAxisPosition(idx, layoutLength, dimensions.length); var positionTable = { horizontal: { @@ -39727,7 +40368,8 @@ return /******/ (function(modules) { // webpackBootstrap rotation: rotation, transform: transform, tickDirection: 1, - labelDirection: 1 + labelDirection: 1, + axisExpandWindow: axisExpandWindow }; }, this); }, @@ -39755,6 +40397,7 @@ return /******/ (function(modules) { // webpackBootstrap }, /** + * Travel data for one time, get activeState of each data item. * @param {module:echarts/data/List} data * @param {Functio} cb param: {string} activeState 'active' or 'inactive' or 'normal' * {number} dataIndex @@ -39763,13 +40406,7 @@ return /******/ (function(modules) { // webpackBootstrap eachActiveState: function (data, callback, context) { var dimensions = this.dimensions; var axesMap = this._axesMap; - var hasActiveSet = false; - - for (var j = 0, lenj = dimensions.length; j < lenj; j++) { - if (axesMap[dimensions[j]].model.getActiveState() !== 'normal') { - hasActiveSet = true; - } - } + var hasActiveSet = this.hasAxisbrushed(); for (var i = 0, len = data.count(); i < len; i++) { var values = data.getValues(dimensions, i); @@ -39795,6 +40432,24 @@ return /******/ (function(modules) { // webpackBootstrap } }, + /** + * Whether has any activeSet. + * @return {boolean} + */ + hasAxisbrushed: function () { + var dimensions = this.dimensions; + var axesMap = this._axesMap; + var hasActiveSet = false; + + for (var j = 0, lenj = dimensions.length; j < lenj; j++) { + if (axesMap[dimensions[j]].model.getActiveState() !== 'normal') { + hasActiveSet = true; + } + } + + return hasActiveSet; + }, + /** * Convert coords of each axis to Point. * Return point. For example: [10, 20] @@ -39804,9 +40459,7 @@ return /******/ (function(modules) { // webpackBootstrap */ axisCoordToPoint: function (coord, dim) { var axisLayout = this._axesLayout[dim]; - var point = [coord, 0]; - vector.applyTransform(point, point, axisLayout.transform); - return point; + return graphic.applyTransform([coord, 0], axisLayout.transform); }, /** @@ -39814,6 +40467,28 @@ return /******/ (function(modules) { // webpackBootstrap */ getAxisLayout: function (dim) { return zrUtil.clone(this._axesLayout[dim]); + }, + + findClosestAxisDim: function (point) { + var axisDim; + var minDist = Infinity; + + zrUtil.each(this._axesLayout, function (axisLayout, dim) { + var localPoint = graphic.applyTransform(point, axisLayout.transform, true); + var extent = this._axesMap[dim].getExtent(); + + if (localPoint[0] < extent[0] || localPoint[0] > extent[1]) { + return; + } + + var dist = Math.abs(localPoint[1]); + if (dist < minDist) { + minDist = dist; + axisDim = dim; + } + }, this); + + return axisDim; } }; @@ -39912,9 +40587,11 @@ return /******/ (function(modules) { // webpackBootstrap */ parallelAxisIndex: null, + layoutMode: 'box', + defaultOption: { - zlevel: 0, // 一级层叠 - z: 0, // 二级层叠 + zlevel: 0, + z: 0, left: 80, top: 60, right: 80, @@ -39924,6 +40601,13 @@ return /******/ (function(modules) { // webpackBootstrap layout: 'horizontal', // 'horizontal' or 'vertical' + // FIXME + // naming? + axisExpandable: false, + axisExpandCenter: null, + axisExpandCount: 0, + axisExpandWidth: 50, // FIXME '10%' ? + parallelAxisDefault: null }, @@ -39958,6 +40642,18 @@ return /******/ (function(modules) { // webpackBootstrap && ecModel.getComponent('parallel', parallelIndex) === this; }, + setAxisExpand: function (opt) { + zrUtil.each( + ['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth'], + function (name) { + if (opt.hasOwnProperty(name)) { + this.option[name] = opt[name]; + } + }, + this + ); + }, + /** * @private */ @@ -40084,6 +40780,8 @@ return /******/ (function(modules) { // webpackBootstrap parallelIndex: null, + nameTruncateLengthOutExpand: 1, + areaSelectStyle: { width: 20, borderWidth: 1, @@ -40128,17 +40826,16 @@ return /******/ (function(modules) { // webpackBootstrap var echarts = __webpack_require__(1); - var actionInfo = { - type: 'axisAreaSelect', - event: 'axisAreaSelected', - update: 'updateVisual' - }; - /** * @payload * @property {string} parallelAxisId * @property {Array.>} intervals */ + var actionInfo = { + type: 'axisAreaSelect', + event: 'axisAreaSelected', + update: 'updateVisual' + }; echarts.registerAction(actionInfo, function (payload, ecModel) { ecModel.eachComponent( {mainType: 'parallelAxis', query: payload}, @@ -40146,6 +40843,18 @@ return /******/ (function(modules) { // webpackBootstrap parallelAxisModel.axis.model.setActiveIntervals(payload.intervals); } ); + }); + + /** + * @payload + */ + echarts.registerAction('parallelAxisExpand', function (payload, ecModel) { + ecModel.eachComponent( + {mainType: 'parallel', query: payload}, + function (parallelModel) { + parallelModel.setAxisExpand(payload); + } + ); }); @@ -40159,6 +40868,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var AxisBuilder = __webpack_require__(131); var BrushController = __webpack_require__(232); + var graphic = __webpack_require__(43); var elementList = ['axisLine', 'axisLabel', 'axisTick', 'axisName']; @@ -40192,6 +40902,10 @@ return /******/ (function(modules) { // webpackBootstrap this.group.removeAll(); + var oldAxisGroup = this._axisGroup; + this._axisGroup = new graphic.Group(); + this.group.add(this._axisGroup); + if (!axisModel.get('show')) { return; } @@ -40203,9 +40917,29 @@ return /******/ (function(modules) { // webpackBootstrap var areaSelectStyle = axisModel.getAreaSelectStyle(); var areaWidth = areaSelectStyle.width; - var axisLayout = coordSys.getAxisLayout(axisModel.axis.dim); + var dim = axisModel.axis.dim; + var axisLayout = coordSys.getAxisLayout(dim); + + // Fetch from axisModel by default. + var axisNameTruncateLength; + var axisNameTruncateEllipsis; + var axisLabelShow; + var axisIndex = zrUtil.indexOf(coordSys.dimensions, dim); + + var axisExpandWindow = axisLayout.axisExpandWindow; + if (axisExpandWindow + && (axisIndex <= axisExpandWindow[0] || axisIndex >= axisExpandWindow[1]) + ) { + axisNameTruncateLength = axisModel.get('nameTruncateLengthOutExpand'); + axisNameTruncateEllipsis = ''; + axisLabelShow = false; + } + var builderOpt = zrUtil.extend( { + axisLabelShow: axisLabelShow, + axisNameTruncateLength: axisNameTruncateLength, + axisNameTruncateEllipsis: axisNameTruncateEllipsis, strokeContainThreshold: areaWidth, // lineWidth === 0 or no value. axisLineSilent: !(areaWidth > 0) // jshint ignore:line @@ -40217,19 +40951,20 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.each(elementList, axisBuilder.add, axisBuilder); - var axisGroup = axisBuilder.getGroup(); + this._axisGroup.add(axisBuilder.getGroup()); - this.group.add(axisGroup); + this._refreshBrushController(builderOpt, areaSelectStyle, axisModel, areaWidth); - this._refreshBrushController(axisGroup, areaSelectStyle, axisModel); + graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel); }, - _refreshBrushController: function (axisGroup, areaSelectStyle, axisModel) { + _refreshBrushController: function (builderOpt, areaSelectStyle, axisModel, areaWidth) { // After filtering, axis may change, select area needs to be update. var axis = axisModel.axis; var coverInfoList = zrUtil.map(axisModel.activeIntervals, function (interval) { return { - brushType: 'line', + brushType: 'lineX', + panelId: 'pl', range: [ axis.dataToCoord(interval[0], true), axis.dataToCoord(interval[1], true) @@ -40237,13 +40972,34 @@ return /******/ (function(modules) { // webpackBootstrap }; }); + var extent = axis.getExtent(); + var extra = 30; // Arbitrary value. + var rect = { + x: extent[0] - extra, + y: -areaWidth / 2, + width: extent[1] - extent[0] + 2 * extra, + height: areaWidth + }; + this._brushController - .mount(axisGroup) - .enableBrush({brushType: 'line', brushStyle: areaSelectStyle}) + .mount({ + enableGlobalPan: true, + rotation: builderOpt.rotation, + position: builderOpt.position + }) + .setPanels([{ + panelId: 'pl', + rect: rect + }]) + .enableBrush({ + brushType: 'lineX', + brushStyle: areaSelectStyle, + removeOnClick: true + }) .updateCovers(coverInfoList); }, - _onBrush: function (coverInfoList, isEnd) { + _onBrush: function (coverInfoList, opt) { // Do not cache these object, because the mey be changed. var axisModel = this.axisModel; var axis = axisModel.axis; @@ -40255,8 +41011,10 @@ return /******/ (function(modules) { // webpackBootstrap ]; }); - // Consider axisModel.option.realtime is null/undefined. - if (!(axisModel.option.realtime ^ !isEnd)) { + // If realtime is true, action is not dispatched on drag end, because + // the drag end emits the same params with the last drag move event, + // and may have some delay when using touch pad. + if (!axisModel.option.realtime === opt.isEnd || opt.removeOnClick) { // jshint ignore:line this.api.dispatchAction({ type: 'axisAreaSelect', parallelAxisId: axisModel.id, @@ -40302,7 +41060,7 @@ return /******/ (function(modules) { // webpackBootstrap var interactionMutex = __webpack_require__(174); var DataDiffer = __webpack_require__(97); - var bind = zrUtil.bind; + var curry = zrUtil.curry; var each = zrUtil.each; var map = zrUtil.map; var mathMin = Math.min; @@ -40310,7 +41068,7 @@ return /******/ (function(modules) { // webpackBootstrap var mathPow = Math.pow; var COVER_Z = 10000; - var UNSELECT_THRESHOLD = 2; + var UNSELECT_THRESHOLD = 6; var MIN_RESIZE_LINE_WIDTH = 6; var MUTEX_RESOURCE_KEY = 'globalPan'; @@ -40334,10 +41092,11 @@ return /******/ (function(modules) { // webpackBootstrap brushStyle: { lineWidth: 2, stroke: 'rgba(0,0,0,0.3)', - fill: 'rgba(0,0,0,0.15)' + fill: 'rgba(0,0,0,0.1)' }, transformable: true, - brushMode: 'single' + brushMode: 'single', + removeOnClick: false }; var baseUID = 0; @@ -40346,18 +41105,30 @@ return /******/ (function(modules) { // webpackBootstrap * @alias module:echarts/component/helper/BrushController * @constructor * @mixin {module:zrender/mixin/Eventful} + * @event module:echarts/component/helper/BrushController#brush + * params: + * areas: Array., coord relates to container group, + * If no container specified, to global. + * opt { + * isEnd: boolean, + * removeOnClick: boolean + * } * * @param {module:zrender/zrender~ZRender} zr */ function BrushController(zr) { + if (true) { + zrUtil.assert(zr); + } + Eventful.call(this); /** * @type {module:zrender/zrender~ZRender} - * @readOnly + * @private */ - this.zr = zr; + this._zr = zr; /** * @type {module:zrender/container/Group} @@ -40381,9 +41152,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * @private - * @type {module:zrender/core/BoundingRect} + * @type {Object} */ - this._containerRect = null; + this._panels; /** * @private @@ -40409,11 +41180,26 @@ return /******/ (function(modules) { // webpackBootstrap */ this._creatingCover; + /** + * true means global panel + * @private + * @type {module:zrender/container/Group|boolean} + */ + this._creatingPanel; + + /** + * @private + * @type {boolean} + */ + this._enableGlobalPan; + /** * @private * @type {boolean} */ - this._mounted = false; + if (true) { + this._mounted; + } /** * @private @@ -40427,7 +41213,7 @@ return /******/ (function(modules) { // webpackBootstrap */ this._handlers = {}; each(mouseHandlers, function (handler, eventName) { - this._handlers[eventName] = bind(handler, this); + this._handlers[eventName] = zrUtil.bind(handler, this); }, this); } @@ -40442,7 +41228,7 @@ return /******/ (function(modules) { // webpackBootstrap * If pass false/null/undefined, disable brush. * @param {number} [brushOption.brushMode='single'] 'single' or 'multiple' * @param {boolean} [brushOption.transformable=true] - * @param {boolean} [brushOption.onRelease] + * @param {boolean} [brushOption.removeOnClick=false] * @param {Object} [brushOption.brushStyle] * @param {number} [brushOption.brushStyle.width] * @param {number} [brushOption.brushStyle.lineWidth] @@ -40450,42 +41236,76 @@ return /******/ (function(modules) { // webpackBootstrap * @param {string} [brushOption.brushStyle.fill] */ enableBrush: function (brushOption) { - if (!this._mounted) { - return; + if (true) { + zrUtil.assert(this._mounted); } - this._brushType && doDisableBrush.call(this); - brushOption.brushType && doEnableBrush.call(this, brushOption); + this._brushType && doDisableBrush(this); + brushOption.brushType && doEnableBrush(this, brushOption); return this; }, /** - * @param {module:zrender/mixin/Transformable} container - * @param {module:zrender/core/BoundingRect|boolean} [rect] If not specified, - * use container.getBoundingRect(). If false, do not use containerRect, - * which means global select. + * @param {Array.} panelOpts If not pass, it is global brush. + * Each items: {panelId, rect} */ - mount: function (container, rect) { - this._mounted = true; // should be at first. - - // Remove from old container. - removeGroup.call(this); + setPanels: function (panelOpts) { + var oldPanels = this._panels || {}; + var newPanels = this._panels = panelOpts && panelOpts.length && {}; + var thisGroup = this.group; - // boundingRect will change when dragging, so we have - // to keep initial boundingRect. - this._containerRect = rect !== false - ? (rect || container.getBoundingRect()) : null; + newPanels && each(panelOpts, function (panelOpt) { + var panelId = panelOpt.panelId; + var panel = oldPanels[panelId]; + if (!panel) { + panel = new graphic.Rect({ + silent: true, + invisible: true + }); + thisGroup.add(panel); + } + panel.attr('shape', panelOpt.rect); + panel.__brushPanelId = panelId; + newPanels[panelId] = panel; + oldPanels[panelId] = null; + }); - // Add to new container. - container.add(this.group); + each(oldPanels, function (panel) { + panel && thisGroup.remove(panel); + }); return this; }, /** - * @param + * @param {Object} [opt] + * @return {boolean} [opt.enableGlobalPan=false] + * @return {boolean} [opt.position=[0, 0]] + * @return {boolean} [opt.rotation=0] + * @return {boolean} [opt.scale=[1, 1]] */ + mount: function (opt) { + opt = opt || {}; + + if (true) { + this._mounted = true; // should be at first. + } + + this._enableGlobalPan = opt.enableGlobalPan; + + var thisGroup = this.group; + this._zr.add(thisGroup); + + thisGroup.attr({ + position: opt.position || [0, 0], + rotation: opt.rotation || 0, + scale: opt.scale || [1, 1] + }); + + return this; + }, + eachCover: function (cb, context) { each(this._covers, cb, context); }, @@ -40504,8 +41324,8 @@ return /******/ (function(modules) { // webpackBootstrap * If brushOptionList is null/undefined, all covers removed. */ updateCovers: function (brushOptionList) { - if (!this._mounted) { - return; + if (true) { + zrUtil.assert(this._mounted); } brushOptionList = zrUtil.map(brushOptionList, function (brushOption) { @@ -40516,53 +41336,60 @@ return /******/ (function(modules) { // webpackBootstrap var oldCovers = this._covers; var newCovers = this._covers = []; var controller = this; + var creatingCover = this._creatingCover; - (new DataDiffer(oldCovers, brushOptionList, oldGetKey, newGetKey)) - .add(add) - .update(update) + (new DataDiffer(oldCovers, brushOptionList, oldGetKey, getKey)) + .add(addOrUpdate) + .update(addOrUpdate) .remove(remove) .execute(); return this; - function oldGetKey(cover, index) { - var brushOption = cover.__brushOption; - return brushOption.id != null ? brushOption.id : tmpIdPrefix + index; - } - - function newGetKey(brushOption, index) { - return brushOption.id != null ? brushOption.id : tmpIdPrefix + index; + function getKey(brushOption, index) { + return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + + '-' + brushOption.brushType; } - function add(newIndex) { - newCovers[newIndex] = createCover.call(controller, brushOptionList[newIndex]); - updateCoverAfterCreation.call(controller, newCovers[newIndex]); + function oldGetKey(cover, index) { + return getKey(cover.__brushOption, index); } - function update(newIndex, oldIndex) { - var cover = newCovers[newIndex] = oldCovers[oldIndex]; + function addOrUpdate(newIndex, oldIndex) { var newBrushOption = brushOptionList[newIndex]; - - if (newBrushOption.brushType !== cover.__brushOption.brushType) { - controller.group.remove(cover); - cover = createCover.call(controller, newBrushOption); + // Consider setOption in event listener of brushSelect, + // where updating cover when creating should be forbiden. + if (oldIndex != null && oldCovers[oldIndex] === creatingCover) { + newCovers[newIndex] = oldCovers[oldIndex]; + } + else { + var cover = newCovers[newIndex] = oldIndex != null + ? ( + oldCovers[oldIndex].__brushOption = newBrushOption, + oldCovers[oldIndex] + ) + : endCreating(controller, createCover(controller, newBrushOption)); + updateCoverAfterCreation(controller, cover); } - - cover.__brushOption = newBrushOption; - updateCoverAfterCreation.call(controller, newCovers[newIndex]); } function remove(oldIndex) { - controller.group.remove(oldCovers[oldIndex]); + if (oldCovers[oldIndex] !== creatingCover) { + controller.group.remove(oldCovers[oldIndex]); + } } }, unmount: function () { this.enableBrush(false); - removeGroup.call(this); - this._covers = []; - this._mounted = false; // should be at last. + // container may 'removeAll' outside. + clearCovers(this); + this._zr.remove(this.group); + + if (true) { + this._mounted = false; // should be at last. + } return this; }, @@ -40576,89 +41403,128 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.mixin(BrushController, Eventful); - function doEnableBrush(brushOption) { - var zr = this.zr; - - if (isGlobalBrush(this)) { - // FIXME - // 多个 selectcontroller,区域不一样时,这是否合理? - var onRelease = zrUtil.bind(function (userOnRelease) { - this.enableBrush(false); - userOnRelease && userOnRelease(); - }, this, brushOption.onRelease); + function doEnableBrush(controller, brushOption) { + var zr = controller._zr; - interactionMutex.take(zr, MUTEX_RESOURCE_KEY, this._uid, onRelease); - zr.setDefaultCursorStyle('crosshair'); + // Consider roam, which takes globalPan too. + if (!controller._enableGlobalPan) { + interactionMutex.take(zr, MUTEX_RESOURCE_KEY, controller._uid); } - each(this._handlers, function (handler, eventName) { + each(controller._handlers, function (handler, eventName) { zr.on(eventName, handler); }); - this._brushType = brushOption.brushType; - this._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true); + controller._brushType = brushOption.brushType; + controller._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true); } - function doDisableBrush() { - var zr = this.zr; + function doDisableBrush(controller) { + var zr = controller._zr; - interactionMutex.release(zr, MUTEX_RESOURCE_KEY, this._uid); - zr.setDefaultCursorStyle('default'); + interactionMutex.release(zr, MUTEX_RESOURCE_KEY, controller._uid); - each(this._handlers, function (handler, eventName) { + each(controller._handlers, function (handler, eventName) { zr.off(eventName, handler); }); - this._brushType = this._brushOption = null; + controller._brushType = controller._brushOption = null; } - function createCover(brushOption) { - var cover = coverRenderers[brushOption.brushType].createCover.call(this, brushOption); + function createCover(controller, brushOption) { + var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption); updateZ(cover); cover.__brushOption = brushOption; - this.group.add(cover); + controller.group.add(cover); return cover; } + function endCreating(controller, creatingCover) { + var coverRenderer = getCoverRenderer(creatingCover); + if (coverRenderer.endCreating) { + coverRenderer.endCreating(controller, creatingCover); + updateZ(creatingCover); + } + return creatingCover; + } + + function updateCoverShape(controller, cover) { + var brushOption = cover.__brushOption; + getCoverRenderer(cover).updateCoverShape( + controller, cover, brushOption.range, brushOption + ); + } + function updateZ(group) { group.traverse(function (el) { el.z = COVER_Z; + el.z2 = COVER_Z; // Consider in given container. }); } - function updateCoverAfterCreation(cover) { - var brushOption = cover.__brushOption; - var coverRenderer = coverRenderers[brushOption.brushType]; - coverRenderer.updateCoverShape.call(this, cover); - coverRenderer.updateCommon.call(this, cover); + function updateCoverAfterCreation(controller, cover) { + getCoverRenderer(cover).updateCommon(controller, cover); + updateCoverShape(controller, cover); } - function isInContainer(x, y) { - var localPos = this.group.transformCoordToLocal(x, y); - return !this._containerRect - || this._containerRect.contain(localPos[0], localPos[1]); + function getCoverRenderer(cover) { + return coverRenderers[cover.__brushOption.brushType]; } - function clearCovers() { - each(this._covers, function (cover) { - this.group.remove(cover); - }, this); - this._covers.length = 0; + function getPanelByPoint(controller, x, y) { + var panels = controller._panels; + if (!panels) { + return true; // Global panel + } + var panel; + each(panels, function (pn) { + pn.contain(x, y) && (panel = pn); + }); + return panel; } - function trigger(isEnd) { - var brushRanges = map(this._covers, function (cover) { + function getPanelByCover(controller, cover) { + var panels = controller._panels; + if (!panels) { + return true; // Global panel + } + var panelId = cover.__brushOption.panelId; + // User may give cover without coord sys info, + // which is then treated as global panel. + return panelId != null ? panels[panelId] : true; + } + + function clearCovers(controller) { + var covers = controller._covers; + var originalLength = covers.length; + each(covers, function (cover) { + controller.group.remove(cover); + }, controller); + covers.length = 0; + + return !!originalLength; + } + + function trigger(controller, opt) { + var areas = map(controller._covers, function (cover) { var brushOption = cover.__brushOption; + var range = zrUtil.clone(brushOption.range); + return { brushType: brushOption.brushType, - range: zrUtil.clone(brushOption.range) + panelId: brushOption.panelId, + range: range }; }); - this.trigger('brush', brushRanges, !!isEnd); + + controller.trigger('brush', areas, { + isEnd: !!opt.isEnd, + removeOnClick: !!opt.removeOnClick + }); } - function shouldShowCover() { - var track = this._track; + function shouldShowCover(controller) { + var track = controller._track; if (!track.length) { return false; @@ -40673,56 +41539,109 @@ return /******/ (function(modules) { // webpackBootstrap return dist > UNSELECT_THRESHOLD; } - function removeGroup() { - // container may 'removeAll' outside. - var group = this.group; - var container = group.parent; - if (container) { - container.remove(group); - } - } - - function isGlobalBrush(controller) { - return !controller._containerRect; - } - - function getLocalTrack() { - return map(this._track, function (point) { - return this.group.transformCoordToLocal(point[0], point[1]); - }, this); - } - - function getLocalTrackEnds() { - var localTrack = getLocalTrack.call(this); - var tail = localTrack.length - 1; + function getTrackEnds(track) { + var tail = track.length - 1; tail < 0 && (tail = 0); - return [localTrack[0], localTrack[tail]]; + return [track[0], track[tail]]; } - function createBaseRect(cover, brushOption) { + function createBaseRectCover(doDrift, controller, brushOption, edgeNames) { + var cover = new graphic.Group(); + cover.add(new graphic.Rect({ - name: 'rect', - style: brushOption.brushStyle, + name: 'main', + style: makeStyle(brushOption), silent: true, draggable: true, cursor: 'move', - drift: bind(driftRect, this, cover, 'nswe'), - ondragend: bind(trigger, this, true) + drift: curry(doDrift, controller, cover, 'nswe'), + ondragend: curry(trigger, controller, {isEnd: true}) })); + + each( + edgeNames, + function (name) { + cover.add(new graphic.Rect({ + name: name, + style: {opacity: 0}, + draggable: true, + silent: true, + invisible: true, + drift: curry(doDrift, controller, cover, name), + ondragend: curry(trigger, controller, {isEnd: true}) + })); + } + ); + + return cover; + } + + function updateBaseRect(controller, cover, localRange, brushOption) { + var lineWidth = brushOption.brushStyle.lineWidth || 0; + var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH); + var x = localRange[0][0]; + var y = localRange[1][0]; + var xa = x - lineWidth / 2; + var ya = y - lineWidth / 2; + var x2 = localRange[0][1]; + var y2 = localRange[1][1]; + var x2a = x2 - handleSize + lineWidth / 2; + var y2a = y2 - handleSize + lineWidth / 2; + var width = x2 - x; + var height = y2 - y; + var widtha = width + lineWidth; + var heighta = height + lineWidth; + + updateRectShape(controller, cover, 'main', x, y, width, height); + + if (brushOption.transformable) { + updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta); + updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta); + updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize); + updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize); + + updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize); + updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize); + updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize); + updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize); + } } - function updateCommon(cover) { + function updateCommon(controller, cover) { var brushOption = cover.__brushOption; - cover.childAt(0).useStyle(brushOption.brushStyle); var transformable = brushOption.transformable; - cover.childAt(0).attr({ + + var mainEl = cover.childAt(0); + mainEl.useStyle(makeStyle(brushOption)); + mainEl.attr({ silent: !transformable, cursor: transformable ? 'move' : 'default' }); + + each( + ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], + function (name) { + var el = cover.childOfName(name); + var globalDir = getGlobalDirection(controller, name); + + el && el.attr({ + silent: !transformable, + invisible: !transformable, + cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null + }); + } + ); } - function updateRectShape(cover, name, x, y, w, h) { - cover.childOfName(name).setShape({x: x, y: y, width: w, height: h}); + function updateRectShape(controller, cover, name, x, y, w, h) { + var el = cover.childOfName(name); + el && el.setShape(pointsToRect( + clipByPanel(controller, cover, [[x, y], [x + w, y + h]]) + )); + } + + function makeStyle(brushOption) { + return zrUtil.defaults({strokeNoScale: true}, brushOption.brushStyle); } function formatRectRange(x, y, x2, y2) { @@ -40735,34 +41654,130 @@ return /******/ (function(modules) { // webpackBootstrap ]; } - function driftRect(cover, name, dx, dy) { + function getTransform(controller) { + return graphic.getTransform(controller.group); + } + + function getGlobalDirection(controller, localDirection) { + if (localDirection.length > 1) { + localDirection = localDirection.split(''); + var globalDir = [ + getGlobalDirection(controller, localDirection[0]), + getGlobalDirection(controller, localDirection[1]) + ]; + (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse(); + return globalDir.join(''); + } + else { + var map = {w: 'left', e: 'right', n: 'top', s: 'bottom'}; + var inverseMap = {left: 'w', right: 'e', top: 'n', bottom: 's'}; + var globalDir = graphic.transformDirection( + map[localDirection], getTransform(controller) + ); + return inverseMap[globalDir]; + } + } + + function driftRect(toRectRange, fromRectRange, controller, cover, name, dx, dy, e) { var brushOption = cover.__brushOption; - var rectRange = brushOption.range; - var delta = [dx, dy]; + var rectRange = toRectRange(brushOption.range); + var localDelta = toLocalDelta(controller, dx, dy); each(name.split(''), function (namePart) { var ind = DIRECTION_MAP[namePart]; - rectRange[ind[0]][ind[1]] += delta[ind[0]]; + rectRange[ind[0]][ind[1]] += localDelta[ind[0]]; }); - brushOption.range = formatRectRange( + brushOption.range = fromRectRange(formatRectRange( rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1] - ); + )); - updateCoverAfterCreation.call(this, cover); - trigger.call(this, false); + updateCoverAfterCreation(controller, cover); + trigger(controller, {isEnd: false}); } - function driftPolygon(cover, dx, dy) { + function driftPolygon(controller, cover, dx, dy, e) { var range = cover.__brushOption.range; + var localDelta = toLocalDelta(controller, dx, dy); each(range, function (point) { - point[0] += dx; - point[1] += dy; + point[0] += localDelta[0]; + point[1] += localDelta[1]; }); - updateCoverAfterCreation.call(this, cover); - trigger.call(this, false); + updateCoverAfterCreation(controller, cover); + trigger(controller, {isEnd: false}); + } + + function toLocalDelta(controller, dx, dy) { + var thisGroup = controller.group; + var localD = thisGroup.transformCoordToLocal(dx, dy); + var localZero = thisGroup.transformCoordToLocal(0, 0); + + return [localD[0] - localZero[0], localD[1] - localZero[1]]; + } + + function clipByPanel(controller, cover, data) { + var panel = getPanelByCover(controller, cover); + if (panel === true) { // Global panel + return zrUtil.clone(data); + } + + var panelRect = panel.getBoundingRect(); + + return zrUtil.map(data, function (point) { + var x = point[0]; + x = mathMax(x, panelRect.x); + x = mathMin(x, panelRect.x + panelRect.width); + var y = point[1]; + y = mathMax(y, panelRect.y); + y = mathMin(y, panelRect.y + panelRect.height); + return [x, y]; + }); + } + + function pointsToRect(points) { + var xmin = mathMin(points[0][0], points[1][0]); + var ymin = mathMin(points[0][1], points[1][1]); + var xmax = mathMax(points[0][0], points[1][0]); + var ymax = mathMax(points[0][1], points[1][1]); + + return { + x: xmin, + y: ymin, + width: xmax - xmin, + height: ymax - ymin + }; + } + + function resetCursor(controller, e) { + var x = e.offsetX; + var y = e.offsetY; + var zr = controller._zr; + + if (controller._brushType) { // If active + var panels = controller._panels; + var covers = controller._covers; + var inCover; + + for (var i = 0; i < covers.length; i++) { + if (coverRenderers[covers[i].__brushOption.brushType].contain(covers[i], x, y)) { + inCover = true; + break; + } + } + + if (!inCover) { + if (panels) { // Brush on panels + each(panels, function (panel) { + panel.contain(x, y) && zr.setCursorStyle('crosshair'); + }); + } + else { // Global brush + zr.setCursorStyle('crosshair'); + } + } + } } function preventDefault(e) { @@ -40770,87 +41785,127 @@ return /******/ (function(modules) { // webpackBootstrap rawE.preventDefault && rawE.preventDefault(); } - function updateCoverByMouse(e, isEnd) { + function mainShapeContain(cover, x, y) { + return cover.childOfName('main').contain(x, y); + } + + function updateCoverByMouse(controller, e, isEnd) { var x = e.offsetX; var y = e.offsetY; - var creatingCover = this._creatingCover; - var thisBrushOption = this._brushOption; + var creatingCover = controller._creatingCover; + var panel = controller._creatingPanel; + var thisBrushOption = controller._brushOption; + var eventParams; - if (isInContainer.call(this, x, y)) { - this._track.push([x, y]); + controller._track.push(controller.group.transformCoordToLocal(x, y)); - if (shouldShowCover.call(this)) { + if (shouldShowCover(controller) || creatingCover) { - if (!creatingCover) { - thisBrushOption.brushMode === 'single' && clearCovers.call(this); - creatingCover = this._creatingCover = - createCover.call(this, zrUtil.clone(thisBrushOption)); - this._covers.push(creatingCover); - } + if (panel && !creatingCover) { + thisBrushOption.brushMode === 'single' && clearCovers(controller); + var brushOption = zrUtil.clone(thisBrushOption); + brushOption.panelId = panel === true ? null : panel.__brushPanelId; + creatingCover = controller._creatingCover = createCover(controller, brushOption); + controller._covers.push(creatingCover); + } - var coverRenderer = coverRenderers[this._brushType]; + if (creatingCover) { + var coverRenderer = coverRenderers[controller._brushType]; var coverBrushOption = creatingCover.__brushOption; - coverBrushOption.range = - coverRenderer.getCreatingRange.call(this, isEnd); + coverBrushOption.range = coverRenderer.getCreatingRange( + clipByPanel(controller, creatingCover, controller._track) + ); if (isEnd) { - if (coverRenderer.endCreating) { - coverRenderer.endCreating.call(this, creatingCover); - updateZ(creatingCover); - } - coverRenderer.updateCommon.call(this, creatingCover); + endCreating(controller, creatingCover); + coverRenderer.updateCommon(controller, creatingCover); } - coverRenderer.updateCoverShape.call(this, creatingCover); + updateCoverShape(controller, creatingCover); - trigger.call(this, isEnd); + eventParams = {isEnd: isEnd}; } } - - if (isEnd && creatingCover) { - this._creatingCover = null; + else if ( + isEnd + && thisBrushOption.brushMode === 'single' + && thisBrushOption.removeOnClick + ) { + // Help user to remove covers easily, only by a tiny drag, in 'single' mode. + // But a single click do not clear covers, because user may have casual + // clicks (for example, click on other component and do not expect covers + // disappear). + // Only some cover removed, trigger action, but not every click trigger action. + if (getPanelByPoint(controller, x, y) && clearCovers(controller)) { + eventParams = {isEnd: isEnd, removeOnClick: true}; + } } + + return eventParams; } var mouseHandlers = { mousedown: function (e) { - if (!e.target || !e.target.draggable) { + if (this._dragging) { + // In case some browser do not support globalOut, + // and release mose out side the browser. + handleDragEnd.call(this, e); + } + else if (!e.target || !e.target.draggable) { preventDefault(e); var x = e.offsetX; var y = e.offsetY; - if (isInContainer.call(this, x, y)) { + this._creatingCover = null; + var panel = this._creatingPanel = getPanelByPoint(this, x, y); + + if (panel) { this._dragging = true; - this._track = [[x, y]]; + this._track = [this.group.transformCoordToLocal(x, y)]; } } }, mousemove: function (e) { + // set Cursor + resetCursor(this, e); + if (this._dragging) { preventDefault(e); - updateCoverByMouse.call(this, e, false); + var eventParams = updateCoverByMouse(this, e, false); + + eventParams && trigger(this, eventParams); } }, - mouseup: function (e) { - if (this._dragging) { + mouseup: handleDragEnd //, - preventDefault(e); + // FIXME + // in tooltip, globalout should not be triggered. + // globalout: handleDragEnd + }; - updateCoverByMouse.call(this, e, true); + function handleDragEnd(e) { + if (this._dragging) { - this._dragging = false; - this._track = []; - } + preventDefault(e); + + var eventParams = updateCoverByMouse(this, e, true); + + this._dragging = false; + this._track = []; + this._creatingCover = null; + + // trigger event shoule be at final, after procedure will be nested. + eventParams && trigger(this, eventParams); } - }; + } /** * key: brushType @@ -40858,143 +41913,131 @@ return /******/ (function(modules) { // webpackBootstrap */ var coverRenderers = { - line: { - createCover: function (brushOption) { - var cover = new graphic.Group(); - - createBaseRect.call(this, cover, brushOption); + lineX: getLineRenderer(0), - return cover; - }, - getCreatingRange: function () { - var ends = getLocalTrackEnds.call(this); - var min = mathMin(ends[0][0], ends[1][0]); - var max = mathMax(ends[0][0], ends[1][0]); - - return [min, max]; - }, - updateCoverShape: function (cover) { - var info = cover.__brushOption; - var range = info.range; - var width = info.brushStyle.width; - cover.childOfName('rect').setShape({ - x: range[0], - y: -width / 2, - width: range[1] - range[0], - height: width - }); - }, - updateCommon: updateCommon - }, + lineY: getLineRenderer(1), rect: { - createCover: function (brushOption) { - var cover = new graphic.Group(); - - createBaseRect.call(this, cover, brushOption); - - each( - ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], - function (name) { - cover.add(new graphic.Rect({ - name: name, - __cursor: CURSOR_MAP[name] + '-resize', - style: {opacity: 0}, - draggable: true, - drift: bind(driftRect, this, cover, name), - ondragend: bind(trigger, this, true) - })); - }, - this + createCover: function (controller, brushOption) { + return createBaseRectCover( + curry( + driftRect, + function (range) { + return range; + }, + function (range) { + return range; + } + ), + controller, + brushOption, + ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'] ); - - return cover; }, - getCreatingRange: function () { - var ends = getLocalTrackEnds.call(this); + getCreatingRange: function (localTrack) { + var ends = getTrackEnds(localTrack); return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]); }, - updateCoverShape: function (cover) { - var info = cover.__brushOption; - var range = info.range; - var lineWidth = info.brushStyle.lineWidth || 0; - var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH); - var x = range[0][0]; - var y = range[1][0]; - var xa = x - lineWidth / 2; - var ya = y - lineWidth / 2; - var x2 = range[0][1]; - var y2 = range[1][1]; - var x2a = x2 - handleSize + lineWidth / 2; - var y2a = y2 - handleSize + lineWidth / 2; - var width = x2 - x; - var height = y2 - y; - var widtha = width + lineWidth; - var heighta = height + lineWidth; - - updateRectShape(cover, 'rect', x, y, width, height); - - if (info.transformable) { - updateRectShape(cover, 'w', xa, ya, handleSize, heighta); - updateRectShape(cover, 'e', x2a, ya, handleSize, heighta); - updateRectShape(cover, 'n', xa, ya, widtha, handleSize); - updateRectShape(cover, 's', xa, y2a, widtha, handleSize); - - updateRectShape(cover, 'nw', xa, ya, handleSize, handleSize); - updateRectShape(cover, 'ne', x2a, ya, handleSize, handleSize); - updateRectShape(cover, 'sw', xa, y2a, handleSize, handleSize); - updateRectShape(cover, 'se', x2a, y2a, handleSize, handleSize); - } + updateCoverShape: function (controller, cover, localRange, brushOption) { + updateBaseRect(controller, cover, localRange, brushOption); }, - updateCommon: function (cover) { - updateCommon.call(this, cover); - var transformable = cover.__brushOption.transformable; - each( - ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], - function (name) { - var el = cover.childOfName(name); - el.attr({ - silent: !transformable, - cursor: transformable ? el.__cursor : 'default' - }); - }, - this - ); - } + updateCommon: updateCommon, + contain: mainShapeContain }, polygon: { - createCover: function (brushOption) { + createCover: function (controller, brushOption) { var cover = new graphic.Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the // border of the shape when drawing, which is a better experience for user. cover.add(new graphic.Polyline({ - style: brushOption.brushStyle, + name: 'main', + style: makeStyle(brushOption), silent: true })); return cover; }, - getCreatingRange: function (isEnd) { - return this._track.slice(); + getCreatingRange: function (localTrack) { + return localTrack; }, - endCreating: function (cover) { + endCreating: function (controller, cover) { cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape. cover.add(new graphic.Polygon({ + name: 'main', draggable: true, - drift: bind(driftPolygon, this, cover), - ondragend: bind(trigger, this, true) + drift: curry(driftPolygon, controller, cover), + ondragend: curry(trigger, controller, {isEnd: true}) })); }, - updateCoverShape: function (cover) { - cover.childAt(0).setShape({points: cover.__brushOption.range}); + updateCoverShape: function (controller, cover, localRange, brushOption) { + cover.childAt(0).setShape({ + points: clipByPanel(controller, cover, localRange) + }); }, - updateCommon: updateCommon + updateCommon: updateCommon, + contain: mainShapeContain } }; + function getLineRenderer(xyIndex) { + return { + createCover: function (controller, brushOption) { + return createBaseRectCover( + curry( + driftRect, + function (range) { + var rectRange = [range, [0, 100]]; + xyIndex && rectRange.reverse(); + return rectRange; + }, + function (rectRange) { + return rectRange[xyIndex]; + } + ), + controller, + brushOption, + [['w', 'e'], ['n', 's']][xyIndex] + ); + }, + getCreatingRange: function (localTrack) { + var ends = getTrackEnds(localTrack); + var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]); + var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]); + + return [min, max]; + }, + updateCoverShape: function (controller, cover, localRange, brushOption) { + var brushWidth = brushOption.brushStyle.width; + var otherExtent; + // If brushWidth not specified, fit the panel. + if (brushWidth == null) { + var panel = getPanelByCover(controller, cover); + var base = 0; + if (panel !== true) { + var rect = panel.getBoundingRect(); + brushWidth = xyIndex ? rect.width : rect.height; + base = xyIndex ? rect.x : rect.y; + } + // FIXME + // do not support global panel yet. + otherExtent = [base, base + (brushWidth || 0)]; + } + else { + otherExtent = [-brushWidth / 2, brushWidth / 2]; + } + var rectRange = [localRange, otherExtent]; + xyIndex && rectRange.reverse(); + + updateBaseRect(controller, cover, rectRange, brushOption); + }, + updateCommon: updateCommon, + contain: mainShapeContain + }; + } + module.exports = BrushController; @@ -41087,7 +42130,7 @@ return /******/ (function(modules) { // webpackBootstrap var dataDimsInfo = zrUtil.map(dataDims, function (dim, dimIndex) { - var modelDimsIndex = zrUtil.indexOf(dim, modelDims); + var modelDimsIndex = zrUtil.indexOf(modelDims, dim); var axisModel = modelDimsIndex >= 0 && ecModel.getComponent( 'parallelAxis', parallelAxisIndices[modelDimsIndex] ); @@ -41289,11 +42332,15 @@ return /******/ (function(modules) { // webpackBootstrap // First create if (!this._data) { - dataGroup.setClipPath(createGridClipShape( + var clipPath = createGridClipShape( coordSys, seriesModel, function () { - dataGroup.removeClipPath(); + // Callback will be invoked immediately if there is no animation + setTimeout(function () { + dataGroup.removeClipPath(); + }); } - )); + ); + dataGroup.setClipPath(clipPath); } this._data = data; @@ -41368,6 +42415,7 @@ return /******/ (function(modules) { // webpackBootstrap height: rect.height } }); + var dim = parallelModel.get('layout') === 'horizontal' ? 'width' : 'height'; rectEl.setShape(dim, 0); graphic.initProps(rectEl, { @@ -41467,9 +42515,11 @@ return /******/ (function(modules) { // webpackBootstrap ecModel.eachSeriesByType('parallel', function (seriesModel) { var itemStyleModel = seriesModel.getModel('itemStyle.normal'); + var lineStyleModel = seriesModel.getModel('lineStyle.normal'); var globalColors = ecModel.get('color'); - var color = itemStyleModel.get('color') + var color = lineStyleModel.get('color') + || itemStyleModel.get('color') || globalColors[seriesModel.seriesIndex % globalColors.length]; var inactiveOpacity = seriesModel.get('inactiveOpacity'); var activeOpacity = seriesModel.get('activeOpacity'); @@ -43183,6 +44233,10 @@ return /******/ (function(modules) { // webpackBootstrap }, this); return encodeHTML(this.name) + '
' + valueHTMLArr.join('
'); + }, + + brushSelector: function (itemLayout, selectors) { + return selectors.rect(itemLayout.brushRect); } }); @@ -43225,7 +44279,7 @@ return /******/ (function(modules) { // webpackBootstrap var itemModel = data.getItemModel(idx); var normalItemStyleModel = itemModel.getModel(normalStyleAccessPath); var color = data.getItemVisual(idx, 'color'); - var borderColor = data.getItemVisual(idx, 'borderColor'); + var borderColor = data.getItemVisual(idx, 'borderColor') || color; // Color must be excluded. // Because symbol provide setColor individually to set fill and stroke @@ -43376,7 +44430,8 @@ return /******/ (function(modules) { // webpackBootstrap initBaseline: openVal > closeVal ? ocHighPoint[constDim] : ocLowPoint[constDim], // open point. bodyEnds: bodyEnds, - whiskerEnds: whiskerEnds + whiskerEnds: whiskerEnds, + brushRect: makeBrushRect() }); function getPoint(val) { @@ -43398,6 +44453,21 @@ return /******/ (function(modules) { // webpackBootstrap : bodyEnds.push(point2, point1); } + function makeBrushRect() { + var pmin = getPoint(Math.min(openVal, closeVal, lowestVal, highestVal)); + var pmax = getPoint(Math.max(openVal, closeVal, lowestVal, highestVal)); + + pmin[variableDim] -= candleWidth / 2; + pmax[variableDim] -= candleWidth / 2; + + return { + x: pmin[0], + y: pmin[1], + width: constDim ? candleWidth : pmax[0] - pmin[0], + height: constDim ? pmax[1] - pmin[1] : candleWidth + }; + } + }, true); }); }; @@ -43789,14 +44859,9 @@ return /******/ (function(modules) { // webpackBootstrap __webpack_require__(261); __webpack_require__(262); - var zrUtil = __webpack_require__(4); var echarts = __webpack_require__(1); echarts.registerLayout( - __webpack_require__(264) - ); - - echarts.registerVisual( - zrUtil.curry(__webpack_require__(93), 'lines', 'lineStyle') + __webpack_require__(267) ); @@ -43812,56 +44877,90 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var CoordinateSystem = __webpack_require__(26); - module.exports = SeriesModel.extend({ + // Convert [ [{coord: []}, {coord: []}] ] + // to [ { coords: [[]] } ] + function preprocessOption (seriesOpt) { + var data = seriesOpt.data; + if (data && data[0] && data[0][0] && data[0][0].coord) { + if (true) { + console.warn('Lines data configuration has been changed to' + + ' { coords:[[1,2],[2,3]] }'); + } + seriesOpt.data = zrUtil.map(data, function (itemOpt) { + var coords = [ + itemOpt[0].coord, itemOpt[1].coord + ]; + var target = { + coords: coords + }; + if (itemOpt[0].name) { + target.fromName = itemOpt[0].name; + } + if (itemOpt[1].name) { + target.toName = itemOpt[1].name; + } + return zrUtil.mergeAll([target, itemOpt[0], itemOpt[1]]); + }); + } + } + + var LinesSeries = SeriesModel.extend({ type: 'series.lines', dependencies: ['grid', 'polar'], - getInitialData: function (option, ecModel) { - var fromDataArr = []; - var toDataArr = []; - var lineDataArr = []; - zrUtil.each(option.data, function (opt) { - fromDataArr.push(opt[0]); - toDataArr.push(opt[1]); - lineDataArr.push(zrUtil.extend( - zrUtil.extend({}, zrUtil.isArray(opt[0]) ? null : opt[0]), - zrUtil.isArray(opt[1]) ? null : opt[1] - )); - }); + visualColorAccessPath: 'lineStyle.normal.color', - var CoordSys = CoordinateSystem.get(option.coordinateSystem); + init: function (option) { + // Not using preprocessor because mergeOption may not have series.type + preprocessOption(option); + + LinesSeries.superApply(this, 'init', arguments); + }, + + mergeOption: function (option) { + preprocessOption(option); + + LinesSeries.superApply(this, 'mergeOption', arguments); + }, + getInitialData: function (option, ecModel) { if (true) { + var CoordSys = CoordinateSystem.get(option.coordinateSystem); if (!CoordSys) { - throw new Error('Invalid coordinate system'); + throw new Error('Unkown coordinate system ' + option.coordinateSystem); } } - var dimensions = CoordSys.dimensions; - - var fromData = new List(dimensions, this); - var toData = new List(dimensions, this); var lineData = new List(['value'], this); - - function geoCoordGetter(item, dim, dataIndex, dimIndex) { - return item.coord && item.coord[dimIndex]; - } - - fromData.initData(fromDataArr, null, geoCoordGetter); - toData.initData(toDataArr, null, geoCoordGetter); - lineData.initData(lineDataArr); - - this.fromData = fromData; - this.toData = toData; + lineData.hasItemOption = false; + lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) { + // dataItem is simply coords + if (dataItem instanceof Array) { + return NaN; + } + else { + lineData.hasItemOption = true; + var value = dataItem.value; + if (value) { + return value instanceof Array ? value[dimIndex] : value; + } + } + }); return lineData; }, formatTooltip: function (dataIndex) { - var fromName = this.fromData.getName(dataIndex); - var toName = this.toData.getName(dataIndex); + var data = this.getData(); + var itemModel = data.getItemModel(dataIndex); + var name = itemModel.get('name'); + if (name) { + return name; + } + var fromName = itemModel.get('fromName'); + var toName = itemModel.get('toName'); return fromName + ' > ' + toName; }, @@ -43879,13 +44978,14 @@ return /******/ (function(modules) { // webpackBootstrap // Geo coordinate system geoIndex: 0, - // symbol: null, - // symbolSize: 10, - // symbolRotate: null, - effect: { show: false, period: 4, + // Animation delay. support callback + // delay: 0, + // If move with constant speed px/sec + // period will be ignored if this property is > 0, + constantSpeed: 0, symbol: 'circle', symbolSize: 3, loop: true, @@ -43899,6 +44999,10 @@ return /******/ (function(modules) { // webpackBootstrap // Available when large is true largeThreshold: 2000, + // If lines are polyline + // polyline not support curveness, label, animation + polyline: false, + label: { normal: { show: false, @@ -43907,10 +45011,7 @@ return /******/ (function(modules) { // webpackBootstrap // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 } }, - // itemStyle: { - // normal: { - // } - // }, + lineStyle: { normal: { opacity: 0.5 @@ -43929,6 +45030,9 @@ return /******/ (function(modules) { // webpackBootstrap var LineDraw = __webpack_require__(198); var EffectLine = __webpack_require__(263); var Line = __webpack_require__(199); + var Polyline = __webpack_require__(264); + var EffectPolyline = __webpack_require__(265); + var LargeLineDraw = __webpack_require__(266); __webpack_require__(1).extendChartView({ @@ -43941,14 +45045,28 @@ return /******/ (function(modules) { // webpackBootstrap var lineDraw = this._lineDraw; var hasEffect = seriesModel.get('effect.show'); - if (hasEffect !== this._hasEffet) { + var isPolyline = seriesModel.get('polyline'); + var isLarge = seriesModel.get('large') && data.count() >= seriesModel.get('largeThreshold'); + + if (true) { + if (hasEffect && isLarge) { + console.warn('Large lines not support effect'); + } + } + if (hasEffect !== this._hasEffet || isPolyline !== this._isPolyline || isLarge !== this._isLarge) { if (lineDraw) { lineDraw.remove(); } - lineDraw = this._lineDraw = new LineDraw( - hasEffect ? EffectLine : Line - ); + lineDraw = this._lineDraw = isLarge + ? new LargeLineDraw() + : new LineDraw( + isPolyline + ? (hasEffect ? EffectPolyline : Polyline) + : (hasEffect ? EffectLine : Line) + ); this._hasEffet = hasEffect; + this._isPolyline = isPolyline; + this._isLarge = isLarge; } var zlevel = seriesModel.get('zlevel'); @@ -43981,7 +45099,6 @@ return /******/ (function(modules) { // webpackBootstrap }); } - this.group.add(lineDraw.group); lineDraw.updateData(data); @@ -43990,7 +45107,7 @@ return /******/ (function(modules) { // webpackBootstrap }, updateLayout: function (seriesModel, ecModel, api) { - this._lineDraw.updateLayout(); + this._lineDraw.updateLayout(seriesModel); // Not use motion when dragging or zooming var zr = api.getZr(); zr.painter.getLayer(this._lastZlevel).clear(true); @@ -44007,6 +45124,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { /** + * Provide effect for line * @module echarts/chart/helper/EffectLine */ @@ -44015,6 +45133,7 @@ return /******/ (function(modules) { // webpackBootstrap var Line = __webpack_require__(199); var zrUtil = __webpack_require__(4); var symbolUtil = __webpack_require__(105); + var vec2 = __webpack_require__(16); var curveUtil = __webpack_require__(50); @@ -44023,45 +45142,19 @@ return /******/ (function(modules) { // webpackBootstrap * @extends {module:zrender/graphic/Group} * @alias {module:echarts/chart/helper/Line} */ - function EffectLine(lineData, idx) { + function EffectLine(lineData, idx, seriesScope) { graphic.Group.call(this); - var line = new Line(lineData, idx); - this.add(line); + this.add(this.createLine(lineData, idx, seriesScope)); this._updateEffectSymbol(lineData, idx); } var effectLineProto = EffectLine.prototype; - function setAnimationPoints(symbol, points) { - symbol.__p1 = points[0]; - symbol.__p2 = points[1]; - symbol.__cp1 = points[2] || [ - (points[0][0] + points[1][0]) / 2, - (points[0][1] + points[1][1]) / 2 - ]; - } - - function updateSymbolPosition() { - var p1 = this.__p1; - var p2 = this.__p2; - var cp1 = this.__cp1; - var t = this.__t; - var pos = this.position; - var quadraticAt = curveUtil.quadraticAt; - var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt; - pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t); - pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t); - - // Tangent - var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t); - var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t); - - this.rotation = -Math.atan2(ty, tx) - Math.PI / 2; - - this.ignore = false; - } + effectLineProto.createLine = function (lineData, idx, seriesScope) { + return new Line(lineData, idx, seriesScope); + }; effectLineProto._updateEffectSymbol = function (lineData, idx) { var itemModel = lineData.getItemModel(idx); @@ -44073,63 +45166,145 @@ return /******/ (function(modules) { // webpackBootstrap } var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color'); var symbol = this.childAt(1); - var period = effectModel.get('period') * 1000; - var loop = effectModel.get('loop'); - if ( - this._symbolType !== symbolType - || period !== this._period - || loop !== this._loop - ) { + + if (this._symbolType !== symbolType) { + // Remove previous + this.remove(symbol); + symbol = symbolUtil.createSymbol( symbolType, -0.5, -0.5, 1, 1, color ); - symbol.ignore = true; symbol.z2 = 100; - this._symbolType = symbolType; - this._period = period; - this._loop = loop; + symbol.culling = true; this.add(symbol); + } + + // Symbol may be removed if loop is false + if (!symbol) { + return; + } + + // Shadow color is same with color in default + symbol.setStyle('shadowColor', color); + symbol.setStyle(effectModel.getItemStyle(['color'])); + + symbol.attr('scale', size); + + symbol.setColor(color); + symbol.attr('scale', size); + + this._symbolType = symbolType; + + this._updateEffectAnimation(lineData, effectModel, idx); + }; + + effectLineProto._updateEffectAnimation = function (lineData, effectModel, idx) { + + var symbol = this.childAt(1); + if (!symbol) { + return; + } + var self = this; + + var points = lineData.getItemLayout(idx); + + var period = effectModel.get('period') * 1000; + var loop = effectModel.get('loop'); + var constantSpeed = effectModel.get('constantSpeed'); + var delayExpr = effectModel.get('delay') || function (idx) { + return idx / lineData.count() * period / 3; + }; + var isDelayFunc = typeof delayExpr === 'function'; + + // Ignore when updating + symbol.ignore = true; + + this.updateAnimationPoints(symbol, points); + + if (constantSpeed > 0) { + period = this.getLineLength(symbol) / constantSpeed * 1000; + } + + if (period !== this._period || loop !== this._loop) { + + symbol.stopAnimation(); + + var delay = delayExpr; + if (isDelayFunc) { + delay = delayExpr(idx); + } + if (symbol.__t > 0) { + delay = -period * symbol.__t; + } symbol.__t = 0; var animator = symbol.animate('', loop) .when(period, { __t: 1 }) - .delay(idx / lineData.count() * period / 2) - .during(zrUtil.bind(updateSymbolPosition, symbol)); + .delay(delay) + .during(function () { + self.updateSymbolPosition(symbol); + }); if (!loop) { - var self = this; animator.done(function () { self.remove(symbol); }); } animator.start(); } - // Shadow color is same with color in default - symbol.setStyle('shadowColor', color); - symbol.setStyle(effectModel.getItemStyle(['color'])); - symbol.attr('scale', size); - var points = lineData.getItemLayout(idx); - setAnimationPoints(symbol, points); + this._period = period; + this._loop = loop; + }; - symbol.setColor(color); - symbol.attr('scale', size); + effectLineProto.getLineLength = function (symbol) { + // Not so accurate + return (vec2.dist(symbol.__p1, symbol.__cp1) + + vec2.dist(symbol.__cp1, symbol.__p2)); }; - effectLineProto.updateData = function (lineData, idx) { - this.childAt(0).updateData(lineData, idx); + effectLineProto.updateAnimationPoints = function (symbol, points) { + symbol.__p1 = points[0]; + symbol.__p2 = points[1]; + symbol.__cp1 = points[2] || [ + (points[0][0] + points[1][0]) / 2, + (points[0][1] + points[1][1]) / 2 + ]; + }; + + effectLineProto.updateData = function (lineData, idx, seriesScope) { + this.childAt(0).updateData(lineData, idx, seriesScope); this._updateEffectSymbol(lineData, idx); }; + effectLineProto.updateSymbolPosition = function (symbol) { + var p1 = symbol.__p1; + var p2 = symbol.__p2; + var cp1 = symbol.__cp1; + var t = symbol.__t; + var pos = symbol.position; + var quadraticAt = curveUtil.quadraticAt; + var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt; + pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t); + pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t); + + // Tangent + var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t); + var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t); + + symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; + + symbol.ignore = false; + }; + + effectLineProto.updateLayout = function (lineData, idx) { this.childAt(0).updateLayout(lineData, idx); - var symbol = this.childAt(1); - if (symbol) { - var points = lineData.getItemLayout(idx); - setAnimationPoints(symbol, points); - } + + var effectModel = lineData.getItemModel(idx).getModel('effect'); + this._updateEffectAnimation(lineData, effectModel, idx); }; zrUtil.inherits(EffectLine, graphic.Group); @@ -44139,54 +45314,414 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 264 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { + + /** + * @module echarts/chart/helper/Line + */ + + + var graphic = __webpack_require__(43); + var zrUtil = __webpack_require__(4); + + /** + * @constructor + * @extends {module:zrender/graphic/Group} + * @alias {module:echarts/chart/helper/Polyline} + */ + function Polyline(lineData, idx, seriesScope) { + graphic.Group.call(this); + + this._createPolyline(lineData, idx, seriesScope); + } + + var polylineProto = Polyline.prototype; + + polylineProto._createPolyline = function (lineData, idx, seriesScope) { + // var seriesModel = lineData.hostModel; + var points = lineData.getItemLayout(idx); + + var line = new graphic.Polyline({ + shape: { + points: points + } + }); + + this.add(line); + + this._updateCommonStl(lineData, idx, seriesScope); + }; + + polylineProto.updateData = function (lineData, idx, seriesScope) { + var seriesModel = lineData.hostModel; + + var line = this.childAt(0); + var target = { + shape: { + points: lineData.getItemLayout(idx) + } + }; + graphic.updateProps(line, target, seriesModel, idx); + + this._updateCommonStl(lineData, idx, seriesScope); + }; + + polylineProto._updateCommonStl = function (lineData, idx, seriesScope) { + var line = this.childAt(0); + var itemModel = lineData.getItemModel(idx); + + var visualColor = lineData.getItemVisual(idx, 'color'); + + var lineStyle = seriesScope && seriesScope.lineStyle; + var hoverLineStyle = seriesScope && seriesScope.hoverLineStyle; + + if (!seriesScope || lineData.hasItemOption) { + lineStyle = itemModel.getModel('lineStyle.normal').getLineStyle(); + hoverLineStyle = itemModel.getModel('lineStyle.emphasis').getLineStyle(); + } + line.useStyle(zrUtil.defaults( + { + strokeNoScale: true, + fill: 'none', + stroke: visualColor + }, + lineStyle + )); + line.hoverStyle = hoverLineStyle; + + graphic.setHoverStyle(this); + }; + + polylineProto.updateLayout = function (lineData, idx) { + var polyline = this.childAt(0); + polyline.setShape('points', lineData.getItemLayout(idx)); + }; + + zrUtil.inherits(Polyline, graphic.Group); + + module.exports = Polyline; + + +/***/ }, +/* 265 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Provide effect for line + * @module echarts/chart/helper/EffectLine + */ + + + var Polyline = __webpack_require__(264); + var zrUtil = __webpack_require__(4); + var EffectLine = __webpack_require__(263); + var vec2 = __webpack_require__(16); + + /** + * @constructor + * @extends {module:echarts/chart/helper/EffectLine} + * @alias {module:echarts/chart/helper/Polyline} + */ + function EffectPolyline(lineData, idx, seriesScope) { + EffectLine.call(this, lineData, idx, seriesScope); + this._lastFrame = 0; + this._lastFramePercent = 0; + } + + var effectPolylineProto = EffectPolyline.prototype; + + // Overwrite + effectPolylineProto.createLine = function (lineData, idx, seriesScope) { + return new Polyline(lineData, idx, seriesScope); + }; + + // Overwrite + effectPolylineProto.updateAnimationPoints = function (symbol, points) { + this._points = points; + var accLenArr = [0]; + var len = 0; + for (var i = 1; i < points.length; i++) { + var p1 = points[i - 1]; + var p2 = points[i]; + len += vec2.dist(p1, p2); + accLenArr.push(len); + } + if (len === 0) { + return; + } + + for (var i = 0; i < accLenArr.length; i++) { + accLenArr[i] /= len; + } + this._offsets = accLenArr; + this._length = len; + }; + + // Overwrite + effectPolylineProto.getLineLength = function (symbol) { + return this._length; + }; + + // Overwrite + effectPolylineProto.updateSymbolPosition = function (symbol) { + var t = symbol.__t; + var points = this._points; + var offsets = this._offsets; + var len = points.length; + + if (!offsets) { + // Has length 0 + return; + } + + var lastFrame = this._lastFrame; + var frame; + + if (t < this._lastFramePercent) { + // Start from the next frame + // PENDING start from lastFrame ? + var start = Math.min(lastFrame + 1, len - 1); + for (frame = start; frame >= 0; frame--) { + if (offsets[frame] <= t) { + break; + } + } + // PENDING really need to do this ? + frame = Math.min(frame, len - 2); + } + else { + for (var frame = lastFrame; frame < len; frame++) { + if (offsets[frame] > t) { + break; + } + } + frame = Math.min(frame - 1, len - 2); + } + + vec2.lerp( + symbol.position, points[frame], points[frame + 1], + (t - offsets[frame]) / (offsets[frame + 1] - offsets[frame]) + ); + + this._lastFrame = frame; + this._lastFramePercent = t; + + symbol.ignore = false; + }; + + zrUtil.inherits(EffectPolyline, EffectLine); + + module.exports = EffectPolyline; + + +/***/ }, +/* 266 */ +/***/ function(module, exports, __webpack_require__) { + + // TODO Batch by color + + + + var graphic = __webpack_require__(43); + + var quadraticContain = __webpack_require__(55); + var lineContain = __webpack_require__(53); + + var LargeLineShape = graphic.extendShape({ + shape: { + polyline: false, + + segs: [] + }, + + buildPath: function (path, shape) { + var segs = shape.segs; + var isPolyline = shape.polyline; + + for (var i = 0; i < segs.length; i++) { + var seg = segs[i]; + if (isPolyline) { + path.moveTo(seg[0][0], seg[0][1]); + for (var j = 1; j < seg.length; j++) { + path.lineTo(seg[j][0], seg[j][1]); + } + } + else { + path.moveTo(seg[0][0], seg[0][1]); + if (seg.length > 2) { + path.quadraticCurveTo(seg[2][0], seg[2][1], seg[1][0], seg[1][1]); + } + else { + path.lineTo(seg[1][0], seg[1][1]); + } + } + } + }, + + findDataIndex: function (x, y) { + var shape = this.shape; + var segs = shape.segs; + var isPolyline = shape.polyline; + var lineWidth = Math.max(this.style.lineWidth, 1); + + // Not consider transform + for (var i = 0; i < segs.length; i++) { + var seg = segs[i]; + if (isPolyline) { + for (var j = 1; j < seg.length; j++) { + if (lineContain.containStroke( + seg[j - 1][0], seg[j - 1][1], seg[j][0], seg[j][1], lineWidth, x, y + )) { + return i; + } + } + } + else { + if (seg.length > 2) { + if (quadraticContain.containStroke( + seg[0][0], seg[0][1], seg[2][0], seg[2][1], seg[1][0], seg[1][1], lineWidth, x, y + )) { + return i; + } + } + else { + if (lineContain.containStroke( + seg[0][0], seg[0][1], seg[1][0], seg[1][1], lineWidth, x, y + )) { + return i; + } + } + } + } + + return -1; + } + }); + + function LargeLineDraw() { + this.group = new graphic.Group(); + + this._lineEl = new LargeLineShape(); + } + + var largeLineProto = LargeLineDraw.prototype; + + /** + * Update symbols draw by new data + * @param {module:echarts/data/List} data + */ + largeLineProto.updateData = function (data) { + this.group.removeAll(); + + var lineEl = this._lineEl; + + var seriesModel = data.hostModel; + + lineEl.setShape({ + segs: data.mapArray(data.getItemLayout), + polyline: seriesModel.get('polyline') + }); + + lineEl.useStyle( + seriesModel.getModel('lineStyle.normal').getLineStyle() + ); + + var visualColor = data.getVisual('color'); + if (visualColor) { + lineEl.setStyle('stroke', visualColor); + } + lineEl.setStyle('fill'); + + // Enable tooltip + // PENDING May have performance issue when path is extremely large + lineEl.seriesIndex = seriesModel.seriesIndex; + lineEl.on('mousemove', function (e) { + lineEl.dataIndex = null; + var dataIndex = lineEl.findDataIndex(e.offsetX, e.offsetY); + if (dataIndex > 0) { + // Provide dataIndex for tooltip + lineEl.dataIndex = dataIndex; + } + }); + + // Add back + this.group.add(lineEl); + }; + + largeLineProto.updateLayout = function (seriesModel) { + var data = seriesModel.getData(); + this._lineEl.setShape({ + segs: data.mapArray(data.getItemLayout) + }); + }; + + largeLineProto.remove = function () { + this.group.removeAll(); + }; + + module.exports = LargeLineDraw; + + +/***/ }, +/* 267 */ +/***/ function(module, exports, __webpack_require__) { module.exports = function (ecModel) { ecModel.eachSeriesByType('lines', function (seriesModel) { var coordSys = seriesModel.coordinateSystem; - var fromData = seriesModel.fromData; - var toData = seriesModel.toData; var lineData = seriesModel.getData(); // FIXME Use data dimensions ? - var dims = coordSys.dimensions; - fromData.each(dims, function (x, y, idx) { - fromData.setItemLayout(idx, coordSys.dataToPoint([x, y])); - }); - toData.each(dims, function (x, y, idx) { - toData.setItemLayout(idx, coordSys.dataToPoint([x, y])); - }); lineData.each(function (idx) { - var p1 = fromData.getItemLayout(idx); - var p2 = toData.getItemLayout(idx); - var curveness = lineData.getItemModel(idx).get('lineStyle.normal.curveness'); - var cp1; - if (curveness > 0) { - cp1 = [ - (p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, - (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness - ]; + var itemModel = lineData.getItemModel(idx); + // TODO Support pure array + var coords = (itemModel.option instanceof Array) ? + itemModel.option : itemModel.get('coords'); + + if (true) { + if (!(coords instanceof Array && coords.length > 0 && coords[0] instanceof Array)) { + throw new Error('Invalid coords ' + JSON.stringify(coords) + '. Lines must have 2d coords array in data item.'); + } } - lineData.setItemLayout(idx, [p1, p2, cp1]); + var pts = []; + + if (seriesModel.get('polyline')) { + for (var i = 0; i < coords.length; i++) { + pts.push(coordSys.dataToPoint(coords[i])); + } + } + else { + pts[0] = coordSys.dataToPoint(coords[0]); + pts[1] = coordSys.dataToPoint(coords[1]); + + var curveness = itemModel.get('lineStyle.normal.curveness'); + if (curveness > 0) { + pts[2] = [ + (pts[0][0] + pts[1][0]) / 2 - (pts[0][1] - pts[1][1]) * curveness, + (pts[0][1] + pts[1][1]) / 2 - (pts[1][0] - pts[0][0]) * curveness + ]; + } + } + lineData.setItemLayout(idx, pts); }); }); }; /***/ }, -/* 265 */ +/* 268 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(266); - __webpack_require__(267); + __webpack_require__(269); + __webpack_require__(270); /***/ }, -/* 266 */ +/* 269 */ /***/ function(module, exports, __webpack_require__) { @@ -44229,13 +45764,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 267 */ +/* 270 */ /***/ function(module, exports, __webpack_require__) { var graphic = __webpack_require__(43); - var HeatmapLayer = __webpack_require__(268); + var HeatmapLayer = __webpack_require__(271); var zrUtil = __webpack_require__(4); function getIsInPiecewiseRange(dataExtent, pieceList, selected) { @@ -44465,7 +46000,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 268 */ +/* 271 */ /***/ function(module, exports, __webpack_require__) { /** @@ -44619,7 +46154,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 269 */ +/* 272 */ /***/ function(module, exports, __webpack_require__) { /** @@ -44627,17 +46162,17 @@ return /******/ (function(modules) { // webpackBootstrap */ - __webpack_require__(270); - __webpack_require__(271); - __webpack_require__(272); + __webpack_require__(273); + __webpack_require__(274); + __webpack_require__(275); var echarts = __webpack_require__(1); // Series Filter - echarts.registerProcessor(__webpack_require__(274)); + echarts.registerProcessor(__webpack_require__(277)); /***/ }, -/* 270 */ +/* 273 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -44692,7 +46227,8 @@ return /******/ (function(modules) { // webpackBootstrap _updateData: function (ecModel) { var legendData = zrUtil.map(this.get('data') || [], function (dataItem) { - if (typeof dataItem === 'string') { + // Can be string or number + if (typeof dataItem === 'string' || typeof dataItem === 'number') { dataItem = { name: dataItem }; @@ -44828,7 +46364,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 271 */ +/* 274 */ /***/ function(module, exports, __webpack_require__) { /** @@ -44915,7 +46451,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 272 */ +/* 275 */ /***/ function(module, exports, __webpack_require__) { @@ -44923,7 +46459,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var symbolCreator = __webpack_require__(105); var graphic = __webpack_require__(43); - var listComponentHelper = __webpack_require__(273); + var listComponentHelper = __webpack_require__(276); var curry = zrUtil.curry; @@ -44999,7 +46535,7 @@ return /******/ (function(modules) { // webpackBootstrap var seriesModel = ecModel.getSeriesByName(name)[0]; if (legendDrawedMap[name]) { - // Series not exists + // Have been drawed return; } @@ -45065,6 +46601,12 @@ return /******/ (function(modules) { // webpackBootstrap } }, this); } + + if (true) { + if (!legendDrawedMap[name]) { + console.warn(name + ' series not exists. Legend data should be same with series name or data name.'); + } + } }, this); listComponentHelper.layout(group, legendModel, api); @@ -45157,7 +46699,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 273 */ +/* 276 */ /***/ function(module, exports, __webpack_require__) { @@ -45227,7 +46769,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 274 */ +/* 277 */ /***/ function(module, exports) { @@ -45251,15 +46793,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 275 */ +/* 278 */ /***/ function(module, exports, __webpack_require__) { // FIXME Better way to pack data in graphic element - __webpack_require__(276); + __webpack_require__(279); - __webpack_require__(277); + __webpack_require__(280); // Show tip action /** @@ -45292,7 +46834,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 276 */ +/* 279 */ /***/ function(module, exports, __webpack_require__) { @@ -45401,12 +46943,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 277 */ +/* 280 */ /***/ function(module, exports, __webpack_require__) { - var TooltipContent = __webpack_require__(278); + var TooltipContent = __webpack_require__(281); var graphic = __webpack_require__(43); var zrUtil = __webpack_require__(4); var formatUtil = __webpack_require__(6); @@ -46552,7 +48094,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 278 */ +/* 281 */ /***/ function(module, exports, __webpack_require__) { /** @@ -46825,15 +48367,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 279 */ +/* 282 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - __webpack_require__(280); - __webpack_require__(286); - __webpack_require__(288); + __webpack_require__(283); + __webpack_require__(289); + __webpack_require__(291); // Polar view __webpack_require__(1).extendComponentView({ @@ -46842,20 +48384,20 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 280 */ +/* 283 */ /***/ function(module, exports, __webpack_require__) { // TODO Axis scale - var Polar = __webpack_require__(281); + var Polar = __webpack_require__(284); var numberUtil = __webpack_require__(7); var axisHelper = __webpack_require__(113); var niceScaleExtent = axisHelper.niceScaleExtent; // 依赖 PolarModel 做预处理 - __webpack_require__(284); + __webpack_require__(287); /** * Resize method bound to the polar @@ -46978,7 +48520,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 281 */ +/* 284 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -46987,8 +48529,8 @@ return /******/ (function(modules) { // webpackBootstrap */ - var RadiusAxis = __webpack_require__(282); - var AngleAxis = __webpack_require__(283); + var RadiusAxis = __webpack_require__(285); + var AngleAxis = __webpack_require__(286); /** * @alias {module:echarts/coord/polar/Polar} @@ -47211,7 +48753,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 282 */ +/* 285 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -47250,7 +48792,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 283 */ +/* 286 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -47291,13 +48833,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 284 */ +/* 287 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - __webpack_require__(285); + __webpack_require__(288); __webpack_require__(1).extendComponentModel({ @@ -47341,7 +48883,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 285 */ +/* 288 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -47393,19 +48935,19 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 286 */ +/* 289 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - __webpack_require__(280); + __webpack_require__(283); - __webpack_require__(287); + __webpack_require__(290); /***/ }, -/* 287 */ +/* 290 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -47492,7 +49034,12 @@ return /******/ (function(modules) { // webpackBootstrap }); this.group.add(graphic.mergePath( lines, { - style: tickModel.getModel('lineStyle').getLineStyle() + style: zrUtil.defaults( + tickModel.getModel('lineStyle').getLineStyle(), + { + stroke: angleAxisModel.get('axisLine.lineStyle.color') + } + ) } )); }, @@ -47535,7 +49082,7 @@ return /******/ (function(modules) { // webpackBootstrap style: { x: p[0], y: p[1], - fill: textStyleModel.getTextColor(), + fill: textStyleModel.getTextColor() || angleAxisModel.get('axisLine.lineStyle.color'), text: labels[i], textAlign: labelTextAlign, textVerticalAlign: labelTextBaseline, @@ -47634,18 +49181,18 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 288 */ +/* 291 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(280); + __webpack_require__(283); - __webpack_require__(289); + __webpack_require__(292); /***/ }, -/* 289 */ +/* 292 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -47793,16 +49340,16 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 290 */ +/* 293 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(291); + __webpack_require__(294); __webpack_require__(162); - __webpack_require__(292); + __webpack_require__(295); __webpack_require__(175); @@ -47847,7 +49394,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 291 */ +/* 294 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -47907,12 +49454,18 @@ return /******/ (function(modules) { // webpackBootstrap top: 'center', + // Aspect is width / height. Inited to be geoJson bbox aspect + // This parameter is used for scale this aspect + aspectScale: 0.75, + // 自适应 // width:, // height:, // right // bottom + silent: false, + // Map type map: '', @@ -47999,7 +49552,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 292 */ +/* 295 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -48033,443 +49586,2726 @@ return /******/ (function(modules) { // webpackBootstrap else { this._mapDraw.group.removeAll(); } + + this.group.silent = geoModel.get('silent'); } }); /***/ }, -/* 293 */ +/* 296 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; + + __webpack_require__(297); + __webpack_require__(300); + __webpack_require__(301); var echarts = __webpack_require__(1); - var graphic = __webpack_require__(43); - var layout = __webpack_require__(21); - - // Model - echarts.extendComponentModel({ - - type: 'title', - - layoutMode: {type: 'box', ignoreSize: true}, - - defaultOption: { - // 一级层叠 - zlevel: 0, - // 二级层叠 - z: 6, - show: true, - - text: '', - // 超链接跳转 - // link: null, - // 仅支持self | blank - target: 'blank', - subtext: '', - - // 超链接跳转 - // sublink: null, - // 仅支持self | blank - subtarget: 'blank', - - // 'center' ¦ 'left' ¦ 'right' - // ¦ {number}(x坐标,单位px) - left: 0, - // 'top' ¦ 'bottom' ¦ 'center' - // ¦ {number}(y坐标,单位px) - top: 0, - - // 水平对齐 - // 'auto' | 'left' | 'right' - // 默认根据 x 的位置判断是左对齐还是右对齐 - //textAlign: null - - backgroundColor: 'rgba(0,0,0,0)', - - // 标题边框颜色 - borderColor: '#ccc', - // 标题边框线宽,单位px,默认为0(无边框) - borderWidth: 0, - - // 标题内边距,单位px,默认各方向内边距为5, - // 接受数组分别设定上右下左边距,同css - padding: 5, - - // 主副标题纵向间隔,单位px,默认为10, - itemGap: 10, - textStyle: { - fontSize: 18, - fontWeight: 'bolder', - // 主标题文字颜色 - color: '#333' - }, - subtextStyle: { - // 副标题文字颜色 - color: '#aaa' - } - } - }); - - // View echarts.extendComponentView({ + type: 'single' + }); - type: 'title', - - render: function (titleModel, ecModel, api) { - this.group.removeAll(); - - if (!titleModel.get('show')) { - return; - } - - var group = this.group; - var textStyleModel = titleModel.getModel('textStyle'); - var subtextStyleModel = titleModel.getModel('subtextStyle'); - var textAlign = titleModel.get('textAlign'); +/***/ }, +/* 297 */ +/***/ function(module, exports, __webpack_require__) { - var textEl = new graphic.Text({ - style: { - text: titleModel.get('text'), - textFont: textStyleModel.getFont(), - fill: textStyleModel.getTextColor(), - textBaseline: 'top' - }, - z2: 10 - }); + /** + * Single coordinate system creator. + */ - var textRect = textEl.getBoundingRect(); - var subText = titleModel.get('subtext'); - var subTextEl = new graphic.Text({ - style: { - text: subText, - textFont: subtextStyleModel.getFont(), - fill: subtextStyleModel.getTextColor(), - y: textRect.height + titleModel.get('itemGap'), - textBaseline: 'top' - }, - z2: 10 - }); + var Single = __webpack_require__(298); - var link = titleModel.get('link'); - var sublink = titleModel.get('sublink'); + /** + * Create single coordinate system and inject it into seriesModel. + * + * @param {module:echarts/model/Global} ecModel + * @param {module:echarts/ExtensionAPI} api + * @return {Array.} + */ + function create(ecModel, api) { + var singles = []; - textEl.silent = !link; - subTextEl.silent = !sublink; + ecModel.eachComponent('singleAxis', function(axisModel, idx) { - if (link) { - textEl.on('click', function () { - window.open(link, '_' + titleModel.get('target')); - }); - } - if (sublink) { - subTextEl.on('click', function () { - window.open(sublink, '_' + titleModel.get('subtarget')); - }); - } + var single = new Single(axisModel, ecModel, api); + single.name = 'single_' + idx; + single.resize(axisModel, api); + axisModel.coordinateSystem = single; + singles.push(single); - group.add(textEl); - subText && group.add(subTextEl); - // If no subText, but add subTextEl, there will be an empty line. + }); - var groupRect = group.getBoundingRect(); - var layoutOption = titleModel.getBoxLayoutParams(); - layoutOption.width = groupRect.width; - layoutOption.height = groupRect.height; - var layoutRect = layout.getLayoutRect( - layoutOption, { - width: api.getWidth(), - height: api.getHeight() - }, titleModel.get('padding') - ); - // Adjust text align based on position - if (!textAlign) { - // Align left if title is on the left. center and right is same - textAlign = titleModel.get('left') || titleModel.get('right'); - if (textAlign === 'middle') { - textAlign = 'center'; - } - // If textAlign is illegal, canvas render text with textAlign 'left' and 'right' - // alternatively (after optimized that ctx.save/restore are not called if no change). - if (textAlign !== 'left' && textAlign !== 'right' && textAlign !== 'center') { - textAlign = 'left'; - } - // Adjust layout by text align - if (textAlign === 'right') { - layoutRect.x += layoutRect.width; - } - else if (textAlign === 'center') { - layoutRect.x += layoutRect.width / 2; - } + ecModel.eachSeries(function (seriesModel) { + if (seriesModel.get('coordinateSystem') === 'singleAxis') { + var singleAxisIndex = seriesModel.get('singleAxisIndex') || 0; + var axisModel = ecModel.getComponent('singleAxis', singleAxisIndex); + seriesModel.coordinateSystem = axisModel.coordinateSystem; } + }); - group.attr('position', [layoutRect.x, layoutRect.y]); - textEl.setStyle('textAlign', textAlign); - subTextEl.setStyle('textAlign', textAlign); - - // Render background - // Get groupRect again because textAlign has been changed - groupRect = group.getBoundingRect(); - var padding = layoutRect.margin; - var style = titleModel.getItemStyle(['color', 'opacity']); - style.fill = titleModel.get('backgroundColor'); - var rect = new graphic.Rect({ - shape: { - x: groupRect.x - padding[3], - y: groupRect.y - padding[0], - width: groupRect.width + padding[1] + padding[3], - height: groupRect.height + padding[0] + padding[2] - }, - style: style, - silent: true - }); - graphic.subPixelOptimizeRect(rect); + return singles; + } - group.add(rect); - } + __webpack_require__(26).register('single', { + create: create, + dimensions: Single.prototype.dimensions }); /***/ }, -/* 294 */ +/* 298 */ /***/ function(module, exports, __webpack_require__) { /** - * DataZoom component entry + * Single coordinates system. */ - __webpack_require__(295); - - __webpack_require__(296); - __webpack_require__(298); - - __webpack_require__(299); - __webpack_require__(300); - - __webpack_require__(303); - __webpack_require__(304); + var SingleAxis = __webpack_require__(299); + var axisHelper = __webpack_require__(113); + var layout = __webpack_require__(21); - __webpack_require__(306); - __webpack_require__(307); + /** + * Create a single coordinates system. + * + * @param {module:echarts/coord/single/AxisModel} axisModel + * @param {module:echarts/model/Global} ecModel + * @param {module:echarts/ExtensionAPI} api + */ + function Single(axisModel, ecModel, api) { + /** + * @type {string} + * @readOnly + */ + this.dimension = 'x'; + /** + * Add it just for draw tooltip. + * + * @type {Array.} + * @readOnly + */ + this.dimensions = ['x']; -/***/ }, -/* 295 */ -/***/ function(module, exports, __webpack_require__) { + /** + * @private + * @type {module:echarts/coord/single/SingleAxis}. + */ + this._axis = null; - + /** + * @private + * @type {module:zrender/core/BoundingRect} + */ + this._rect; - __webpack_require__(19).registerSubTypeDefaulter('dataZoom', function (option) { - // Default 'slider' when no type specified. - return 'slider'; - }); + this._init(axisModel, ecModel, api); + /** + * @type {module:echarts/coord/single/AxisModel} + */ + this._model = axisModel; + } + Single.prototype = { -/***/ }, -/* 296 */ -/***/ function(module, exports, __webpack_require__) { + type: 'singleAxis', - /** - * @file Data zoom model - */ + constructor: Single, + /** + * Initialize single coordinate system. + * + * @param {module:echarts/coord/single/AxisModel} axisModel + * @param {module:echarts/model/Global} ecModel + * @param {module:echarts/ExtensionAPI} api + * @private + */ + _init: function (axisModel, ecModel, api) { - var zrUtil = __webpack_require__(4); - var env = __webpack_require__(2); - var echarts = __webpack_require__(1); - var modelUtil = __webpack_require__(5); - var AxisProxy = __webpack_require__(297); - var each = zrUtil.each; - var eachAxisDim = modelUtil.eachAxisDim; + var dim = this.dimension; - var DataZoomModel = echarts.extendComponentModel({ + var axis = new SingleAxis( + dim, + axisHelper.createScaleByModel(axisModel), + [0, 0], + axisModel.get('type'), + axisModel.get('position') + ); - type: 'dataZoom', + var isCategory = axis.type === 'category'; + axis.onBand = isCategory && axisModel.get('boundaryGap'); + axis.inverse = axisModel.get('inverse'); + axis.orient = axisModel.get('orient'); - dependencies: [ - 'xAxis', 'yAxis', 'zAxis', 'radiusAxis', 'angleAxis', 'series' - ], + axisModel.axis = axis; + axis.model = axisModel; + this._axis = axis; + }, /** - * @protected + * Update axis scale after data processed + * @param {module:echarts/model/Global} ecModel + * @param {module:echarts/ExtensionAPI} api */ - defaultOption: { - zlevel: 0, - z: 4, // Higher than normal component (z: 2). - orient: null, // Default auto by axisIndex. Possible value: 'horizontal', 'vertical'. - xAxisIndex: null, // Default all horizontal category axis. - yAxisIndex: null, // Default all vertical category axis. - angleAxisIndex: null, - radiusAxisIndex: null, - filterMode: 'filter', // Possible values: 'filter' or 'empty'. - // 'filter': data items which are out of window will be removed. - // This option is applicable when filtering outliers. - // 'empty': data items which are out of window will be set to empty. - // This option is applicable when user should not neglect - // that there are some data items out of window. - // Taking line chart as an example, line will be broken in - // the filtered points when filterModel is set to 'empty', but - // be connected when set to 'filter'. - - throttle: null, // Dispatch action by the fixed rate, avoid frequency. - // default 100. Do not throttle when use null/undefined. - // If animation === true and animationDurationUpdate > 0, - // default value is 100, otherwise 20. - start: 0, // Start percent. 0 ~ 100 - end: 100, // End percent. 0 ~ 100 - startValue: null, // Start value. If startValue specified, start is ignored. - endValue: null // End value. If endValue specified, end is ignored. + update: function (ecModel, api) { + this._updateAxisFromSeries(ecModel); }, /** - * @override + * Update the axis extent from series. + * + * @param {module:echarts/model/Global} ecModel + * @private */ - init: function (option, parentModel, ecModel) { - - /** - * key like x_0, y_1 - * @private - * @type {Object} - */ - this._dataIntervalByAxis = {}; - - /** - * @private - */ - this._dataInfo = {}; - - /** - * key like x_0, y_1 - * @private - */ - this._axisProxies = {}; - - /** - * @readOnly - */ - this.textStyleModel; - - /** - * @private - */ - this._autoThrottle = true; - - var rawOption = retrieveRaw(option); + _updateAxisFromSeries: function (ecModel) { - this.mergeDefaultAndTheme(option, ecModel); + ecModel.eachSeries(function (seriesModel) { - this.doInit(rawOption); + var data = seriesModel.getData(); + var dim = this.dimension; + this._axis.scale.unionExtent( + data.getDataExtent(seriesModel.coordDimToDataDim(dim)) + ); + axisHelper.niceScaleExtent(this._axis, this._axis.model); + }, this); }, /** - * @override + * Resize the single coordinate system. + * + * @param {module:echarts/coord/single/AxisModel} axisModel + * @param {module:echarts/ExtensionAPI} api */ - mergeOption: function (newOption) { - var rawOption = retrieveRaw(newOption); - - //FIX #2591 - zrUtil.merge(this.option, newOption, true); + resize: function (axisModel, api) { + this._rect = layout.getLayoutRect( + { + left: axisModel.get('left'), + top: axisModel.get('top'), + right: axisModel.get('right'), + bottom: axisModel.get('bottom'), + width: axisModel.get('width'), + height: axisModel.get('height') + }, + { + width: api.getWidth(), + height: api.getHeight() + } + ); - this.doInit(rawOption); + this._adjustAxis(); }, /** - * @protected + * @return {module:zrender/core/BoundingRect} */ - doInit: function (rawOption) { - var thisOption = this.option; + getRect: function () { + return this._rect; + }, - // Disable realtime view update if canvas is not supported. - if (!env.canvasSupported) { - thisOption.realtime = false; - } + /** + * @private + */ + _adjustAxis: function () { - this._setDefaultThrottle(rawOption); + var rect = this._rect; + var axis = this._axis; - processRangeProp('start', 'startValue', rawOption, thisOption); - processRangeProp('end', 'endValue', rawOption, thisOption); + var isHorizontal = axis.isHorizontal(); + var extent = isHorizontal ? [0, rect.width] : [0, rect.height]; + var idx = axis.reverse ? 1 : 0; - this.textStyleModel = this.getModel('textStyle'); + axis.setExtent(extent[idx], extent[1 - idx]); - this._resetTarget(); + this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y); - this._giveAxisProxies(); }, /** - * @private + * @param {module:echarts/coord/single/SingleAxis} axis + * @param {number} coordBase */ - _giveAxisProxies: function () { - var axisProxies = this._axisProxies; + _updateAxisTransform: function (axis, coordBase) { - this.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel, ecModel) { - var axisModel = this.dependentModels[dimNames.axis][axisIndex]; + var axisExtent = axis.getExtent(); + var extentSum = axisExtent[0] + axisExtent[1]; + var isHorizontal = axis.isHorizontal(); - // If exists, share axisProxy with other dataZoomModels. - var axisProxy = axisModel.__dzAxisProxy || ( - // Use the first dataZoomModel as the main model of axisProxy. - axisModel.__dzAxisProxy = new AxisProxy( - dimNames.name, axisIndex, this, ecModel - ) - ); - // FIXME - // dispose __dzAxisProxy + axis.toGlobalCoord = isHorizontal ? + function (coord) { + return coord + coordBase; + } : + function (coord) { + return extentSum - coord + coordBase; + }; - axisProxies[dimNames.name + '_' + axisIndex] = axisProxy; - }, this); + axis.toLocalCoord = isHorizontal ? + function (coord) { + return coord - coordBase; + } : + function (coord) { + return extentSum - coord + coordBase; + }; }, /** - * @private + * Get axis. + * + * @return {module:echarts/coord/single/SingleAxis} */ - _resetTarget: function () { - var thisOption = this.option; - - var autoMode = this._judgeAutoMode(); + getAxis: function () { + return this._axis; + }, - eachAxisDim(function (dimNames) { - var axisIndexName = dimNames.axisIndex; - thisOption[axisIndexName] = modelUtil.normalizeToArray( - thisOption[axisIndexName] - ); - }, this); + /** + * Get axis, add it just for draw tooltip. + * + * @return {[type]} [description] + */ + getBaseAxis: function () { + return this._axis; + }, - if (autoMode === 'axisIndex') { - this._autoSetAxisIndex(); + /** + * If contain point. + * + * @param {Array.} point + * @return {boolean} + */ + containPoint: function (point) { + var rect = this.getRect(); + var axis = this.getAxis(); + var orient = axis.orient; + if (orient === 'horizontal') { + return axis.contain(axis.toLocalCoord(point[0])) + && (point[1] >= rect.y && point[1] <= (rect.y + rect.height)); } - else if (autoMode === 'orient') { - this._autoSetOrient(); + else { + return axis.contain(axis.toLocalCoord(point[1])) + && (point[0] >= rect.y && point[0] <= (rect.y + rect.height)); } }, /** - * @private + * @param {Array.} point + * @return {Array.} */ - _judgeAutoMode: function () { - // Auto set only works for setOption at the first time. - // The following is user's reponsibility. So using merged - // option is OK. - var thisOption = this.option; - - var hasIndexSpecified = false; - eachAxisDim(function (dimNames) { - // When user set axisIndex as a empty array, we think that user specify axisIndex - // but do not want use auto mode. Because empty array may be encountered when - // some error occured. - if (thisOption[dimNames.axisIndex] != null) { - hasIndexSpecified = true; - } - }, this); - - var orient = thisOption.orient; + pointToData: function (point) { + var axis = this.getAxis(); + return [axis.coordToData(axis.toLocalCoord( + point[axis.orient === 'horizontal' ? 0 : 1] + ))]; + }, + + /** + * Convert the series data to concrete point. + * + * @param {number|Array.} val + * @return {Array.} + */ + dataToPoint: function (val) { + var axis = this.getAxis(); + var rect = this.getRect(); + var pt = []; + var idx = axis.orient === 'horizontal' ? 0 : 1; + pt[idx] = axis.toGlobalCoord(axis.dataToCoord(+val)); + pt[1 - idx] = idx === 0 ? (rect.y + rect.height / 2) : (rect.x + rect.width / 2); + return pt; + } + }; + + module.exports = Single; + + + +/***/ }, +/* 299 */ +/***/ function(module, exports, __webpack_require__) { + + + + var zrUtil = __webpack_require__(4); + var Axis = __webpack_require__(122); + var axisHelper = __webpack_require__(113); + + /** + * @constructor module:echarts/coord/single/SingleAxis + * @extends {module:echarts/coord/Axis} + * @param {string} dim + * @param {*} scale + * @param {Array.} coordExtent + * @param {string} axisType + * @param {string} position + */ + var SingleAxis = function (dim, scale, coordExtent, axisType, position) { + + Axis.call(this, dim, scale, coordExtent); + + /** + * Axis type + * - 'category' + * - 'value' + * - 'time' + * - 'log' + * @type {string} + */ + this.type = axisType || 'value'; + + /** + * Axis position + * - 'top' + * - 'bottom' + * - 'left' + * - 'right' + * @type {string} + */ + this.position = position || 'bottom'; + + /** + * Axis orient + * - 'horizontal' + * - 'vertical' + * @type {[type]} + */ + this.orient = null; + + /** + * @type {number} + */ + this._labelInterval = null; + + }; + + SingleAxis.prototype = { + + constructor: SingleAxis, + + /** + * Axis model + * @type {module:echarts/coord/single/AxisModel} + */ + model: null, + + /** + * Judge the orient of the axis. + * @return {boolean} + */ + isHorizontal: function () { + var position = this.position; + return position === 'top' || position === 'bottom'; + + }, + + /** + * Get interval of the axis label. + * @return {number} + */ + getLabelInterval: function () { + var labelInterval = this._labelInterval; + if (!labelInterval) { + var axisModel = this.model; + var labelModel = axisModel.getModel('axisLabel'); + var interval = labelModel.get('interval'); + if (!(this.type === 'category' && interval === 'auto')) { + + labelInterval = this._labelInterval = interval === 'auto' ? 0 : interval; + return labelInterval; + } + labelInterval = this._labelInterval = + axisHelper.getAxisLabelInterval( + zrUtil.map(this.scale.getTicks(), this.dataToCoord, this), + axisModel.getFormattedLabels(), + labelModel.getModel('textStyle').getFont(), + this.isHorizontal() + ); + } + return labelInterval; + }, + + /** + * Convert the local coord(processed by dataToCoord()) + * to global coord(concrete pixel coord). + * designated by module:echarts/coord/single/Single. + * @type {Function} + */ + toGlobalCoord: null, + + /** + * Convert the global coord to local coord. + * designated by module:echarts/coord/single/Single. + * @type {Function} + */ + toLocalCoord: null + + }; + + zrUtil.inherits(SingleAxis, Axis); + + module.exports = SingleAxis; + + +/***/ }, +/* 300 */ +/***/ function(module, exports, __webpack_require__) { + + + + var AxisBuilder = __webpack_require__(131); + var zrUtil = __webpack_require__(4); + var graphic = __webpack_require__(43); + var getInterval = AxisBuilder.getInterval; + var ifIgnoreOnTick = AxisBuilder.ifIgnoreOnTick; + + var axisBuilderAttrs = [ + 'axisLine', 'axisLabel', 'axisTick', 'axisName' + ]; + + var selfBuilderAttr = 'splitLine'; + + var AxisView = __webpack_require__(1).extendComponentView({ + + type: 'singleAxis', + + render: function (axisModel, ecModel) { + + var group = this.group; + + group.removeAll(); + + var layout = axisLayout(axisModel); + + var axisBuilder = new AxisBuilder(axisModel, layout); + + zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder); + + group.add(axisBuilder.getGroup()); + + if (axisModel.get(selfBuilderAttr + '.show')) { + this['_' + selfBuilderAttr](axisModel, layout.labelInterval); + } + }, + + _splitLine: function(axisModel, labelInterval) { + var axis = axisModel.axis; + var splitLineModel = axisModel.getModel('splitLine'); + var lineStyleModel = splitLineModel.getModel('lineStyle'); + var lineWidth = lineStyleModel.get('width'); + var lineColors = lineStyleModel.get('color'); + var lineInterval = getInterval(splitLineModel, labelInterval); + + lineColors = lineColors instanceof Array ? lineColors : [lineColors]; + + var gridRect = axisModel.coordinateSystem.getRect(); + var isHorizontal = axis.isHorizontal(); + + var splitLines = []; + var lineCount = 0; + + var ticksCoords = axis.getTicksCoords(); + + var p1 = []; + var p2 = []; + + for (var i = 0; i < ticksCoords.length; ++i) { + if (ifIgnoreOnTick(axis, i, lineInterval)) { + continue; + } + var tickCoord = axis.toGlobalCoord(ticksCoords[i]); + if (isHorizontal) { + p1[0] = tickCoord; + p1[1] = gridRect.y; + p2[0] = tickCoord; + p2[1] = gridRect.y + gridRect.height; + } + else { + p1[0] = gridRect.x; + p1[1] = tickCoord; + p2[0] = gridRect.x + gridRect.width; + p2[1] = tickCoord; + } + var colorIndex = (lineCount++) % lineColors.length; + splitLines[colorIndex] = splitLines[colorIndex] || []; + splitLines[colorIndex].push(new graphic.Line( + graphic.subPixelOptimizeLine({ + shape: { + x1: p1[0], + y1: p1[1], + x2: p2[0], + y2: p2[1] + }, + style: { + lineWidth: lineWidth + }, + silent: true + }))); + } + + for (var i = 0; i < splitLines.length; ++i) { + this.group.add(graphic.mergePath(splitLines[i], { + style: { + stroke: lineColors[i % lineColors.length], + lineDash: lineStyleModel.getLineDash(), + lineWidth: lineWidth + }, + silent: true + })); + } + } + }); + + function axisLayout(axisModel) { + + var single = axisModel.coordinateSystem; + var axis = axisModel.axis; + var layout = {}; + + var axisPosition = axis.position; + var orient = axis.orient; + + var rect = single.getRect(); + var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height]; + + var positionMap = { + horizontal: {top: rectBound[2], bottom: rectBound[3]}, + vertical: {left: rectBound[0], right: rectBound[1]} + }; + + layout.position = [ + orient === 'vertical' + ? positionMap.vertical[axisPosition] + : rectBound[0], + orient === 'horizontal' + ? positionMap.horizontal[axisPosition] + : rectBound[3] + ]; + + var r = {horizontal: 0, vertical: 1}; + layout.rotation = Math.PI / 2 * r[orient]; + + var directionMap = {top: -1, bottom: 1, right: 1, left: -1}; + + layout.labelDirection = layout.tickDirection + = layout.nameDirection + = directionMap[axisPosition]; + + if (axisModel.getModel('axisTick').get('inside')) { + layout.tickDirection = -layout.tickDirection; + } + + if (axisModel.getModel('axisLabel').get('inside')) { + layout.labelDirection = -layout.labelDirection; + } + + var labelRotation = axisModel.getModel('axisLabel').get('rotate'); + layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation; + + layout.labelInterval = axis.getLabelInterval(); + + layout.z2 = 1; + + return layout; + } + + module.exports = AxisView; + + + +/***/ }, +/* 301 */ +/***/ function(module, exports, __webpack_require__) { + + + + var ComponentModel = __webpack_require__(19); + var axisModelCreator = __webpack_require__(126); + var zrUtil = __webpack_require__(4); + + var AxisModel = ComponentModel.extend({ + + type: 'singleAxis', + + layoutMode: 'box', + + /** + * @type {module:echarts/coord/single/SingleAxis} + */ + axis: null, + + /** + * @type {module:echarts/coord/single/Single} + */ + coordinateSystem: null + + }); + + var defaultOption = { + + left: '5%', + top: '5%', + right: '5%', + bottom: '5%', + + type: 'value', + + position: 'bottom', + + orient: 'horizontal', + + axisLine: { + show: true, + lineStyle: { + width: 2, + type: 'solid' + } + }, + + axisTick: { + show: true, + length: 6, + lineStyle: { + width: 2 + } + }, + + axisLabel: { + show: true, + interval: 'auto' + }, + + splitLine: { + show: true, + lineStyle: { + type: 'dashed', + opacity: 0.2 + } + } + }; + + function getAxisType(axisName, option) { + return option.type || (option.data ? 'category' : 'value'); + } + + zrUtil.merge(AxisModel.prototype, __webpack_require__(128)); + + axisModelCreator('single', AxisModel, getAxisType, defaultOption); + + module.exports = AxisModel; + + +/***/ }, +/* 302 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Brush component entry + */ + + + __webpack_require__(1).registerPreprocessor( + __webpack_require__(303) + ); + + __webpack_require__(304); + __webpack_require__(309); + __webpack_require__(310); + __webpack_require__(311); + + __webpack_require__(312); + + + +/***/ }, +/* 303 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @file brush preprocessor + */ + + + var zrUtil = __webpack_require__(4); + + var DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear']; + + module.exports = function (option, isNew) { + var brushComponents = option && option.brush; + if (!zrUtil.isArray(brushComponents)) { + brushComponents = brushComponents ? [brushComponents] : []; + } + + if (!brushComponents.length) { + return; + } + + var brushComponentSpecifiedBtns = []; + + zrUtil.each(brushComponents, function (brushOpt) { + var tbs = brushOpt.hasOwnProperty('toolbox') + ? brushOpt.toolbox : []; + + if (tbs instanceof Array) { + brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs); + } + }); + + var toolbox = option && option.toolbox; + + if (zrUtil.isArray(toolbox)) { + toolbox = toolbox[0]; + } + if (!toolbox) { + toolbox = {feature: {}}; + option.toolbox = [toolbox]; + } + + var toolboxFeature = (toolbox.feature || (toolbox.feature = {})); + var toolboxBrush = toolboxFeature.brush || (toolboxFeature.brush = {}); + var brushTypes = toolboxBrush.type || (toolboxBrush.type = []); + + brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns); + + removeDuplicate(brushTypes); + + if (isNew && !brushTypes.length) { + brushTypes.push.apply(brushTypes, DEFAULT_TOOLBOX_BTNS); + } + }; + + function removeDuplicate(arr) { + var map = {}; + zrUtil.each(arr, function (val) { + map[val] = 1; + }); + arr.length = 0; + zrUtil.each(map, function (flag, val) { + arr.push(val); + }); + } + + + +/***/ }, +/* 304 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @file Brush visual coding. + */ + + + var echarts = __webpack_require__(1); + var visualSolution = __webpack_require__(305); + var zrUtil = __webpack_require__(4); + var BoundingRect = __webpack_require__(15); + var selector = __webpack_require__(306); + var throttle = __webpack_require__(307); + var brushHelper = __webpack_require__(308); + + var STATE_LIST = ['inBrush', 'outOfBrush']; + var DISPATCH_METHOD = '__ecBrushSelect'; + var DISPATCH_FLAG = '__ecInBrushSelectEvent'; + var PRIORITY_BRUSH = echarts.PRIORITY.VISUAL.BRUSH; + + /** + * Layout for visual, the priority higher than other layout, and before brush visual. + */ + echarts.registerLayout(PRIORITY_BRUSH, function (ecModel, api, payload) { + ecModel.eachComponent({mainType: 'brush'}, function (brushModel) { + + payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption( + payload.key === 'brush' ? payload.brushOption : {brushType: false} + ); + + brushModel.coordInfoList = brushHelper.makeCoordInfoList(brushModel.option, ecModel); + + brushHelper.parseInputRanges(brushModel, ecModel); + }); + }); + + /** + * Register the visual encoding if this modules required. + */ + echarts.registerVisual(PRIORITY_BRUSH, function (ecModel, api, payload) { + + var brushSelected = []; + var throttleType; + var throttleDelay; + + ecModel.eachComponent({mainType: 'brush'}, function (brushModel, brushIndex) { + + var thisBrushSelected = { + brushId: brushModel.id, + brushIndex: brushIndex, + brushName: brushModel.name, + areas: zrUtil.clone(brushModel.areas), + selected: [] + }; + // Every brush component exists in event params, convenient + // for user to find by index. + brushSelected.push(thisBrushSelected); + + var brushOption = brushModel.option; + var brushLink = brushOption.brushLink; + var linkedSeriesMap = []; + var selectedDataIndexForLink = []; + var rangeInfoBySeries = []; + var hasBrushExists = 0; + + if (!brushIndex) { // Only the first throttle setting works. + throttleType = brushOption.throttleType; + throttleDelay = brushOption.throttleDelay; + } + + // Add boundingRect and selectors to range. + var areas = zrUtil.map(brushModel.areas, function (area) { + return bindSelector( + zrUtil.defaults( + {boundingRect: boundingRectBuilders[area.brushType](area)}, + area + ) + ); + }); + + var visualMappings = visualSolution.createVisualMappings( + brushModel.option, STATE_LIST, function (mappingOption) { + mappingOption.mappingMethod = 'fixed'; + } + ); + + zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) { + linkedSeriesMap[seriesIndex] = 1; + }); + + function linkOthers(seriesIndex) { + return brushLink === 'all' || linkedSeriesMap[seriesIndex]; + } + + // If no supported brush or no brush on the series, + // all visuals should be in original state. + function brushed(rangeInfoList) { + return !!rangeInfoList.length; + } + + /** + * Logic for each series: (If the logic has to be modified one day, do it carefully!) + * + * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord. + * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord. + * └!hasBrushExist┘ └nothing. + * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord. + * └!hasBrushExist┘ └nothing. + * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck. + * !brushed┘ └nothing. + * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing. + */ + + // Step A + ecModel.eachSeries(function (seriesModel, seriesIndex) { + var rangeInfoList = rangeInfoBySeries[seriesIndex] = []; + + seriesModel.subType === 'parallel' + ? stepAParallel(seriesModel, seriesIndex, rangeInfoList) + : stepAOthers(seriesModel, seriesIndex, rangeInfoList); + }); + + function stepAParallel(seriesModel, seriesIndex) { + var coordSys = seriesModel.coordinateSystem; + hasBrushExists |= coordSys.hasAxisbrushed(); + + linkOthers(seriesIndex) && coordSys.eachActiveState( + seriesModel.getData(), + function (activeState, dataIndex) { + activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1); + } + ); + } + + function stepAOthers(seriesModel, seriesIndex, rangeInfoList) { + var selectorsByBrushType = getSelectorsByBrushType(seriesModel); + if (!selectorsByBrushType || brushModelNotControll(brushModel, seriesIndex)) { + return; + } + + zrUtil.each(areas, function (area) { + selectorsByBrushType[area.brushType] + && brushHelper.controlSeries(area, brushModel, seriesModel) + && rangeInfoList.push(area); + hasBrushExists |= brushed(rangeInfoList); + }); + + if (linkOthers(seriesIndex) && brushed(rangeInfoList)) { + var data = seriesModel.getData(); + data.each(function (dataIndex) { + if (checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex)) { + selectedDataIndexForLink[dataIndex] = 1; + } + }); + } + } + + // Step B + ecModel.eachSeries(function (seriesModel, seriesIndex) { + var seriesBrushSelected = { + seriesId: seriesModel.id, + seriesIndex: seriesIndex, + seriesName: seriesModel.name, + dataIndex: [] + }; + // Every series exists in event params, convenient + // for user to find series by seriesIndex. + thisBrushSelected.selected.push(seriesBrushSelected); + + var selectorsByBrushType = getSelectorsByBrushType(seriesModel); + var rangeInfoList = rangeInfoBySeries[seriesIndex]; + + var data = seriesModel.getData(); + var getValueState = linkOthers(seriesIndex) + ? function (dataIndex) { + return selectedDataIndexForLink[dataIndex] + ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') + : 'outOfBrush'; + } + : function (dataIndex) { + return checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) + ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') + : 'outOfBrush'; + }; + + // If no supported brush or no brush, all visuals are in original state. + (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) + && visualSolution.applyVisual( + STATE_LIST, visualMappings, data, getValueState + ); + }); + + }); + + dispatchAction(api, throttleType, throttleDelay, brushSelected, payload); + }); + + function dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) { + // This event will not be triggered when `setOpion`, otherwise dead lock may + // triggered when do `setOption` in event listener, which we do not find + // satisfactory way to solve yet. Some considered resolutions: + // (a) Diff with prevoius selected data ant only trigger event when changed. + // But store previous data and diff precisely (i.e., not only by dataIndex, but + // also detect value changes in selected data) might bring complexity or fragility. + // (b) Use spectial param like `silent` to suppress event triggering. + // But such kind of volatile param may be weird in `setOption`. + if (!payload) { + return; + } + + var zr = api.getZr(); + if (zr[DISPATCH_FLAG]) { + return; + } + + if (!zr[DISPATCH_METHOD]) { + zr[DISPATCH_METHOD] = doDispatch; + } + + var fn = throttle.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType); + + fn(api, brushSelected); + } + + function doDispatch(api, brushSelected) { + if (!api.isDisposed()) { + var zr = api.getZr(); + zr[DISPATCH_FLAG] = true; + api.dispatchAction({ + type: 'brushSelect', + batch: brushSelected + }); + zr[DISPATCH_FLAG] = false; + } + } + + function checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) { + var itemLayout = data.getItemLayout(dataIndex); + for (var i = 0, len = rangeInfoList.length; i < len; i++) { + var area = rangeInfoList[i]; + if (selectorsByBrushType[area.brushType]( + itemLayout, area.selectors, area + )) { + return true; + } + } + } + + function getSelectorsByBrushType(seriesModel) { + var brushSelector = seriesModel.brushSelector; + if (zrUtil.isString(brushSelector)) { + var sels = []; + zrUtil.each(selector, function (selectorsByElementType, brushType) { + sels[brushType] = selectorsByElementType[brushSelector]; + }); + return sels; + } + else if (zrUtil.isFunction(brushSelector)) { + var bSelector = {}; + zrUtil.each(selector, function (sel, brushType) { + bSelector[brushType] = brushSelector; + }); + return bSelector; + } + return brushSelector; + } + + function brushModelNotControll(brushModel, seriesIndex) { + var seriesIndices = brushModel.option.seriesIndex; + return seriesIndices != null + && seriesIndices !== 'all' + && ( + zrUtil.isArray(seriesIndices) + ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 + : seriesIndex !== seriesIndices + ); + } + + function bindSelector(area) { + var selectors = area.selectors = {}; + zrUtil.each(selector[area.brushType], function (selFn, elType) { + // Do not use function binding or curry for performance. + selectors[elType] = function (itemLayout) { + return selFn(itemLayout, selectors, area); + }; + }); + return area; + } + + var boundingRectBuilders = { + + lineX: zrUtil.noop, + + lineY: zrUtil.noop, + + rect: function (area) { + return getBoundingRectFromMinMax(area.range); + }, + + polygon: function (area) { + var minMax; + var range = area.range; + + for (var i = 0, len = range.length; i < len; i++) { + minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]]; + var rg = range[i]; + rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]); + rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]); + rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]); + rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]); + } + + return minMax && getBoundingRectFromMinMax(minMax); + } + }; + + function getBoundingRectFromMinMax(minMax) { + return new BoundingRect( + minMax[0][0], + minMax[1][0], + minMax[0][1] - minMax[0][0], + minMax[1][1] - minMax[1][0] + ); + } + + + +/***/ }, +/* 305 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @file Visual solution, for consistent option specification. + */ + + + var zrUtil = __webpack_require__(4); + var VisualMapping = __webpack_require__(191); + var each = zrUtil.each; + + function hasKeys(obj) { + if (obj) { + for (var name in obj){ + if (obj.hasOwnProperty(name)) { + return true; + } + } + } + } + + var visualSolution = { + + /** + * @param {Object} option + * @param {Array.} stateList + * @param {Function} [supplementVisualOption] + * @return {Object} visualMappings > + */ + createVisualMappings: function (option, stateList, supplementVisualOption) { + var visualMappings = {}; + + each(stateList, function (state) { + var mappings = visualMappings[state] = createMappings(); + + each(option[state], function (visualData, visualType) { + if (!VisualMapping.isValidType(visualType)) { + return; + } + var mappingOption = { + type: visualType, + visual: visualData + }; + supplementVisualOption && supplementVisualOption(mappingOption, state); + mappings[visualType] = new VisualMapping(mappingOption); + + // Prepare a alpha for opacity, for some case that opacity + // is not supported, such as rendering using gradient color. + if (visualType === 'opacity') { + mappingOption = zrUtil.clone(mappingOption); + mappingOption.type = 'colorAlpha'; + mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption); + } + }); + }); + + return visualMappings; + + function createMappings() { + var Creater = function () {}; + // Make sure hidden fields will not be visited by + // object iteration (with hasOwnProperty checking). + Creater.prototype.__hidden = Creater.prototype; + var obj = new Creater(); + return obj; + } + }, + + /** + * @param {Object} thisOption + * @param {Object} newOption + * @param {Array.} keys + */ + replaceVisualOption: function (thisOption, newOption, keys) { + // Visual attributes merge is not supported, otherwise it + // brings overcomplicated merge logic. See #2853. So if + // newOption has anyone of these keys, all of these keys + // will be reset. Otherwise, all keys remain. + var has; + zrUtil.each(keys, function (key) { + if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { + has = true; + } + }); + has && zrUtil.each(keys, function (key) { + if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { + thisOption[key] = zrUtil.clone(newOption[key]); + } + else { + delete thisOption[key]; + } + }); + }, + + /** + * @param {Array.} stateList + * @param {Object} visualMappings > + * @param {module:echarts/data/List} list + * @param {Function} getValueState param: valueOrIndex, return: state. + * @param {object} [scope] Scope for getValueState + * @param {string} [dimension] Concrete dimension, if used. + */ + applyVisual: function (stateList, visualMappings, data, getValueState, scope, dimension) { + var visualTypesMap = {}; + zrUtil.each(stateList, function (state) { + var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); + visualTypesMap[state] = visualTypes; + }); + + var dataIndex; + + function getVisual(key) { + return data.getItemVisual(dataIndex, key); + } + + function setVisual(key, value) { + data.setItemVisual(dataIndex, key, value); + } + + if (dimension == null) { + data.each(eachItem, true); + } + else { + data.each([dimension], eachItem, true); + } + + function eachItem(valueOrIndex, index) { + dataIndex = dimension == null ? valueOrIndex : index; + var valueState = getValueState.call(scope, valueOrIndex); + var mappings = visualMappings[valueState]; + var visualTypes = visualTypesMap[valueState]; + + for (var i = 0, len = visualTypes.length; i < len; i++) { + var type = visualTypes[i]; + mappings[type] && mappings[type].applyVisual( + valueOrIndex, getVisual, setVisual + ); + } + } + } + }; + + module.exports = visualSolution; + + + +/***/ }, +/* 306 */ +/***/ function(module, exports, __webpack_require__) { + + + + var polygonContain = __webpack_require__(166).contain; + var BoundingRect = __webpack_require__(15); + + // Key of the first level is brushType: `line`, `rect`, `polygon`. + // Key of the second level is chart element type: `point`, `rect`. + // See moudule:echarts/component/helper/BrushController + // function param: + // {Object} itemLayout fetch from data.getItemLayout(dataIndex) + // {Object} selectors {point: selector, rect: selector, ...} + // {Object} area {range: [[], [], ..], boudingRect} + // function return: + // {boolean} Whether in the given brush. + var selector = { + lineX: getLineSelectors(0), + lineY: getLineSelectors(1), + rect: { + point: function (itemLayout, selectors, area) { + return area.boundingRect.contain(itemLayout[0], itemLayout[1]); + }, + rect: function (itemLayout, selectors, area) { + return area.boundingRect.intersect(makeBoundingRect(itemLayout)); + } + }, + polygon: { + point: function (itemLayout, selectors, area) { + return area.boundingRect.contain(itemLayout[0], itemLayout[1]) + && polygonContain(area.range, itemLayout[0], itemLayout[1]); + }, + rect: function (itemLayout, selectors, area) { + // FIXME + // 随意写的,没有考察过效率。 + var points = area.range; + + if (points.length <= 1) { + return false; + } + + var x = itemLayout.x; + var y = itemLayout.y; + var width = itemLayout.width; + var height = itemLayout.height; + var p = points[0]; + + if (polygonContain(points, x, y) + || polygonContain(points, x + width, y) + || polygonContain(points, x, y + height) + || polygonContain(points, x + width, y + height) + || makeBoundingRect(itemLayout).contain(p[0], p[1]) + || lineIntersectPolygon(x, y, x + width, y, points) + || lineIntersectPolygon(x, y, x, y + height, points) + || lineIntersectPolygon(x + width, y, x + width, y + height, points) + || lineIntersectPolygon(x, y + height, x + width, y + height, points) + ) { + return true; + } + } + } + }; + + function getLineSelectors(xyIndex) { + var xy = ['x', 'y']; + var wh = ['width', 'height']; + + return { + point: function (itemLayout, selectors, area) { + var range = area.range; + var p = itemLayout[xyIndex]; + return inLineRange(p, range); + }, + rect: function (itemLayout, selectors, area) { + var range = area.range; + return inLineRange(itemLayout[xy[xyIndex]], range) + || inLineRange(itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]], range); + } + }; + } + + function inLineRange(p, range) { + return range[0] <= p && p <= range[1]; + } + + // FIXME + // 随意写的,没考察过效率。 + function lineIntersectPolygon(lx, ly, l2x, l2y, points) { + for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) { + var p = points[i]; + if (lineIntersect(lx, ly, l2x, l2y, p[0], p[1], p2[0], p2[1])) { + return true; + } + p2 = p; + } + } + + // Code from with some fix. + // See + function lineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) { + var delta = determinant(a2x - a1x, b1x - b2x, a2y - a1y, b1y - b2y); + if (nearZero(delta)) { // parallel + return false; + } + var namenda = determinant(b1x - a1x, b1x - b2x, b1y - a1y, b1y - b2y) / delta; + if (namenda < 0 || namenda > 1) { + return false; + } + var miu = determinant(a2x - a1x, b1x - a1x, a2y - a1y, b1y - a1y) / delta; + if (miu < 0 || miu > 1) { + return false; + } + return true; + } + + function nearZero(val) { + return val <= (1e-6) && val >= -(1e-6); + } + + function determinant(v1, v2, v3, v4) { + return v1 * v4 - v2 * v3; + } + + function makeBoundingRect(itemLayout) { + var x = itemLayout.x; + var y = itemLayout.y; + var width = itemLayout.width; + var height = itemLayout.height; + + // width and height might be negative. + if (width < 0) { + x = x + width; + width = -width; + } + if (height < 0) { + y = y + height; + height = -height; + } + return new BoundingRect(x, y, width, height); + } + + module.exports = selector; + + + +/***/ }, +/* 307 */ +/***/ function(module, exports) { + + + + var lib = {}; + + var ORIGIN_METHOD = '\0__throttleOriginMethod'; + var RATE = '\0__throttleRate'; + var THROTTLE_TYPE = '\0__throttleType'; + + /** + * @public + * @param {(Function)} fn + * @param {number} [delay=0] Unit: ms. + * @param {boolean} [debounce=false] + * true: If call interval less than `delay`, only the last call works. + * false: If call interval less than `delay, call works on fixed rate. + * @return {(Function)} throttled fn. + */ + lib.throttle = function (fn, delay, debounce) { + + var currCall; + var lastCall = 0; + var lastExec = 0; + var timer = null; + var diff; + var scope; + var args; + + delay = delay || 0; + + function exec() { + lastExec = (new Date()).getTime(); + timer = null; + fn.apply(scope, args || []); + } + + var cb = function () { + currCall = (new Date()).getTime(); + scope = this; + args = arguments; + diff = currCall - (debounce ? lastCall : lastExec) - delay; + + clearTimeout(timer); + + if (debounce) { + timer = setTimeout(exec, delay); + } + else { + if (diff >= 0) { + exec(); + } + else { + timer = setTimeout(exec, -diff); + } + } + + lastCall = currCall; + }; + + /** + * Clear throttle. + * @public + */ + cb.clear = function () { + if (timer) { + clearTimeout(timer); + timer = null; + } + }; + + return cb; + }; + + /** + * Create throttle method or update throttle rate. + * + * @example + * ComponentView.prototype.render = function () { + * ... + * throttle.createOrUpdate( + * this, + * '_dispatchAction', + * this.model.get('throttle'), + * 'fixRate' + * ); + * }; + * ComponentView.prototype.remove = function () { + * throttle.clear(this, '_dispatchAction'); + * }; + * ComponentView.prototype.dispose = function () { + * throttle.clear(this, '_dispatchAction'); + * }; + * + * @public + * @param {Object} obj + * @param {string} fnAttr + * @param {number} [rate] + * @param {string} [throttleType='fixRate'] 'fixRate' or 'debounce' + * @return {Function} throttled function. + */ + lib.createOrUpdate = function (obj, fnAttr, rate, throttleType) { + var fn = obj[fnAttr]; + + if (!fn) { + return; + } + + var originFn = fn[ORIGIN_METHOD] || fn; + var lastThrottleType = fn[THROTTLE_TYPE]; + var lastRate = fn[RATE]; + + if (lastRate !== rate || lastThrottleType !== throttleType) { + if (rate == null || !throttleType) { + return (obj[fnAttr] = originFn); + } + + fn = obj[fnAttr] = lib.throttle( + originFn, rate, throttleType === 'debounce' + ); + fn[ORIGIN_METHOD] = originFn; + fn[THROTTLE_TYPE] = throttleType; + fn[RATE] = rate; + } + + return fn; + }; + + /** + * Clear throttle. Example see throttle.createOrUpdate. + * + * @public + * @param {Object} obj + * @param {string} fnAttr + */ + lib.clear = function (obj, fnAttr) { + var fn = obj[fnAttr]; + if (fn && fn[ORIGIN_METHOD]) { + obj[fnAttr] = fn[ORIGIN_METHOD]; + } + }; + + module.exports = lib; + + + +/***/ }, +/* 308 */ +/***/ function(module, exports, __webpack_require__) { + + + + var zrUtil = __webpack_require__(4); + var graphic = __webpack_require__(43); + + var each = zrUtil.each; + + var helper = {}; + + var COMPONENT_NAMES = ['geo', 'xAxis', 'yAxis']; + var PANEL_ID_SPLIT = '--'; + var COORD_CONVERTS = ['dataToPoint', 'pointToData']; + + helper.parseOutputRanges = function (areas, coordInfoList, ecModel, rangesCoordInfo) { + each(areas, function (area, index) { + var panelId = area.panelId; + + if (panelId) { + panelId = panelId.split(PANEL_ID_SPLIT); + + area[panelId[0] + 'Index'] = +panelId[1]; + + var coordInfo = findCoordInfo(area, coordInfoList); + area.coordRange = coordConvert[area.brushType]( + 1, coordInfo, area.range + ); + rangesCoordInfo && (rangesCoordInfo[index] = coordInfo); + } + }); + }; + + helper.parseInputRanges = function (brushModel, ecModel) { + each(brushModel.areas, function (area) { + var coordInfo = findCoordInfo(area, brushModel.coordInfoList); + + if (true) { + zrUtil.assert( + !coordInfo || coordInfo === true || area.coordRange, + 'coordRange must be specified when coord index specified.' + ); + zrUtil.assert( + !coordInfo || coordInfo !== true || area.range, + 'range must be specified.' + ); + } + + area.range = area.range || []; + + // convert coordRange to global range and set panelId. + if (coordInfo && coordInfo !== true) { + area.range = coordConvert[area.brushType]( + 0, coordInfo, area.coordRange + ); + area.panelId = coordInfo.panelId; + } + }); + }; + + helper.makePanelOpts = function (coordInfoList) { + var panelOpts = []; + + each(coordInfoList, function (coordInfo) { + var coordSys = coordInfo.coordSys; + var rect; + + if (coordInfo.geoIndex >= 0) { + rect = coordSys.getBoundingRect().clone(); + // geo roam and zoom transform + rect.applyTransform(graphic.getTransform(coordSys)); + } + else { // xAxis or yAxis + // grid is not Transformable. + rect = coordSys.grid.getRect().clone(); + } + + panelOpts.push({panelId: coordInfo.panelId, rect: rect}); + }); + + return panelOpts; + }; + + /** + * @param {Object} option {xAxisIndex, yAxisIndex, geoIndex} + * @param {module:echarts/model/Global} ecModel + * @return {Array.} coordInfoList + */ + helper.makeCoordInfoList = function (option, ecModel) { + var coordInfoList = []; + + each(COMPONENT_NAMES, function (componentName) { + var componentIndices = option[componentName + 'Index']; + if (componentIndices == null || componentIndices === 'none') { + return; + } + if (componentIndices !== 'all' && !zrUtil.isArray(componentIndices)) { + componentIndices = [componentIndices]; + } + + ecModel.eachComponent({mainType: componentName}, function (componentModel, index) { + if (componentIndices !== 'all' && zrUtil.indexOf(componentIndices, index) < 0) { + return; + } + + var grid; + var coordSys; + + (componentName === 'xAxis' || componentName === 'yAxis') + ? (grid = componentModel.axis.grid) + : (coordSys = componentModel.coordinateSystem); // geo + + var coordInfo; + + // Check duplicate and find cartesian when tranval to yAxis. + for (var i = 0, len = coordInfoList.length; i < len; i++) { + var cInfo = coordInfoList[i]; + if (true) { + zrUtil.assert( + cInfo[componentName + 'Index'] != index, + 'Coord should not be defined duplicately: ' + componentName + index + ); + } + // CoordSys is always required for `rect brush` or `polygon brush`. + // If both xAxisIndex and yAxisIndex specified, fetch cartesian by them. + if (componentName === 'yAxis' && !cInfo.yAxis && cInfo.xAxis) { + var aCoordSys = grid.getCartesian(cInfo.xAxisIndex, index); + if (aCoordSys) { // The yAxis and xAxis are in the same cartesian. + coordSys = aCoordSys; + coordInfo = cInfo; + break; + } + } + } + + !coordInfo && coordInfoList.push(coordInfo = {}); + + coordInfo[componentName] = componentModel; + coordInfo[componentName + 'Index'] = index; + // If both xAxisIndex and yAxisIndex specified, panelId only use yAxisIndex, + // which is enough to index panel. + coordInfo.panelId = componentName + PANEL_ID_SPLIT + index; + coordInfo.coordSys = coordSys + // If only xAxisIndex or only yAxisIndex specified, find its first cartesian. + || grid.getCartesian(coordInfo.xAxisIndex, coordInfo.yAxisIndex); + + coordInfo.coordSys + ? (coordInfoList[componentName + 'Has'] = true) + : coordInfoList.pop(); // If a coordInfo exists originally, existance of coordSys is ensured. + }); + }); + + return coordInfoList; + }; + + helper.controlSeries = function (area, brushModel, seriesModel) { + // Check whether area is bound in coord, and series do not belong to that coord. + // If do not do this check, some brush (like lineX) will controll all axes. + var coordInfo = findCoordInfo(area, brushModel.coordInfoList); + return coordInfo === true || (coordInfo && coordInfo.coordSys === seriesModel.coordinateSystem); + }; + + function formatMinMax(minMax) { + minMax[0] > minMax[1] && minMax.reverse(); + return minMax; + } + + /** + * If return Object, a coord found. + * If reutrn true, global found. + * Otherwise nothing found. + * + * @param {Object} area {Index} + * @param {Array} coordInfoList + * @return {Obejct|boolean} + */ + function findCoordInfo(area, coordInfoList) { + var isGlobal = true; + for (var j = 0; j < COMPONENT_NAMES.length; j++) { + var indexAttr = COMPONENT_NAMES[j] + 'Index'; + if (area[indexAttr] >= 0) { + isGlobal = false; + for (var i = 0; i < coordInfoList.length; i++) { + if (coordInfoList[i][indexAttr] === area[indexAttr]) { + return coordInfoList[i]; + } + } + } + } + return isGlobal; + } + + function axisConvert(axisName, to, coordInfo, coordRange) { + var axis = coordInfo.coordSys.getAxis(axisName); + + if (true) { + zrUtil.assert(axis, 'line brush is only available in cartesian (grid).'); + } + + return formatMinMax(zrUtil.map([0, 1], function (i) { + return to + ? axis.coordToData(axis.toLocalCoord(coordRange[i])) + : axis.toGlobalCoord(axis.dataToCoord(coordRange[i])); + })); + } + + var coordConvert = { + + lineX: zrUtil.curry(axisConvert, 'x'), + + lineY: zrUtil.curry(axisConvert, 'y'), + + rect: function (to, coordInfo, coordRange) { + var coordSys = coordInfo.coordSys; + var xminymin = coordSys[COORD_CONVERTS[to]]([coordRange[0][0], coordRange[1][0]]); + var xmaxymax = coordSys[COORD_CONVERTS[to]]([coordRange[0][1], coordRange[1][1]]); + return [ + formatMinMax([xminymin[0], xmaxymax[0]]), + formatMinMax([xminymin[1], xmaxymax[1]]) + ]; + }, + + polygon: function (to, coordInfo, coordRange) { + var coordSys = coordInfo.coordSys; + return zrUtil.map(coordRange, coordSys[COORD_CONVERTS[to]], coordSys); + } + }; + + module.exports = helper; + + + +/***/ }, +/* 309 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @file Brush model + */ + + + var echarts = __webpack_require__(1); + var zrUtil = __webpack_require__(4); + var visualSolution = __webpack_require__(305); + var Model = __webpack_require__(8); + + var DEFAULT_OUT_OF_BRUSH_COLOR = ['#ddd']; + + var BrushModel = echarts.extendComponentModel({ + + type: 'brush', + + dependencies: ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'], + + /** + * @protected + */ + defaultOption: { + // inBrush: null, + // outOfBrush: null, + toolbox: null, // Default value see preprocessor. + brushLink: null, // Series indices array, broadcast using dataIndex. + // or 'all', which means all series. 'none' or null means no series. + seriesIndex: 'all', // seriesIndex array, specify series controlled by this brush component. + geoIndex: null, // + xAxisIndex: null, + yAxisIndex: null, + + brushType: 'rect', // Default brushType, see BrushController. + brushMode: 'single', // Default brushMode, 'single' or 'multiple' + transformable: true, // Default transformable. + brushStyle: { // Default brushStyle + borderWidth: 1, + color: 'rgba(120,140,180,0.3)', + borderColor: 'rgba(120,140,180,0.8)', + width: null // do not use bursh width in line brush, but fetch from grid. + }, + + throttleType: 'fixRate',// Throttle in brushSelected event. 'fixRate' or 'debounce'. + // If null, no throttle. Valid only in the first brush component + throttleDelay: 0, // Unit: ms, 0 means every event will be triggered. + + // FIXME + // 试验效果 + removeOnClick: true + }, + + /** + * @readOnly + * @type {Array.} + */ + areas: [], + + /** + * Current activated brush type. + * If null, brush is inactived. + * see module:echarts/component/helper/BrushController + * @readOnly + * @type {string} + */ + brushType: null, + + /** + * Current brush opt. + * see module:echarts/component/helper/BrushController + * @readOnly + * @type {Object} + */ + brushOption: {}, + + /** + * @readOnly + * @type {Array.} + */ + coordInfoList: [], + + optionUpdated: function (newOption, isInit) { + var thisOption = this.option; + + !isInit && visualSolution.replaceVisualOption( + thisOption, newOption, ['inBrush', 'outOfBrush'] + ); + + thisOption.inBrush = thisOption.inBrush || {}; + // Always give default visual, consider setOption at the second time. + thisOption.outOfBrush = thisOption.outOfBrush || {color: DEFAULT_OUT_OF_BRUSH_COLOR}; + }, + + /** + * If ranges is null/undefined, range state remain. + * + * @param {Array.} [ranges] + */ + setAreas: function (areas) { + if (true) { + zrUtil.assert(zrUtil.isArray(areas)); + zrUtil.each(areas, function (area) { + zrUtil.assert(area.brushType, 'Illegal areas'); + }); + } + + // If ranges is null/undefined, range state remain. + // This helps user to dispatchAction({type: 'brush'}) with no areas + // set but just want to get the current brush select info from a `brush` event. + if (!areas) { + return; + } + + this.areas = zrUtil.map(areas, function (area) { + return this._mergeBrushOption(area); + }, this); + }, + + /** + * see module:echarts/component/helper/BrushController + * @param {Object} brushOption + */ + setBrushOption: function (brushOption) { + this.brushOption = this._mergeBrushOption(brushOption); + this.brushType = this.brushOption.brushType; + }, + + /** + * @private + */ + _mergeBrushOption: function (brushOption) { + var option = this.option; + return zrUtil.merge( + { + brushType: option.brushType, + brushMode: option.brushMode, + transformable: option.transformable, + brushStyle: new Model(option.brushStyle).getItemStyle(), + removeOnClick: option.removeOnClick + }, + brushOption, + true + ); + } + + }); + + module.exports = BrushModel; + + + +/***/ }, +/* 310 */ +/***/ function(module, exports, __webpack_require__) { + + + + var zrUtil = __webpack_require__(4); + var BrushController = __webpack_require__(232); + var echarts = __webpack_require__(1); + var brushHelper = __webpack_require__(308); + + module.exports = echarts.extendComponentView({ + + type: 'brush', + + init: function (ecModel, api) { + + /** + * @readOnly + * @type {module:echarts/model/Global} + */ + this.ecModel = ecModel; + + /** + * @readOnly + * @type {module:echarts/ExtensionAPI} + */ + this.api = api; + + /** + * @readOnly + * @type {module:echarts/component/brush/BrushModel} + */ + this.model; + + /** + * @private + * @type {module:echarts/component/helper/BrushController} + */ + (this._brushController = new BrushController(api.getZr())) + .on('brush', zrUtil.bind(this._onBrush, this)) + .mount(); + }, + + /** + * @override + */ + render: function (brushModel) { + this.model = brushModel; + return updateController.apply(this, arguments); + }, + + /** + * @override + */ + updateView: updateController, + + /** + * @override + */ + updateLayout: updateController, + + /** + * @override + */ + updateVisual: updateController, + + /** + * @override + */ + dispose: function () { + this._brushController.dispose(); + }, + + /** + * @private + */ + _onBrush: function (areas, opt) { + var modelId = this.model.id; + + brushHelper.parseOutputRanges(areas, this.model.coordInfoList, this.ecModel); + + // Action is not dispatched on drag end, because the drag end + // emits the same params with the last drag move event, and + // may have some delay when using touch pad, which makes + // animation not smooth (when using debounce). + (!opt.isEnd || opt.removeOnClick) && this.api.dispatchAction({ + type: 'brush', + brushId: modelId, + areas: zrUtil.clone(areas), + $from: modelId + }); + } + + }); + + function updateController(brushModel, ecModel, api, payload) { + // Do not update controller when drawing. + (!payload || payload.$from !== brushModel.id) && this._brushController + .setPanels(brushHelper.makePanelOpts(brushModel.coordInfoList)) + .enableBrush(brushModel.brushOption) + .updateCovers(brushModel.areas.slice()); + } + + + +/***/ }, +/* 311 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @file Brush action + */ + + + var echarts = __webpack_require__(1); + + /** + * payload: { + * brushIndex: number, or, + * brushId: string, or, + * brushName: string, + * globalRanges: Array + * } + */ + echarts.registerAction( + {type: 'brush', event: 'brush', update: 'updateView'}, + function (payload, ecModel) { + ecModel.eachComponent({mainType: 'brush', query: payload}, function (brushModel) { + brushModel.setAreas(payload.areas); + }); + } + ); + + /** + * payload: { + * brushComponents: [ + * { + * brushId, + * brushIndex, + * brushName, + * series: [ + * { + * seriesId, + * seriesIndex, + * seriesName, + * rawIndices: [21, 34, ...] + * }, + * ... + * ] + * }, + * ... + * ] + * } + */ + echarts.registerAction( + {type: 'brushSelect', event: 'brushSelected', update: 'none'}, + function () {} + ); + + +/***/ }, +/* 312 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + + var featureManager = __webpack_require__(313); + var zrUtil = __webpack_require__(4); + + function Brush(model, ecModel, api) { + this.model = model; + this.ecModel = ecModel; + this.api = api; + + /** + * @private + * @type {string} + */ + this._brushType; + + /** + * @private + * @type {string} + */ + this._brushMode; + } + + Brush.defaultOption = { + show: true, + type: ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'], + icon: { + rect: 'M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13', // jshint ignore:line + polygon: 'M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2', // jshint ignore:line + lineX: 'M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4', // jshint ignore:line + lineY: 'M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4', // jshint ignore:line + keep: 'M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z', // jshint ignore:line + clear: 'M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2' // jshint ignore:line + }, + title: { + rect: '矩形选择', + polygon: '圈选', + lineX: '横向选择', + lineY: '纵向选择', + keep: '保持选择', + clear: '清除选择' + } + }; + + var proto = Brush.prototype; + + proto.render = + proto.updateView = + proto.updateLayout = function (featureModel, ecModel, api) { + var brushType; + var brushMode; + var isBrushed; + + ecModel.eachComponent({mainType: 'brush'}, function (brushModel) { + brushType = brushModel.brushType; + brushMode = brushModel.brushOption.brushMode || 'single'; + isBrushed |= brushModel.areas.length; + }); + this._brushType = brushType; + this._brushMode = brushMode; + + zrUtil.each(featureModel.get('type', true), function (type) { + featureModel.setIconStatus( + type, + ( + type === 'keep' + ? brushMode === 'multiple' + : type === 'clear' + ? isBrushed + : type === brushType + ) ? 'emphasis' : 'normal' + ); + }); + }; + + proto.getIcons = function () { + var model = this.model; + var availableIcons = model.get('icon', true); + var icons = {}; + zrUtil.each(model.get('type', true), function (type) { + if (availableIcons[type]) { + icons[type] = availableIcons[type]; + } + }); + return icons; + }; + + proto.onclick = function (ecModel, api, type) { + var api = this.api; + var brushType = this._brushType; + var brushMode = this._brushMode; + + if (type === 'clear') { + api.dispatchAction({ + type: 'brush', + // Clear all areas of all brush components. + areas: [] + }); + } + else { + api.dispatchAction({ + type: 'takeGlobalCursor', + key: 'brush', + brushOption: { + brushType: type === 'keep' + ? brushType + : (brushType === type ? false : type), + brushMode: type === 'keep' + ? (brushMode === 'multiple' ? 'single' : 'multiple') + : brushMode + } + }); + } + }; + + featureManager.register('brush', Brush); + + module.exports = Brush; + + +/***/ }, +/* 313 */ +/***/ function(module, exports) { + + 'use strict'; + + + var features = {}; + + module.exports = { + register: function (name, ctor) { + features[name] = ctor; + }, + + get: function (name) { + return features[name]; + } + }; + + +/***/ }, +/* 314 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + + var echarts = __webpack_require__(1); + var graphic = __webpack_require__(43); + var layout = __webpack_require__(21); + + // Model + echarts.extendComponentModel({ + + type: 'title', + + layoutMode: {type: 'box', ignoreSize: true}, + + defaultOption: { + // 一级层叠 + zlevel: 0, + // 二级层叠 + z: 6, + show: true, + + text: '', + // 超链接跳转 + // link: null, + // 仅支持self | blank + target: 'blank', + subtext: '', + + // 超链接跳转 + // sublink: null, + // 仅支持self | blank + subtarget: 'blank', + + // 'center' ¦ 'left' ¦ 'right' + // ¦ {number}(x坐标,单位px) + left: 0, + // 'top' ¦ 'bottom' ¦ 'center' + // ¦ {number}(y坐标,单位px) + top: 0, + + // 水平对齐 + // 'auto' | 'left' | 'right' | 'center' + // 默认根据 left 的位置判断是左对齐还是右对齐 + // textAlign: null + // + // 垂直对齐 + // 'auto' | 'top' | 'bottom' | 'middle' + // 默认根据 top 位置判断是上对齐还是下对齐 + // textBaseline: null + + backgroundColor: 'rgba(0,0,0,0)', + + // 标题边框颜色 + borderColor: '#ccc', + + // 标题边框线宽,单位px,默认为0(无边框) + borderWidth: 0, + + // 标题内边距,单位px,默认各方向内边距为5, + // 接受数组分别设定上右下左边距,同css + padding: 5, + + // 主副标题纵向间隔,单位px,默认为10, + itemGap: 10, + textStyle: { + fontSize: 18, + fontWeight: 'bolder', + color: '#333' + }, + subtextStyle: { + color: '#aaa' + } + } + }); + + // View + echarts.extendComponentView({ + + type: 'title', + + render: function (titleModel, ecModel, api) { + this.group.removeAll(); + + if (!titleModel.get('show')) { + return; + } + + var group = this.group; + + var textStyleModel = titleModel.getModel('textStyle'); + var subtextStyleModel = titleModel.getModel('subtextStyle'); + + var textAlign = titleModel.get('textAlign'); + var textBaseline = titleModel.get('textBaseline'); + + var textEl = new graphic.Text({ + style: { + text: titleModel.get('text'), + textFont: textStyleModel.getFont(), + fill: textStyleModel.getTextColor() + }, + z2: 10 + }); + + var textRect = textEl.getBoundingRect(); + + var subText = titleModel.get('subtext'); + var subTextEl = new graphic.Text({ + style: { + text: subText, + textFont: subtextStyleModel.getFont(), + fill: subtextStyleModel.getTextColor(), + y: textRect.height + titleModel.get('itemGap'), + textBaseline: 'top' + }, + z2: 10 + }); + + var link = titleModel.get('link'); + var sublink = titleModel.get('sublink'); + + textEl.silent = !link; + subTextEl.silent = !sublink; + + if (link) { + textEl.on('click', function () { + window.open(link, '_' + titleModel.get('target')); + }); + } + if (sublink) { + subTextEl.on('click', function () { + window.open(sublink, '_' + titleModel.get('subtarget')); + }); + } + + group.add(textEl); + subText && group.add(subTextEl); + // If no subText, but add subTextEl, there will be an empty line. + + var groupRect = group.getBoundingRect(); + var layoutOption = titleModel.getBoxLayoutParams(); + layoutOption.width = groupRect.width; + layoutOption.height = groupRect.height; + var layoutRect = layout.getLayoutRect( + layoutOption, { + width: api.getWidth(), + height: api.getHeight() + }, titleModel.get('padding') + ); + // Adjust text align based on position + if (!textAlign) { + // Align left if title is on the left. center and right is same + textAlign = titleModel.get('left') || titleModel.get('right'); + if (textAlign === 'middle') { + textAlign = 'center'; + } + // Adjust layout by text align + if (textAlign === 'right') { + layoutRect.x += layoutRect.width; + } + else if (textAlign === 'center') { + layoutRect.x += layoutRect.width / 2; + } + } + if (!textBaseline) { + textBaseline = titleModel.get('top') || titleModel.get('bottom'); + if (textBaseline === 'center') { + textBaseline = 'middle'; + } + if (textBaseline === 'bottom') { + layoutRect.y += layoutRect.height; + } + else if (textBaseline === 'middle') { + layoutRect.y += layoutRect.height / 2; + } + + textBaseline = textBaseline || 'top'; + } + + group.attr('position', [layoutRect.x, layoutRect.y]); + var alignStyle = { + textAlign: textAlign, + textVerticalAlign: textBaseline + }; + textEl.setStyle(alignStyle); + subTextEl.setStyle(alignStyle); + + // Render background + // Get groupRect again because textAlign has been changed + groupRect = group.getBoundingRect(); + var padding = layoutRect.margin; + var style = titleModel.getItemStyle(['color', 'opacity']); + style.fill = titleModel.get('backgroundColor'); + var rect = new graphic.Rect({ + shape: { + x: groupRect.x - padding[3], + y: groupRect.y - padding[0], + width: groupRect.width + padding[1] + padding[3], + height: groupRect.height + padding[0] + padding[2] + }, + style: style, + silent: true + }); + graphic.subPixelOptimizeRect(rect); + + group.add(rect); + } + }); + + +/***/ }, +/* 315 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * DataZoom component entry + */ + + + __webpack_require__(316); + + __webpack_require__(317); + __webpack_require__(319); + + __webpack_require__(320); + __webpack_require__(321); + + __webpack_require__(323); + __webpack_require__(324); + + __webpack_require__(326); + __webpack_require__(327); + + + +/***/ }, +/* 316 */ +/***/ function(module, exports, __webpack_require__) { + + + + __webpack_require__(19).registerSubTypeDefaulter('dataZoom', function (option) { + // Default 'slider' when no type specified. + return 'slider'; + }); + + + +/***/ }, +/* 317 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @file Data zoom model + */ + + + var zrUtil = __webpack_require__(4); + var env = __webpack_require__(2); + var echarts = __webpack_require__(1); + var modelUtil = __webpack_require__(5); + var AxisProxy = __webpack_require__(318); + var each = zrUtil.each; + var eachAxisDim = modelUtil.eachAxisDim; + + var DataZoomModel = echarts.extendComponentModel({ + + type: 'dataZoom', + + dependencies: [ + 'xAxis', 'yAxis', 'zAxis', 'radiusAxis', 'angleAxis', 'series' + ], + + /** + * @protected + */ + defaultOption: { + zlevel: 0, + z: 4, // Higher than normal component (z: 2). + orient: null, // Default auto by axisIndex. Possible value: 'horizontal', 'vertical'. + xAxisIndex: null, // Default the first horizontal category axis. + yAxisIndex: null, // Default the first vertical category axis. + angleAxisIndex: null, + radiusAxisIndex: null, + filterMode: 'filter', // Possible values: 'filter' or 'empty'. + // 'filter': data items which are out of window will be removed. + // This option is applicable when filtering outliers. + // 'empty': data items which are out of window will be set to empty. + // This option is applicable when user should not neglect + // that there are some data items out of window. + // Taking line chart as an example, line will be broken in + // the filtered points when filterModel is set to 'empty', but + // be connected when set to 'filter'. + + throttle: null, // Dispatch action by the fixed rate, avoid frequency. + // default 100. Do not throttle when use null/undefined. + // If animation === true and animationDurationUpdate > 0, + // default value is 100, otherwise 20. + start: 0, // Start percent. 0 ~ 100 + end: 100, // End percent. 0 ~ 100 + startValue: null, // Start value. If startValue specified, start is ignored. + endValue: null // End value. If endValue specified, end is ignored. + }, + + /** + * @override + */ + init: function (option, parentModel, ecModel) { + + /** + * key like x_0, y_1 + * @private + * @type {Object} + */ + this._dataIntervalByAxis = {}; + + /** + * @private + */ + this._dataInfo = {}; + + /** + * key like x_0, y_1 + * @private + */ + this._axisProxies = {}; + + /** + * @readOnly + */ + this.textStyleModel; + + /** + * @private + */ + this._autoThrottle = true; + + var rawOption = retrieveRaw(option); + + this.mergeDefaultAndTheme(option, ecModel); + + this.doInit(rawOption); + }, + + /** + * @override + */ + mergeOption: function (newOption) { + var rawOption = retrieveRaw(newOption); + + //FIX #2591 + zrUtil.merge(this.option, newOption, true); + + this.doInit(rawOption); + }, + + /** + * @protected + */ + doInit: function (rawOption) { + var thisOption = this.option; + + // Disable realtime view update if canvas is not supported. + if (!env.canvasSupported) { + thisOption.realtime = false; + } + + this._setDefaultThrottle(rawOption); + + processRangeProp('start', 'startValue', rawOption, thisOption); + processRangeProp('end', 'endValue', rawOption, thisOption); + + this.textStyleModel = this.getModel('textStyle'); + + this._resetTarget(); + + this._giveAxisProxies(); + }, + + /** + * @private + */ + _giveAxisProxies: function () { + var axisProxies = this._axisProxies; + + this.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel, ecModel) { + var axisModel = this.dependentModels[dimNames.axis][axisIndex]; + + // If exists, share axisProxy with other dataZoomModels. + var axisProxy = axisModel.__dzAxisProxy || ( + // Use the first dataZoomModel as the main model of axisProxy. + axisModel.__dzAxisProxy = new AxisProxy( + dimNames.name, axisIndex, this, ecModel + ) + ); + // FIXME + // dispose __dzAxisProxy + + axisProxies[dimNames.name + '_' + axisIndex] = axisProxy; + }, this); + }, + + /** + * @private + */ + _resetTarget: function () { + var thisOption = this.option; + + var autoMode = this._judgeAutoMode(); + + eachAxisDim(function (dimNames) { + var axisIndexName = dimNames.axisIndex; + thisOption[axisIndexName] = modelUtil.normalizeToArray( + thisOption[axisIndexName] + ); + }, this); + + if (autoMode === 'axisIndex') { + this._autoSetAxisIndex(); + } + else if (autoMode === 'orient') { + this._autoSetOrient(); + } + }, + + /** + * @private + */ + _judgeAutoMode: function () { + // Auto set only works for setOption at the first time. + // The following is user's reponsibility. So using merged + // option is OK. + var thisOption = this.option; + + var hasIndexSpecified = false; + eachAxisDim(function (dimNames) { + // When user set axisIndex as a empty array, we think that user specify axisIndex + // but do not want use auto mode. Because empty array may be encountered when + // some error occured. + if (thisOption[dimNames.axisIndex] != null) { + hasIndexSpecified = true; + } + }, this); + + var orient = thisOption.orient; if (orient == null && hasIndexSpecified) { return 'orient'; @@ -48737,7 +52573,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 297 */ +/* 318 */ /***/ function(module, exports, __webpack_require__) { /** @@ -49099,7 +52935,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 298 */ +/* 319 */ /***/ function(module, exports, __webpack_require__) { @@ -49188,7 +53024,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 299 */ +/* 320 */ /***/ function(module, exports, __webpack_require__) { /** @@ -49196,7 +53032,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - var DataZoomModel = __webpack_require__(296); + var DataZoomModel = __webpack_require__(317); var SliderZoomModel = DataZoomModel.extend({ @@ -49267,20 +53103,20 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 300 */ +/* 321 */ /***/ function(module, exports, __webpack_require__) { var zrUtil = __webpack_require__(4); var graphic = __webpack_require__(43); - var throttle = __webpack_require__(301); - var DataZoomView = __webpack_require__(298); + var throttle = __webpack_require__(307); + var DataZoomView = __webpack_require__(319); var Rect = graphic.Rect; var numberUtil = __webpack_require__(7); var linearMap = numberUtil.linearMap; var layout = __webpack_require__(21); - var sliderMove = __webpack_require__(302); + var sliderMove = __webpack_require__(322); var asc = numberUtil.asc; var bind = zrUtil.bind; // var mathMax = Math.max; @@ -50006,207 +53842,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 301 */ -/***/ function(module, exports) { - - - - var lib = {}; - - var ORIGIN_METHOD = '\0__throttleOriginMethod'; - var RATE = '\0__throttleRate'; - - /** - * 频率控制 返回函数连续调用时,fn 执行频率限定为每多少时间执行一次 - * 例如常见效果: - * notifyWhenChangesStop - * 频繁调用时,只保证最后一次执行 - * 配成:trailing:true;debounce:true 即可 - * notifyAtFixRate - * 频繁调用时,按规律心跳执行 - * 配成:trailing:true;debounce:false 即可 - * 注意: - * 根据model更新view的时候,可以使用throttle, - * 但是根据view更新model的时候,避免使用这种延迟更新的方式。 - * 因为这可能导致model和server同步出现问题。 - * - * @public - * @param {(Function|Array.)} fn 需要调用的函数 - * 如果fn为array,则表示可以对多个函数进行throttle。 - * 他们共享同一个timer。 - * @param {number} delay 延迟时间,单位毫秒 - * @param {bool} trailing 是否保证最后一次触发的执行 - * true:表示保证最后一次调用会触发执行。 - * 但任何调用后不可能立即执行,总会delay。 - * false:表示不保证最后一次调用会触发执行。 - * 但只要间隔大于delay,调用就会立即执行。 - * @param {bool} debounce 节流 - * true:表示:频繁调用(间隔小于delay)时,根本不执行 - * false:表示:频繁调用(间隔小于delay)时,按规律心跳执行 - * @return {(Function|Array.)} 实际调用函数。 - * 当输入的fn为array时,返回值也为array。 - * 每项是Function。 - */ - lib.throttle = function (fn, delay, trailing, debounce) { - - var currCall = (new Date()).getTime(); - var lastCall = 0; - var lastExec = 0; - var timer = null; - var diff; - var scope; - var args; - var isSingle = typeof fn === 'function'; - delay = delay || 0; - - if (isSingle) { - return createCallback(); - } - else { - var ret = []; - for (var i = 0; i < fn.length; i++) { - ret[i] = createCallback(i); - } - return ret; - } - - function createCallback(index) { - - function exec() { - lastExec = (new Date()).getTime(); - timer = null; - (isSingle ? fn : fn[index]).apply(scope, args || []); - } - - var cb = function () { - currCall = (new Date()).getTime(); - scope = this; - args = arguments; - diff = currCall - (debounce ? lastCall : lastExec) - delay; - - clearTimeout(timer); - - if (debounce) { - if (trailing) { - timer = setTimeout(exec, delay); - } - else if (diff >= 0) { - exec(); - } - } - else { - if (diff >= 0) { - exec(); - } - else if (trailing) { - timer = setTimeout(exec, -diff); - } - } - - lastCall = currCall; - }; - - /** - * Clear throttle. - * @public - */ - cb.clear = function () { - if (timer) { - clearTimeout(timer); - timer = null; - } - }; - - return cb; - } - }; - - /** - * 按一定频率执行,最后一次调用总归会执行 - * - * @public - */ - lib.fixRate = function (fn, delay) { - return delay != null - ? lib.throttle(fn, delay, true, false) - : fn; - }; - - /** - * 直到不频繁调用了才会执行,最后一次调用总归会执行 - * - * @public - */ - lib.debounce = function (fn, delay) { - return delay != null - ? lib.throttle(fn, delay, true, true) - : fn; - }; - - - /** - * Create throttle method or update throttle rate. - * - * @example - * ComponentView.prototype.render = function () { - * ... - * throttle.createOrUpdate( - * this, - * '_dispatchAction', - * this.model.get('throttle'), - * 'fixRate' - * ); - * }; - * ComponentView.prototype.remove = function () { - * throttle.clear(this, '_dispatchAction'); - * }; - * ComponentView.prototype.dispose = function () { - * throttle.clear(this, '_dispatchAction'); - * }; - * - * @public - * @param {Object} obj - * @param {string} fnAttr - * @param {number} rate - * @param {string} throttleType 'fixRate' or 'debounce' - */ - lib.createOrUpdate = function (obj, fnAttr, rate, throttleType) { - var fn = obj[fnAttr]; - - if (!fn || rate == null || !throttleType) { - return; - } - - var originFn = fn[ORIGIN_METHOD] || fn; - var lastRate = fn[RATE]; - - if (lastRate !== rate) { - fn = obj[fnAttr] = lib[throttleType](originFn, rate); - fn[ORIGIN_METHOD] = originFn; - fn[RATE] = rate; - } - }; - - /** - * Clear throttle. Example see throttle.createOrUpdate. - * - * @public - * @param {Object} obj - * @param {string} fnAttr - */ - lib.clear = function (obj, fnAttr) { - var fn = obj[fnAttr]; - if (fn && fn[ORIGIN_METHOD]) { - obj[fnAttr] = fn[ORIGIN_METHOD]; - } - }; - - module.exports = lib; - - - -/***/ }, -/* 302 */ +/* 322 */ /***/ function(module, exports) { @@ -50265,7 +53901,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 303 */ +/* 323 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50273,7 +53909,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - module.exports = __webpack_require__(296).extend({ + module.exports = __webpack_require__(317).extend({ type: 'dataZoom.inside', @@ -50287,15 +53923,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 304 */ +/* 324 */ /***/ function(module, exports, __webpack_require__) { - var DataZoomView = __webpack_require__(298); + var DataZoomView = __webpack_require__(319); var zrUtil = __webpack_require__(4); - var sliderMove = __webpack_require__(302); - var roams = __webpack_require__(305); + var sliderMove = __webpack_require__(322); + var roams = __webpack_require__(325); var bind = zrUtil.bind; var InsideZoomView = DataZoomView.extend({ @@ -50354,15 +53990,6 @@ return /******/ (function(modules) { // webpackBootstrap // polar支持 }, - /** - * @override - */ - remove: function () { - roams.unregister(this.api, this.dataZoomModel.id); - InsideZoomView.superApply(this, 'remove', arguments); - this._range = null; - }, - /** * @override */ @@ -50487,7 +54114,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 305 */ +/* 325 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50503,7 +54130,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var RoamController = __webpack_require__(173); - var throttle = __webpack_require__(301); + var throttle = __webpack_require__(307); var curry = zrUtil.curry; var ATTR = '\0_ec_dataZoom_roams'; @@ -50684,7 +54311,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 306 */ +/* 326 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50747,7 +54374,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 307 */ +/* 327 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50795,7 +54422,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 308 */ +/* 328 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50803,13 +54430,13 @@ return /******/ (function(modules) { // webpackBootstrap */ - __webpack_require__(309); - __webpack_require__(321); + __webpack_require__(329); + __webpack_require__(340); /***/ }, -/* 309 */ +/* 329 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50818,19 +54445,19 @@ return /******/ (function(modules) { // webpackBootstrap __webpack_require__(1).registerPreprocessor( - __webpack_require__(310) + __webpack_require__(330) ); - __webpack_require__(311); - __webpack_require__(312); - __webpack_require__(314); - __webpack_require__(317); - __webpack_require__(320); + __webpack_require__(331); + __webpack_require__(332); + __webpack_require__(333); + __webpack_require__(336); + __webpack_require__(339); /***/ }, -/* 310 */ +/* 330 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50882,7 +54509,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 311 */ +/* 331 */ /***/ function(module, exports, __webpack_require__) { @@ -50906,7 +54533,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 312 */ +/* 332 */ /***/ function(module, exports, __webpack_require__) { /** @@ -50915,13 +54542,16 @@ return /******/ (function(modules) { // webpackBootstrap var echarts = __webpack_require__(1); - var visualSolution = __webpack_require__(313); + var visualSolution = __webpack_require__(305); + var VisualMapping = __webpack_require__(191); var zrUtil = __webpack_require__(4); echarts.registerVisual(echarts.PRIORITY.VISUAL.COMPONENT, function (ecModel) { ecModel.eachComponent('visualMap', function (visualMapModel) { processSingleVisualMap(visualMapModel, ecModel); }); + + prepareVisualMeta(ecModel); }); function processSingleVisualMap(visualMapModel, ecModel) { @@ -50939,150 +54569,56 @@ return /******/ (function(modules) { // webpackBootstrap }); } + // Only support color. + function prepareVisualMeta(ecModel) { + ecModel.eachSeries(function (seriesModel) { + var data = seriesModel.getData(); + var visualMetaList = []; + ecModel.eachComponent('visualMap', function (visualMapModel) { + var visualMeta = {}; + visualMetaList.push(visualMeta); - -/***/ }, -/* 313 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @file Visual solution, for consistent option specification. - */ - - - var zrUtil = __webpack_require__(4); - var VisualMapping = __webpack_require__(191); - var each = zrUtil.each; - - var visualSolution = { - - /** - * @param {Object} option - * @param {Array.} stateList - * @param {Function} [supplementVisualOption] - * @return {Object} visualMappings > - */ - createVisualMappings: function (option, stateList, supplementVisualOption) { - var visualMappings = {}; - - each(stateList, function (state) { - var mappings = visualMappings[state] = createMappings(); - - each(option[state], function (visualData, visualType) { - if (!VisualMapping.isValidType(visualType)) { - return; - } - var mappingOption = { - type: visualType, - visual: visualData - }; - supplementVisualOption && supplementVisualOption(mappingOption, state); - mappings[visualType] = new VisualMapping(mappingOption); - - // Prepare a alpha for opacity, for some case that opacity - // is not supported, such as rendering using gradient color. - if (visualType === 'opacity') { - mappingOption = zrUtil.clone(mappingOption); - mappingOption.type = 'colorAlpha'; - mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption); - } - }); - }); - - return visualMappings; - - function createMappings() { - var Creater = function () {}; - // Make sure hidden fields will not be visited by - // object iteration (with hasOwnProperty checking). - Creater.prototype.__hidden = Creater.prototype; - var obj = new Creater(); - return obj; - } - }, - - /** - * @param {Object} thisOption - * @param {Object} newOption - * @param {Array.} keys - */ - replaceVisualOption: function (thisOption, newOption, keys) { - // Visual attributes merge is not supported, otherwise it - // brings overcomplicated merge logic. See #2853. So if - // newOption has anyone of these keys, all of these keys - // will be reset. Otherwise, all keys remain. - var has; - zrUtil.each(keys, function (key) { - if (newOption.hasOwnProperty(key)) { - has = true; - } - }); - has && zrUtil.each(keys, function (key) { - if (newOption.hasOwnProperty(key)) { - thisOption[key] = zrUtil.clone(newOption[key]); - } - else { - delete thisOption[key]; - } - }); - }, - - /** - * @param {Array.} stateList - * @param {Object} visualMappings > - * @param {module:echarts/data/List} list - * @param {Function} getValueState param: valueOrIndex, return: state. - * @param {object} [scope] Scope for getValueState - * @param {string} [dimension] Concrete dimension, if used. - */ - applyVisual: function (stateList, visualMappings, data, getValueState, scope, dimension) { - var visualTypesMap = {}; - zrUtil.each(stateList, function (state) { - var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); - visualTypesMap[state] = visualTypes; + var stops = visualMeta.stops = visualMapModel.getStops(seriesModel, getColorVisual); + visualMeta.dimension = visualMapModel.getDataDimension(data); }); - var dataIndex; - - function getVisual(key) { - return data.getItemVisual(dataIndex, key); - } - - function setVisual(key, value) { - data.setItemVisual(dataIndex, key, value); - } + // console.log(JSON.stringify(visualMetaList.map(a => a.stops))); + seriesModel.getData().setVisual('visualMeta', visualMetaList); + }); + } - if (dimension == null) { - data.each(eachItem, true); - } - else { - data.each([dimension], eachItem, true); - } + // FIXME + // performance and export for heatmap? + function getColorVisual(visualMapModel, value, valueState) { + var mappings = visualMapModel.targetVisuals[valueState]; + var visualTypes = VisualMapping.prepareVisualTypes(mappings); + var resultVisual = {}; + + for (var i = 0, len = visualTypes.length; i < len; i++) { + var type = visualTypes[i]; + var mapping = mappings[ + type === 'colorAlpha' ? '__alphaForOpacity' : type + ]; + mapping && mapping.applyVisual(value, getVisual, setVisual); + } - function eachItem(valueOrIndex, index) { - dataIndex = dimension == null ? valueOrIndex : index; - var valueState = getValueState.call(scope, valueOrIndex); - var mappings = visualMappings[valueState]; - var visualTypes = visualTypesMap[valueState]; + return resultVisual.color; - for (var i = 0, len = visualTypes.length; i < len; i++) { - var type = visualTypes[i]; - mappings[type] && mappings[type].applyVisual( - valueOrIndex, getVisual, setVisual - ); - } - } + function getVisual(key) { + return resultVisual[key]; } - }; + function setVisual(key, value) { + resultVisual[key] = value; + } + } - module.exports = visualSolution; /***/ }, -/* 314 */ +/* 333 */ /***/ function(module, exports, __webpack_require__) { /** @@ -51090,7 +54626,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - var VisualMapModel = __webpack_require__(315); + var VisualMapModel = __webpack_require__(334); var zrUtil = __webpack_require__(4); var numberUtil = __webpack_require__(7); @@ -51189,7 +54725,6 @@ return /******/ (function(modules) { // webpackBootstrap }, /** - * @public * @override */ setSelected: function (selected) { @@ -51217,7 +54752,6 @@ return /******/ (function(modules) { // webpackBootstrap }, /** - * @public * @override */ getValueState: function (value) { @@ -51233,7 +54767,6 @@ return /******/ (function(modules) { // webpackBootstrap }, /** - * @public * @params {Array.} range target value: range[0] <= value && value <= range[1] * @return {Array.} [{seriesId, dataIndices: >}, ...] */ @@ -51251,17 +54784,78 @@ return /******/ (function(modules) { // webpackBootstrap result.push({seriesId: seriesModel.id, dataIndex: dataIndices}); }, this); + return result; + }, + + getStops: function (seriesModel, getColorVisual) { + if (!this.isTargetSeries(seriesModel)) { + return; + } + + var result = []; + insertStopList(this, 'outOfRange', this.getExtent(), result); + insertStopList(this, 'inRange', this.option.range.slice(), result); + + zrUtil.each(result, function (item) { + item.color = getColorVisual(this, item.value, item.valueState); + }, this); + return result; } }); + function getColorStopValues(visualMapModel, valueState, dataExtent) { + var mapping = visualMapModel.targetVisuals[valueState].color; + + if (!mapping) { + return dataExtent.slice(); + } + + var count = mapping.option.visual.length; + + if (count <= 1 || dataExtent[0] === dataExtent[1]) { + return dataExtent.slice(); + } + + // We only use linear mappping for color, so we can do inverse mapping: + var step = (dataExtent[1] - dataExtent[0]) / (count - 1); + var value = dataExtent[0]; + var stopValues = []; + for (var i = 0; i < count && value < dataExtent[1]; i++) { + stopValues.push(value); + value += step; + } + stopValues.push(dataExtent[1]); + + return stopValues; + } + + function insertStopList(visualMapModel, valueState, dataExtent, result) { + var stops = getColorStopValues(visualMapModel, valueState, dataExtent); + + zrUtil.each(stops, function (val) { + var stop = {value: val, valueState: valueState}; + var inRange = 0; + for (var i = 0; i < result.length; i++) { + // Format to: outOfRange -- inRange -- outOfRange. + inRange |= result[i].valueState === 'inRange'; + if (val < result[i].value) { + result.splice(i, 0, stop); + return; + } + inRange && (result[i].valueState = 'inRange'); + } + result.push(stop); + }); + } + module.exports = ContinuousModel; /***/ }, -/* 315 */ +/* 334 */ /***/ function(module, exports, __webpack_require__) { /** @@ -51272,9 +54866,9 @@ return /******/ (function(modules) { // webpackBootstrap var echarts = __webpack_require__(1); var zrUtil = __webpack_require__(4); var env = __webpack_require__(2); - var visualDefault = __webpack_require__(316); + var visualDefault = __webpack_require__(335); var VisualMapping = __webpack_require__(191); - var visualSolution = __webpack_require__(313); + var visualSolution = __webpack_require__(305); var mapVisual = VisualMapping.mapVisual; var modelUtil = __webpack_require__(5); var eachVisual = VisualMapping.eachVisual; @@ -51285,6 +54879,8 @@ return /******/ (function(modules) { // webpackBootstrap var linearMap = numberUtil.linearMap; var noop = zrUtil.noop; + var DEFAULT_COLOR = ['#f6efa6', '#d88273', '#bf444c']; + var VisualMapModel = echarts.extendComponentModel({ type: 'visualMap', @@ -51361,7 +54957,7 @@ return /******/ (function(modules) { // webpackBootstrap // 接受数组分别设定上右下左边距,同css textGap: 10, // precision: 0, // 小数精度,默认为0,无小数点 - color: ['#bf444c', '#d88273', '#f6efa6'], //颜色(deprecated,兼容ec2,顺序同pieces,不同于inRange/outOfRange) + color: null, //颜色(deprecated,兼容ec2,顺序同pieces,不同于inRange/outOfRange) formatter: null, text: null, // 文本,如['高', '低'],兼容ec2,text[0]对应高值,text[1]对应低值 @@ -51420,7 +55016,7 @@ return /******/ (function(modules) { // webpackBootstrap } !isInit && visualSolution.replaceVisualOption( - this.option, newOption, this.replacableOptionKeys + thisOption, newOption, this.replacableOptionKeys ); this.textStyleModel = this.getModel('textStyle'); @@ -51469,6 +55065,17 @@ return /******/ (function(modules) { // webpackBootstrap }, this); }, + /** + * @pubilc + */ + isTargetSeries: function (seriesModel) { + var is = false; + this.eachTargetSeries(function (model) { + model === seriesModel && (is = true); + }); + return is; + }, + /** * @example * this.formatValueText(someVal); // format single numeric value to text. @@ -51479,16 +55086,18 @@ return /******/ (function(modules) { // webpackBootstrap * * @param {number|Array.} value Real value, or this.dataBound[0 or 1]. * @param {boolean} [isCategory=false] Only available when value is number. + * @param {Array.} edgeSymbols Open-close symbol when value is interval. * @return {string} * @protected */ - formatValueText: function(value, isCategory) { + formatValueText: function(value, isCategory, edgeSymbols) { var option = this.option; var precision = option.precision; var dataBound = this.dataBound; var formatter = option.formatter; var isMinMax; var textValue; + edgeSymbols = edgeSymbols || ['<', '>']; if (zrUtil.isArray(value)) { value = value.slice(); @@ -51515,10 +55124,10 @@ return /******/ (function(modules) { // webpackBootstrap if (isMinMax) { if (value[0] === dataBound[0]) { - return '< ' + textValue[1]; + return edgeSymbols[0] + ' ' + textValue[1]; } else if (value[1] === dataBound[1]) { - return '> ' + textValue[0]; + return edgeSymbols[1] + ' ' + textValue[0]; } else { return textValue[0] + ' - ' + textValue[1]; @@ -51590,7 +55199,7 @@ return /******/ (function(modules) { // webpackBootstrap completeSingle.call(this, target); completeSingle.call(this, controller); completeInactive.call(this, target, 'inRange', 'outOfRange'); - completeInactive.call(this, target, 'outOfRange', 'inRange'); + // completeInactive.call(this, target, 'outOfRange', 'inRange'); completeController.call(this, controller); function completeSingle(base) { @@ -51606,6 +55215,14 @@ return /******/ (function(modules) { // webpackBootstrap base.inRange = {color: thisOption.color.slice().reverse()}; } + // Compatible with previous logic, always give a defautl color, otherwise + // simple config with no inRange and outOfRange will not work. + // Originally we use visualMap.color as the default color, but setOption at + // the second time the default color will be erased. So we change to use + // constant DEFAULT_COLOR. + // If user do not want the defualt color, set inRange: {color: null}. + base.inRange = base.inRange || {color: DEFAULT_COLOR}; + // If using shortcut like: {inRange: 'symbol'}, complete default value. each(this.stateList, function (state) { var visualType = base[state]; @@ -51748,7 +55365,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 316 */ +/* 335 */ /***/ function(module, exports, __webpack_require__) { /** @@ -51824,18 +55441,18 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 317 */ +/* 336 */ /***/ function(module, exports, __webpack_require__) { - var VisualMapView = __webpack_require__(318); + var VisualMapView = __webpack_require__(337); var graphic = __webpack_require__(43); var zrUtil = __webpack_require__(4); var numberUtil = __webpack_require__(7); - var sliderMove = __webpack_require__(302); + var sliderMove = __webpack_require__(322); var LinearGradient = __webpack_require__(79); - var helper = __webpack_require__(319); + var helper = __webpack_require__(338); var modelUtil = __webpack_require__(5); var linearMap = numberUtil.linearMap; @@ -52125,15 +55742,18 @@ return /******/ (function(modules) { // webpackBootstrap this._dragging = !isEnd; - // Transform dx, dy to bar coordination. - var vertex = this._applyTransform([dx, dy], this._shapes.barGroup, true); - this._updateInterval(handleIndex, vertex[1]); + if (!isEnd) { + // Transform dx, dy to bar coordination. + var vertex = this._applyTransform([dx, dy], this._shapes.barGroup, true); + this._updateInterval(handleIndex, vertex[1]); - // Considering realtime, update view should be executed - // before dispatch action. - this._updateView(); + // Considering realtime, update view should be executed + // before dispatch action. + this._updateView(); + } - if (isEnd || this.visualMapModel.get('realtime')) { + // dragEnd do not dispatch action when realtime. + if (isEnd === !this.visualMapModel.get('realtime')) { // jshint ignore:line this.api.dispatchAction({ type: 'selectDataRange', from: this.uid, @@ -52142,8 +55762,8 @@ return /******/ (function(modules) { // webpackBootstrap }); } - if (isEnd && !this._hovering) { - this._clearHoverLinkToSeries(); + if (isEnd) { + !this._hovering && this._clearHoverLinkToSeries(); } else if (useHoverLinkOnHandle(this.visualMapModel)) { this._doHoverLinkToSeries(this._handleEnds[handleIndex], false); @@ -52652,7 +56272,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 318 */ +/* 337 */ /***/ function(module, exports, __webpack_require__) { @@ -52812,7 +56432,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 319 */ +/* 338 */ /***/ function(module, exports, __webpack_require__) { @@ -52869,7 +56489,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 320 */ +/* 339 */ /***/ function(module, exports, __webpack_require__) { /** @@ -52897,7 +56517,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 321 */ +/* 340 */ /***/ function(module, exports, __webpack_require__) { /** @@ -52906,24 +56526,24 @@ return /******/ (function(modules) { // webpackBootstrap __webpack_require__(1).registerPreprocessor( - __webpack_require__(310) + __webpack_require__(330) ); - __webpack_require__(311); - __webpack_require__(312); - __webpack_require__(322); - __webpack_require__(323); - __webpack_require__(320); + __webpack_require__(331); + __webpack_require__(332); + __webpack_require__(341); + __webpack_require__(342); + __webpack_require__(339); /***/ }, -/* 322 */ +/* 341 */ /***/ function(module, exports, __webpack_require__) { - var VisualMapModel = __webpack_require__(315); + var VisualMapModel = __webpack_require__(334); var zrUtil = __webpack_require__(4); var VisualMapping = __webpack_require__(191); @@ -52966,7 +56586,8 @@ return /******/ (function(modules) { // webpackBootstrap // vertical side of each item. Otherwise, horizontal side. itemSymbol: 'roundRect', pieceList: null, // Each item is Object, with some of those attrs: - // {min, max, value, color, colorSaturation, colorAlpha, opacity, + // {min, max, lt, gt, lte, gte, value, + // color, colorSaturation, colorAlpha, opacity, // symbol, symbolSize}, which customize the range or visual // coding of the certain piece. Besides, see "Order Rule". categories: null, // category names, like: ['some1', 'some2', 'some3']. @@ -53133,6 +56754,58 @@ return /******/ (function(modules) { // webpackBootstrap }, this); return result; + }, + + /** + * @private + */ + getRepresentValue: function (piece) { + var representValue; + if (this.isCategory()) { + representValue = piece.value; + } + else { + if (piece.value != null) { + representValue = piece.value; + } + else { + var pieceInterval = piece.interval || []; + representValue = (pieceInterval[0] + pieceInterval[1]) / 2; + } + } + return representValue; + }, + + getStops: function (seriesModel, getColorVisual) { + var result = []; + var model = this; + + if (this.isTargetSeries(seriesModel)) { + var curr = -Infinity; + zrUtil.each(this._pieceList, function (piece) { + // Do not support category yet. + var interval = piece.interval; + if (interval) { + interval[0] > curr && setPiece({ + interval: [curr, interval[0]], + valueState: 'outOfRange' + }); + setPiece({ + interval: interval.slice(), + valueState: this.getValueState((interval[0] + interval[1]) / 2) + }); + curr = interval[1]; + } + }, this); + } + return result; + + function setPiece(piece) { + result.push(piece); + piece.color = getColorVisual( + model, model.getRepresentValue(piece), piece.valueState + ); + } } }); @@ -53146,6 +56819,7 @@ return /******/ (function(modules) { // webpackBootstrap splitNumber: function () { var thisOption = this.option; + var pieceList = this._pieceList; var precision = thisOption.precision; var dataExtent = this.getExtent(); var splitNumber = thisOption.splitNumber; @@ -53163,12 +56837,18 @@ return /******/ (function(modules) { // webpackBootstrap for (var i = 0, curr = dataExtent[0]; i < splitNumber; i++, curr += splitStep) { var max = i === splitNumber - 1 ? dataExtent[1] : (curr + splitStep); - this._pieceList.push({ - text: this.formatValueText([curr, max]), + pieceList.push({ index: i, - interval: [curr, max] + interval: [curr, max], + close: [1, 1] }); } + + normalizePieces(pieceList); + + zrUtil.each(pieceList, function (piece) { + piece.text = this.formatValueText(piece.interval); + }, this); }, categories: function () { @@ -53188,6 +56868,8 @@ return /******/ (function(modules) { // webpackBootstrap pieces: function () { var thisOption = this.option; + var pieceList = this._pieceList; + zrUtil.each(thisOption.pieces, function (pieceListItem, index) { if (!zrUtil.isObject(pieceListItem)) { @@ -53195,52 +56877,115 @@ return /******/ (function(modules) { // webpackBootstrap } var item = {text: '', index: index}; - var hasLabel; if (pieceListItem.label != null) { item.text = pieceListItem.label; - hasLabel = true; } if (pieceListItem.hasOwnProperty('value')) { - item.value = pieceListItem.value; - - if (!hasLabel) { - item.text = this.formatValueText(item.value); - } + var value = item.value = pieceListItem.value; + item.interval = [value, value]; + item.close = [1, 1]; } else { - var min = pieceListItem.min; - var max = pieceListItem.max; - min == null && (min = -Infinity); - max == null && (max = Infinity); - if (min === max) { - // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}], - // we use value to lift the priority when min === max - item.value = min; + // `min` `max` is legacy option. + // `lt` `gt` `lte` `gte` is recommanded. + var interval = item.interval = []; + var close = item.close = [0, 0]; + + var closeList = [1, 0, 1]; + var infinityList = [-Infinity, Infinity]; + + var useMinMax = []; + for (var lg = 0; lg < 2; lg++) { + var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg]; + for (var i = 0; i < 3 && interval[lg] == null; i++) { + interval[lg] = pieceListItem[names[i]]; + close[lg] = closeList[i]; + useMinMax[lg] = i === 2; + } + interval[lg] == null && (interval[lg] = infinityList[lg]); + } + useMinMax[0] && interval[1] === Infinity && (close[0] = 0); + useMinMax[1] && interval[0] === -Infinity && (close[1] = 0); + + if (true) { + if (interval[0] > interval[1]) { + console.warn( + 'Piece ' + index + 'is illegal: ' + interval + + ' lower bound should not greater then uppper bound.' + ); + } } - item.interval = [min, max]; - if (!hasLabel) { - item.text = this.formatValueText([min, max]); + if (interval[0] === interval[1] && close[0] && close[1]) { + // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}], + // we use value to lift the priority when min === max + item.value = interval[0]; } } item.visual = VisualMapping.retrieveVisuals(pieceListItem); - this._pieceList.push(item); + pieceList.push(item); }, this); // See "Order Rule". - normalizeReverse(thisOption, this._pieceList); + normalizeReverse(thisOption, pieceList); + // Only pieces + normalizePieces(pieceList); + + zrUtil.each(pieceList, function (piece) { + var close = piece.close; + var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]]; + piece.text = piece.text || this.formatValueText( + piece.value != null ? piece.value : piece.interval, + false, + edgeSymbols + ); + }, this); } }; - function normalizeReverse(thisOption, arr) { + function normalizeReverse(thisOption, pieceList) { var inverse = thisOption.inverse; if (thisOption.orient === 'vertical' ? !inverse : inverse) { - arr.reverse(); + pieceList.reverse(); + } + } + + // Reorder, remove duplicate, which are needed when using gradient. + // Not applicable for categories. + function normalizePieces(pieceList) { + pieceList.sort(function (a, b) { + return littleThan(a, b) ? -1 : 1; + }); + + var curr = -Infinity; + for (var i = 0; i < pieceList.length; i++) { + var interval = pieceList[i].interval; + var close = pieceList[i].close; + for (var lg = 0; lg < 2; lg++) { + if (interval[lg] < curr) { + interval[lg] = curr; + close[lg] = 1 - lg; + } + curr = interval[lg]; + } + } + // console.log(JSON.stringify(pieceList.map(a => a.interval))); + + function littleThan(piece, standard, lg) { + lg = lg || 0; + return piece.interval[lg] < standard.interval[lg] + || ( + piece.interval[lg] === standard.interval[lg] + && ( + +piece.close[lg] > standard.close[lg] + || littleThan(piece, standard, 1) + ) + ); } } @@ -53248,17 +56993,17 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 323 */ +/* 342 */ /***/ function(module, exports, __webpack_require__) { - var VisualMapView = __webpack_require__(318); + var VisualMapView = __webpack_require__(337); var zrUtil = __webpack_require__(4); var graphic = __webpack_require__(43); var symbolCreators = __webpack_require__(105); var layout = __webpack_require__(21); - var helper = __webpack_require__(319); + var helper = __webpack_require__(338); var PiecewiseVisualMapView = VisualMapView.extend({ @@ -53307,7 +57052,7 @@ return /******/ (function(modules) { // webpackBootstrap this._enableHoverLink(itemGroup, item.indexInModelPieceList); - var representValue = this._getRepresentValue(piece); + var representValue = visualMapModel.getRepresentValue(piece); this._createItemSymbol( itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]] @@ -53427,26 +57172,6 @@ return /******/ (function(modules) { // webpackBootstrap return {viewPieceList: viewPieceList, endsText: endsText}; }, - /** - * @private - */ - _getRepresentValue: function (piece) { - var representValue; - if (this.visualMapModel.isCategory()) { - representValue = piece.value; - } - else { - if (piece.value != null) { - representValue = piece.value; - } - else { - var pieceInterval = piece.interval || []; - representValue = (pieceInterval[0] + pieceInterval[1]) / 2; - } - } - return representValue; - }, - /** * @private */ @@ -53491,14 +57216,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 324 */ +/* 343 */ /***/ function(module, exports, __webpack_require__) { // HINT Markpoint can't be used too much - __webpack_require__(325); - __webpack_require__(327); + __webpack_require__(344); + __webpack_require__(346); __webpack_require__(1).registerPreprocessor(function (opt) { // Make sure markPoint component is enabled @@ -53507,12 +57232,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 325 */ +/* 344 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(326).extend({ + module.exports = __webpack_require__(345).extend({ type: 'markPoint', @@ -53545,7 +57270,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 326 */ +/* 345 */ /***/ function(module, exports, __webpack_require__) { @@ -53680,7 +57405,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 327 */ +/* 346 */ /***/ function(module, exports, __webpack_require__) { @@ -53691,15 +57416,15 @@ return /******/ (function(modules) { // webpackBootstrap var List = __webpack_require__(96); - var markerHelper = __webpack_require__(328); + var markerHelper = __webpack_require__(347); function updateMarkerLayout(mpData, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; mpData.each(function (idx) { var itemModel = mpData.getItemModel(idx); var point; - var xPx = numberUtil.parsePercent(itemModel.getShallow('x'), api.getWidth()); - var yPx = numberUtil.parsePercent(itemModel.getShallow('y'), api.getHeight()); + var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth()); + var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } @@ -53729,7 +57454,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } - __webpack_require__(329).extend({ + __webpack_require__(348).extend({ type: 'markPoint', @@ -53841,7 +57566,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 328 */ +/* 347 */ /***/ function(module, exports, __webpack_require__) { @@ -54045,7 +57770,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 329 */ +/* 348 */ /***/ function(module, exports, __webpack_require__) { @@ -54087,13 +57812,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 330 */ +/* 349 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(331); - __webpack_require__(332); + __webpack_require__(350); + __webpack_require__(351); __webpack_require__(1).registerPreprocessor(function (opt) { // Make sure markLine component is enabled @@ -54102,12 +57827,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 331 */ +/* 350 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(326).extend({ + module.exports = __webpack_require__(345).extend({ type: 'markLine', @@ -54147,7 +57872,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 332 */ +/* 351 */ /***/ function(module, exports, __webpack_require__) { @@ -54156,7 +57881,7 @@ return /******/ (function(modules) { // webpackBootstrap var List = __webpack_require__(96); var numberUtil = __webpack_require__(7); - var markerHelper = __webpack_require__(328); + var markerHelper = __webpack_require__(347); var LineDraw = __webpack_require__(198); @@ -54276,13 +58001,10 @@ return /******/ (function(modules) { // webpackBootstrap var itemModel = data.getItemModel(idx); var point; - var xPx = itemModel.get('x'); - var yPx = itemModel.get('y'); - if (xPx != null && yPx != null) { - point = [ - numberUtil.parsePercent(xPx, api.getWidth()), - numberUtil.parsePercent(yPx, api.getHeight()) - ]; + var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth()); + var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight()); + if (!isNaN(xPx) && !isNaN(yPx)) { + point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic @@ -54318,12 +58040,20 @@ return /******/ (function(modules) { // webpackBootstrap point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]); } } + + // Use x, y if has any + if (!isNaN(xPx)) { + point[0] = xPx; + } + if (!isNaN(yPx)) { + point[1] = yPx; + } } data.setItemLayout(idx, point); } - __webpack_require__(329).extend({ + __webpack_require__(348).extend({ type: 'markLine', @@ -54492,6 +58222,7 @@ return /******/ (function(modules) { // webpackBootstrap lineData.initData( zrUtil.map(optData, function (item) { return item[2]; }) ); + lineData.hasItemOption = true; return { from: fromData, to: toData, @@ -54501,13 +58232,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 333 */ +/* 352 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(334); - __webpack_require__(335); + __webpack_require__(353); + __webpack_require__(354); __webpack_require__(1).registerPreprocessor(function (opt) { // Make sure markArea component is enabled @@ -54516,12 +58247,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 334 */ +/* 353 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(326).extend({ + module.exports = __webpack_require__(345).extend({ type: 'markArea', @@ -54557,7 +58288,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 335 */ +/* 354 */ /***/ function(module, exports, __webpack_require__) { // TODO Better on polar @@ -54569,7 +58300,7 @@ return /******/ (function(modules) { // webpackBootstrap var graphic = __webpack_require__(43); var colorUtil = __webpack_require__(39); - var markerHelper = __webpack_require__(328); + var markerHelper = __webpack_require__(347); var markAreaTransform = function (seriesModel, coordSys, maModel, item) { var lt = markerHelper.dataTransform(seriesModel, item[0]); @@ -54644,13 +58375,10 @@ return /******/ (function(modules) { // webpackBootstrap var itemModel = data.getItemModel(idx); var point; - var xPx = itemModel.get(dims[0]); - var yPx = itemModel.get(dims[1]); - if (xPx != null && yPx != null) { - point = [ - numberUtil.parsePercent(xPx, api.getWidth()), - numberUtil.parsePercent(yPx, api.getHeight()) - ]; + var xPx = numberUtil.parsePercent(itemModel.get(dims[0]), api.getWidth()); + var yPx = numberUtil.parsePercent(itemModel.get(dims[1]), api.getHeight()); + if (!isNaN(xPx) && !isNaN(yPx)) { + point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic @@ -54677,6 +58405,14 @@ return /******/ (function(modules) { // webpackBootstrap point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]); } } + + // Use x, y if has any + if (!isNaN(xPx)) { + point[0] = xPx; + } + if (!isNaN(yPx)) { + point[1] = yPx; + } } return point; @@ -54684,7 +58420,7 @@ return /******/ (function(modules) { // webpackBootstrap var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']]; - __webpack_require__(329).extend({ + __webpack_require__(348).extend({ type: 'markArea', @@ -54857,12 +58593,13 @@ return /******/ (function(modules) { // webpackBootstrap return item.value; }; areaData.initData(optData, null, dimValueGetter); + areaData.hasItemOption = true; return areaData; } /***/ }, -/* 336 */ +/* 355 */ /***/ function(module, exports, __webpack_require__) { /** @@ -54872,17 +58609,17 @@ return /******/ (function(modules) { // webpackBootstrap var echarts = __webpack_require__(1); - echarts.registerPreprocessor(__webpack_require__(337)); + echarts.registerPreprocessor(__webpack_require__(356)); - __webpack_require__(338); - __webpack_require__(339); - __webpack_require__(340); - __webpack_require__(342); + __webpack_require__(357); + __webpack_require__(358); + __webpack_require__(359); + __webpack_require__(361); /***/ }, -/* 337 */ +/* 356 */ /***/ function(module, exports, __webpack_require__) { /** @@ -54973,7 +58710,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 338 */ +/* 357 */ /***/ function(module, exports, __webpack_require__) { @@ -54986,7 +58723,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 339 */ +/* 358 */ /***/ function(module, exports, __webpack_require__) { /** @@ -55030,7 +58767,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 340 */ +/* 359 */ /***/ function(module, exports, __webpack_require__) { /** @@ -55038,7 +58775,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - var TimelineModel = __webpack_require__(341); + var TimelineModel = __webpack_require__(360); var zrUtil = __webpack_require__(4); var modelUtil = __webpack_require__(5); @@ -55146,7 +58883,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 341 */ +/* 360 */ /***/ function(module, exports, __webpack_require__) { /** @@ -55348,7 +59085,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 342 */ +/* 361 */ /***/ function(module, exports, __webpack_require__) { /** @@ -55359,8 +59096,8 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var graphic = __webpack_require__(43); var layout = __webpack_require__(21); - var TimelineView = __webpack_require__(343); - var TimelineAxis = __webpack_require__(344); + var TimelineView = __webpack_require__(362); + var TimelineAxis = __webpack_require__(363); var symbolUtil = __webpack_require__(105); var axisHelper = __webpack_require__(113); var BoundingRect = __webpack_require__(15); @@ -56041,7 +59778,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 343 */ +/* 362 */ /***/ function(module, exports, __webpack_require__) { /** @@ -56061,7 +59798,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 344 */ +/* 363 */ /***/ function(module, exports, __webpack_require__) { @@ -56162,29 +59899,28 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 345 */ +/* 364 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(346); - __webpack_require__(348); + __webpack_require__(365); + __webpack_require__(366); - __webpack_require__(350); - __webpack_require__(351); - __webpack_require__(352); - __webpack_require__(353); - __webpack_require__(358); - __webpack_require__(359); + __webpack_require__(368); + __webpack_require__(369); + __webpack_require__(370); + __webpack_require__(371); + __webpack_require__(376); /***/ }, -/* 346 */ +/* 365 */ /***/ function(module, exports, __webpack_require__) { - var featureManager = __webpack_require__(347); + var featureManager = __webpack_require__(313); var zrUtil = __webpack_require__(4); var ToolboxModel = __webpack_require__(1).extendComponentModel({ @@ -56255,44 +59991,24 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 347 */ -/***/ function(module, exports) { - - 'use strict'; - - - var features = {}; - - module.exports = { - register: function (name, ctor) { - features[name] = ctor; - }, - - get: function (name) { - return features[name]; - } - }; - - -/***/ }, -/* 348 */ +/* 366 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) { - var featureManager = __webpack_require__(347); + var featureManager = __webpack_require__(313); var zrUtil = __webpack_require__(4); var graphic = __webpack_require__(43); var Model = __webpack_require__(8); var DataDiffer = __webpack_require__(97); - var listComponentHelper = __webpack_require__(273); + var listComponentHelper = __webpack_require__(276); var textContain = __webpack_require__(14); module.exports = __webpack_require__(1).extendComponentView({ type: 'toolbox', - render: function (toolboxModel, ecModel, api) { + render: function (toolboxModel, ecModel, api, payload) { var group = this.group; group.removeAll(); @@ -56375,7 +60091,7 @@ return /******/ (function(modules) { // webpackBootstrap }; if (feature.render) { - feature.render(featureModel, ecModel, api); + feature.render(featureModel, ecModel, api, payload); } } @@ -56494,6 +60210,18 @@ return /******/ (function(modules) { // webpackBootstrap }); }, + updateView: function (toolboxModel, ecModel, api, payload) { + zrUtil.each(this._features, function (feature) { + feature.updateView && feature.updateView(feature.model, ecModel, api, payload); + }); + }, + + updateLayout: function (toolboxModel, ecModel, api, payload) { + zrUtil.each(this._features, function (feature) { + feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload); + }); + }, + remove: function (ecModel, api) { zrUtil.each(this._features, function (feature) { feature.remove && feature.remove(ecModel, api); @@ -56513,10 +60241,10 @@ return /******/ (function(modules) { // webpackBootstrap } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(349))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(367))) /***/ }, -/* 349 */ +/* 367 */ /***/ function(module, exports) { // shim for using process in browser @@ -56641,7 +60369,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 350 */ +/* 368 */ /***/ function(module, exports, __webpack_require__) { @@ -56705,7 +60433,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - __webpack_require__(347).register( + __webpack_require__(313).register( 'saveAsImage', SaveAsImage ); @@ -56713,7 +60441,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 351 */ +/* 369 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -56881,13 +60609,13 @@ return /******/ (function(modules) { // webpackBootstrap ecModel.mergeOption(payload.newOption); }); - __webpack_require__(347).register('magicType', MagicType); + __webpack_require__(313).register('magicType', MagicType); module.exports = MagicType; /***/ }, -/* 352 */ +/* 370 */ /***/ function(module, exports, __webpack_require__) { /** @@ -57334,7 +61062,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } - __webpack_require__(347).register('dataView', DataView); + __webpack_require__(313).register('dataView', DataView); __webpack_require__(1).registerAction({ type: 'changeDataView', @@ -57370,54 +61098,38 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 353 */ +/* 371 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var zrUtil = __webpack_require__(4); - var numberUtil = __webpack_require__(7); var BrushController = __webpack_require__(232); - var BoundingRect = __webpack_require__(15); - var Group = __webpack_require__(30); - var history = __webpack_require__(354); + var brushHelper = __webpack_require__(308); + var history = __webpack_require__(372); var each = zrUtil.each; - var asc = numberUtil.asc; // Use dataZoomSelect - __webpack_require__(355); + __webpack_require__(373); // Spectial component id start with \0ec\0, see echarts/model/Global.js~hasInnerId var DATA_ZOOM_ID_BASE = '\0_ec_\0toolbox-dataZoom_'; function DataZoom(model, ecModel, api) { - this.model = model; - this.ecModel = ecModel; - this.api = api; - var zr = api.getZr(); - - /** - * @private - * @type {module:zrender/container/Group} - */ - var controllerGroup = this._controllerGroup = new Group(); - zr.add(controllerGroup); - /** * @private * @type {module:echarts/component/helper/BrushController} */ - (this._brushController = new BrushController(zr)) + (this._brushController = new BrushController(api.getZr())) .on('brush', zrUtil.bind(this._onBrush, this)) - .mount(controllerGroup, false); + .mount(); /** - * Is zoom active. * @private - * @type {Object} + * @type {boolean} */ this._isZoomActive; } @@ -57437,7 +61149,12 @@ return /******/ (function(modules) { // webpackBootstrap var proto = DataZoom.prototype; - proto.render = function (featureModel, ecModel, api) { + proto.render = function (featureModel, ecModel, api, payload) { + this.model = featureModel; + this.ecModel = ecModel; + this.api = api; + + updateZoomBtnStatus(featureModel, ecModel, this, payload); updateBackBtnStatus(featureModel, ecModel); }; @@ -57450,9 +61167,7 @@ return /******/ (function(modules) { // webpackBootstrap }; proto.dispose = function (ecModel, api) { - var zr = api.getZr(); this._brushController.dispose(); - this._controllerGroup && zr.remove(this._controllerGroup); }; /** @@ -57462,160 +61177,114 @@ return /******/ (function(modules) { // webpackBootstrap zoom: function () { var nextActive = !this._isZoomActive; - var controller = this._brushController; - - if (nextActive) { - this._isZoomActive = nextActive; - this.model.setIconStatus('zoom', 'emphasis'); - - controller.enableBrush({ - brushType: 'rect', - brushStyle: { - // FIXME - // user customized? - lineWidth: 3, - stroke: '#333', - fill: 'rgba(0,0,0,0.2)' - }, - // FIXME - // 是否应通过触发 action 的方式来互斥而非 onRelease? - onRelease: zrUtil.bind(onRelease, this) - }); - } - else { - controller.enableBrush(false); - } - function onRelease() { - this.model.setIconStatus('zoom', 'normal'); - this._isZoomActive = false; - } + this.api.dispatchAction({ + type: 'takeGlobalCursor', + key: 'dataZoomSelect', + dataZoomSelectActive: nextActive + }); }, back: function () { - this._dispatchAction(history.pop(this.ecModel)); + this._dispatchZoomAction(history.pop(this.ecModel)); } }; - function prepareCoordInfo(grid, ecModel) { - // Default use the first axis. - // FIXME - var coordInfo = [ - {axisModel: grid.getAxis('x').model, axisIndex: 0}, // x - {axisModel: grid.getAxis('y').model, axisIndex: 0} // y - ]; - coordInfo.grid = grid; - - ecModel.eachComponent( - {mainType: 'dataZoom', subType: 'select'}, - function (dzModel, dataZoomIndex) { - if (isTheAxis('xAxis', coordInfo[0].axisModel, dzModel, ecModel)) { - coordInfo[0].dataZoomModel = dzModel; - } - if (isTheAxis('yAxis', coordInfo[1].axisModel, dzModel, ecModel)) { - coordInfo[1].dataZoomModel = dzModel; - } - } - ); - - return coordInfo; - } - - function isTheAxis(axisName, axisModel, dataZoomModel, ecModel) { - var axisIndex = dataZoomModel.get(axisName + 'Index'); - return axisIndex != null - && ecModel.getComponent(axisName, axisIndex) === axisModel; - } - /** * @private */ - proto._onBrush = function (brushRanges, isEnd) { - if (!isEnd || !brushRanges.length) { + proto._onBrush = function (areas, opt) { + if (!opt.isEnd || !areas.length) { return; } - var brushRange = brushRanges[0]; - - this._brushController.updateCovers([]); // remove cover - var snapshot = {}; var ecModel = this.ecModel; - // FIXME - // polar + this._brushController.updateCovers([]); // remove cover - ecModel.eachComponent('grid', function (gridModel, gridIndex) { - var grid = gridModel.coordinateSystem; - var coordInfo = prepareCoordInfo(grid, ecModel); - var selDataRange = pointToDataInCartesian(brushRange, coordInfo); + var coordInfoList = brushHelper.makeCoordInfoList( + retrieveAxisSetting(this.model.option), ecModel + ); + var rangesCoordInfoList = []; + brushHelper.parseOutputRanges(areas, coordInfoList, ecModel, rangesCoordInfoList); - if (selDataRange) { - var xBatchItem = scaleCartesianAxis(selDataRange, coordInfo, 0, 'x'); - var yBatchItem = scaleCartesianAxis(selDataRange, coordInfo, 1, 'y'); + var area = areas[0]; // dataZoom can not multiple area. + var coordInfo = rangesCoordInfoList[0]; + var coordRange = area.coordRange; + var brushType = area.brushType; - xBatchItem && (snapshot[xBatchItem.dataZoomId] = xBatchItem); - yBatchItem && (snapshot[yBatchItem.dataZoomId] = yBatchItem); + if (coordInfo && coordRange) { + if (brushType === 'rect') { + setBatch('xAxis', coordRange[0], coordInfo); + setBatch('yAxis', coordRange[1], coordInfo); } - }, this); + else { + var axisNames = {lineX: 'xAxis', lineY: 'yAxis'}; + setBatch(axisNames[brushType], coordRange, coordInfo); + } + } history.push(ecModel, snapshot); - this._dispatchAction(snapshot); - }; - - function pointToDataInCartesian(brushRange, coordInfo) { - var grid = coordInfo.grid; - var range = brushRange.range; + this._dispatchZoomAction(snapshot); - var selRect = new BoundingRect( - range[0][0], - range[1][0], - range[0][1] - range[0][0], - range[1][1] - range[1][0] - ); - if (!selRect.intersect(grid.getRect())) { - return; + function setBatch(axisName, minMax, coordInfo) { + var dataZoomModel = findDataZoom(axisName, coordInfo[axisName], ecModel); + if (dataZoomModel) { + snapshot[dataZoomModel.id] = { + dataZoomId: dataZoomModel.id, + startValue: minMax[0], + endValue: minMax[1] + }; + } } - var cartesian = grid.getCartesian(coordInfo[0].axisIndex, coordInfo[1].axisIndex); - var dataLeftTop = cartesian.pointToData([range[0][0], range[1][0]], true); - var dataRightBottom = cartesian.pointToData([range[0][1], range[1][1]], true); - - return [ - asc([dataLeftTop[0], dataRightBottom[0]]), // x, using asc to handle inverse - asc([dataLeftTop[1], dataRightBottom[1]]) // y, using asc to handle inverse - ]; - } - function scaleCartesianAxis(selDataRange, coordInfo, dimIdx, dimName) { - var dimCoordInfo = coordInfo[dimIdx]; - var dataZoomModel = dimCoordInfo.dataZoomModel; - - if (dataZoomModel) { - return { - dataZoomId: dataZoomModel.id, - startValue: selDataRange[dimIdx][0], - endValue: selDataRange[dimIdx][1] - }; + function findDataZoom(axisName, axisModel, ecModel) { + var dataZoomModel; + ecModel.eachComponent( + {mainType: 'dataZoom', subType: 'select'}, + function (dzModel, dataZoomIndex) { + var axisIndex = dzModel.get(axisName + 'Index'); + if (axisIndex != null + && ecModel.getComponent(axisName, axisIndex) === axisModel + ) { + dataZoomModel = dzModel; + } + } + ); + return dataZoomModel; } - } + }; /** * @private */ - proto._dispatchAction = function (snapshot) { + proto._dispatchZoomAction = function (snapshot) { var batch = []; - each(snapshot, function (batchItem) { - batch.push(batchItem); + // Convert from hash map to array. + each(snapshot, function (batchItem, dataZoomId) { + batch.push(zrUtil.clone(batchItem)); }); batch.length && this.api.dispatchAction({ type: 'dataZoom', from: this.uid, - batch: zrUtil.clone(batch, true) + batch: batch }); }; + function retrieveAxisSetting(option) { + var setting = {}; + // Compatible with previous setting: null => all axis, false => no axis. + zrUtil.each(['xAxisIndex', 'yAxisIndex'], function (name) { + setting[name] = option[name]; + setting[name] == null && (setting[name] = 'all'); + (setting[name] === false || setting[name] === 'none') && (setting[name] = []); + }); + return setting; + } + function updateBackBtnStatus(featureModel, ecModel) { featureModel.setIconStatus( 'back', @@ -57623,8 +61292,45 @@ return /******/ (function(modules) { // webpackBootstrap ); } + function updateZoomBtnStatus(featureModel, ecModel, view, payload) { + var zoomActive = view._isZoomActive; + + if (payload && payload.type === 'takeGlobalCursor') { + zoomActive = payload.key === 'dataZoomSelect' + ? payload.dataZoomSelectActive : false; + } + + view._isZoomActive = zoomActive; - __webpack_require__(347).register('dataZoom', DataZoom); + featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal'); + + var coordInfoList = brushHelper.makeCoordInfoList( + retrieveAxisSetting(featureModel.option), ecModel + ); + var brushType = (coordInfoList.xAxisHas && !coordInfoList.yAxisHas) + ? 'lineX' + : (!coordInfoList.xAxisHas && coordInfoList.yAxisHas) + ? 'lineY' + : 'rect'; + + view._brushController + .setPanels(brushHelper.makePanelOpts(coordInfoList)) + .enableBrush( + zoomActive + ? { + brushType: brushType, + brushStyle: { // FIXME user customized? + lineWidth: 0, + // stroke: '#333', + fill: 'rgba(0,0,0,0.2)' + } + } + : false + ); + } + + + __webpack_require__(313).register('dataZoom', DataZoom); // Create special dataZoom option for select @@ -57657,14 +61363,19 @@ return /******/ (function(modules) { // webpackBootstrap return; } + // Try not to modify model, because it is not merged yet. var axisIndicesName = axisName + 'Index'; var givenAxisIndices = dataZoomOpt[axisIndicesName]; - if (givenAxisIndices != null && !zrUtil.isArray(givenAxisIndices)) { - givenAxisIndices = givenAxisIndices === false ? [] : [givenAxisIndices]; + if (givenAxisIndices != null + && givenAxisIndices != 'all' + && !zrUtil.isArray(givenAxisIndices) + ) { + givenAxisIndices = (givenAxisIndices === false || givenAxisIndices === 'none') ? [] : [givenAxisIndices]; } forEachComponent(axisName, function (axisOpt, axisIndex) { if (givenAxisIndices != null + && givenAxisIndices != 'all' && zrUtil.indexOf(givenAxisIndices, axisIndex) === -1 ) { return; @@ -57695,7 +61406,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 354 */ +/* 372 */ /***/ function(module, exports, __webpack_require__) { /** @@ -57809,7 +61520,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 355 */ +/* 373 */ /***/ function(module, exports, __webpack_require__) { /** @@ -57817,21 +61528,21 @@ return /******/ (function(modules) { // webpackBootstrap */ - __webpack_require__(295); + __webpack_require__(316); - __webpack_require__(296); - __webpack_require__(298); + __webpack_require__(317); + __webpack_require__(319); - __webpack_require__(356); - __webpack_require__(357); + __webpack_require__(374); + __webpack_require__(375); - __webpack_require__(306); - __webpack_require__(307); + __webpack_require__(326); + __webpack_require__(327); /***/ }, -/* 356 */ +/* 374 */ /***/ function(module, exports, __webpack_require__) { /** @@ -57839,7 +61550,7 @@ return /******/ (function(modules) { // webpackBootstrap */ - var DataZoomModel = __webpack_require__(296); + var DataZoomModel = __webpack_require__(317); module.exports = DataZoomModel.extend({ @@ -57850,12 +61561,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 357 */ +/* 375 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(298).extend({ + module.exports = __webpack_require__(319).extend({ type: 'dataZoom.select' @@ -57864,13 +61575,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 358 */ +/* 376 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var history = __webpack_require__(354); + var history = __webpack_require__(372); function Restore(model) { this.model = model; @@ -57894,7 +61605,7 @@ return /******/ (function(modules) { // webpackBootstrap }; - __webpack_require__(347).register('restore', Restore); + __webpack_require__(313).register('restore', Restore); __webpack_require__(1).registerAction( @@ -57908,133 +61619,16 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 359 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - - var featureManager = __webpack_require__(347); - var zrUtil = __webpack_require__(4); - - function Brush(model, ecModel, api) { - this.model = model; - this.ecModel = ecModel; - this.api = api; - - /** - * @private - * @type {string} - */ - this._brushType; - - /** - * @private - * @type {string} - */ - this._brushMode; - } - - Brush.defaultOption = { - show: true, - type: ['rect', 'polygon', 'keep', 'clear'], - icon: { - // FIXME - rect: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1', - // FIXME - polygon: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1', - // FIXME - keep: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5', - // FIXME - clear: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5' - }, - title: { - rect: '矩形选择', - polygon: '圈选', - keep: '保持选择', - clear: '清除选择' - } - }; - - var proto = Brush.prototype; - - proto.render = function (featureModel, ecModel, api) { - var brushType; - var brushMode; - - ecModel.eachComponent({mainType: 'brush'}, function (brushModel) { - brushType = brushModel.brushType; - brushMode = brushModel.brushOption.brushMode || 'single'; - }); - - this._brushType = brushType; - this._brushMode = brushMode; - - zrUtil.each(featureModel.get('type', true), function (type) { - if (type !== 'clear' && type !== 'keep') { - featureModel.setIconStatus(type, type === brushType ? 'emphasis' : 'normal'); - } - if (type === 'keep') { - featureModel.setIconStatus(type, brushMode === 'multiple' ? 'emphasis' : 'normal'); - } - }); - }; - - proto.getIcons = function () { - var model = this.model; - var availableIcons = model.get('icon', true); - var icons = {}; - zrUtil.each(model.get('type', true), function (type) { - if (availableIcons[type]) { - icons[type] = availableIcons[type]; - } - }); - return icons; - }; - - proto.onclick = function (ecModel, api, type) { - var api = this.api; - var brushType = this._brushType; - var brushMode = this._brushMode; - - if (type === 'clear') { - api.dispatchAction({ - type: 'brush', - // Clear all brushRanges of all brush components. - brushRanges: [] - }); - } - else { - api.dispatchAction({ - type: 'enableBrush', - brushOption: { - brushType: type === 'keep' - ? brushType - : (brushType === type ? false : type), - brushMode: type === 'keep' - ? (brushMode === 'multiple' ? 'single' : 'multiple') - : brushMode - } - }); - } - }; - - featureManager.register('brush', Brush); - - module.exports = Brush; - - -/***/ }, -/* 360 */ +/* 377 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(361); - __webpack_require__(81).registerPainter('vml', __webpack_require__(363)); + __webpack_require__(378); + __webpack_require__(81).registerPainter('vml', __webpack_require__(380)); /***/ }, -/* 361 */ +/* 378 */ /***/ function(module, exports, __webpack_require__) { // http://www.w3.org/TR/NOTE-VML @@ -58055,7 +61649,7 @@ return /******/ (function(modules) { // webpackBootstrap var Gradient = __webpack_require__(61); - var vmlCore = __webpack_require__(362); + var vmlCore = __webpack_require__(379); var round = Math.round; var sqrt = Math.sqrt; @@ -58253,15 +61847,15 @@ return /******/ (function(modules) { // webpackBootstrap }; var updateStrokeNode = function (el, style) { - if (style.lineJoin != null) { - el.joinstyle = style.lineJoin; - } - if (style.miterLimit != null) { - el.miterlimit = style.miterLimit * Z; - } - if (style.lineCap != null) { - el.endcap = style.lineCap; - } + // if (style.lineJoin != null) { + // el.joinstyle = style.lineJoin; + // } + // if (style.miterLimit != null) { + // el.miterlimit = style.miterLimit * Z; + // } + // if (style.lineCap != null) { + // el.endcap = style.lineCap; + // } if (style.lineDash != null) { el.dashstyle = style.lineDash.join(' '); } @@ -58871,6 +62465,7 @@ return /******/ (function(modules) { // webpackBootstrap // FIXME encodeHtmlAttribute ? var font = fontStyle.style + ' ' + fontStyle.variant + ' ' + fontStyle.weight + ' ' + fontStyle.size + 'px "' + fontStyle.family + '"'; + var baseline = style.textBaseline; var verticalAlign = style.textVerticalAlign; @@ -59091,7 +62686,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 362 */ +/* 379 */ /***/ function(module, exports, __webpack_require__) { @@ -59144,7 +62739,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 363 */ +/* 380 */ /***/ function(module, exports, __webpack_require__) { /** @@ -59156,7 +62751,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrLog = __webpack_require__(40); - var vmlCore = __webpack_require__(362); + var vmlCore = __webpack_require__(379); function parseInt10(val) { return parseInt(val, 10); @@ -59297,6 +62892,10 @@ return /******/ (function(modules) { // webpackBootstrap return this._height; }, + clear: function () { + this.root.removeChild(this.vmlViewport); + }, + _getWidth: function () { var root = this.root; var stl = root.currentStyle; diff --git a/dist/echarts.min.js b/dist/echarts.min.js index a9adc2e992..85df0a1058 100644 --- a/dist/echarts.min.js +++ b/dist/echarts.min.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.echarts=e():t.echarts=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(2),i(91),i(85),i(96),i(171),i(294),i(283),i(304),i(259),i(255),i(251),i(290),i(299),i(237),i(242),i(248),i(279),i(272),i(36),i(184),i(208),i(319),i(316),i(224),i(198),i(174),i(332),i(191),i(190),i(189),i(323),i(199),i(216)},function(t,e){function i(t){if("object"==typeof t&&null!==t){var e=t;if(t instanceof Array){e=[];for(var n=0,r=t.length;r>n;n++)e[n]=i(t[n])}else if(!M(t)&&!I(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=i(t[o]))}return e}return t}function n(t,e,r){if(!S(e)||!S(t))return r?i(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!S(s)||!S(a)||_(s)||_(a)||I(s)||I(a)||M(s)||M(a)?!r&&o in t||(t[o]=i(e[o],!0)):n(a,s,r)}return t}function r(t,e){for(var i=t[0],r=1,o=t.length;o>r;r++)i=n(i,t[r],e);return i}function o(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function a(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return document.createElement("canvas")}function l(){return C||(C=N.createCanvas().getContext("2d")),C}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,a(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===z)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===R)return t.map(e,i);for(var n=[],r=0,o=t.length;o>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===V)return t.reduce(e,i,n);for(var r=0,o=t.length;o>r;r++)i=e.call(n,i,t[r],r,t);return i}}function m(t,e,i){if(t&&e){if(t.filter&&t.filter===O)return t.filter(e,i);for(var n=[],r=0,o=t.length;o>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function v(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=E.call(arguments,2);return function(){return t.apply(e,i.concat(E.call(arguments)))}}function x(t){var e=E.call(arguments,1);return function(){return t.apply(this,e.concat(E.call(arguments)))}}function _(t){return"[object Array]"===P.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===P.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!D[P.call(t)]}function I(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function A(t){for(var e=0,i=arguments.length;i>e;e++)if(null!=arguments[e])return arguments[e]}function T(){return Function.call.apply(E,arguments)}function L(t,e){if(!t)throw new Error(e)}var C,D={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},P=Object.prototype.toString,k=Array.prototype,z=k.forEach,O=k.filter,E=k.slice,R=k.map,V=k.reduce,N={inherits:u,mixin:c,clone:i,merge:n,mergeAll:r,extend:o,defaults:a,getContext:l,createCanvas:s,indexOf:h,slice:T,find:v,isArrayLike:d,each:f,map:p,reduce:g,filter:m,bind:y,curry:x,isArray:_,isString:w,isObject:S,isFunction:b,isBuildInObject:M,isDom:I,retrieve:A,assert:L,noop:function(){}};t.exports=N},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),D.prototype[t].call(this,e,i,n)}}function r(){D.call(this)}function o(t,e,i){function n(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=Q[e]),this.id,this.group,this._dom=t,this._zr=T.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio}),this._theme=L.clone(e),this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._api=new x(this),this._coordSysMgr=new _,this._finalEvents=[],D.call(this),this._messageCenter=new r,this._initEvents(),this.resize=L.bind(this.resize,this),P(K,n),P(X,n)}function a(t,e){var i=this._model;i&&i.eachComponent({mainType:"series",query:e},function(n,r){var o=this._chartsMap[n.__viewId];o&&o.__alive&&o[t](n,i,this._api,e)},this)}function s(){this[F]||(this[F]=1,k(this._finalEvents,function(t){this.trigger(t.type,t)},this),this[F]=0)}function l(t,e,i){var n=this._api;k(this._componentsViews,function(r){var o=r.__model;r[t](o,e,n,i),g(o,r)},this),e.eachSeries(function(r,o){var a=this._chartsMap[r.__viewId];a[t](r,e,n,i),g(r,a)},this)}function h(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,r=i?this._componentsMap:this._chartsMap,o=this._zr,a=0;ar.get("progressiveThreshold")&&l&&!v.node;h&&a.group.traverse(function(t){"group"!==t.type&&(t.progressive=h?Math.floor(s++/l):-1,h&&t.stopAnimation(!0))})},this),n>t.get("hoverLayerThreshold")&&!v.node&&this._zr.storage.traverse(function(t){"group"!==t.type&&(t.useHoverLayer=!0)}),k(this._chartsViews,function(e){e.__alive||e.remove(t,i)},this)}function g(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function m(t){function e(t,e){for(var i=0;in;n++)e[n]=i(t[n])}else if(!M(t)&&!A(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=i(t[o]))}return e}return t}function n(t,e,r){if(!S(e)||!S(t))return r?i(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!S(s)||!S(a)||_(s)||_(a)||A(s)||A(a)||M(s)||M(a)?!r&&o in t||(t[o]=i(e[o],!0)):n(a,s,r)}return t}function r(t,e){for(var i=t[0],r=1,o=t.length;o>r;r++)i=n(i,t[r],e);return i}function o(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function a(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return document.createElement("canvas")}function l(){return C||(C=N.createCanvas().getContext("2d")),C}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,a(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===z)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===R)return t.map(e,i);for(var n=[],r=0,o=t.length;o>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===V)return t.reduce(e,i,n);for(var r=0,o=t.length;o>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===O)return t.filter(e,i);for(var n=[],r=0,o=t.length;o>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=E.call(arguments,2);return function(){return t.apply(e,i.concat(E.call(arguments)))}}function x(t){var e=E.call(arguments,1);return function(){return t.apply(this,e.concat(E.call(arguments)))}}function _(t){return"[object Array]"===P.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===P.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!D[P.call(t)]}function A(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function I(t){for(var e=0,i=arguments.length;i>e;e++)if(null!=arguments[e])return arguments[e]}function T(){return Function.call.apply(E,arguments)}function L(t,e){if(!t)throw new Error(e)}var C,D={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},P=Object.prototype.toString,k=Array.prototype,z=k.forEach,O=k.filter,E=k.slice,R=k.map,V=k.reduce,N={inherits:h,mixin:c,clone:i,merge:n,mergeAll:r,extend:o,defaults:a,getContext:l,createCanvas:s,indexOf:u,slice:T,find:m,isArrayLike:d,each:f,map:p,reduce:g,filter:v,bind:y,curry:x,isArray:_,isString:w,isObject:S,isFunction:b,isBuildInObject:M,isDom:A,retrieve:I,assert:L,noop:function(){}};t.exports=N},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),P.prototype[t].call(this,e,i,n)}}function r(){P.call(this)}function o(t,e,i){function n(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=K[e]),this.id,this.group,this._dom=t,this._zr=L.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio}),this._theme=C.clone(e),this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._api=new _(this),this._coordSysMgr=new b,P.call(this),this._messageCenter=new r,this._initEvents(),this.resize=C.bind(this.resize,this),this._pendingActions=[],k(Q,n),k(Y,n)}function a(t,e){var i=this._model;i&&i.eachComponent({mainType:"series",query:e},function(n,r){var o=this._chartsMap[n.__viewId];o&&o.__alive&&o[t](n,i,this._api,e)},this)}function s(t,e,i){var n=this._api;z(this._componentsViews,function(r){var o=r.__model;r[t](o,e,n,i),v(o,r)},this),e.eachSeries(function(r,o){var a=this._chartsMap[r.__viewId];a[t](r,e,n,i),v(r,a),g(r,a)},this),p(this._zr,e)}function l(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,r=i?this._componentsMap:this._chartsMap,o=this._zr,a=0;ae.get("hoverLayerThreshold")&&!y.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function g(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),r=i>t.get("progressiveThreshold")&&n&&!y.node;r&&e.group.traverse(function(t){t.isGroup||(t.progressive=r?Math.floor(i++/n):-1,r&&t.stopAnimation(!0))});var o=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.setStyle("blend",o)})}function v(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function m(t){function e(t,e){for(var i=0;i0?e.animateTo(i,l,u||0,h,o):(e.attr(i),o&&o())}else e.attr(i),o&&o()}var m=i(1),v=i(162),y=Math.round,x=i(6),_=i(17),b=i(19),w=i(5),S=(i(30),{});S.Group=i(28),S.Image=i(48),S.Text=i(72),S.Circle=i(153),S.Sector=i(159),S.Ring=i(158),S.Polygon=i(155),S.Polyline=i(156),S.Rect=i(157),S.Line=i(154),S.BezierCurve=i(152),S.Arc=i(151),S.CompoundPath=i(145),S.LinearGradient=i(82),S.RadialGradient=i(147),S.BoundingRect=i(7),S.extendShape=function(t){return x.extend(t)},S.extendPath=function(t,e){return v.extendFromString(t,e)},S.makePath=function(t,e,i,n){var r=v.createFromString(t,e),o=r.getBoundingRect();if(i){var a=o.width/o.height;if("center"===n){var s,l=i.height*a;l<=i.width?s=i.height:(l=i.width,s=l/a);var h=i.x+i.width/2,u=i.y+i.height/2;i.x=h-l/2,i.y=u-s/2,i.width=l,i.height=s}this.resizePath(r,i)}return r},S.mergePath=v.mergePath,S.resizePath=function(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}},S.subPixelOptimizeLine=function(t){var e=S.subPixelOptimize,i=t.shape,n=t.style.lineWidth;return y(2*i.x1)===y(2*i.x2)&&(i.x1=i.x2=e(i.x1,n,!0)),y(2*i.y1)===y(2*i.y2)&&(i.y1=i.y2=e(i.y1,n,!0)),t},S.subPixelOptimizeRect=function(t){var e=S.subPixelOptimize,i=t.shape,n=t.style.lineWidth,r=i.x,o=i.y,a=i.width,s=i.height;return i.x=e(i.x,n,!0),i.y=e(i.y,n,!0),i.width=Math.max(e(r+a,n,!1)-i.x,0===a?0:1),i.height=Math.max(e(o+s,n,!1)-i.y,0===s?0:1),t},S.subPixelOptimize=function(t,e,i){var n=y(2*t);return(n+y(e))%2===0?n/2:(n+(i?1:-1))/2},S.setHoverStyle=function(t,e){"group"===t.type?t.traverse(function(t){"group"!==t.type&&u(t,e)}):u(t,e),t.on("mouseover",c).on("mouseout",d),t.on("emphasis",f).on("normal",p)},S.setText=function(t,e,i){var n=e.getShallow("position")||"inside",r=n.indexOf("inside")>=0?"white":i,o=e.getModel("textStyle");m.extend(t,{textDistance:e.getShallow("distance")||5,textFont:o.getFont(),textPosition:n,textFill:o.getTextColor()||r})},S.updateProps=function(t,e,i,n,r){g(!0,t,e,i,n,r)},S.initProps=function(t,e,i,n,r){g(!1,t,e,i,n,r)},S.getTransform=function(t,e){for(var i=b.identity([]);t&&t!==e;)b.mul(i,t.getLocalTransform(),i),t=t.parent;return i},S.applyTransform=function(t,e,i){return i&&(e=b.invert([],e)),w.applyTransform([],t,e)},S.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return o=S.applyTransform(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},t.exports=S},function(t,e){function i(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}var n={},r=1e-4;n.linearMap=function(t,e,i,n){var r=e[1]-e[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]},n.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?i(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},n.round=function(t){return+(+t).toFixed(10)},n.asc=function(t){return t.sort(function(t,e){return t-e}),t},n.getPrecision=function(t){if(isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},n.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n);return Math.max(-r+o,0)},n.MAX_SAFE_INTEGER=9007199254740991,n.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},n.isRadianAroundZero=function(t){return t>-r&&r>t},n.parseDate=function(t){return t instanceof Date?t:new Date("string"==typeof t?new Date(t.replace(/-/g,"/"))-new Date("1970/01/01"):Math.round(t))},n.quantity=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},n.nice=function(t,e){var i,r=n.quantity(t),o=t/r;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,i*r},t.exports=n},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(t,e){var n=new i(2);return n[0]=t||0,n[1]=e||0,n},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},normalize:function(t,e){var i=n.len(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}};n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t.exports=n},function(t,e,i){function n(t){r.call(this,t),this.path=new a}var r=i(37),o=i(1),a=i(29),s=i(141),l=i(146),h=l.prototype.getCanvasPattern,u=Math.abs;n.prototype={constructor:n,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path,r=i.hasStroke(),o=i.hasFill(),a=i.fill,s=i.stroke,l=o&&!!a.colorStops,u=r&&!!s.colorStops,c=o&&!!a.image,d=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f=this.getBoundingRect();l&&(this._fillGradient=i.getGradient(t,a,f)),u&&(this._strokeGradient=i.getGradient(t,s,f))}l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=h.call(a,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=h.call(s,t));var p=i.lineDash,g=i.lineDashOffset,m=!!t.setLineDash,v=this.getGlobalScale();n.setScale(v[0],v[1]),this.__dirtyPath||p&&!m&&r?(n=this.path.beginPath(t),p&&!m&&(n.setLineDash(p),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),o&&n.fill(t),p&&m&&(t.setLineDash(p),t.lineDashOffset=g),r&&n.stroke(t),p&&m&&t.setLineDash([]),this.restoreTransform(t),(i.text||0===i.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),s.containStroke(o,a/l,t,e)))return!0}if(r.hasFill())return s.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(o.isObject(t))for(var n in t)i[n]=t[n];else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&u(t[0]-1)>1e-10&&u(t[3]-1)>1e-10?Math.sqrt(u(t[0]*t[3]-t[2]*t[1])):1}},n.extend=function(t){var e=function(e){n.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var o in i)!r.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(r[o]=i[o])}t.init&&t.init.call(this,e)};o.inherits(e,n);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},o.inherits(n,r),t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){this.x=t,this.y=e,this.width=i,this.height=n}var r=i(5),o=i(19),a=r.applyTransform,s=Math.min,l=Math.abs,h=Math.max;n.prototype={constructor:n,union:function(t){var e=s(t.x,this.x),i=s(t.y,this.y);this.width=h(t.x+t.width,this.x+this.width)-e,this.height=h(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[];return function(i){i&&(t[0]=this.x,t[1]=this.y,e[0]=this.x+this.width,e[1]=this.y+this.height,a(t,t,i),a(e,e,i),this.x=s(t[0],e[0]),this.y=s(t[1],e[1]),this.width=l(e[0]-t[0]),this.height=l(e[1]-t[1]))}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=o.create();return o.translate(r,r,[-e.x,-e.y]),o.scale(r,r,[i,n]),o.translate(r,r,[t.x,t.y]),r},intersect:function(t){var e=this,i=e.x,n=e.x+e.width,r=e.y,o=e.y+e.height,a=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(a>n||i>s||l>o||r>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new n(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},t.exports=n},function(t,e,i){var n=i(9),r=i(4),o=i(1),a=["x","y","z","radius","angle"],s={};s.createNameEach=function(t,e){t=t.slice();var i=o.map(t,s.capitalFirst);e=(e||[]).slice();var n=o.map(e,s.capitalFirst);return function(r,a){o.each(t,function(t,o){for(var s={name:t,capital:i[o]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function a(t,n){n.nodes.push(t),e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function o(t){!n(t,s)&&r(t,s)&&(a(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;a(i,s);var l;do l=!1,t(o);while(l);return s}},s.defaultEmphasis=function(t,e){if(t){var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{};o.each(e,function(t){var e=o.retrieve(i[t],n[t]);null!=e&&(i[t]=e)})}},s.LABEL_OPTIONS=["position","show","textStyle","distance","formatter"],s.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},s.isDataItemOption=function(t){return o.isObject(t)&&!(t instanceof Array)},s.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isFinite(t)||null==t||"-"===t||(t=+r.parseDate(t)),null==t||""===t?NaN:+t)},s.dataFormatMixin={getDataParams:function(t,e){var i=this.getData(e),n=this.seriesIndex,r=this.name,o=this.getRawValue(t,e),a=i.getRawIndex(t),s=i.getName(t,!0),l=i.getRawDataItem(t);return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:n,seriesName:r,name:s,dataIndex:a,data:l,dataType:e,value:o,color:i.getItemVisual(t,"color"),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,r){e=e||"normal";var o=this.getData(i),a=o.getItemModel(t),s=this.getDataParams(t,i);null!=r&&s.value instanceof Array&&(s.value=s.value[r]);var l=a.get(["label",e,"formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?n.formatTpl(l,s):void 0},getRawValue:function(t,e){var i=this.getData(e),n=i.getRawDataItem(t);return null!=n?!o.isObject(n)||n instanceof Array?n:n.value:void 0},formatTooltip:o.noop},s.mappingToExists=function(t,e){e=(e||[]).slice();var i=o.map(t||[],function(t,e){return{exist:t}});return o.each(e,function(t,n){if(o.isObject(t))for(var r=0;r=i.length&&i.push({option:t})}}),i},s.isIdInner=function(t){return o.isObject(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")},s.compressBatches=function(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var o=t[n].seriesId,a=s.normalizeToArray(t[n].dataIndex),l=i&&i[o],h=0,u=a.length;u>h;h++){var c=a[h];l&&l[c]?l[c]=null:(e[o]||(e[o]={}))[c]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var o=n(t[r],!0);o.length&&i.push({seriesId:r,dataIndex:o})}return i}var r={},o={};return i(t||[],r),i(e||[],o,r),[n(r),n(o)]},t.exports=s},function(t,e,i){function n(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function r(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function o(t){var e=t.length;return"number"==typeof t?[t,t,t,t]:2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function a(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function s(t,e){return"{"+t+(null==e?"":e)+"}"}function l(t,e){c.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars,r=0;ra;a++)for(var l=0;lt?"0"+t:t}var c=i(1),d=i(4),f=["a","b","c","d","e","f","g"];t.exports={normalizeCssArray:o,addCommas:n,toCamelCase:r,encodeHTML:a,formatTpl:l,formatTime:h}},function(t,e,i){function n(t){var e=[];return o.each(u.getClassesByMainType(t),function(t){a.apply(e,t.prototype.dependencies||[])}),o.map(e,function(t){return l.parseClassType(t).main})}var r=i(12),o=i(1),a=Array.prototype.push,s=i(42),l=i(20),h=i(14),u=r.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,init:function(t,e,i,n){this.mergeDefaultAndTheme(this.option,this.ecModel)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?h.getLayoutParams(t):{},r=e.getTheme();o.merge(t,r.get(this.mainType)),o.merge(t,this.getDefaultOption()),i&&h.mergeLayoutParam(t,n,i)},mergeOption:function(t){o.merge(this.option,t,!0);var e=this.layoutMode;e&&h.mergeLayoutParam(this.option,t,e)},optionUpdated:function(t,e){},getDefaultOption:function(){if(!this.hasOwnProperty("__defaultOption")){for(var t=[],e=this.constructor;e;){var i=e.prototype.defaultOption;i&&t.push(i),e=e.superClass}for(var n={},r=t.length-1;r>=0;r--)n=o.merge(n,t[r],!0);this.__defaultOption=n}return this.__defaultOption}});l.enableClassExtend(u,function(t,e,i,n){o.extend(this,n),this.uid=s.getUID("componentModel")}),l.enableClassManagement(u,{registerWhenExtend:!0}),s.enableSubTypeDefaulter(u),s.enableTopologicalTravel(u,n),o.mixin(u,i(120)),t.exports=u},function(t,e){function i(t){var e={},i={},n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/);return n&&(i.ie=!0,i.version=n[1]),n&&(i.ie=!0,i.version=n[1]),r&&(i.edge=!0,i.version=r[1]),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=10)}}var n={};n="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:i(navigator.userAgent),t.exports=n},function(t,e,i){function n(t,e,i,n){this.parentModel=e,this.ecModel=i,this.option=t,this.init&&(arguments.length<=4?this.init(t,e,i,n):this.init.apply(this,arguments))}var r=i(1),o=i(20);n.prototype={constructor:n,init:null,mergeOption:function(t){r.merge(this.option,t,!0)},get:function(t,e){if(!t)return this.option;"string"==typeof t&&(t=t.split("."));for(var i=this.option,n=this.parentModel,r=0;r=0?r[s]=new l.constructor(o[s].length):r[s]=o[s]}return n}var o="undefined",a="undefined"==typeof window?e:window,s=typeof a.Float64Array===o?Array:a.Float64Array,l=typeof a.Int32Array===o?Array:a.Int32Array,h={"float":s,"int":l,ordinal:Array,number:Array,time:Array},u=i(12),c=i(45),d=i(1),f=i(8),p=d.isObject,g=["stackedOn","hasItemOption","_nameList","_idList","_rawData"],m=function(t,e){d.each(g.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods},v=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;r0&&(b+="__ec__"+u[w]),u[w]++),b&&(l[c]=b)}this._nameList=e,this._idList=l},y.count=function(){return this.indices.length},y.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r)return NaN;var o=n[t]&&n[t][r];if(i){var a=this._dimensionInfos[t];if(a&&a.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(o>=0&&l>0||0>=o&&0>l)&&(o+=l),s=s.stackedOn}}return o},y.getValues=function(t,e,i){var n=[];d.isArray(t)||(i=e,e=t,t=this.dimensions);for(var r=0,o=t.length;o>r;r++)n.push(this.get(t[r],e,i));return n},y.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},y.getDataExtent=function(t,e){var i=this._storage[t],n=this.getDimensionInfo(t);e=n&&n.stackable&&e;var r,o=(this._extent||(this._extent={}))[t+!!e];if(o)return o;if(i){for(var a=1/0,s=-(1/0),l=0,h=this.count();h>l;l++)r=this.get(t,l,e),a>r&&(a=r),r>s&&(s=r);return this._extent[t+!!e]=[a,s]}return[1/0,-(1/0)]},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,o=this.count();o>r;r++){var a=this.get(t,r,e);isNaN(a)||(n+=a)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var o=0,a=r.length;a>o;o++){var s=r[o];if(n[s]===e)return o}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var o=e[n];if(i[o]===t)return n}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,r=n[t];if(r){for(var o=Number.MAX_VALUE,a=-1,s=0,l=this.count();l>s;s++){var h=e-this.get(t,s,i),u=Math.abs(h);(o>u||u===o&&h>0)&&(o=u,a=s)}return a}return-1},y.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},y.getRawDataItem=function(t){return this._rawData[this.getRawIndex(t)]},y.getName=function(t){return this._nameList[this.indices[t]]||""},y.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},y.each=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],a=t.length,s=this.indices;r=r||this;for(var l=0;lh;h++)o[h]=this.get(t[h],l,i);o[h]=l,e.apply(r,o)}},y.filterSelf=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],a=[],s=t.length,l=this.indices;r=r||this;for(var h=0;hc;c++)a[c]=this.get(t[c],h,i);a[c]=h,u=e.apply(r,a)}u&&o.push(l[h])}return this.indices=o,this._extent={},this},y.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},y.map=function(t,e,i,o){t=d.map(n(t),this.getDimension,this);var a=r(this,t),s=a.indices=this.indices,l=a._storage,h=[]; -return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(h[0]=n,n=h);for(var r=0;rg;g+=d){d>p-g&&(d=p-g,u.length=d);for(var m=0;d>m;m++){var v=l[g+m];u[m]=f[v],c[m]=v}var y=i(u),v=c[n(u,y)||0];f[v]=y,h.push(v)}return o},y.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new u(this._rawData[t],e,e&&e.ecModel)},y.diff=function(t){var e=this._idList,i=t&&t._idList;return new c(t?t.indices:[],this.indices,function(t){return i[t]||t+""},function(t){return e[t]||t+""})},y.getVisual=function(t){var e=this._visual;return e&&e[t]},y.setVisual=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},y.setLayout=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},y.getLayout=function(t){return this._layout[t]},y.getItemLayout=function(t){return this._itemLayouts[t]},y.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?d.extend(this._itemLayouts[t]||{},e):e},y.clearItemLayouts=function(){this._itemLayouts.length=0},y.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=i},y.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var x=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};y.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(x,e)),this._graphicEls[t]=e},y.getItemGraphicEl=function(t){return this._graphicEls[t]},y.eachItemGraphicEl=function(t,e){d.each(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},y.cloneShallow=function(){var t=d.map(this.dimensions,this.getDimensionInfo,this),e=new v(t,this.hostModel);return e._storage=this._storage,m(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=d.extend({},this._extent)),e},y.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(d.slice(arguments)))})},y.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],y.CHANGABLE_METHODS=["filterSelf"],t.exports=v}).call(e,function(){return this}())},function(t,e,i){"use strict";function n(t,e,i,n,r){var o=0,a=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);u=o+m,u>n||l.newline?(o=0,u=m,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=a+v,c>r||l.newline?(o+=s+i,a=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=u+i:a=c+i)})}var r=i(1),o=i(7),a=i(4),s=i(9),l=a.parsePercent,h=r.each,u={},c=["left","right","top","bottom","width","height"];u.box=n,u.vbox=r.curry(n,"vertical"),u.hbox=r.curry(n,"horizontal"),u.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,o=l(t.x,n),a=l(t.y,r),h=l(t.x2,n),u=l(t.y2,r);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=n),(isNaN(a)||isNaN(parseFloat(t.y)))&&(a=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=r),i=s.normalizeCssArray(i||0),{width:Math.max(h-o-i[1]-i[3],0),height:Math.max(u-a-i[0]-i[2],0)}},u.getLayoutRect=function(t,e,i){i=s.normalizeCssArray(i||0);var n=e.width,r=e.height,a=l(t.left,n),h=l(t.top,r),u=l(t.right,n),c=l(t.bottom,r),d=l(t.width,n),f=l(t.height,r),p=i[2]+i[0],g=i[1]+i[3],m=t.aspect;switch(isNaN(d)&&(d=n-u-g-a),isNaN(f)&&(f=r-c-p-h),isNaN(d)&&isNaN(f)&&(m>n/r?d=.8*n:f=.8*r),null!=m&&(isNaN(d)&&(d=m*f),isNaN(f)&&(f=d/m)),isNaN(a)&&(a=n-u-d-g),isNaN(h)&&(h=r-c-f-p),t.left||t.right){case"center":a=n/2-d/2-i[3];break;case"right":a=n-d-g}switch(t.top||t.bottom){case"middle":case"center":h=r/2-f/2-i[0];break;case"bottom":h=r-f-p}a=a||0,h=h||0,isNaN(d)&&(d=n-a-(u||0)),isNaN(f)&&(f=r-h-(c||0));var v=new o(a+i[3],h+i[0],d,f);return v.margin=i,v},u.positionGroup=function(t,e,i,n){var o=t.getBoundingRect();e=r.extend(r.clone(e),{width:o.width,height:o.height}),e=u.getLayoutRect(e,i,n),t.attr("position",[e.x-o.x,e.y-o.y])},u.mergeLayoutParam=function(t,e,i){function n(n){var r={},s=0,l={},u=0,c=i.ignoreSize?1:2;if(h(n,function(e){l[e]=t[e]}),h(n,function(t){o(e,t)&&(r[t]=l[t]=e[t]),a(r,t)&&s++,a(l,t)&&u++}),u!==c&&s){if(s>=c)return r;for(var d=0;d',d=this.name;return"\x00-"===d&&(d=""),e?c+h(this.name)+" : "+a:(d&&h(d)+"
")+c+(s?h(s)+" : "+a:a)},ifEnableAnimation:function(){if(l.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()},getColorFromPalette:function(t,e){var i=this.ecModel,n=s.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipDataIndex:null});n.mixin(c,o.dataFormatMixin),n.mixin(c,s),t.exports=c},function(t,e,i){"use strict";function n(t){return t>-w&&w>t}function r(t){return t>w||-w>t}function o(t,e,i,n,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*n+3*o*i)}function a(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function s(t,e,i,r,o,a){var s=r+3*(e-i)-t,l=3*(i-2*e+t),h=3*(e-t),u=t-o,c=l*l-3*s*h,d=l*h-9*s*u,f=h*h-3*l*u,p=0;if(n(c)&&n(d))if(n(l))a[0]=0;else{var g=-h/l;g>=0&&1>=g&&(a[p++]=g)}else{var m=d*d-4*c*f;if(n(m)){var v=d/c,g=-l/s+v,y=-v/2;g>=0&&1>=g&&(a[p++]=g),y>=0&&1>=y&&(a[p++]=y)}else if(m>0){var x=b(m),w=c*l+1.5*s*(-d+x),S=c*l+1.5*s*(-d-x);w=0>w?-_(-w,I):_(w,I),S=0>S?-_(-S,I):_(S,I);var g=(-l-(w+S))/(3*s);g>=0&&1>=g&&(a[p++]=g)}else{var A=(2*c*l-3*s*d)/(2*b(c*c*c)),T=Math.acos(A)/3,L=b(c),C=Math.cos(T),g=(-l-2*L*C)/(3*s),y=(-l+L*(C+M*Math.sin(T)))/(3*s),D=(-l+L*(C-M*Math.sin(T)))/(3*s);g>=0&&1>=g&&(a[p++]=g),y>=0&&1>=y&&(a[p++]=y),D>=0&&1>=D&&(a[p++]=D)}}return p}function l(t,e,i,o,a){var s=6*i-12*e+6*t,l=9*e+3*o-3*t-9*i,h=3*e-3*t,u=0;if(n(l)){if(r(s)){var c=-h/s;c>=0&&1>=c&&(a[u++]=c)}}else{var d=s*s-4*l*h;if(n(d))a[0]=-s/(2*l);else if(d>0){var f=b(d),c=(-s+f)/(2*l),p=(-s-f)/(2*l);c>=0&&1>=c&&(a[u++]=c),p>=0&&1>=p&&(a[u++]=p)}}return u}function h(t,e,i,n,r,o){var a=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-a)*r+a,u=(l-s)*r+s,c=(u-h)*r+h;o[0]=t,o[1]=a,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=n}function u(t,e,i,n,r,a,s,l,h,u,c){var d,f,p,g,m,v=.005,y=1/0;A[0]=h,A[1]=u;for(var _=0;1>_;_+=.05)T[0]=o(t,i,r,s,_),T[1]=o(e,n,a,l,_),g=x(A,T),y>g&&(d=_,y=g);y=1/0;for(var w=0;32>w&&!(S>v);w++)f=d-v,p=d+v,T[0]=o(t,i,r,s,f),T[1]=o(e,n,a,l,f),g=x(T,A),f>=0&&y>g?(d=f,y=g):(L[0]=o(t,i,r,s,p),L[1]=o(e,n,a,l,p),m=x(L,A),1>=p&&y>m?(d=p,y=m):v*=.5);return c&&(c[0]=o(t,i,r,s,d),c[1]=o(e,n,a,l,d)),b(y)}function c(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function d(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function f(t,e,i,o,a){var s=t-2*e+i,l=2*(e-t),h=t-o,u=0;if(n(s)){if(r(l)){var c=-h/l;c>=0&&1>=c&&(a[u++]=c)}}else{var d=l*l-4*s*h;if(n(d)){var c=-l/(2*s);c>=0&&1>=c&&(a[u++]=c)}else if(d>0){var f=b(d),c=(-l+f)/(2*s),p=(-l-f)/(2*s);c>=0&&1>=c&&(a[u++]=c),p>=0&&1>=p&&(a[u++]=p)}}return u}function p(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function g(t,e,i,n,r){var o=(e-t)*n+t,a=(i-e)*n+e,s=(a-o)*n+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=i}function m(t,e,i,n,r,o,a,s,l){var h,u=.005,d=1/0;A[0]=a,A[1]=s;for(var f=0;1>f;f+=.05){T[0]=c(t,i,r,f),T[1]=c(e,n,o,f);var p=x(A,T);d>p&&(h=f,d=p)}d=1/0;for(var g=0;32>g&&!(S>u);g++){var m=h-u,v=h+u;T[0]=c(t,i,r,m),T[1]=c(e,n,o,m);var p=x(T,A);if(m>=0&&d>p)h=m,d=p;else{L[0]=c(t,i,r,v),L[1]=c(e,n,o,v);var y=x(L,A);1>=v&&d>y?(h=v,d=y):u*=.5}}return l&&(l[0]=c(t,i,r,h),l[1]=c(e,n,o,h)),b(d)}var v=i(5),y=v.create,x=v.distSquare,_=Math.pow,b=Math.sqrt,w=1e-8,S=1e-4,M=b(3),I=1/3,A=y(),T=y(),L=y();t.exports={cubicAt:o,cubicDerivativeAt:a,cubicRootAt:s,cubicExtrema:l,cubicSubdivide:h,cubicProjectPoint:u,quadraticAt:c,quadraticDerivativeAt:d,quadraticRootAt:f,quadraticExtremum:p,quadraticSubdivide:g,quadraticProjectPoint:m}},function(t,e){function i(t){return t=Math.round(t),0>t?0:t>255?255:t}function n(t){return t=Math.round(t),0>t?0:t>360?360:t}function r(t){return 0>t?0:t>1?1:t}function o(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function a(t){return r(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function s(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function l(t,e,i){return t+(e-t)*i}function h(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in x)return x[e].slice();if("#"!==e.charAt(0)){var i=e.indexOf("("),n=e.indexOf(")");if(-1!==i&&n+1===e.length){var r=e.substr(0,i),s=e.substr(i+1,n-(i+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return;l=a(s.pop());case"rgb":if(3!==s.length)return;return[o(s[0]),o(s[1]),o(s[2]),l];case"hsla":if(4!==s.length)return;return s[3]=a(s[3]),u(s);case"hsl":if(3!==s.length)return;return u(s);default:return}}}else{if(4===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&4095>=h))return;return[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]}if(7===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&16777215>=h))return;return[(16711680&h)>>16,(65280&h)>>8,255&h,1]}}}}function u(t){var e=(parseFloat(t[0])%360+360)%360/360,n=a(t[1]),r=a(t[2]),o=.5>=r?r*(n+1):r+n-r*n,l=2*r-o,h=[i(255*s(l,o,e+1/3)),i(255*s(l,o,e)),i(255*s(l,o,e-1/3))];return 4===t.length&&(h[3]=t[3]),h}function c(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a,h=(s+a)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+a):l/(2-s-a);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+u-d:o===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function d(t,e){var i=h(t);if(i){for(var n=0;3>n;n++)0>e?i[n]=i[n]*(1-e)|0:i[n]=(255-i[n])*e+i[n]|0;return y(i,4===i.length?"rgba":"rgb")}}function f(t,e){var i=h(t);return i?((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1):void 0}function p(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[0,0,0,0];var r=t*(e.length-1),o=Math.floor(r),a=Math.ceil(r),s=e[o],h=e[a],u=r-o;return n[0]=i(l(s[0],h[0],u)),n[1]=i(l(s[1],h[1],u)),n[2]=i(l(s[2],h[2],u)),n[3]=i(l(s[3],h[3],u)),n}}function g(t,e,n){if(e&&e.length&&t>=0&&1>=t){var o=t*(e.length-1),a=Math.floor(o),s=Math.ceil(o),u=h(e[a]),c=h(e[s]),d=o-a,f=y([i(l(u[0],c[0],d)),i(l(u[1],c[1],d)),i(l(u[2],c[2],d)),r(l(u[3],c[3],d))],"rgba");return n?{color:f,leftIndex:a,rightIndex:s,value:o}:f}}function m(t,e,i,r){return t=h(t),t?(t=c(t),null!=e&&(t[0]=n(e)),null!=i&&(t[1]=a(i)),null!=r&&(t[2]=a(r)),y(u(t),"rgba")):void 0}function v(t,e){return t=h(t),t&&null!=e?(t[3]=r(e),y(t,"rgba")):void 0}function y(t,e){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}var x={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};t.exports={parse:h,lift:d,toHex:f,fastMapToColor:p,mapToColor:g,modifyHSL:m,modifyAlpha:v,stringify:y}},function(t,e,i){function n(t,e){var i=t+":"+e;if(h[i])return h[i];for(var n=(t+"").split("\n"),r=0,o=0,a=n.length;a>o;o++)r=Math.max(p.measureText(n[o],e).width,r);return u>c&&(u=0,h={}),u++,h[i]=r,r}function r(t,e,i,r){var o=((t||"")+"").split("\n").length,a=n(t,e),s=n("国",e),l=o*s,h=new f(0,0,a,l);switch(h.lineHeight=s,r){case"bottom":case"alphabetic":h.y-=s;break;case"middle":h.y-=s/2}switch(i){case"end":case"right":h.x-=h.width;break;case"center":h.x-=h.width/2}return h}function o(t,e,i,n){var r=e.x,o=e.y,a=e.height,s=e.width,l=i.height,h=a/2-l/2,u="left";switch(t){case"left":r-=n,o+=h,u="right";break;case"right":r+=n+s,o+=h,u="left";break;case"top":r+=s/2,o-=n+l,u="center";break;case"bottom":r+=s/2,o+=a+n,u="center";break;case"inside":r+=s/2,o+=h,u="center";break;case"insideLeft":r+=n,o+=h,u="left";break;case"insideRight":r+=s-n,o+=h,u="right";break;case"insideTop":r+=s/2,o+=n,u="center";break;case"insideBottom":r+=s/2,o+=a-l-n,u="center";break;case"insideTopLeft":r+=n,o+=n,u="left";break;case"insideTopRight":r+=s-n,o+=n,u="right";break;case"insideBottomLeft":r+=n,o+=a-l-n;break;case"insideBottomRight":r+=s-n,o+=a-l-n,u="right"}return{x:r,y:o,textAlign:u,textBaseline:"top"}}function a(t,e,i,r){if(!i)return"";r=d.defaults({ellipsis:"...",minCharacters:3,maxIterations:3,cnCharWidth:n("国",e),ascCharWidth:n("a",e)},r,!0),i-=n(r.ellipsis);for(var o=(t+"").split("\n"),a=0,l=o.length;l>a;a++)o[a]=s(o[a],e,i,r);return o.join("\n")}function s(t,e,i,r){for(var o=0;;o++){var a=n(t,e);if(i>a||o>=r.maxIterations){t+=r.ellipsis;break}var s=0===o?l(t,i,r):Math.floor(t.length*i/a);if(sr&&e>n;r++){var a=t.charCodeAt(r);n+=a>=0&&127>=a?i.ascCharWidth:i.cnCharWidth}return r}var h={},u=0,c=5e3,d=i(1),f=i(7),p={getWidth:n,getBoundingRect:r,adjustTextPositionOnRect:o,ellipsis:a,measureText:function(t,e){var i=d.getContext();return i.font=e,i.measureText(t)}};t.exports=p},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(){var t=new i(6);return n.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},rotate:function(t,e,i){var n=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+a*h,t[1]=-n*h+a*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*o+h*l,t[5]=u*l-h*o,t},scale:function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},invert:function(t,e){var i=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=i*a-o*n;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*r)*l,t[5]=(o*r-i*s)*l,t):null}};t.exports=n},function(t,e,i){function n(t,e){var i=o.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function r(t,e,i){return this.superClass.prototype[e].apply(t,i)}var o=i(1),a={},s=".",l="___EC__COMPONENT__CONTAINER___",h=a.parseClassType=function(t){var e={main:"",sub:""};return t&&(t=t.split(s),e.main=t[0]||"",e.sub=t[1]||""),e};a.enableClassExtend=function(t,e){t.extend=function(i){var a=function(){e&&e.apply(this,arguments),t.apply(this,arguments)};return o.extend(a.prototype,i),a.extend=this.extend,a.superCall=n,a.superApply=r,o.inherits(a,this),a.superClass=this,a}},a.enableClassManagement=function(t,e){function i(t){var e=n[t.main];return e&&e[l]||(e=n[t.main]={},e[l]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(e=h(e),e.sub){if(e.sub!==l){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[l]&&(r=e?r[e]:null),i&&!r)throw new Error("Component "+t+"."+(e||"")+" not exists. Load it first.");return r},t.getClassesByMainType=function(t){t=h(t);var e=[],i=n[t.main];return i&&i[l]?o.each(i,function(t,i){i!==l&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=h(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return o.each(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=h(t);var e=n[t.main];return e&&e[l]},t.parseClassType=h,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t},a.setReadOnly=function(t,e){},t.exports=a},function(t,e,i){var n=Array.prototype.slice,r=i(1),o=r.indexOf,a=function(){this._$handlers={}};a.prototype={constructor:a,one:function(t,e,i){var n=this._$handlers;return e&&t?(n[t]||(n[t]=[]),o(n[t],t)>=0?this:(n[t].push({h:e,one:!0,ctx:i||this}),this)):this},on:function(t,e,i){var n=this._$handlers;return e&&t?(n[t]||(n[t]=[]),n[t].push({h:e,one:!1,ctx:i||this}),this):this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,o=i[t].length;o>r;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=n.call(e,1));for(var r=this._$handlers[t],o=r.length,a=0;o>a;){switch(i){case 1:r[a].h.call(r[a].ctx);break;case 2:r[a].h.call(r[a].ctx,e[1]);break;case 3:r[a].h.call(r[a].ctx,e[1],e[2]);break;default:r[a].h.apply(r[a].ctx,e)}r[a].one?(r.splice(a,1),o--):a++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=n.call(e,1,e.length-1));for(var r=e[e.length-1],o=this._$handlers[t],a=o.length,s=0;a>s;){switch(i){case 1:o[s].h.call(r);break;case 2:o[s].h.call(r,e[1]);break;case 3:o[s].h.call(r,e[1],e[2]);break;default:o[s].h.apply(r,e)}o[s].one?(o.splice(s,1),a--):s++}}return this}},t.exports=a},function(t,e){"use strict";var i={};t.exports={register:function(t,e){i[t]=e},get:function(t){return i[t]}}},function(t,e,i){"use strict";function n(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function r(t,e,i){var r=n(t);return i=i||{},i.zrX=e.clientX-r.left,i.zrY=e.clientY-r.top,i}function o(t,e){if(e=e||window.event,null!=e.zrX)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var o="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];o&&r(t,o,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function a(t,e,i){h?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function s(t,e,i){h?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}var l=i(21),h="undefined"!=typeof window&&!!window.addEventListener,u=h?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};t.exports={clientToLocal:r,normalizeEvent:o,addEventListener:a,removeEventListener:s,stop:u,Dispatcher:l}},function(t,e){"use strict";function i(){this._coordinateSystems=[]}var n={};i.prototype={constructor:i,create:function(t,e){var i=[];for(var r in n){var o=n[r].create(t,e);o&&(i=i.concat(o))}this._coordinateSystems=i},update:function(t,e){for(var i=this._coordinateSystems,n=0;n0&&l>0&&!c&&(o=0),0>o&&0>l&&!d&&(l=0)),[o,l]},h.niceScaleExtent=function(t,e){var i=t.scale,n=h.getScaleExtent(t,e),r=null!=(e.getMin?e.getMin():e.get("min")),o=null!=(e.getMax?e.getMax():e.get("max")),a=e.get("splitNumber");i.setExtent(n[0],n[1]),i.niceExtent(a,r,o);var s=e.get("minInterval");if(isFinite(s)&&!r&&!o&&"interval"===i.type){var l=i.getInterval(),u=Math.max(Math.abs(l),s)/l;n=i.getExtent(),i.setExtent(u*n[0],n[1]*u),i.niceExtent(a)}var l=e.get("interval");null!=l&&i.setInterval&&i.setInterval(l)},h.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new n(t.getCategories(),[1/0,-(1/0)]);case"value":return new r;default:return(o.getClass(e)||r).create(t)}},h.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)},h.getAxisLabelInterval=function(t,e,i,n){var r,o=0,a=0,s=1;e.length>40&&(s=Math.floor(e.length/40));for(var h=0;h1?s:o*s},h.getFormattedLabels=function(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",e)}}(e),s.map(n,e)):"function"==typeof e?s.map(r,function(n,r){return e("category"===t.type?i.getLabel(n):n,r)},this):n},t.exports=h},function(t,e,i){"use strict";var n=i(3),r=i(7),o=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n+o),t.lineTo(i-r,n+o),t.closePath()}}),a=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n),t.lineTo(i,n+o),t.lineTo(i-r,n),t.closePath()}}),s=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=n-o+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h);t.arc(i,l,a,Math.PI-h,2*Math.PI+h);var f=.6*a,p=.7*a;t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),l=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,o=e.y,a=n/3*2;t.moveTo(r,o),t.lineTo(r+a,o+i),t.lineTo(r,o+i/4*3),t.lineTo(r-a,o+i),t.lineTo(r,o),t.closePath()}}),h={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:a,pin:s,arrow:l,triangle:o},u={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var o=Math.min(i,n);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},c={};for(var d in h)c[d]=new h[d];var f=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e){var i=e.symbolType,n=c[i];"none"!==e.symbolType&&(n||(i="rect",n=c[i]),u[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(t,n.shape))}}),p=function(t){if("image"!==this.type){var e=this.style,i=this.shape;i&&"line"===i.symbolType?e.stroke=t:this.__isEmptyBrush?(e.stroke=t,e.fill="#fff"):(e.fill&&(e.fill=t),e.stroke&&(e.stroke=t)),this.dirty(!1)}},g={createSymbol:function(t,e,i,o,a,s){var l=0===t.indexOf("empty");l&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var h;return h=0===t.indexOf("image://")?new n.Image({style:{image:t.slice(8),x:e,y:i,width:o,height:a}}):0===t.indexOf("path://")?n.makePath(t.slice(7),{},new r(e,i,o,a)):new f({shape:{symbolType:t,x:e,y:i,width:o,height:a}}),h.__isEmptyBrush=l,h.setColor=p,h.setColor(s),h}};t.exports=g},function(t,e,i){function n(){this.group=new a,this.uid=s.getUID("viewChart")}function r(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;is;s++)r(t.getItemGraphicEl(a[s]),i);else if(o)for(var h=o instanceof Array?o:[o],s=0,l=h.length;l>s;s++){var n=t.indexOfName(h[s]);r(t.getItemGraphicEl(n),i)}else t.eachItemGraphicEl(function(t){r(t,i)})}var a=i(28),s=i(42),l=i(20);n.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){o(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){o(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var h=n.prototype;h.updateView=h.updateLayout=h.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},l.enableClassExtend(n),l.enableClassManagement(n,{registerWhenExtend:!0}),t.exports=n},function(t,e,i){var n=i(1),r=i(57),o=i(7),a=function(t){t=t||{},r.call(this,t);for(var e in t)this[e]=t[e];this._children=[],this.__storage=null,this.__dirty=!0};a.prototype={constructor:a,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof a&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,o=n.indexOf(r,t);return 0>o?this:(r.splice(o,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof a&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;ethis._ux||y(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(l.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(l.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(l.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=g(r)*i+t,this._xi=m(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(l.R,t,e,i,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();x&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;ae.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=r+o),o%=r,g-=o*u,m-=o*c;u>=0&&t>=g||0>u&&g>t;)n=this._dashIdx,i=a[n],g+=u*i,m+=c*i,this._dashIdx=(n+1)%y,u>0&&l>g||0>u&&g>l||s[n%2?"moveTo":"lineTo"](u>=0?f(g,t):p(g,t),c>=0?f(m,e):p(m,e));u=g-t,c=m-e,this._dashOffset=-v(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,o,a){var s,l,h,u,c,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._ctx,m=this._xi,y=this._yi,x=n.cubicAt,_=0,b=this._dashIdx,w=p.length,S=0;for(0>f&&(f=d+f),f%=d,s=0;1>s;s+=.1)l=x(m,t,i,o,s+.1)-x(m,t,i,o,s),h=x(y,e,r,a,s+.1)-x(y,e,r,a,s),_+=v(l*l+h*h);for(;w>b&&(S+=p[b],!(S>f));b++);for(s=(S-f)/_;1>=s;)u=x(m,t,i,o,s),c=x(y,e,r,a,s),b%2?g.moveTo(u,c):g.lineTo(u,c),s+=p[b]/_,b=(b+1)%w;b%2!==0&&g.lineTo(o,a),l=o-u,h=a-c,this._dashOffset=-v(l*l+h*h)},_dashedQuadraticTo:function(t,e,i,n){var r=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,x&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=d[0]=d[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,s=0,f=0;fd;){var f=s[d++];switch(1==d&&(n=s[d],r=s[d+1],e=n,i=r),f){case l.M:e=n=s[d++],i=r=s[d++],t.moveTo(n,r);break;case l.L:o=s[d++],a=s[d++],(y(o-n)>h||y(a-r)>u||d===c-1)&&(t.lineTo(o,a),n=o,r=a);break;case l.C:t.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.Q:t.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.A:var p=s[d++],v=s[d++],x=s[d++],_=s[d++],b=s[d++],w=s[d++],S=s[d++],M=s[d++],I=x>_?x:_,A=x>_?1:x/_,T=x>_?_/x:1,L=Math.abs(x-_)>.001,C=b+w;L?(t.translate(p,v),t.rotate(S),t.scale(A,T),t.arc(0,0,I,b,C,1-M),t.scale(1/A,1/T),t.rotate(-S),t.translate(-p,-v)):t.arc(p,v,I,b,C,1-M),1==d&&(e=g(b)*x+p,i=m(b)*_+v),n=g(C)*x+p,r=m(C)*_+v;break;case l.R:e=n=s[d],i=r=s[d+1],t.rect(s[d++],s[d++],s[d++],s[d++]);break;case l.Z:t.closePath(),n=e,r=i}}}},_.CMD=l,t.exports=_},function(t,e){var i=function(t){this.colorStops=t||[]};i.prototype={constructor:i,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},t.exports=i},function(t,e,i){function n(t,e,i,n){if(!e)return t;var s=r(e[0]),l=o.isArray(s)&&s.length||1;i=i||[],n=n||"extra";for(var h=0;l>h;h++)if(!t[h]){var u=i[h]||n+(h-i.length);t[h]=a(e,h)?{type:"ordinal",name:u}:u}return t}function r(t){return o.isArray(t)?t:o.isObject(t)?t.value:t}var o=i(1),a=n.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var a=r(t[i]);if(!o.isArray(a))return!1;var a=a[e];if(null!=a&&isFinite(a))return!1;if(o.isString(a)&&"-"!==a)return!0}return!1};t.exports=n},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=0;e=0)){var a=this.getShallow(o);null!=a&&(i[t[r][0]]=a)}}return i}}},function(t,e,i){function n(){this._extent=[1/0,-(1/0)],this._interval=0,this.init&&this.init.apply(this,arguments)}var r=i(20),o=n.prototype;o.parse=function(t){return t},o.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},o.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},o.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},o.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},o.getExtent=function(){return this._extent.slice()},o.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},o.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;io&&!isNaN(o)&&(o=+o)),o};return b.hasItemOption=!1,b.initData(t,w,S),b}function a(t){return"category"!==t&&"time"!==t}function s(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function l(t,e){var i=[];if(t&&t.categoryAxisModel){var n=t.categoryAxisModel.getCategories();if(n){var r=e.length;if(c.isArray(e[0])&&e[0].length>1){i=[];for(var o=0;r>o;o++)i[o]=n[e[o][t.categoryIndex||0]]}else i=n.slice(0)}}return i}var h=i(13),u=i(31),c=i(1),d=i(8),f=i(24),p=d.getDataItemValue,g=d.converDataValue,m={cartesian2d:function(t,e,i){var n=i.getComponent("xAxis",e.get("xAxisIndex")),r=i.getComponent("yAxis",e.get("yAxisIndex")),o=n.get("type"),l=r.get("type"),h=[{name:"x",type:s(o),stackable:a(o)},{name:"y",type:s(l),stackable:a(l)}],c="category"===o;return u(h,t,["x","y","z"]),{dimensions:h,categoryIndex:c?0:1,categoryAxisModel:c?n:"category"===l?r:null}},polar:function(t,e,i){var n=e.get("polarIndex")||0,r=function(t){return t.get("polarIndex")===n},o=i.findComponents({mainType:"angleAxis",filter:r})[0],l=i.findComponents({mainType:"radiusAxis",filter:r})[0],h=l.get("type"),c=o.get("type"),d=[{name:"radius",type:s(h),stackable:a(h)},{name:"angle",type:s(c),stackable:a(c)}],f="category"===c;return u(d,t,["radius","angle","value"]),{dimensions:d,categoryIndex:f?1:0,categoryAxisModel:f?o:"category"===h?l:null}},geo:function(t,e,i){return{dimensions:u([{name:"lng"},{name:"lat"}],t,["lng","lat","value"])}}};t.exports=o},function(t,e,i){"use strict";var n=i(3),r=i(1);i(53),i(101),i(2).extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new n.Rect({shape:t.coordinateSystem.getRect(),style:r.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0}))}})},function(t,e,i){function n(t){t=t||{},a.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new o(t.style),this._rect=null,this.__clipPaths=[]}var r=i(1),o=i(148),a=i(57),s=i(73);n.prototype={constructor:n,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?a.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new o(t),this.dirty(!1),this}},r.inherits(n,a),r.mixin(n,s),t.exports=n},function(t,e,i){var n=i(4),r=i(9),o=i(33),a=Math.floor,s=Math.ceil,l=o.extend({type:"interval",_interval:0,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval||this.niceTicks(),this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice()},getTicks:function(){this._interval||this.niceTicks();var t=this._interval,e=this._extent,i=[],r=1e4;if(t){var o=this._niceExtent;e[0]r)return[];e[1]>o[1]&&i.push(e[1])}return i},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(i=-i,e.reverse());var r=n.nice(i/t,!0),o=[n.round(s(e[0]/r)*r),n.round(a(e[1]/r)*r)];this._interval=r,this._niceExtent=o}},niceExtent:function(t,e,i){var r=this._extent;if(r[0]===r[1])if(0!==r[0]){var o=r[0]/2;r[0]-=o,r[1]+=o}else r[1]=1;var l=r[1]-r[0];isFinite(l)||(r[0]=0,r[1]=1),this.niceTicks(t);var h=this._interval;e||(r[0]=n.round(a(r[0]/h)*h)),i||(r[1]=n.round(s(r[1]/h)*h))}});l.create=function(){return new l},t.exports=l},function(t,e,i){function n(t){this.group=new o.Group,this._symbolCtor=t||a}function r(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}var o=i(3),a=i(49),s=n.prototype;s.updateData=function(t,e){var i=this.group,n=t.hostModel,a=this._data,s=this._symbolCtor,l={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis")};t.diff(a).add(function(n){var o=t.getItemLayout(n);if(r(t,n,e)){var a=new s(t,n,l);a.attr("position",o),t.setItemGraphicEl(n,a),i.add(a)}}).update(function(h,u){var c=a.getItemGraphicEl(u),d=t.getItemLayout(h);return r(t,h,e)?(c?(c.updateData(t,h,l),o.updateProps(c,{position:d},n)):(c=new s(t,h),c.attr("position",d)),i.add(c),void t.setItemGraphicEl(h,c)):void i.remove(c)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},s.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},s.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll())},t.exports=n},function(t,e,i){function n(t){var e={};return u(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function r(t,e,i,n){null!=i[e]&&null==i[t]&&(n[t]=null)}var o=i(1),a=i(11),s=i(2),l=i(8),h=i(175),u=o.each,c=l.eachAxisDim,d=s.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,angleAxisIndex:null,radiusAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0;var r=n(t);this.mergeDefaultAndTheme(t,i),this.doInit(r)},mergeOption:function(t){var e=n(t);o.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;a.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),r("start","startValue",t,e),r("end","endValue",t,e),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var o=this.dependentModels[e.axis][i],a=o.__dzAxisProxy||(o.__dzAxisProxy=new h(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();c(function(e){var i=e.axisIndex;t[i]=l.normalizeToArray(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;c(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option;if(t){var n="vertical"===e?{dim:"y",axisIndex:"yAxisIndex",axis:"yAxis"}:{dim:"x",axisIndex:"xAxisIndex",axis:"xAxis"};this.dependentModels[n.axis].length&&(i[n.axisIndex]=[0],t=!1)}t&&c(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;a>o;o++)"category"===r[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&c(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex);o.indexOf(n,r)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return c(function(n){var r=t.get(n.axisIndex),o=this.dependentModels[n.axis][r];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return c(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;c(function(n){u(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},setRawRange:function(t){u(["start","end","startValue","endValue"],function(e){this.option[e]=t[e]},this)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(){var t=this._axisProxies;for(var e in t)if(t.hasOwnProperty(e)&&t[e].hostedBy(this))return t[e];for(var e in t)if(t.hasOwnProperty(e)&&!t[e].hostedBy(this))return t[e]}});t.exports=d},function(t,e,i){var n=i(56);t.exports=n.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetInfo:function(){function t(t,e,i,n){for(var r,o=0;o=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,r,o){function a(t){h[t].entryCount--,0===h[t].entryCount&&u.push(t)}function s(t){c[t]=!0,a(t)}if(t.length){var l=i(e),h=l.graph,u=l.noEntryList,c={};for(n.each(t,function(t){c[t]=!0});u.length;){var d=u.pop(),f=h[d],p=!!c[d];p&&(r.call(o,d,f.originalDeps.slice()),delete c[d]),n.each(f.successor,p?s:a)}n.each(c,function(){throw new Error("Circle dependency may exists")})}}},t.exports=s},function(t,e){function i(t){for(var e=0;t>=u;)e|=1&t,t>>=1;return t+e}function n(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;i>o&&n(t[o],t[o-1])<0;)o++;r(t,e,o)}else for(;i>o&&n(t[o],t[o-1])>=0;)o++;return o-e}function r(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function o(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var o,a=t[n],s=e,l=n;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function a(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;s>l&&o(t,e[i+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[i+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])>0?a=u+1:l=u}return l}function s(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;s>l&&o(t,e[i+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=n-r;s>l&&o(t,e[i+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])<0?l=u:a=u+1}return l}function l(t,e){function i(t,e){u[y]=t,f[y]=e,y+=1}function n(){for(;y>1;){var t=y-2;if(t>=1&&f[t-1]<=f[t]+f[t+1]||t>=2&&f[t-2]<=f[t]+f[t-1])f[t-1]f[t+1])break;o(t)}}function r(){for(;y>1;){var t=y-2;t>0&&f[t-1]=r?l(n,r,o,c):h(n,r,o,c)))}function l(i,n,r,o){var l=0;for(l=0;n>l;l++)x[l]=t[i+l];var h=0,u=r,d=i;if(t[d++]=t[u++],0!==--o){if(1===n){for(l=0;o>l;l++)t[d+l]=t[u+l];return void(t[d+o]=x[h])}for(var f,g,m,v=p;;){f=0,g=0,m=!1;do if(e(t[u],x[h])<0){if(t[d++]=t[u++],g++,f=0,0===--o){m=!0;break}}else if(t[d++]=x[h++],f++,g=0,1===--n){m=!0;break}while(v>(f|g));if(m)break;do{if(f=s(t[u],x,h,n,0,e),0!==f){for(l=0;f>l;l++)t[d+l]=x[h+l];if(d+=f,h+=f,n-=f,1>=n){m=!0;break}}if(t[d++]=t[u++],0===--o){m=!0;break}if(g=a(x[h],t,u,o,0,e),0!==g){for(l=0;g>l;l++)t[d+l]=t[u+l];if(d+=g,u+=g,o-=g,0===o){m=!0;break}}if(t[d++]=x[h++],1===--n){m=!0;break}v--}while(f>=c||g>=c);if(m)break;0>v&&(v=0),v+=2}if(p=v,1>p&&(p=1),1===n){for(l=0;o>l;l++)t[d+l]=t[u+l];t[d+o]=x[h]}else{if(0===n)throw new Error;for(l=0;n>l;l++)t[d+l]=x[h+l]}}else for(l=0;n>l;l++)t[d+l]=x[h+l]}function h(i,n,r,o){var l=0;for(l=0;o>l;l++)x[l]=t[r+l];var h=i+n-1,u=o-1,d=r+o-1,f=0,g=0;if(t[d--]=t[h--],0!==--n){if(1===o){for(d-=n,h-=n,g=d+1,f=h+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];return void(t[d]=x[u])}for(var m=p;;){var v=0,y=0,_=!1;do if(e(x[u],t[h])<0){if(t[d--]=t[h--],v++,y=0,0===--n){_=!0;break}}else if(t[d--]=x[u--],y++,v=0,1===--o){_=!0;break}while(m>(v|y));if(_)break;do{if(v=n-s(x[u],t,i,n,n-1,e),0!==v){for(d-=v,h-=v,n-=v,g=d+1,f=h+1,l=v-1;l>=0;l--)t[g+l]=t[f+l];if(0===n){_=!0;break}}if(t[d--]=x[u--],1===--o){_=!0;break}if(y=o-a(t[h],x,0,o,o-1,e),0!==y){for(d-=y,u-=y,o-=y,g=d+1,f=u+1,l=0;y>l;l++)t[g+l]=x[f+l];if(1>=o){_=!0;break}}if(t[d--]=t[h--],0===--n){_=!0;break}m--}while(v>=c||y>=c);if(_)break;0>m&&(m=0),m+=2}if(p=m,1>p&&(p=1),1===o){for(d-=n,h-=n,g=d+1,f=h+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];t[d]=x[u]}else{if(0===o)throw new Error;for(f=d-(o-1),l=0;o>l;l++)t[f+l]=x[l]}}else for(f=d-(o-1),l=0;o>l;l++)t[f+l]=x[l]}var u,f,p=c,g=0,m=d,v=0,y=0;g=t.length,2*d>g&&(m=g>>>1);var x=[];v=120>g?5:1542>g?10:119151>g?19:40,u=[],f=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function h(t,e,r,a){r||(r=0),a||(a=t.length);var s=a-r;if(!(2>s)){var h=0;if(u>s)return h=n(t,r,a,e),void o(t,r,a,r+h,e);var c=new l(t,e),d=i(s);do{if(h=n(t,r,a,e),d>h){var f=s;f>d&&(f=d),o(t,r,r+f,r+h,e),h=f}c.pushRun(r,h),c.mergeRuns(),s-=h,r+=h}while(0!==s);c.forceMergeRuns()}}var u=32,c=7,d=256;t.exports=h},function(t,e,i){function n(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}var r=i(4),o=r.linearMap,a=i(1),s=[0,1],l=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};l.prototype={constructor:l,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){var t=this._extent.slice();return t},getPixelPrecision:function(t){return r.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count())),o(t,s,i,e)},coordToData:function(t,e){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count()));var a=o(t,i,s,e);return this.scale.scale(a)},getTicksCoords:function(){if(this.onBand){for(var t=this.getBands(),e=[],i=0;ia;a++)e.push([o*a/i+n,o*(a+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i}},t.exports=l},function(t,e){"use strict";function i(t){return t}function n(t,e,n,r){this._old=t,this._new=e,this._oldKeyGetter=n||i,this._newKeyGetter=r||i}function r(t,e,i){for(var n=0;nt;t++)this._add&&this._add(h[t]);else this._add&&this._add(h)}}},t.exports=n},function(t,e){t.exports=function(t,e,i,n,r){n.eachRawSeriesByType(t,function(t){var r=t.getData(),o=t.get("symbol")||e,a=t.get("symbolSize");r.setVisual({legendSymbol:i||o,symbol:o,symbolSize:a}),n.isSeriesFiltered(t)||("function"==typeof a&&r.each(function(e){var i=t.getRawValue(e),n=t.getDataParams(e);r.setItemVisual(e,"symbolSize",a(i,n))}),r.each(function(t){var e=r.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&r.setItemVisual(t,"symbol",i),null!=n&&r.setItemVisual(t,"symbolSize",n)}))})}},function(t,e,i){var n=i(34);t.exports=function(){if(0!==n.debugMode)if(1==n.debugMode)for(var t in arguments)throw new Error(arguments[t]);else if(n.debugMode>1)for(var t in arguments)console.log(arguments[t])}},function(t,e,i){function n(t){r.call(this,t)}var r=i(37),o=i(7),a=i(1),s=i(63),l=i(144),h=new l(50);n.prototype={constructor:n,type:"image",brush:function(t,e){var i,n=this.style,r=n.image;if(n.bind(t,e),i="string"==typeof r?this._image:r,!i&&r){var o=h.get(r);if(!o)return i=new Image,i.onload=function(){i.onload=null;for(var t=0;t0?"top":"bottom",n="center"):c(o-d)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&d>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,verticalAlign:r}}function o(t,e,i){var n,r,o=u(-t.rotation),a=i[0]>i[1],s="start"===e&&!a||"start"!==e&&a;return c(o-d/2)?(r=s?"bottom":"top",n="center"):c(o-1.5*d)?(r=s?"top":"bottom",n="center"):(r="middle",n=1.5*d>o&&o>d/2?s?"left":"right":s?"right":"left"),{rotation:o,textAlign:n,verticalAlign:r}}var a=i(1),s=i(3),l=i(12),h=i(4),u=h.remRadian,c=h.isRadianAroundZero,d=Math.PI,f=function(t,e){this.opt=e,this.axisModel=t,a.defaults(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new s.Group({position:e.position.slice(),rotation:e.rotation})};f.prototype={constructor:f,hasBuilder:function(t){return!!p[t]},add:function(t){p[t].call(this)},getGroup:function(){return this.group}};var p={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent();this.group.add(new s.Line({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:a.extend({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle()),strokeContainThreshold:t.strokeContainThreshold,silent:!!t.axisLineSilent,z2:1}))}},axisTick:function(){var t=this.axisModel;if(t.get("axisTick.show")){for(var e=t.axis,i=t.getModel("axisTick"),n=this.opt,r=i.getModel("lineStyle"),o=i.get("length"),a=m(i,n.labelInterval),l=e.getTicksCoords(),h=[],u=0;ud[1]?-1:1,p=["start"===l?d[0]-f*c:"end"===l?d[1]+f*c:(d[0]+d[1])/2,"middle"===l?t.labelOffset+h*c:0];a="middle"===l?r(t,t.rotation,h):o(t,l,d);var g=new s.Text({style:{text:i,textFont:u.getFont(),fill:u.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:a.textAlign,textVerticalAlign:a.verticalAlign},position:p,rotation:a.rotation,silent:e.get("silent"),z2:1});g.eventData=n(e),g.eventData.targetType="axisName",g.eventData.name=i,this.group.add(g)}}},g=f.ifIgnoreOnTick=function(t,e,i){var n,r=t.scale;return"ordinal"===r.type&&("function"==typeof i?(n=r.getTicks()[e],!i(n,r.getLabel(n))):e%(i+1))},m=f.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};t.exports=f},function(t,e,i){function n(t){return a.isObject(t)&&null!=t.value?t.value:t}function r(){return"category"===this.get("type")&&a.map(this.get("data"),n)}function o(){return s.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))}var a=i(1),s=i(25);t.exports={getFormattedLabels:o,getCategories:r}},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(10),o=i(1),a=i(68),s=r.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this._resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this._resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this._resetRange()},setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},getMin:function(){var t=this.option;return null!=t.rangeStart?t.rangeStart:t.min},getMax:function(){var t=this.option;return null!=t.rangeEnd?t.rangeEnd:t.max},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},_resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}});o.merge(s.prototype,i(51));var l={gridIndex:0};a("x",s,n,l),a("y",s,n,l),t.exports=s},function(t,e,i){function n(t,e,i){return i.getComponent("grid",t.get("gridIndex"))===e}function r(t){var e,i=t.model,n=i.getFormattedLabels(),r=1,o=n.length;o>40&&(r=Math.ceil(o/40));for(var a=0;o>a;a+=r)if(!t.isLabelIgnored(a)){var s=i.getTextRect(n[a]);e?e.union(s):e=s}return e}function o(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this._model=t}function a(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}var s=i(14),l=i(25),h=i(1),u=i(111),c=i(109),d=h.each,f=l.ifAxisCrossZero,p=l.niceScaleExtent;i(112);var g=o.prototype;g.type="grid",g.getRect=function(){return this._rect},g.update=function(t,e){function i(t){var e=n[t];for(var i in e){var r=e[i];if(r&&("category"===r.type||!f(r)))return!0}return!1}var n=this._axesMap;this._updateScale(t,this._model),d(n.x,function(t){p(t,t.model)}),d(n.y,function(t){p(t,t.model)}),d(n.x,function(t){i("y")&&(t.onZero=!1)}),d(n.y,function(t){i("x")&&(t.onZero=!1)}),this.resize(this._model,e)},g.resize=function(t,e){function i(){d(o,function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),a(t,e?n.x:n.y)})}var n=s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var o=this._axesList;i(),t.get("containLabel")&&(d(o,function(t){if(!t.model.get("axisLabel.inside")){var e=r(t);if(e){var i=t.isHorizontal()?"height":"width",o=t.model.get("axisLabel.margin");n[i]-=e[i]+o,"top"===t.position?n.y+=e.height+o:"left"===t.position&&(n.x+=e.width+o)}}}),i())},g.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)return i[n];return i[e]}},g.getCartesian=function(t,e){var i="x"+t+"y"+e;return this._coordsMap[i]},g._initCartesian=function(t,e,i){function r(i){return function(r,h){if(n(r,t,e)){var u=r.get("position");"x"===i?("top"!==u&&"bottom"!==u&&(u="bottom"),o[u]&&(u="top"===u?"bottom":"top")):("left"!==u&&"right"!==u&&(u="left"),o[u]&&(u="left"===u?"right":"left")),o[u]=!0;var d=new c(i,l.createScaleByModel(r),[0,0],r.get("type"),u),f="category"===d.type;d.onBand=f&&r.get("boundaryGap"),d.inverse=r.get("inverse"),d.onZero=r.get("axisLine.onZero"),r.axis=d,d.model=r,d.index=h,this._axesList.push(d),a[i][h]=d,s[i]++}}}var o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};return e.eachComponent("xAxis",r("x"),this),e.eachComponent("yAxis",r("y"),this),s.x&&s.y?(this._axesMap=a,void d(a.x,function(t,e){d(a.y,function(i,n){var r="x"+e+"y"+n,o=new u(r);o.grid=this,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)},this)},this)):(this._axesMap={},void(this._axesList=[]))},g._updateScale=function(t,e){function i(t,e,i){d(i.coordDimToDataDim(e.dim),function(i){e.scale.unionExtent(t.getDataExtent(i,"ordinal"!==e.scale.type))})}h.each(this._axesList,function(t){t.scale.setExtent(1/0,-(1/0))}),t.eachSeries(function(r){if("cartesian2d"===r.get("coordinateSystem")){var o=r.get("xAxisIndex"),a=r.get("yAxisIndex"),s=t.getComponent("xAxis",o),l=t.getComponent("yAxis",a);if(!n(s,e,t)||!n(l,e,t))return;var h=this.getCartesian(o,a),u=r.getData(),c=h.getAxis("x"),d=h.getAxis("y");"list"===u.type&&(i(u,c,r),i(u,d,r))}},this)},o.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,r){var a=new o(n,t,e);a.name="grid_"+r,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("cartesian2d"===e.get("coordinateSystem")){var n=e.get("xAxisIndex"),r=e.get("yAxisIndex"),o=t.getComponent("xAxis",n),a=i[o.get("gridIndex")];e.coordinateSystem=a.getCartesian(n,r)}}),i},o.dimensions=u.prototype.dimensions,i(24).register("cartesian2d",o),t.exports=o},function(t,e){t.exports=function(t,e){e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem;if(i){var n=i.dimensions;"singleAxis"===i.type?e.each(n[0],function(t,n){e.setItemLayout(n,isNaN(t)?[NaN,NaN]:i.dataToPoint(t))}):e.each(n,function(t,n,r){e.setItemLayout(r,isNaN(t)||isNaN(n)?[NaN,NaN]:i.dataToPoint([t,n]))},!0)}})}},function(t,e){t.exports={clearColorPalette:function(){this._colorIdx=0,this._colorNameMap={}},getColorFromPalette:function(t,e){e=e||this;var i=e._colorIdx||0,n=e._colorNameMap||(e._colorNameMap={});if(n[t])return n[t];var r=this.get("color",!0)||[];if(r.length){var o=r[i];return t&&(n[t]=o),e._colorIdx=(i+1)%r.length,o}}}},function(t,e,i){var n=i(28),r=i(42),o=i(20),a=function(){this.group=new n,this.uid=r.getUID("viewComponent")};a.prototype={constructor:a,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var s=a.prototype;s.updateView=s.updateLayout=s.updateVisual=function(t,e,i,n){},o.enableClassExtend(a),o.enableClassManagement(a,{registerWhenExtend:!0}),t.exports=a},function(t,e,i){"use strict";var n=i(61),r=i(21),o=i(83),a=i(160),s=i(1),l=function(t){o.call(this,t),r.call(this,t),a.call(this,t),this.id=t.id||n()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(s.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i.5?e:t}function s(t,e,i,n,r){var a=t.length;if(1==r)for(var s=0;a>s;s++)n[s]=o(t[s],e[s],i);else for(var l=t[0].length,s=0;a>s;s++)for(var h=0;l>h;h++)n[s][h]=o(t[s][h],e[s][h],i)}function l(t,e,i){var n=t.length,r=e.length;if(n!==r){var o=n>r;if(o)t.length=r;else for(var a=n;r>a;a++)t.push(1===i?e[a]:x.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;al;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function h(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;n>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function u(t,e,i,n,r,o,a,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=c(t[u],e[u],i[u],n[u],r,o,a);else for(var d=t[0].length,u=0;h>u;u++)for(var f=0;d>f;f++)s[u][f]=c(t[u][f],e[u][f],i[u][f],n[u][f],r,o,a)}function c(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function d(t){if(y(t)){var e=t.length;if(y(t[0])){for(var i=[],n=0;e>n;n++)i.push(x.call(t[n]));return i}return x.call(t)}return t}function f(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function p(t,e,i,n,r){var d=t._getter,p=t._setter,v="spline"===e,x=n.length;if(x){var _,b=n[0].value,w=y(b),S=!1,M=!1,I=w&&y(b[0])?2:1;n.sort(function(t,e){return t.time-e.time}),_=n[x-1].time;for(var A=[],T=[],L=n[0].value,C=!0,D=0;x>D;D++){A.push(n[D].time/_);var P=n[D].value;if(w&&h(P,L,I)||!w&&P===L||(C=!1),L=P,"string"==typeof P){var k=m.parse(P);k?(P=k,S=!0):M=!0}T.push(P)}if(!C){for(var z=T[x-1],D=0;x-1>D;D++)w?l(T[D],z,I):!isNaN(T[D])||isNaN(z)||M||S||(T[D]=z);w&&l(d(t._target,r),z,I);var O,E,R,V,N,B,G=0,F=0;if(S)var H=[0,0,0,0];var W=function(t,e){var i;if(F>e){for(O=Math.min(G+1,x-1),i=O;i>=0&&!(A[i]<=e);i--);i=Math.min(i,x-2)}else{for(i=G;x>i&&!(A[i]>e);i++);i=Math.min(i-1,x-2)}G=i,F=e;var n=A[i+1]-A[i];if(0!==n)if(E=(e-A[i])/n,v)if(V=T[i],R=T[0===i?i:i-1],N=T[i>x-2?x-1:i+1],B=T[i>x-3?x-1:i+2],w)u(R,V,N,B,E,E*E,E*E*E,d(t,r),I);else{var l;if(S)l=u(R,V,N,B,E,E*E,E*E*E,H,1),l=f(H);else{if(M)return a(V,N,E);l=c(R,V,N,B,E,E*E,E*E*E)}p(t,r,l)}else if(w)s(T[i],T[i+1],E,d(t,r),I);else{var l;if(S)s(T[i],T[i+1],E,H,1),l=f(H);else{if(M)return a(T[i],T[i+1],E);l=o(T[i],T[i+1],E)}p(t,r,l)}},Z=new g({target:t._target,life:_,loop:t._loop,delay:t._delay,onframe:W,ondestroy:i});return e&&"spline"!==e&&(Z.easing=e),Z}}}var g=i(136),m=i(17),v=i(1),y=v.isArrayLike,x=Array.prototype.slice,_=function(t,e,i,o){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||n,this._setter=o||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};_.prototype={when:function(t,e){var i=this._tracks;for(var n in e){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:d(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;i++)t[i].call(this)},start:function(t){var e,i=this,n=0,r=function(){n--,n||i._doneCallback()};for(var o in this._tracks){var a=p(this,t,r,this._tracks[o],o);a&&(this._clipList.push(a),n++,this.animation&&this.animation.addClip(a),e=a)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var n=0;nt&&(t+=i),t}}},function(t,e){var i=2311;t.exports=function(){return"zr_"+i++}},function(t,e,i){var n=i(150),r=i(149);t.exports={buildPath:function(t,e,i){var o=e.points,a=e.smooth;if(o&&o.length>=2){if(a&&"spline"!==a){var s=r(o,a,i,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var l=o.length,h=0;(i?l:l-1)>h;h++){var u=s[2*h],c=s[2*h+1],d=o[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],d[0],d[1])}}else{"spline"===a&&(o=n(o,i)),t.moveTo(o[0][0],o[0][1]);for(var h=1,f=o.length;f>h;h++)t.lineTo(o[h][0],o[h][1])}i&&t.closePath()}}}},function(t,e){t.exports={buildPath:function(t,e){var i,n,r,o,a=e.x,s=e.y,l=e.width,h=e.height,u=e.r;0>l&&(a+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=r=o=u:u instanceof Array?1===u.length?i=n=r=o=u[0]:2===u.length?(i=r=u[0],n=o=u[1]):3===u.length?(i=u[0],n=o=u[1],r=u[2]):(i=u[0],n=u[1],r=u[2],o=u[3]):i=n=r=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),n+r>h&&(c=n+r,n*=h/c,r*=h/c),i+o>h&&(c=i+o,i*=h/c,o*=h/c),t.moveTo(a+i,s),t.lineTo(a+l-n,s),0!==n&&t.quadraticCurveTo(a+l,s,a+l,s+n),t.lineTo(a+l,s+h-r),0!==r&&t.quadraticCurveTo(a+l,s+h,a+l-r,s+h),t.lineTo(a+o,s+h),0!==o&&t.quadraticCurveTo(a,s+h,a,s+h-o),t.lineTo(a,s+i),0!==i&&t.quadraticCurveTo(a,s,a+i,s)}}},function(t,e,i){var n=i(1);t.exports={updateSelectedMap:function(t){this._selectTargetMap=n.reduce(t||[],function(t,e){return t[e.name]=e,t},{})},select:function(t){var e=this._selectTargetMap,i=e[t],r=this.get("selectedMode");"single"===r&&n.each(e,function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t){var e=this._selectTargetMap[t];e&&(e.selected=!1)},toggleSelected:function(t){var e=this._selectTargetMap[t];return null!=e?(this[e.selected?"unSelect":"select"](t),e.selected):void 0},isSelected:function(t){var e=this._selectTargetMap[t];return e&&e.selected}}},function(t,e,i){function n(t){r.defaultEmphasis(t.label,r.LABEL_OPTIONS)}var r=i(8),o=i(1),a=i(11),s=i(9),l=s.addCommas,h=s.encodeHTML,u=i(2).extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},ifEnableAnimation:function(){if(a.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.ifEnableAnimation()},mergeOption:function(t,e,i,r){var a=this.constructor,s=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),l=t[s];if(!i||!i.data)return void(t[s]=null);if(l)l.mergeOption(i,e,!0);else{r&&n(i),o.each(i.data,function(t){t instanceof Array?(n(t[0]),n(t[1])):n(t)});var h={mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0};l=new a(i,this,e,h),l.__hostSeries=t}t[s]=l},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=o.isArray(i)?o.map(i,l).join(", "):l(i),r=e.getName(t),a=this.name;return(null!=i||r)&&(a+="
"),r&&(a+=h(r),null!=i&&(a+=" : ")),null!=i&&(a+=n),a},getData:function(){return this._data},setData:function(t){this._data=t}});o.mixin(u,r.dataFormatMixin),t.exports=u},function(t,e,i){t.exports=i(2).extendComponentView({type:"marker",init:function(){this.markerGroupMap={}},render:function(t,e,i){var n=this.markerGroupMap;for(var r in n)n[r].__keep=!1;var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this);for(var r in n)n[r].__keep||this.group.remove(n[r].group)},renderSeries:function(){}})},function(t,e,i){function n(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function r(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function o(t,e,i){var n=-1;do n=Math.max(l.getPrecision(t.get(e,i)),n),t=t.stackedOn;while(t);return n}function a(t,e,i,n,r,a){var s=[],l=m(e,n,t),h=e.indexOfNearest(n,l,!0);s[r]=e.get(i,h,!0),s[a]=e.get(n,h,!0);var u=o(e,n,h);return u>=0&&(s[a]=+s[a].toFixed(u)),s}var s=i(1),l=i(4),h=s.indexOf,u=s.curry,c={min:u(a,"min"),max:u(a,"max"),average:u(a,"average")},d=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!r(e)&&!s.isArray(e.coord)&&n){var o=n.dimensions,a=f(e,i,n,t);if(e=s.clone(e),e.type&&c[e.type]&&a.baseAxis&&a.valueAxis){var l=h(o,a.baseAxis.dim),u=h(o,a.valueAxis.dim);e.coord=c[e.type](i,a.baseDataDim,a.valueDataDim,l,u),e.value=e.coord[u]}else{for(var d=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],p=0;2>p;p++)if(c[d[p]]){var g=t.coordDimToDataDim(o[p])[0];d[p]=m(i,g,d[p])}e.coord=d}}return e},f=function(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(n.dataDimToCoordDim(r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0]):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0],r.valueDataDim=n.coordDimToDataDim(r.valueAxis.dim)[0]),r},p=function(t,e){return t&&t.containData&&e.coord&&!n(e)?t.containData(e.coord):!0},g=function(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value},m=function(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,r++)},!0),n/r}return t.getDataExtent(e,!0)["max"===i?1:0]};t.exports={dataTransform:d,dataFilter:p,dimValueGetter:g,getAxisInfo:f,numCalculate:m}},function(t,e,i){var n=i(78),r=i(1),o=i(10),a=i(14),s=["value","category","time","log"];t.exports=function(t,e,i,l){r.each(s,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,n){var s=this.layoutMode,l=s?a.getLayoutParams(e):{},h=n.getTheme();r.merge(e,h.get(o+"Axis")),r.merge(e,this.getDefaultOption()),e.type=i(t,e),s&&a.mergeLayoutParam(e,l,s)},defaultOption:r.mergeAll([{},n[o+"Axis"],l],!0)})}),o.registerSubTypeDefaulter(t+"Axis",r.curry(i,t))}},function(t,e){t.exports=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;rf;f++){var x=v(t,i,o,h,p[f]);c[0]=a(x,c[0]),d[0]=s(x,d[0])}for(y=m(e,n,l,u,g),f=0;y>f;f++){var _=v(e,n,l,u,g[f]);c[1]=a(_,c[1]),d[1]=s(_,d[1])}c[0]=a(t,c[0]),d[0]=s(t,d[0]),c[0]=a(h,c[0]),d[0]=s(h,d[0]),c[1]=a(e,c[1]),d[1]=s(e,d[1]),c[1]=a(u,c[1]),d[1]=s(u,d[1])},o.fromQuadratic=function(t,e,i,n,o,l,h,u){var c=r.quadraticExtremum,d=r.quadraticAt,f=s(a(c(t,i,o),1),0),p=s(a(c(e,n,l),1),0),g=d(t,i,o,f),m=d(e,n,l,p);h[0]=a(t,o,g),h[1]=a(e,l,m),u[0]=s(t,o,g),u[1]=s(e,l,m)},o.fromArc=function(t,e,i,r,o,a,s,p,g){var m=n.min,v=n.max,y=Math.abs(o-a);if(1e-4>y%f&&y>1e-4)return p[0]=t-i,p[1]=e-r,g[0]=t+i,void(g[1]=e+r);if(u[0]=h(o)*i+t,u[1]=l(o)*r+e,c[0]=h(a)*i+t,c[1]=l(a)*r+e,m(p,u,c),v(g,u,c),o%=f,0>o&&(o+=f),a%=f,0>a&&(a+=f),o>a&&!s?a+=f:a>o&&s&&(o+=f),s){var x=a;a=o,o=x}for(var _=0;a>_;_+=Math.PI/2)_>o&&(d[0]=h(_)*i+t,d[1]=l(_)*r+e,m(p,d,p),v(g,d,g))},t.exports=o},function(t,e,i){var n=i(37),r=i(1),o=i(18),a=function(t){n.call(this,t)};a.prototype={constructor:a,type:"text",brush:function(t,e){var i=this.style,n=i.x||0,r=i.y||0,a=i.text;if(null!=a&&(a+=""),i.bind(t,e),a){this.setTransform(t);var s,l=i.textAlign;if(i.textVerticalAlign){var h=o.getBoundingRect(a,t.font,i.textAlign,"top");switch(s="middle",i.textVerticalAlign){case"middle":r-=h.height/2-h.lineHeight/2;break;case"bottom":r-=h.height-h.lineHeight/2;break;default:r+=h.lineHeight/2}}else s=i.textBaseline;t.font=i.textFont||i.font,t.textAlign=l||"left",t.textAlign!==l&&(t.textAlign="left"),t.textBaseline=s||"alphabetic",t.textBaseline!==s&&(t.textBaseline="alphabetic");for(var u=o.measureText("国",t.font).width,c=a.split("\n"),d=0;d=0?parseFloat(t)/100*e:parseFloat(t):t}var r=i(18),o=i(7),a=new o,s=function(){};s.prototype={constructor:s,drawRectText:function(t,e,i){var o=this.style,s=o.text;if(null!=s&&(s+=""),s){t.save();var l,h,u=o.textPosition,c=o.textDistance,d=o.textAlign,f=o.textFont||o.font,p=o.textBaseline,g=o.textVerticalAlign;i=i||r.getBoundingRect(s,f,d,p);var m=this.transform;if(m&&(a.copy(e),a.applyTransform(m),e=a),u instanceof Array){if(l=e.x+n(u[0],e.width),h=e.y+n(u[1],e.height),d=d||"left",p=p||"top",g){switch(g){case"middle":h-=i.height/2-i.lineHeight/2;break;case"bottom":h-=i.height-i.lineHeight/2;break;default:h+=i.lineHeight/2}p="middle"}}else{var v=r.adjustTextPositionOnRect(u,e,i,c);l=v.x,h=v.y,d=d||v.textAlign,p=p||v.textBaseline}t.textAlign=d||"left",t.textBaseline=p||"alphabetic";var y=o.textFill,x=o.textStroke;y&&(t.fillStyle=y),x&&(t.strokeStyle=x),t.font=f,t.shadowBlur=o.textShadowBlur,t.shadowColor=o.textShadowColor||"transparent",t.shadowOffsetX=o.textShadowOffsetX,t.shadowOffsetY=o.textShadowOffsetY;for(var _=s.split("\n"),b=0;b<_.length;b++)y&&t.fillText(_[b],l,h),x&&t.strokeText(_[b],l,h),h+=i.lineHeight;t.restore()}}},t.exports=s},function(t,e,i){function n(t){delete c[t]}/*! +var y=i(12),x=i(122),_=i(88),b=i(23),w=i(123),S=i(10),M=i(15),A=i(57),I=i(27),T=i(3),L=i(77),C=i(1),D=i(17),P=i(22),k=i(44),z=C.each,O=1e3,E=5e3,R=1e3,V=2e3,N=3e3,B=4e3,G=5e3,F="__flag_in_main_process",H="_hasGradientOrPatternBg";r.prototype.on=n("on"),r.prototype.off=n("off"),r.prototype.one=n("one"),C.mixin(r,P);var W=o.prototype;W.getDom=function(){return this._dom},W.getZr=function(){return this._zr},W.setOption=function(t,e,i){this[F]=!0,this._model&&!e||(this._model=new x(null,null,this._theme,new w(this._api))),this._model.setOption(t,$),Z.prepareAndUpdate.call(this),this[F]=!1,this._flushPendingActions(),!i&&this._zr.refreshImmediately()},W.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},W.getModel=function(){return this._model},W.getOption=function(){return this._model.getOption()},W.getWidth=function(){return this._zr.getWidth()},W.getHeight=function(){return this._zr.getHeight()},W.getRenderedCanvas=function(t){if(y.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr,i=e.storage.getDisplayList();return C.each(i,function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},W.getDataURL=function(t){t=t||{};var e=t.excludeComponents,i=this._model,n=[],r=this;z(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o=this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return z(n,function(t){t.group.ignore=!1}),o},W.getConnectedDataURL=function(t){if(y.canvasSupported){var e=this.group,i=Math.min,n=Math.max,r=1/0;if(tt[e]){var o=r,a=r,s=-r,l=-r,u=[],h=t&&t.pixelRatio||1;for(var c in J){var d=J[c];if(d.group===e){var f=d.getRenderedCanvas(C.clone(t)),p=d.getDom().getBoundingClientRect();o=i(p.left,o),a=i(p.top,a),s=n(p.right,s),l=n(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}o*=h,a*=h,s*=h,l*=h;var g=s-o,v=l-a,m=C.createCanvas();m.width=g,m.height=v;var x=L.init(m);return z(u,function(t){var e=new T.Image({style:{x:t.left*h-o,y:t.top*h-a,image:t.dom}});x.add(e)}),x.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}};var Z={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr,r=this._zr;if(e){e.restoreData(),n.create(this._model,this._api),u.call(this,e,i),h.call(this,e),n.update(e,i),d.call(this,e,t),f.call(this,e,t);var o=e.get("backgroundColor")||"transparent",a=r.painter;if(a.isSingleCanvas&&a.isSingleCanvas())r.configLayer(0,{clearColor:o});else{if(!y.canvasSupported){var s=D.parse(o);o=D.stringify(s,"rgb"),0===s[3]&&(o="transparent")}o.colorStops||o.image?(r.configLayer(0,{clearColor:o}),this[H]=!0,this._dom.style.background="transparent"):(this[H]&&r.configLayer(0,{clearColor:null}),this[H]=!1,this._dom.style.background=o)}}},updateView:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),d.call(this,e,t),s.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),d.call(this,e,t),s.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(c.call(this,e,t),s.call(this,"updateLayout",e,t))},highlight:function(t){a.call(this,"highlight",t)},downplay:function(t){a.call(this,"downplay",t)},prepareAndUpdate:function(t){var e=this._model;l.call(this,"component",e),l.call(this,"chart",e),Z.update.call(this,t)}};W.resize=function(){this[F]=!0,this._zr.resize();var t=this._model&&this._model.resetOption("media");Z[t?"prepareAndUpdate":"update"].call(this),this._loadingFX&&this._loadingFX.resize(),this[F]=!1,this._flushPendingActions()};var q=i(121);W.showLoading=function(t,e){C.isObject(t)&&(e=t,t="default"),this.hideLoading();var i=q(this._api,e),n=this._zr;this._loadingFX=i,n.add(i)},W.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},W.makeActionFromEvent=function(t){var e=C.extend({},t);return e.type=X[t.type],e},W.dispatchAction=function(t,e){var i=U[t.type];if(i){var n=i.actionInfo,r=n.update||"update";if(this[F])return void this._pendingActions.push(t);this[F]=!0;var o=[t],a=!1;t.batch&&(a=!0,o=C.map(t.batch,function(e){return e=C.defaults(C.extend({},e),t),e.batch=null,e}));for(var s,l=[],u="highlight"===t.type||"downplay"===t.type,h=0;h0?e.animateTo(i,l,h||0,u,o):(e.attr(i),o&&o())}else e.attr(i),o&&o()}var v=i(1),m=i(164),y=Math.round,x=i(6),_=i(17),b=i(19),w=i(5),S=(i(29),{});S.Group=i(34),S.Image=i(48),S.Text=i(75),S.Circle=i(155),S.Sector=i(161),S.Ring=i(160),S.Polygon=i(157),S.Polyline=i(158),S.Rect=i(159),S.Line=i(156),S.BezierCurve=i(154),S.Arc=i(153),S.CompoundPath=i(149),S.LinearGradient=i(86),S.RadialGradient=i(150),S.BoundingRect=i(7),S.extendShape=function(t){return x.extend(t)},S.extendPath=function(t,e){return m.extendFromString(t,e)},S.makePath=function(t,e,i,n){var r=m.createFromString(t,e),o=r.getBoundingRect();if(i){var a=o.width/o.height;if("center"===n){var s,l=i.height*a;l<=i.width?s=i.height:(l=i.width,s=l/a);var u=i.x+i.width/2,h=i.y+i.height/2;i.x=u-l/2,i.y=h-s/2,i.width=l,i.height=s}this.resizePath(r,i)}return r},S.mergePath=m.mergePath,S.resizePath=function(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}},S.subPixelOptimizeLine=function(t){var e=S.subPixelOptimize,i=t.shape,n=t.style.lineWidth;return y(2*i.x1)===y(2*i.x2)&&(i.x1=i.x2=e(i.x1,n,!0)),y(2*i.y1)===y(2*i.y2)&&(i.y1=i.y2=e(i.y1,n,!0)),t},S.subPixelOptimizeRect=function(t){var e=S.subPixelOptimize,i=t.shape,n=t.style.lineWidth,r=i.x,o=i.y,a=i.width,s=i.height;return i.x=e(i.x,n,!0),i.y=e(i.y,n,!0),i.width=Math.max(e(r+a,n,!1)-i.x,0===a?0:1),i.height=Math.max(e(o+s,n,!1)-i.y,0===s?0:1),t},S.subPixelOptimize=function(t,e,i){var n=y(2*t);return(n+y(e))%2===0?n/2:(n+(i?1:-1))/2},S.setHoverStyle=function(t,e){"group"===t.type?t.traverse(function(t){"group"!==t.type&&h(t,e)}):h(t,e),t.on("mouseover",c).on("mouseout",d),t.on("emphasis",f).on("normal",p)},S.setText=function(t,e,i){var n=e.getShallow("position")||"inside",r=n.indexOf("inside")>=0?"white":i,o=e.getModel("textStyle");v.extend(t,{textDistance:e.getShallow("distance")||5,textFont:o.getFont(),textPosition:n,textFill:o.getTextColor()||r})},S.updateProps=function(t,e,i,n,r){g(!0,t,e,i,n,r)},S.initProps=function(t,e,i,n,r){g(!1,t,e,i,n,r)},S.getTransform=function(t,e){for(var i=b.identity([]);t&&t!==e;)b.mul(i,t.getLocalTransform(),i),t=t.parent;return i},S.applyTransform=function(t,e,i){return i&&(e=b.invert([],e)),w.applyTransform([],t,e)},S.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return o=S.applyTransform(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},S.groupTransition=function(t,e,i,n){function r(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function o(t){var e={position:w.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=v.extend({},t.shape)),e}if(t&&e){var a=r(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=o(t);t.attr(o(e)),S.updateProps(t,n,i,t.dataIndex)}}})}},t.exports=S},function(t,e){function i(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}var n={},r=1e-4;n.linearMap=function(t,e,i,n){var r=e[1]-e[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]},n.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?i(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},n.round=function(t){return+(+t).toFixed(10)},n.asc=function(t){return t.sort(function(t,e){return t-e}),t},n.getPrecision=function(t){if(isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},n.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n);return Math.max(-r+o,0)},n.MAX_SAFE_INTEGER=9007199254740991,n.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},n.isRadianAroundZero=function(t){return t>-r&&r>t},n.parseDate=function(t){return t instanceof Date?t:new Date("string"==typeof t?new Date(t.replace(/-/g,"/"))-new Date("1970/01/01"):Math.round(t))},n.quantity=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},n.nice=function(t,e){var i,r=n.quantity(t),o=t/r;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,i*r},t.exports=n},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(t,e){var n=new i(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},normalize:function(t,e){var i=n.len(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}};n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t.exports=n},function(t,e,i){function n(t){r.call(this,t),this.path=new a}var r=i(37),o=i(1),a=i(28),s=i(146),l=i(63),u=l.prototype.getCanvasPattern,h=Math.abs;n.prototype={constructor:n,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path,r=i.hasStroke(),o=i.hasFill(),a=i.fill,s=i.stroke,l=o&&!!a.colorStops,h=r&&!!s.colorStops,c=o&&!!a.image,d=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f=this.getBoundingRect();l&&(this._fillGradient=i.getGradient(t,a,f)),h&&(this._strokeGradient=i.getGradient(t,s,f))}l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=u.call(a,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=u.call(s,t));var p=i.lineDash,g=i.lineDashOffset,v=!!t.setLineDash,m=this.getGlobalScale();n.setScale(m[0],m[1]),this.__dirtyPath||p&&!v&&r?(n=this.path.beginPath(t),p&&!v&&(n.setLineDash(p),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),o&&n.fill(t),p&&v&&(t.setLineDash(p),t.lineDashOffset=g),r&&n.stroke(t),p&&v&&t.setLineDash([]),this.restoreTransform(t),(i.text||0===i.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),s.containStroke(o,a/l,t,e)))return!0}if(r.hasFill())return s.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(o.isObject(t))for(var n in t)i[n]=t[n];else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&h(t[0]-1)>1e-10&&h(t[3]-1)>1e-10?Math.sqrt(h(t[0]*t[3]-t[2]*t[1])):1}},n.extend=function(t){var e=function(e){n.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var o in i)!r.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(r[o]=i[o])}t.init&&t.init.call(this,e)};o.inherits(e,n);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},o.inherits(n,r),t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){this.x=t,this.y=e,this.width=i,this.height=n}var r=i(5),o=i(19),a=r.applyTransform,s=Math.min,l=Math.abs,u=Math.max;n.prototype={constructor:n,union:function(t){var e=s(t.x,this.x),i=s(t.y,this.y);this.width=u(t.x+t.width,this.x+this.width)-e,this.height=u(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[];return function(i){i&&(t[0]=this.x,t[1]=this.y,e[0]=this.x+this.width,e[1]=this.y+this.height,a(t,t,i),a(e,e,i),this.x=s(t[0],e[0]),this.y=s(t[1],e[1]),this.width=l(e[0]-t[0]),this.height=l(e[1]-t[1]))}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=o.create();return o.translate(r,r,[-e.x,-e.y]),o.scale(r,r,[i,n]),o.translate(r,r,[t.x,t.y]),r},intersect:function(t){var e=this,i=e.x,n=e.x+e.width,r=e.y,o=e.y+e.height,a=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(a>n||i>s||l>o||r>u)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new n(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},t.exports=n},function(t,e,i){var n=i(11),r=i(4),o=i(9),a=i(1),s=["x","y","z","radius","angle"],l={};l.createNameEach=function(t,e){t=t.slice();var i=a.map(t,l.capitalFirst);e=(e||[]).slice();var n=a.map(e,l.capitalFirst);return function(r,o){a.each(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){a.each(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function o(t,n){n.nodes.push(t),e(function(e){a.each(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function a(t){!n(t,s)&&r(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(a);while(l);return s}},l.defaultEmphasis=function(t,e){if(t){var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{};a.each(e,function(t){var e=a.retrieve(i[t],n[t]);null!=e&&(i[t]=e)})}},l.LABEL_OPTIONS=["position","show","textStyle","distance","formatter"],l.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},l.isDataItemOption=function(t){return a.isObject(t)&&!(t instanceof Array)},l.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isFinite(t)||null==t||"-"===t||(t=+r.parseDate(t)),null==t||""===t?NaN:+t)},l.createDataFormatModel=function(t,e){var i=new o;return a.mixin(i,l.dataFormatMixin),i.seriesIndex=e.seriesIndex,i.name=e.name||"",i.mainType=e.mainType,i.subType=e.subType,i.getData=function(){return t},i},l.dataFormatMixin={getDataParams:function(t,e){var i=this.getData(e),n=this.seriesIndex,r=this.name,o=this.getRawValue(t,e),a=i.getRawIndex(t),s=i.getName(t,!0),l=i.getRawDataItem(t);return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:n,seriesName:r,name:s,dataIndex:a,data:l,dataType:e,value:o,color:i.getItemVisual(t,"color"),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,r){e=e||"normal";var o=this.getData(i),a=o.getItemModel(t),s=this.getDataParams(t,i);null!=r&&s.value instanceof Array&&(s.value=s.value[r]);var l=a.get(["label",e,"formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?n.formatTpl(l,s):void 0},getRawValue:function(t,e){var i=this.getData(e),n=i.getRawDataItem(t);return null!=n?!a.isObject(n)||n instanceof Array?n:n.value:void 0},formatTooltip:a.noop},l.mappingToExists=function(t,e){e=(e||[]).slice();var i=a.map(t||[],function(t,e){return{exist:t}});return a.each(e,function(t,n){if(a.isObject(t))for(var r=0;r=i.length&&i.push({option:t})}}),i},l.isIdInner=function(t){return a.isObject(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")},l.truncate=function(t,e,i){if(!t)return t;for(var n=0,r=0,o=t.length;o>r&&e>n;r++)n+=t.charCodeAt(r)>255?2:1;return o>r&&(t=t.slice(0,r)+(i||"")),t},l.compressBatches=function(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var o=t[n].seriesId,a=l.normalizeToArray(t[n].dataIndex),s=i&&i[o],u=0,h=a.length;h>u;u++){var c=a[u];s&&s[c]?s[c]=null:(e[o]||(e[o]={}))[c]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var o=n(t[r],!0);o.length&&i.push({seriesId:r,dataIndex:o})}return i}var r={},o={};return i(t||[],r),i(e||[],o,r),[n(r),n(o)]},t.exports=l},function(t,e,i){function n(t,e,i,n){this.parentModel=e,this.ecModel=i,this.option=t,this.init&&(arguments.length<=4?this.init(t,e,i,n):this.init.apply(this,arguments))}var r=i(1),o=i(20);n.prototype={constructor:n,init:null,mergeOption:function(t){r.merge(this.option,t,!0)},get:function(t,e){if(!t)return this.option;"string"==typeof t&&(t=t.split("."));for(var i=this.option,n=this.parentModel,r=0;r=0;r--)n=o.merge(n,t[r],!0);this.__defaultOption=n}return this.__defaultOption}});l.enableClassExtend(h,function(t,e,i,n){o.extend(this,n),this.uid=s.getUID("componentModel")}),l.enableClassManagement(h,{registerWhenExtend:!0}),s.enableSubTypeDefaulter(h),s.enableTopologicalTravel(h,n),o.mixin(h,i(126)),t.exports=h},function(t,e,i){function n(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function r(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function o(t){var e=t.length;return"number"==typeof t?[t,t,t,t]:2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function a(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function s(t,e){return"{"+t+(null==e?"":e)+"}"}function l(t,e){c.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars,r=0;ra;a++)for(var l=0;lt?"0"+t:t}var c=i(1),d=i(4),f=["a","b","c","d","e","f","g"];t.exports={normalizeCssArray:o,addCommas:n,toCamelCase:r,encodeHTML:a,formatTpl:l,formatTime:u}},function(t,e){function i(t){var e={},i={},n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/);return n&&(i.ie=!0,i.version=n[1]),n&&(i.ie=!0,i.version=n[1]),r&&(i.edge=!0,i.version=r[1]),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=10)}}var n={};n="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:i(navigator.userAgent),t.exports=n},function(t,e,i){(function(e){function n(t){return d.isArray(t)||(t=[t]),t}function r(t,e){var i=t.dimensions,n=new m(d.map(i,t.getDimensionInfo,t),t.hostModel);v(n,t);for(var r=n._storage={},o=t._storage,a=0;a=0?r[s]=new l.constructor(o[s].length):r[s]=o[s]}return n}var o="undefined",a="undefined"==typeof window?e:window,s=typeof a.Float64Array===o?Array:a.Float64Array,l=typeof a.Int32Array===o?Array:a.Int32Array,u={"float":s,"int":l,ordinal:Array,number:Array,time:Array},h=i(9),c=i(45),d=i(1),f=i(8),p=d.isObject,g=["stackedOn","hasItemOption","_nameList","_idList","_rawData"],v=function(t,e){d.each(g.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods},m=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;r0&&(w+="__ec__"+h[b]),h[b]++),w&&(l[c]=w)}this._nameList=e,this._idList=l},y.count=function(){return this.indices.length},y.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r)return NaN;var o=n[t]&&n[t][r];if(i){var a=this._dimensionInfos[t];if(a&&a.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(o>=0&&l>0||0>=o&&0>l)&&(o+=l),s=s.stackedOn}}return o},y.getValues=function(t,e,i){var n=[];d.isArray(t)||(i=e,e=t,t=this.dimensions);for(var r=0,o=t.length;o>r;r++)n.push(this.get(t[r],e,i));return n},y.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},y.getDataExtent=function(t,e){t=this.getDimension(t);var i=this._storage[t],n=this.getDimensionInfo(t);e=n&&n.stackable&&e;var r,o=(this._extent||(this._extent={}))[t+!!e];if(o)return o;if(i){for(var a=1/0,s=-(1/0),l=0,u=this.count();u>l;l++)r=this.get(t,l,e),a>r&&(a=r),r>s&&(s=r);return this._extent[t+!!e]=[a,s]}return[1/0,-(1/0)]},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,o=this.count();o>r;r++){var a=this.get(t,r,e);isNaN(a)||(n+=a)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var o=0,a=r.length;a>o;o++){var s=r[o];if(n[s]===e)return o}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var o=e[n];if(i[o]===t)return n}return-1},y.indexOfRawIndex=function(t){for(var e=this.indices,i=0,n=e.length-1;n>=i;){var r=(i+n)/2|0;if(e[r]t))return r;n=r-1}}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,r=n[t];if(r){for(var o=Number.MAX_VALUE,a=-1,s=0,l=this.count();l>s;s++){var u=e-this.get(t,s,i),h=Math.abs(u);(o>h||h===o&&u>0)&&(o=h,a=s)}return a}return-1},y.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},y.getRawDataItem=function(t){ +return this._rawData[this.getRawIndex(t)]},y.getName=function(t){return this._nameList[this.indices[t]]||""},y.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},y.each=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],a=t.length,s=this.indices;r=r||this;for(var l=0;lu;u++)o[u]=this.get(t[u],l,i);o[u]=l,e.apply(r,o)}},y.filterSelf=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],a=[],s=t.length,l=this.indices;r=r||this;for(var u=0;uc;c++)a[c]=this.get(t[c],u,i);a[c]=u,h=e.apply(r,a)}h&&o.push(l[u])}return this.indices=o,this._extent={},this},y.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},y.map=function(t,e,i,o){t=d.map(n(t),this.getDimension,this);var a=r(this,t),s=a.indices=this.indices,l=a._storage,u=[];return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(u[0]=n,n=u);for(var r=0;rg;g+=d){d>p-g&&(d=p-g,h.length=d);for(var v=0;d>v;v++){var m=l[g+v];h[v]=f[m],c[v]=m}var y=i(h),m=c[n(h,y)||0];f[m]=y,u.push(m)}return o},y.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new h(this._rawData[t],e,e&&e.ecModel)},y.diff=function(t){var e=this._idList,i=t&&t._idList;return new c(t?t.indices:[],this.indices,function(t){return i[t]||t+""},function(t){return e[t]||t+""})},y.getVisual=function(t){var e=this._visual;return e&&e[t]},y.setVisual=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},y.setLayout=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},y.getLayout=function(t){return this._layout[t]},y.getItemLayout=function(t){return this._itemLayouts[t]},y.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?d.extend(this._itemLayouts[t]||{},e):e},y.clearItemLayouts=function(){this._itemLayouts.length=0},y.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=i},y.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var x=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};y.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(x,e)),this._graphicEls[t]=e},y.getItemGraphicEl=function(t){return this._graphicEls[t]},y.eachItemGraphicEl=function(t,e){d.each(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},y.cloneShallow=function(){var t=d.map(this.dimensions,this.getDimensionInfo,this),e=new m(t,this.hostModel);return e._storage=this._storage,v(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=d.extend({},this._extent)),e},y.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(d.slice(arguments)))})},y.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],y.CHANGABLE_METHODS=["filterSelf"],t.exports=m}).call(e,function(){return this}())},function(t,e,i){"use strict";function n(t,e,i,n,r){var o=0,a=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);h=o+v,h>n||l.newline?(o=0,h=v,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=a+m,c>r||l.newline?(o+=s+i,a=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=h+i:a=c+i)})}var r=i(1),o=i(7),a=i(4),s=i(11),l=a.parsePercent,u=r.each,h={},c=["left","right","top","bottom","width","height"];h.box=n,h.vbox=r.curry(n,"vertical"),h.hbox=r.curry(n,"horizontal"),h.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,o=l(t.x,n),a=l(t.y,r),u=l(t.x2,n),h=l(t.y2,r);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(u)||isNaN(parseFloat(t.x2)))&&(u=n),(isNaN(a)||isNaN(parseFloat(t.y)))&&(a=0),(isNaN(h)||isNaN(parseFloat(t.y2)))&&(h=r),i=s.normalizeCssArray(i||0),{width:Math.max(u-o-i[1]-i[3],0),height:Math.max(h-a-i[0]-i[2],0)}},h.getLayoutRect=function(t,e,i){i=s.normalizeCssArray(i||0);var n=e.width,r=e.height,a=l(t.left,n),u=l(t.top,r),h=l(t.right,n),c=l(t.bottom,r),d=l(t.width,n),f=l(t.height,r),p=i[2]+i[0],g=i[1]+i[3],v=t.aspect;switch(isNaN(d)&&(d=n-h-g-a),isNaN(f)&&(f=r-c-p-u),isNaN(d)&&isNaN(f)&&(v>n/r?d=.8*n:f=.8*r),null!=v&&(isNaN(d)&&(d=v*f),isNaN(f)&&(f=d/v)),isNaN(a)&&(a=n-h-d-g),isNaN(u)&&(u=r-c-f-p),t.left||t.right){case"center":a=n/2-d/2-i[3];break;case"right":a=n-d-g}switch(t.top||t.bottom){case"middle":case"center":u=r/2-f/2-i[0];break;case"bottom":u=r-f-p}a=a||0,u=u||0,isNaN(d)&&(d=n-a-(h||0)),isNaN(f)&&(f=r-u-(c||0));var m=new o(a+i[3],u+i[0],d,f);return m.margin=i,m},h.positionGroup=function(t,e,i,n){var o=t.getBoundingRect();e=r.extend(r.clone(e),{width:o.width,height:o.height}),e=h.getLayoutRect(e,i,n),t.attr("position",[e.x-o.x,e.y-o.y])},h.mergeLayoutParam=function(t,e,i){function n(n){var r={},s=0,l={},h=0,c=i.ignoreSize?1:2;if(u(n,function(e){l[e]=t[e]}),u(n,function(t){o(e,t)&&(r[t]=l[t]=e[t]),a(r,t)&&s++,a(l,t)&&h++}),h!==c&&s){if(s>=c)return r;for(var d=0;d',d=this.name;return"\x00-"===d&&(d=""),e?c+u(this.name)+" : "+a:(d&&u(d)+"
")+c+(s?u(s)+" : "+a:a)},ifEnableAnimation:function(){if(l.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()},getColorFromPalette:function(t,e){var i=this.ecModel,n=s.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipDataIndex:null});n.mixin(c,o.dataFormatMixin),n.mixin(c,s),t.exports=c},function(t,e,i){"use strict";function n(t){return t>-w&&w>t}function r(t){return t>w||-w>t}function o(t,e,i,n,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*n+3*o*i)}function a(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function s(t,e,i,r,o,a){var s=r+3*(e-i)-t,l=3*(i-2*e+t),u=3*(e-t),h=t-o,c=l*l-3*s*u,d=l*u-9*s*h,f=u*u-3*l*h,p=0;if(n(c)&&n(d))if(n(l))a[0]=0;else{var g=-u/l;g>=0&&1>=g&&(a[p++]=g)}else{var v=d*d-4*c*f;if(n(v)){var m=d/c,g=-l/s+m,y=-m/2;g>=0&&1>=g&&(a[p++]=g),y>=0&&1>=y&&(a[p++]=y)}else if(v>0){var x=b(v),w=c*l+1.5*s*(-d+x),S=c*l+1.5*s*(-d-x);w=0>w?-_(-w,A):_(w,A),S=0>S?-_(-S,A):_(S,A);var g=(-l-(w+S))/(3*s);g>=0&&1>=g&&(a[p++]=g)}else{var I=(2*c*l-3*s*d)/(2*b(c*c*c)),T=Math.acos(I)/3,L=b(c),C=Math.cos(T),g=(-l-2*L*C)/(3*s),y=(-l+L*(C+M*Math.sin(T)))/(3*s),D=(-l+L*(C-M*Math.sin(T)))/(3*s);g>=0&&1>=g&&(a[p++]=g),y>=0&&1>=y&&(a[p++]=y),D>=0&&1>=D&&(a[p++]=D)}}return p}function l(t,e,i,o,a){var s=6*i-12*e+6*t,l=9*e+3*o-3*t-9*i,u=3*e-3*t,h=0;if(n(l)){if(r(s)){var c=-u/s;c>=0&&1>=c&&(a[h++]=c)}}else{var d=s*s-4*l*u;if(n(d))a[0]=-s/(2*l);else if(d>0){var f=b(d),c=(-s+f)/(2*l),p=(-s-f)/(2*l);c>=0&&1>=c&&(a[h++]=c),p>=0&&1>=p&&(a[h++]=p)}}return h}function u(t,e,i,n,r,o){var a=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=n}function h(t,e,i,n,r,a,s,l,u,h,c){var d,f,p,g,v,m=.005,y=1/0;I[0]=u,I[1]=h;for(var _=0;1>_;_+=.05)T[0]=o(t,i,r,s,_),T[1]=o(e,n,a,l,_),g=x(I,T),y>g&&(d=_,y=g);y=1/0;for(var w=0;32>w&&!(S>m);w++)f=d-m,p=d+m,T[0]=o(t,i,r,s,f),T[1]=o(e,n,a,l,f),g=x(T,I),f>=0&&y>g?(d=f,y=g):(L[0]=o(t,i,r,s,p),L[1]=o(e,n,a,l,p),v=x(L,I),1>=p&&y>v?(d=p,y=v):m*=.5);return c&&(c[0]=o(t,i,r,s,d),c[1]=o(e,n,a,l,d)),b(y)}function c(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function d(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function f(t,e,i,o,a){var s=t-2*e+i,l=2*(e-t),u=t-o,h=0;if(n(s)){if(r(l)){var c=-u/l;c>=0&&1>=c&&(a[h++]=c)}}else{var d=l*l-4*s*u;if(n(d)){var c=-l/(2*s);c>=0&&1>=c&&(a[h++]=c)}else if(d>0){var f=b(d),c=(-l+f)/(2*s),p=(-l-f)/(2*s);c>=0&&1>=c&&(a[h++]=c),p>=0&&1>=p&&(a[h++]=p)}}return h}function p(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function g(t,e,i,n,r){var o=(e-t)*n+t,a=(i-e)*n+e,s=(a-o)*n+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=i}function v(t,e,i,n,r,o,a,s,l){var u,h=.005,d=1/0;I[0]=a,I[1]=s;for(var f=0;1>f;f+=.05){T[0]=c(t,i,r,f),T[1]=c(e,n,o,f);var p=x(I,T);d>p&&(u=f,d=p)}d=1/0;for(var g=0;32>g&&!(S>h);g++){var v=u-h,m=u+h;T[0]=c(t,i,r,v),T[1]=c(e,n,o,v);var p=x(T,I);if(v>=0&&d>p)u=v,d=p;else{L[0]=c(t,i,r,m),L[1]=c(e,n,o,m);var y=x(L,I);1>=m&&d>y?(u=m,d=y):h*=.5}}return l&&(l[0]=c(t,i,r,u),l[1]=c(e,n,o,u)),b(d)}var m=i(5),y=m.create,x=m.distSquare,_=Math.pow,b=Math.sqrt,w=1e-8,S=1e-4,M=b(3),A=1/3,I=y(),T=y(),L=y();t.exports={cubicAt:o,cubicDerivativeAt:a,cubicRootAt:s,cubicExtrema:l,cubicSubdivide:u,cubicProjectPoint:h,quadraticAt:c,quadraticDerivativeAt:d,quadraticRootAt:f,quadraticExtremum:p,quadraticSubdivide:g,quadraticProjectPoint:v}},function(t,e){function i(t){return t=Math.round(t),0>t?0:t>255?255:t}function n(t){return t=Math.round(t),0>t?0:t>360?360:t}function r(t){return 0>t?0:t>1?1:t}function o(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function a(t){return r(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function s(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function l(t,e,i){return t+(e-t)*i}function u(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in x)return x[e].slice();if("#"!==e.charAt(0)){var i=e.indexOf("("),n=e.indexOf(")");if(-1!==i&&n+1===e.length){var r=e.substr(0,i),s=e.substr(i+1,n-(i+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return;l=a(s.pop());case"rgb":if(3!==s.length)return;return[o(s[0]),o(s[1]),o(s[2]),l];case"hsla":if(4!==s.length)return;return s[3]=a(s[3]),h(s);case"hsl":if(3!==s.length)return;return h(s);default:return}}}else{if(4===e.length){var u=parseInt(e.substr(1),16);if(!(u>=0&&4095>=u))return;return[(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1]}if(7===e.length){var u=parseInt(e.substr(1),16);if(!(u>=0&&16777215>=u))return;return[(16711680&u)>>16,(65280&u)>>8,255&u,1]}}}}function h(t){var e=(parseFloat(t[0])%360+360)%360/360,n=a(t[1]),r=a(t[2]),o=.5>=r?r*(n+1):r+n-r*n,l=2*r-o,u=[i(255*s(l,o,e+1/3)),i(255*s(l,o,e)),i(255*s(l,o,e-1/3))];return 4===t.length&&(u[3]=t[3]),u}function c(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+a):l/(2-s-a);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function d(t,e){var i=u(t);if(i){for(var n=0;3>n;n++)0>e?i[n]=i[n]*(1-e)|0:i[n]=(255-i[n])*e+i[n]|0;return y(i,4===i.length?"rgba":"rgb")}}function f(t,e){var i=u(t);return i?((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1):void 0}function p(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[0,0,0,0];var r=t*(e.length-1),o=Math.floor(r),a=Math.ceil(r),s=e[o],u=e[a],h=r-o;return n[0]=i(l(s[0],u[0],h)),n[1]=i(l(s[1],u[1],h)),n[2]=i(l(s[2],u[2],h)),n[3]=i(l(s[3],u[3],h)),n}}function g(t,e,n){if(e&&e.length&&t>=0&&1>=t){var o=t*(e.length-1),a=Math.floor(o),s=Math.ceil(o),h=u(e[a]),c=u(e[s]),d=o-a,f=y([i(l(h[0],c[0],d)),i(l(h[1],c[1],d)),i(l(h[2],c[2],d)),r(l(h[3],c[3],d))],"rgba");return n?{color:f,leftIndex:a,rightIndex:s,value:o}:f}}function v(t,e,i,r){return t=u(t),t?(t=c(t),null!=e&&(t[0]=n(e)),null!=i&&(t[1]=a(i)),null!=r&&(t[2]=a(r)),y(h(t),"rgba")):void 0}function m(t,e){return t=u(t),t&&null!=e?(t[3]=r(e),y(t,"rgba")):void 0}function y(t,e){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}var x={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};t.exports={parse:u,lift:d,toHex:f,fastMapToColor:p,mapToColor:g,modifyHSL:v,modifyAlpha:m,stringify:y}},function(t,e,i){function n(t,e){var i=t+":"+e;if(u[i])return u[i];for(var n=(t+"").split("\n"),r=0,o=0,a=n.length;a>o;o++)r=Math.max(p.measureText(n[o],e).width,r);return h>c&&(h=0,u={}),h++,u[i]=r,r}function r(t,e,i,r){var o=((t||"")+"").split("\n").length,a=n(t,e),s=n("国",e),l=o*s,u=new f(0,0,a,l);switch(u.lineHeight=s,r){case"bottom":case"alphabetic":u.y-=s;break;case"middle":u.y-=s/2}switch(i){case"end":case"right":u.x-=u.width;break;case"center":u.x-=u.width/2}return u}function o(t,e,i,n){var r=e.x,o=e.y,a=e.height,s=e.width,l=i.height,u=a/2-l/2,h="left";switch(t){case"left":r-=n,o+=u,h="right";break;case"right":r+=n+s,o+=u,h="left";break;case"top":r+=s/2,o-=n+l,h="center";break;case"bottom":r+=s/2,o+=a+n,h="center";break;case"inside":r+=s/2,o+=u,h="center";break;case"insideLeft":r+=n,o+=u,h="left";break;case"insideRight":r+=s-n,o+=u,h="right";break;case"insideTop":r+=s/2,o+=n,h="center";break;case"insideBottom":r+=s/2,o+=a-l-n,h="center";break;case"insideTopLeft":r+=n,o+=n,h="left";break;case"insideTopRight":r+=s-n,o+=n,h="right";break;case"insideBottomLeft":r+=n,o+=a-l-n;break;case"insideBottomRight":r+=s-n,o+=a-l-n,h="right"}return{x:r,y:o,textAlign:h,textBaseline:"top"}}function a(t,e,i,r){if(!i)return"";r=d.defaults({ellipsis:"...",minCharacters:3,maxIterations:3,cnCharWidth:n("国",e),ascCharWidth:n("a",e)},r,!0),i-=n(r.ellipsis);for(var o=(t+"").split("\n"),a=0,l=o.length;l>a;a++)o[a]=s(o[a],e,i,r);return o.join("\n")}function s(t,e,i,r){for(var o=0;;o++){var a=n(t,e);if(i>a||o>=r.maxIterations){t+=r.ellipsis;break}var s=0===o?l(t,i,r):Math.floor(t.length*i/a);if(sr&&e>n;r++){var a=t.charCodeAt(r);n+=a>=0&&127>=a?i.ascCharWidth:i.cnCharWidth}return r}var u={},h=0,c=5e3,d=i(1),f=i(7),p={getWidth:n,getBoundingRect:r,adjustTextPositionOnRect:o,ellipsis:a,measureText:function(t,e){var i=d.getContext();return i.font=e,i.measureText(t)}};t.exports=p},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(){var t=new i(6);return n.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},rotate:function(t,e,i){var n=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+a*u,t[1]=-n*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t},scale:function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},invert:function(t,e){var i=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=i*a-o*n;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*r)*l,t[5]=(o*r-i*s)*l,t):null}};t.exports=n},function(t,e,i){function n(t,e){var i=o.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function r(t,e,i){return this.superClass.prototype[e].apply(t,i)}var o=i(1),a={},s=".",l="___EC__COMPONENT__CONTAINER___",u=a.parseClassType=function(t){var e={main:"",sub:""};return t&&(t=t.split(s),e.main=t[0]||"",e.sub=t[1]||""),e};a.enableClassExtend=function(t,e){t.extend=function(i){var a=function(){e&&e.apply(this,arguments),t.apply(this,arguments)};return o.extend(a.prototype,i),a.extend=this.extend,a.superCall=n,a.superApply=r,o.inherits(a,this),a.superClass=this,a}},a.enableClassManagement=function(t,e){function i(t){var e=n[t.main];return e&&e[l]||(e=n[t.main]={},e[l]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(e=u(e),e.sub){if(e.sub!==l){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[l]&&(r=e?r[e]:null),i&&!r)throw new Error("Component "+t+"."+(e||"")+" not exists. Load it first.");return r},t.getClassesByMainType=function(t){t=u(t);var e=[],i=n[t.main];return i&&i[l]?o.each(i,function(t,i){i!==l&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=u(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return o.each(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=u(t);var e=n[t.main];return e&&e[l]},t.parseClassType=u,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t},a.setReadOnly=function(t,e){},t.exports=a},function(t,e,i){var n=i(134),r=i(38);i(135),i(133);var o=i(32),a=i(4),s=i(1),l=i(18),u={};u.getScaleExtent=function(t,e){var i=t.scale,n=i.getExtent(),r=n[1]-n[0];if("ordinal"===i.type)return isFinite(r)?n:[0,0];var o=e.getMin?e.getMin():e.get("min"),l=e.getMax?e.getMax():e.get("max"),u=e.getNeedCrossZero?e.getNeedCrossZero():!e.get("scale"),h=e.get("boundaryGap");s.isArray(h)||(h=[h||0,h||0]),h[0]=a.parsePercent(h[0],1),h[1]=a.parsePercent(h[1],1);var c=!0,d=!0;return null==o&&(o=n[0]-h[0]*r,c=!1),null==l&&(l=n[1]+h[1]*r,d=!1),"dataMin"===o&&(o=n[0]),"dataMax"===l&&(l=n[1]),u&&(o>0&&l>0&&!c&&(o=0),0>o&&0>l&&!d&&(l=0)),[o,l]},u.niceScaleExtent=function(t,e){var i=t.scale,n=u.getScaleExtent(t,e),r=null!=(e.getMin?e.getMin():e.get("min")),o=null!=(e.getMax?e.getMax():e.get("max")),a=e.get("splitNumber");i.setExtent(n[0],n[1]),i.niceExtent(a,r,o);var s=e.get("minInterval");if(isFinite(s)&&!r&&!o&&"interval"===i.type){var l=i.getInterval(),h=Math.max(Math.abs(l),s)/l;n=i.getExtent(),i.setExtent(h*n[0],n[1]*h),i.niceExtent(a)}var l=e.get("interval");null!=l&&i.setInterval&&i.setInterval(l)},u.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new n(t.getCategories(),[1/0,-(1/0)]);case"value":return new r;default:return(o.getClass(e)||r).create(t)}},u.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)},u.getAxisLabelInterval=function(t,e,i,n){var r,o=0,a=0,s=1;e.length>40&&(s=Math.floor(e.length/40));for(var u=0;u1?s:(o+1)*s-1},u.getFormattedLabels=function(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",e)}}(e),s.map(n,e)):"function"==typeof e?s.map(r,function(n,r){return e("category"===t.type?i.getLabel(n):n,r)},this):n},t.exports=u},function(t,e){var i=Array.prototype.slice,n=function(){this._$handlers={}};n.prototype={constructor:n,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var r=0;rr;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>3&&(e=i.call(e,1));for(var r=this._$handlers[t],o=r.length,a=0;o>a;){switch(n){case 1:r[a].h.call(r[a].ctx);break;case 2:r[a].h.call(r[a].ctx,e[1]);break;case 3:r[a].h.call(r[a].ctx,e[1],e[2]);break;default:r[a].h.apply(r[a].ctx,e)}r[a].one?(r.splice(a,1),o--):a++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>4&&(e=i.call(e,1,e.length-1));for(var r=e[e.length-1],o=this._$handlers[t],a=o.length,s=0;a>s;){switch(n){case 1:o[s].h.call(r);break;case 2:o[s].h.call(r,e[1]);break;case 3:o[s].h.call(r,e[1],e[2]);break;default:o[s].h.apply(r,e)}o[s].one?(o.splice(s,1),a--):s++}}return this}},t.exports=n},function(t,e){"use strict";function i(){this._coordinateSystems=[]}var n={};i.prototype={constructor:i,create:function(t,e){var i=[];for(var r in n){var o=n[r].create(t,e);o&&(i=i.concat(o))}this._coordinateSystems=i},update:function(t,e){for(var i=this._coordinateSystems,n=0;n=0;if(n){var o="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];o&&r(t,o,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function a(t,e,i){u?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function s(t,e,i){u?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}var l=i(22),u="undefined"!=typeof window&&!!window.addEventListener,h=u?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};t.exports={clientToLocal:r,normalizeEvent:o,addEventListener:a,removeEventListener:s,stop:h,Dispatcher:l}},function(t,e){"use strict";var i={};t.exports={register:function(t,e){i[t]=e},get:function(t){return i[t]}}},function(t,e,i){"use strict";var n=i(3),r=i(7),o=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n+o),t.lineTo(i-r,n+o),t.closePath()}}),a=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n),t.lineTo(i,n+o),t.lineTo(i-r,n),t.closePath()}}),s=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=n-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u);t.arc(i,l,a,Math.PI-u,2*Math.PI+u);var f=.6*a,p=.7*a;t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),l=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,o=e.y,a=n/3*2;t.moveTo(r,o),t.lineTo(r+a,o+i),t.lineTo(r,o+i/4*3),t.lineTo(r-a,o+i),t.lineTo(r,o),t.closePath()}}),u={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:a,pin:s,arrow:l,triangle:o},h={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var o=Math.min(i,n);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},c={};for(var d in u)c[d]=new u[d];var f=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e){var i=e.symbolType,n=c[i];"none"!==e.symbolType&&(n||(i="rect",n=c[i]),h[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(t,n.shape))}}),p=function(t){if("image"!==this.type){var e=this.style,i=this.shape;i&&"line"===i.symbolType?e.stroke=t:this.__isEmptyBrush?(e.stroke=t,e.fill="#fff"):(e.fill&&(e.fill=t),e.stroke&&(e.stroke=t)),this.dirty(!1)}},g={createSymbol:function(t,e,i,o,a,s){var l=0===t.indexOf("empty");l&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var u;return u=0===t.indexOf("image://")?new n.Image({style:{image:t.slice(8),x:e,y:i,width:o,height:a}}):0===t.indexOf("path://")?n.makePath(t.slice(7),{},new r(e,i,o,a)):new f({shape:{symbolType:t,x:e,y:i,width:o,height:a}}),u.__isEmptyBrush=l,u.setColor=p,u.setColor(s),u}};t.exports=g},function(t,e,i){function n(){this.group=new a,this.uid=s.getUID("viewChart")}function r(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;is;s++)r(t.getItemGraphicEl(a[s]),i);else if(o)for(var u=o instanceof Array?o:[o],s=0,l=u.length;l>s;s++){var n=t.indexOfName(u[s]);r(t.getItemGraphicEl(n),i)}else t.eachItemGraphicEl(function(t){r(t,i)})}var a=i(34),s=i(43),l=i(20);n.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){o(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){o(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var u=n.prototype;u.updateView=u.updateLayout=u.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},l.enableClassExtend(n),l.enableClassManagement(n,{registerWhenExtend:!0}),t.exports=n},function(t,e,i){"use strict";var n=i(16),r=i(5),o=i(74),a=i(7),s=i(33).devicePixelRatio,l={ +M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},u=[],h=[],c=[],d=[],f=Math.min,p=Math.max,g=Math.cos,v=Math.sin,m=Math.sqrt,y=Math.abs,x="undefined"!=typeof Float32Array,_=function(){this.data=[],this._len=0,this._ctx=null,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._ux=0,this._uy=0};_.prototype={constructor:_,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=y(1/s/t)||0,this._uy=y(1/s/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),this._len=0,this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=y(t-this._xi)>this._ux||y(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(l.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(l.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(l.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=g(r)*i+t,this._xi=v(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(l.R,t,e,i,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();x&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;ae.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=r+o),o%=r,g-=o*h,v-=o*c;h>0&&t>=g||0>h&&g>=t||0==h&&(c>0&&e>=v||0>c&&v>=e);)n=this._dashIdx,i=a[n],g+=h*i,v+=c*i,this._dashIdx=(n+1)%y,h>0&&l>g||0>h&&g>l||c>0&&u>v||0>c&&v>u||s[n%2?"moveTo":"lineTo"](h>=0?f(g,t):p(g,t),c>=0?f(v,e):p(v,e));h=g-t,c=v-e,this._dashOffset=-m(h*h+c*c)},_dashedBezierTo:function(t,e,i,r,o,a){var s,l,u,h,c,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._ctx,v=this._xi,y=this._yi,x=n.cubicAt,_=0,b=this._dashIdx,w=p.length,S=0;for(0>f&&(f=d+f),f%=d,s=0;1>s;s+=.1)l=x(v,t,i,o,s+.1)-x(v,t,i,o,s),u=x(y,e,r,a,s+.1)-x(y,e,r,a,s),_+=m(l*l+u*u);for(;w>b&&(S+=p[b],!(S>f));b++);for(s=(S-f)/_;1>=s;)h=x(v,t,i,o,s),c=x(y,e,r,a,s),b%2?g.moveTo(h,c):g.lineTo(h,c),s+=p[b]/_,b=(b+1)%w;b%2!==0&&g.lineTo(o,a),l=o-h,u=a-c,this._dashOffset=-m(l*l+u*u)},_dashedQuadraticTo:function(t,e,i,n){var r=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,x&&(this.data=new Float32Array(t)))},getBoundingRect:function(){u[0]=u[1]=c[0]=c[1]=Number.MAX_VALUE,h[0]=h[1]=d[0]=d[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,s=0,f=0;fd;){var f=s[d++];switch(1==d&&(n=s[d],r=s[d+1],e=n,i=r),f){case l.M:e=n=s[d++],i=r=s[d++],t.moveTo(n,r);break;case l.L:o=s[d++],a=s[d++],(y(o-n)>u||y(a-r)>h||d===c-1)&&(t.lineTo(o,a),n=o,r=a);break;case l.C:t.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.Q:t.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.A:var p=s[d++],m=s[d++],x=s[d++],_=s[d++],b=s[d++],w=s[d++],S=s[d++],M=s[d++],A=x>_?x:_,I=x>_?1:x/_,T=x>_?_/x:1,L=Math.abs(x-_)>.001,C=b+w;L?(t.translate(p,m),t.rotate(S),t.scale(I,T),t.arc(0,0,A,b,C,1-M),t.scale(1/I,1/T),t.rotate(-S),t.translate(-p,-m)):t.arc(p,m,A,b,C,1-M),1==d&&(e=g(b)*x+p,i=v(b)*_+m),n=g(C)*x+p,r=v(C)*_+m;break;case l.R:e=n=s[d],i=r=s[d+1],t.rect(s[d++],s[d++],s[d++],s[d++]);break;case l.Z:t.closePath(),n=e,r=i}}}},_.CMD=l,t.exports=_},function(t,e){var i=function(t){this.colorStops=t||[]};i.prototype={constructor:i,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},t.exports=i},function(t,e,i){function n(t,e,i,n){if(!e)return t;var s=r(e[0]),l=o.isArray(s)&&s.length||1;i=i||[],n=n||"extra";for(var u=0;l>u;u++)if(!t[u]){var h=i[u]||n+(u-i.length);t[u]=a(e,u)?{type:"ordinal",name:h}:h}return t}function r(t){return o.isArray(t)?t:o.isObject(t)?t.value:t}var o=i(1),a=n.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var a=r(t[i]);if(!o.isArray(a))return!1;var a=a[e];if(null!=a&&isFinite(a))return!1;if(o.isString(a)&&"-"!==a)return!0}return!1};t.exports=n},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=0;e=0)){var a=this.getShallow(o);null!=a&&(i[t[r][0]]=a)}}return i}}},function(t,e,i){function n(){this._extent=[1/0,-(1/0)],this._interval=0,this.init&&this.init.apply(this,arguments)}var r=i(20),o=n.prototype;o.parse=function(t){return t},o.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},o.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},o.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},o.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},o.getExtent=function(){return this._extent.slice()},o.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},o.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof a&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,o=n.indexOf(r,t);return 0>o?this:(r.splice(o,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof a&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&r(t)?function(t,e,i,n){return d.isDataItemOption(t)&&(x.hasItemOption=!0),n===y?i:g(p(t),m[n])}:function(t,e,i,n){var r=p(t),o=g(r&&r[n],m[n]);d.isDataItemOption(t)&&(x.hasItemOption=!0);var a=s&&s.categoryAxesModels;return a&&a[e]&&"string"==typeof o&&(b[e]=b[e]||a[e].getCategories(),o=c.indexOf(b[e],o),0>o&&!isNaN(o)&&(o=+o)),o};return x.hasItemOption=!1,x.initData(t,_,w),x}function a(t){return"category"!==t&&"time"!==t}function s(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function l(t,e){var i,n=[],r=t&&t.dimensions[t.categoryIndex];if(r&&(i=t.categoryAxesModels[r.name]),i){var o=i.getCategories();if(o){var a=e.length;if(c.isArray(e[0])&&e[0].length>1){n=[];for(var s=0;a>s;s++)n[s]=o[e[s][t.categoryIndex||0]]}else n=o.slice(0)}}return n}var u=i(13),h=i(30),c=i(1),d=i(8),f=i(23),p=d.getDataItemValue,g=d.converDataValue,v={cartesian2d:function(t,e,i){var n=i.getComponent("xAxis",e.get("xAxisIndex")),r=i.getComponent("yAxis",e.get("yAxisIndex")),o=n.get("type"),l=r.get("type"),u=[{name:"x",type:s(o),stackable:a(o)},{name:"y",type:s(l),stackable:a(l)}],c="category"===o,d="category"===l;h(u,t,["x","y","z"]);var f={};return c&&(f.x=n),d&&(f.y=r),{dimensions:u,categoryIndex:c?0:d?1:-1,categoryAxesModels:f}},polar:function(t,e,i){var n=e.get("polarIndex")||0,r=function(t){return t.get("polarIndex")===n},o=i.findComponents({mainType:"angleAxis",filter:r})[0],l=i.findComponents({mainType:"radiusAxis",filter:r})[0],u=l.get("type"),c=o.get("type"),d=[{name:"radius",type:s(u),stackable:a(u)},{name:"angle",type:s(c),stackable:a(c)}],f="category"===c,p="category"===u;h(d,t,["radius","angle","value"]);var g={};return p&&(g.radius=l),f&&(g.angle=o),{dimensions:d,categoryIndex:f?1:p?0:-1,categoryAxesModels:g}},geo:function(t,e,i){return{dimensions:h([{name:"lng"},{name:"lat"}],t,["lng","lat","value"])}}};t.exports=o},function(t,e,i){"use strict";var n=i(3),r=i(1);i(54),i(105),i(2).extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new n.Rect({shape:t.coordinateSystem.getRect(),style:r.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0}))}})},function(t,e,i){function n(t){t=t||{},a.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new o(t.style),this._rect=null,this.__clipPaths=[]}var r=i(1),o=i(64),a=i(58),s=i(76);n.prototype={constructor:n,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?a.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new o(t),this.dirty(!1),this}},r.inherits(n,a),r.mixin(n,s),t.exports=n},function(t,e,i){var n=i(4),r=i(11),o=i(32),a=Math.floor,s=Math.ceil,l=o.extend({type:"interval",_interval:0,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval||this.niceTicks(),this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice()},getTicks:function(){this._interval||this.niceTicks();var t=this._interval,e=this._extent,i=[],r=1e4;if(t){var o=this._niceExtent;e[0]r)return[];e[1]>o[1]&&i.push(e[1])}return i},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(i=-i,e.reverse());var r=n.nice(i/t,!0),o=[n.round(s(e[0]/r)*r),n.round(a(e[1]/r)*r)];this._interval=r,this._niceExtent=o}},niceExtent:function(t,e,i){var r=this._extent;if(r[0]===r[1])if(0!==r[0]){var o=r[0]/2;r[0]-=o,r[1]+=o}else r[1]=1;var l=r[1]-r[0];isFinite(l)||(r[0]=0,r[1]=1),this.niceTicks(t);var u=this._interval;e||(r[0]=n.round(a(r[0]/u)*u)),i||(r[1]=n.round(s(r[1]/u)*u))}});l.create=function(){return new l},t.exports=l},function(t,e,i){function n(t){this.group=new o.Group,this._symbolCtor=t||a}function r(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}var o=i(3),a=i(49),s=n.prototype;s.updateData=function(t,e){var i=this.group,n=t.hostModel,a=this._data,s=this._symbolCtor,l={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis")};t.diff(a).add(function(n){var o=t.getItemLayout(n);if(r(t,n,e)){var a=new s(t,n,l);a.attr("position",o),t.setItemGraphicEl(n,a),i.add(a)}}).update(function(u,h){var c=a.getItemGraphicEl(h),d=t.getItemLayout(u);return r(t,u,e)?(c?(c.updateData(t,u,l),o.updateProps(c,{position:d},n)):(c=new s(t,u),c.attr("position",d)),i.add(c),void t.setItemGraphicEl(u,c)):void i.remove(c)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},s.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},s.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll())},t.exports=n},function(t,e,i){function n(t){var e={};return h(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function r(t,e,i,n){null!=i[e]&&null==i[t]&&(n[t]=null)}var o=i(1),a=i(12),s=i(2),l=i(8),u=i(177),h=o.each,c=l.eachAxisDim,d=s.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,angleAxisIndex:null,radiusAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0;var r=n(t);this.mergeDefaultAndTheme(t,i),this.doInit(r)},mergeOption:function(t){var e=n(t);o.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;a.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),r("start","startValue",t,e),r("end","endValue",t,e),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var o=this.dependentModels[e.axis][i],a=o.__dzAxisProxy||(o.__dzAxisProxy=new u(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();c(function(e){var i=e.axisIndex;t[i]=l.normalizeToArray(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;c(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option;if(t){var n="vertical"===e?{dim:"y",axisIndex:"yAxisIndex",axis:"yAxis"}:{dim:"x",axisIndex:"xAxisIndex",axis:"xAxis"};this.dependentModels[n.axis].length&&(i[n.axisIndex]=[0],t=!1)}t&&c(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;a>o;o++)"category"===r[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&c(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex);o.indexOf(n,r)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return c(function(n){var r=t.get(n.axisIndex),o=this.dependentModels[n.axis][r];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return c(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;c(function(n){h(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},setRawRange:function(t){h(["start","end","startValue","endValue"],function(e){this.option[e]=t[e]},this)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(){var t=this._axisProxies;for(var e in t)if(t.hasOwnProperty(e)&&t[e].hostedBy(this))return t[e];for(var e in t)if(t.hasOwnProperty(e)&&!t[e].hostedBy(this))return t[e]}});t.exports=d},function(t,e,i){var n=i(57);t.exports=n.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetInfo:function(){function t(t,e,i,n){for(var r,o=0;o=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){var t=this._extent.slice();return t},getPixelPrecision:function(t){return r.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count())),o(t,s,i,e)},coordToData:function(t,e){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count()));var a=o(t,i,s,e);return this.scale.scale(a)},getTicksCoords:function(){if(this.onBand){for(var t=this.getBands(),e=[],i=0;ia;a++)e.push([o*a/i+n,o*(a+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i}},t.exports=l},function(t,e,i){var n=i(1),r=i(20),o=r.parseClassType,a=0,s={},l="_";s.getUID=function(t){return[t||"",a++,Math.random()].join(l)},s.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=o(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var a=o(i).main;t.hasSubTypes(i)&&e[a]&&(r=e[a](n))}return r},t},s.enableTopologicalTravel=function(t,e){function i(t){var i={},a=[];return n.each(t,function(s){var l=r(i,s),u=l.originalDeps=e(s),h=o(u,t);l.entryCount=h.length,0===l.entryCount&&a.push(s),n.each(h,function(t){n.indexOf(l.predecessor,t)<0&&l.predecessor.push(t);var e=r(i,t);n.indexOf(e.successor,t)<0&&e.successor.push(s)})}),{graph:i,noEntryList:a}}function r(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return n.each(t,function(t){n.indexOf(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,r,o){function a(t){u[t].entryCount--,0===u[t].entryCount&&h.push(t)}function s(t){c[t]=!0,a(t)}if(t.length){var l=i(e),u=l.graph,h=l.noEntryList,c={};for(n.each(t,function(t){c[t]=!0});h.length;){var d=h.pop(),f=u[d],p=!!c[d];p&&(r.call(o,d,f.originalDeps.slice()),delete c[d]),n.each(f.successor,p?s:a)}n.each(c,function(){throw new Error("Circle dependency may exists")})}}},t.exports=s},function(t,e){function i(t){for(var e=0;t>=h;)e|=1&t,t>>=1;return t+e}function n(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;i>o&&n(t[o],t[o-1])<0;)o++;r(t,e,o)}else for(;i>o&&n(t[o],t[o-1])>=0;)o++;return o-e}function r(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function o(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var o,a=t[n],s=e,l=n;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function a(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;s>l&&o(t,e[i+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[i+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[i+h])>0?a=h+1:l=h}return l}function s(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;s>l&&o(t,e[i+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=n-r;s>l&&o(t,e[i+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[i+h])<0?l=h:a=h+1}return l}function l(t,e){function i(t,e){h[y]=t,f[y]=e,y+=1}function n(){for(;y>1;){var t=y-2;if(t>=1&&f[t-1]<=f[t]+f[t+1]||t>=2&&f[t-2]<=f[t]+f[t-1])f[t-1]f[t+1])break;o(t)}}function r(){for(;y>1;){var t=y-2;t>0&&f[t-1]=r?l(n,r,o,c):u(n,r,o,c)))}function l(i,n,r,o){var l=0;for(l=0;n>l;l++)x[l]=t[i+l];var u=0,h=r,d=i;if(t[d++]=t[h++],0!==--o){if(1===n){for(l=0;o>l;l++)t[d+l]=t[h+l];return void(t[d+o]=x[u])}for(var f,g,v,m=p;;){f=0,g=0,v=!1;do if(e(t[h],x[u])<0){if(t[d++]=t[h++],g++,f=0,0===--o){v=!0;break}}else if(t[d++]=x[u++],f++,g=0,1===--n){v=!0;break}while(m>(f|g));if(v)break;do{if(f=s(t[h],x,u,n,0,e),0!==f){for(l=0;f>l;l++)t[d+l]=x[u+l];if(d+=f,u+=f,n-=f,1>=n){v=!0;break}}if(t[d++]=t[h++],0===--o){v=!0;break}if(g=a(x[u],t,h,o,0,e),0!==g){for(l=0;g>l;l++)t[d+l]=t[h+l];if(d+=g,h+=g,o-=g,0===o){v=!0;break}}if(t[d++]=x[u++],1===--n){v=!0;break}m--}while(f>=c||g>=c);if(v)break;0>m&&(m=0),m+=2}if(p=m,1>p&&(p=1),1===n){for(l=0;o>l;l++)t[d+l]=t[h+l];t[d+o]=x[u]}else{if(0===n)throw new Error;for(l=0;n>l;l++)t[d+l]=x[u+l]}}else for(l=0;n>l;l++)t[d+l]=x[u+l]}function u(i,n,r,o){var l=0;for(l=0;o>l;l++)x[l]=t[r+l];var u=i+n-1,h=o-1,d=r+o-1,f=0,g=0;if(t[d--]=t[u--],0!==--n){if(1===o){for(d-=n,u-=n,g=d+1,f=u+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];return void(t[d]=x[h])}for(var v=p;;){var m=0,y=0,_=!1;do if(e(x[h],t[u])<0){if(t[d--]=t[u--],m++,y=0,0===--n){_=!0;break}}else if(t[d--]=x[h--],y++,m=0,1===--o){_=!0;break}while(v>(m|y));if(_)break;do{if(m=n-s(x[h],t,i,n,n-1,e),0!==m){for(d-=m,u-=m,n-=m,g=d+1,f=u+1,l=m-1;l>=0;l--)t[g+l]=t[f+l];if(0===n){_=!0;break}}if(t[d--]=x[h--],1===--o){_=!0;break}if(y=o-a(t[u],x,0,o,o-1,e),0!==y){for(d-=y,h-=y,o-=y,g=d+1,f=h+1,l=0;y>l;l++)t[g+l]=x[f+l];if(1>=o){_=!0;break}}if(t[d--]=t[u--],0===--n){_=!0;break}v--}while(m>=c||y>=c);if(_)break;0>v&&(v=0),v+=2}if(p=v,1>p&&(p=1),1===o){for(d-=n,u-=n,g=d+1,f=u+1,l=n-1;l>=0;l--)t[g+l]=t[f+l];t[d]=x[h]}else{if(0===o)throw new Error;for(f=d-(o-1),l=0;o>l;l++)t[f+l]=x[l]}}else for(f=d-(o-1),l=0;o>l;l++)t[f+l]=x[l]}var h,f,p=c,g=0,v=d,m=0,y=0;g=t.length,2*d>g&&(v=g>>>1);var x=[];m=120>g?5:1542>g?10:119151>g?19:40,h=[],f=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function u(t,e,r,a){r||(r=0),a||(a=t.length);var s=a-r;if(!(2>s)){var u=0;if(h>s)return u=n(t,r,a,e),void o(t,r,a,r+u,e);var c=new l(t,e),d=i(s);do{if(u=n(t,r,a,e),d>u){var f=s;f>d&&(f=d),o(t,r,r+f,r+u,e),u=f}c.pushRun(r,u),c.mergeRuns(),s-=u,r+=u}while(0!==s);c.forceMergeRuns()}}var h=32,c=7,d=256;t.exports=u},function(t,e){"use strict";function i(t){return t}function n(t,e,n,r){this._old=t,this._new=e,this._oldKeyGetter=n||i,this._newKeyGetter=r||i}function r(t,e,i){for(var n=0;nt;t++)this._add&&this._add(u[t]);else this._add&&this._add(u)}}},t.exports=n},function(t,e){t.exports=function(t,e,i,n,r){n.eachRawSeriesByType(t,function(t){var r=t.getData(),o=t.get("symbol")||e,a=t.get("symbolSize");r.setVisual({legendSymbol:i||o,symbol:o,symbolSize:a}),n.isSeriesFiltered(t)||("function"==typeof a&&r.each(function(e){var i=t.getRawValue(e),n=t.getDataParams(e);r.setItemVisual(e,"symbolSize",a(i,n))}),r.each(function(t){var e=r.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&r.setItemVisual(t,"symbol",i),null!=n&&r.setItemVisual(t,"symbolSize",n)}))})}},function(t,e,i){var n=i(33);t.exports=function(){if(0!==n.debugMode)if(1==n.debugMode)for(var t in arguments)throw new Error(arguments[t]);else if(n.debugMode>1)for(var t in arguments)console.log(arguments[t])}},function(t,e,i){function n(t){r.call(this,t)}var r=i(37),o=i(7),a=i(1),s=i(66),l=i(148),u=new l(50);n.prototype={constructor:n,type:"image",brush:function(t,e){var i,n=this.style,r=n.image;if(n.bind(t,this,e),i="string"==typeof r?this._image:r,!i&&r){var o=u.get(r);if(!o)return i=new Image,i.onload=function(){i.onload=null;for(var t=0;t0?"top":"bottom",n="center"):p(o-y)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&y>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,verticalAlign:r}}function a(t,e,i,n){var r,o,a=f(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return p(a-y/2)?(o=l?"bottom":"top",r="center"):p(a-1.5*y)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*y>a&&a>y/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,verticalAlign:o}}var s=i(1),l=i(8),u=i(3),h=i(9),c=i(13),d=i(4),f=d.remRadian,p=d.isRadianAroundZero,g=i(5),v=g.applyTransform,m=s.retrieve,y=Math.PI,x=function(t,e){this.opt=e,this.axisModel=t,s.defaults(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new u.Group;var i=new u.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};x.prototype={constructor:x,hasBuilder:function(t){return!!_[t]},add:function(t){_[t].call(this)},getGroup:function(){return this.group}};var _={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],o=[i[1],0];n&&(v(r,r,n),v(o,o,n)),this.group.add(new u.Line(u.subPixelOptimizeLine({anid:"line",shape:{x1:r[0],y1:r[1],x2:o[0],y2:o[1]},style:s.extend({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle()),strokeContainThreshold:t.strokeContainThreshold,silent:!!t.axisLineSilent,z2:1})))}},axisTick:function(){var t=this.axisModel;if(t.get("axisTick.show"))for(var e=t.axis,i=t.getModel("axisTick"),n=this.opt,r=i.getModel("lineStyle"),o=i.get("length"),a=w(i,n.labelInterval),l=e.getTicksCoords(),h=e.scale.getTicks(),c=[],d=[],f=this._transform,p=0;pg[1]?-1:1,x=["start"===h?g[0]-v*p:"end"===h?g[1]+v*p:(g[0]+g[1])/2,"middle"===h?t.labelOffset+d*p:0],_=e.get("nameRotate");null!=_&&(_=_*y/180),s="middle"===h?o(t,null!=_?_:t.rotation,d):a(t,h,_||0,g);var b=i,w=m(t.axisNameTruncateLength,e.get("nameTruncateLength")),S=m(t.axisNameTruncateEllipsis,e.get("nameTruncateEllipsis"));null!=w&&(b=l.truncate(i,w,S));var M=new u.Text({anid:"name",__fullText:i,__truncatedText:b,style:{text:b,textFont:f.getFont(),fill:f.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.textAlign,textVerticalAlign:s.verticalAlign},position:x,rotation:s.rotation,silent:e.get("silent"),z2:1});if(null!=w){M.dataIndex=0;var A=new c(["value"],e);A.initData([{value:i,tooltip:{formatter:r}}]),M.dataModel=l.createDataFormatModel(A,{mainType:"axis"})}M.eventData=n(e),M.eventData.targetType="axisName",M.eventData.name=i,this._dumbGroup.add(M),M.updateTransform(),this.group.add(M),M.decomposeTransform()}}},b=x.ifIgnoreOnTick=function(t,e,i){var n,r=t.scale;return"ordinal"===r.type&&("function"==typeof i?(n=r.getTicks()[e],!i(n,r.getLabel(n))):e%(i+1))},w=x.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};t.exports=x},function(t,e,i){function n(t){return a.isObject(t)&&null!=t.value?t.value:t}function r(){return"category"===this.get("type")&&a.map(this.get("data"),n)}function o(){return s.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))}var a=i(1),s=i(21);t.exports={getFormattedLabels:o,getCategories:r}},function(t,e,i){var n=i(81),r=i(1),o=i(10),a=i(14),s=["value","category","time","log"];t.exports=function(t,e,i,l){r.each(s,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,n){var s=this.layoutMode,l=s?a.getLayoutParams(e):{},u=n.getTheme();r.merge(e,u.get(o+"Axis")),r.merge(e,this.getDefaultOption()),e.type=i(t,e),s&&a.mergeLayoutParam(e,l,s)},defaultOption:r.mergeAll([{},n[o+"Axis"],l],!0)})}),o.registerSubTypeDefaulter(t+"Axis",r.curry(i,t))}},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(10),o=i(1),a=i(52),s=r.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this._resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this._resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this._resetRange()},setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},getMin:function(){var t=this.option;return null!=t.rangeStart?t.rangeStart:t.min},getMax:function(){var t=this.option;return null!=t.rangeEnd?t.rangeEnd:t.max},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},_resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}});o.merge(s.prototype,i(51));var l={gridIndex:0};a("x",s,n,l),a("y",s,n,l),t.exports=s},function(t,e,i){function n(t,e,i){return i.getComponent("grid",t.get("gridIndex"))===e}function r(t){var e,i=t.model,n=i.getFormattedLabels(),r=1,o=n.length;o>40&&(r=Math.ceil(o/40));for(var a=0;o>a;a+=r)if(!t.isLabelIgnored(a)){var s=i.getTextRect(n[a]);e?e.union(s):e=s}return e}function o(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this._model=t}function a(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}var s=i(14),l=i(21),u=i(1),h=i(117),c=i(115),d=u.each,f=l.ifAxisCrossZero,p=l.niceScaleExtent;i(118);var g=o.prototype;g.type="grid",g.getRect=function(){return this._rect},g.update=function(t,e){function i(t){var e=n[t];for(var i in e){var r=e[i];if(r&&("category"===r.type||!f(r)))return!0}return!1}var n=this._axesMap;this._updateScale(t,this._model),d(n.x,function(t){p(t,t.model)}),d(n.y,function(t){p(t,t.model)}),d(n.x,function(t){i("y")&&(t.onZero=!1)}),d(n.y,function(t){i("x")&&(t.onZero=!1)}),this.resize(this._model,e)},g.resize=function(t,e){function i(){d(o,function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),a(t,e?n.x:n.y)})}var n=s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var o=this._axesList;i(),t.get("containLabel")&&(d(o,function(t){if(!t.model.get("axisLabel.inside")){var e=r(t);if(e){var i=t.isHorizontal()?"height":"width",o=t.model.get("axisLabel.margin");n[i]-=e[i]+o,"top"===t.position?n.y+=e.height+o:"left"===t.position&&(n.x+=e.width+o)}}}),i())},g.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)return i[n];return i[e]}},g.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}for(var n=0,r=this._coordsList;n.5?e:t}function s(t,e,i,n,r){var a=t.length;if(1==r)for(var s=0;a>s;s++)n[s]=o(t[s],e[s],i);else for(var l=t[0].length,s=0;a>s;s++)for(var u=0;l>u;u++)n[s][u]=o(t[s][u],e[s][u],i)}function l(t,e,i){var n=t.length,r=e.length;if(n!==r){var o=n>r;if(o)t.length=r;else for(var a=n;r>a;a++)t.push(1===i?e[a]:x.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;al;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function u(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;n>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function h(t,e,i,n,r,o,a,s,l){var u=t.length;if(1==l)for(var h=0;u>h;h++)s[h]=c(t[h],e[h],i[h],n[h],r,o,a);else for(var d=t[0].length,h=0;u>h;h++)for(var f=0;d>f;f++)s[h][f]=c(t[h][f],e[h][f],i[h][f],n[h][f],r,o,a)}function c(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function d(t){if(y(t)){var e=t.length;if(y(t[0])){for(var i=[],n=0;e>n;n++)i.push(x.call(t[n]));return i}return x.call(t)}return t}function f(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function p(t,e,i,n,r){var d=t._getter,p=t._setter,m="spline"===e,x=n.length;if(x){var _,b=n[0].value,w=y(b),S=!1,M=!1,A=w&&y(b[0])?2:1;n.sort(function(t,e){return t.time-e.time}),_=n[x-1].time;for(var I=[],T=[],L=n[0].value,C=!0,D=0;x>D;D++){I.push(n[D].time/_);var P=n[D].value;if(w&&u(P,L,A)||!w&&P===L||(C=!1),L=P,"string"==typeof P){var k=v.parse(P);k?(P=k,S=!0):M=!0}T.push(P)}if(!C){for(var z=T[x-1],D=0;x-1>D;D++)w?l(T[D],z,A):!isNaN(T[D])||isNaN(z)||M||S||(T[D]=z);w&&l(d(t._target,r),z,A);var O,E,R,V,N,B,G=0,F=0;if(S)var H=[0,0,0,0];var W=function(t,e){var i;if(F>e){for(O=Math.min(G+1,x-1),i=O;i>=0&&!(I[i]<=e);i--);i=Math.min(i,x-2)}else{for(i=G;x>i&&!(I[i]>e);i++);i=Math.min(i-1,x-2)}G=i,F=e;var n=I[i+1]-I[i];if(0!==n)if(E=(e-I[i])/n,m)if(V=T[i],R=T[0===i?i:i-1],N=T[i>x-2?x-1:i+1],B=T[i>x-3?x-1:i+2],w)h(R,V,N,B,E,E*E,E*E*E,d(t,r),A);else{var l;if(S)l=h(R,V,N,B,E,E*E,E*E*E,H,1),l=f(H);else{if(M)return a(V,N,E);l=c(R,V,N,B,E,E*E,E*E*E)}p(t,r,l)}else if(w)s(T[i],T[i+1],E,d(t,r),A);else{var l;if(S)s(T[i],T[i+1],E,H,1),l=f(H);else{if(M)return a(T[i],T[i+1],E);l=o(T[i],T[i+1],E)}p(t,r,l)}},Z=new g({target:t._target,life:_,loop:t._loop,delay:t._delay,onframe:W,ondestroy:i});return e&&"spline"!==e&&(Z.easing=e),Z}}}var g=i(142),v=i(17),m=i(1),y=m.isArrayLike,x=Array.prototype.slice,_=function(t,e,i,o){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||n,this._setter=o||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};_.prototype={when:function(t,e){var i=this._tracks;for(var n in e){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:d(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;i++)t[i].call(this)},start:function(t){var e,i=this,n=0,r=function(){n--,n||i._doneCallback()};for(var o in this._tracks){var a=p(this,t,r,this._tracks[o],o);a&&(this._clipList.push(a),n++,this.animation&&this.animation.addClip(a),e=a)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var n=0;nt&&(t+=i),t}}},function(t,e){var i=2311;t.exports=function(){return i++}},function(t,e){var i=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};i.prototype.getCanvasPattern=function(t){return this._canvasPattern||(this._canvasPattern=t.createPattern(this.image,this.repeat))},t.exports=i},function(t,e){function i(t,e,i){var n=e.x,r=e.x2,o=e.y,a=e.y2;e.global||(n=n*i.width+i.x,r=r*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y);var s=t.createLinearGradient(n,o,r,a);return s}function n(t,e,i){var n=i.width,r=i.height,o=Math.min(n,r),a=e.x,s=e.y,l=e.r;e.global||(a=a*n+i.x,s=s*r+i.y,l*=o);var u=t.createRadialGradient(a,s,0,a,s,l);return u}var r=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],o=function(t){this.extendFrom(t)};o.prototype={constructor:o,fill:"#000000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,textFill:"#000",textStroke:null,textPosition:"inside",textBaseline:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,blend:null,bind:function(t,e,i){for(var n=this,o=i&&i.style,a=!o,s=0;s0},extendFrom:function(t,e){if(t){var i=this;for(var n in t)!t.hasOwnProperty(n)||!e&&i.hasOwnProperty(n)||(i[n]=t[n])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var o="radial"===e.type?n:i,a=o(t,e,r),s=e.colorStops,l=0;l=2){if(a&&"spline"!==a){var s=r(o,a,i,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var l=o.length,u=0;(i?l:l-1)>u;u++){var h=s[2*u],c=s[2*u+1],d=o[(u+1)%l];t.bezierCurveTo(h[0],h[1],c[0],c[1],d[0],d[1])}}else{"spline"===a&&(o=n(o,i)),t.moveTo(o[0][0],o[0][1]);for(var u=1,f=o.length;f>u;u++)t.lineTo(o[u][0],o[u][1])}i&&t.closePath()}}}},function(t,e){t.exports={buildPath:function(t,e){var i,n,r,o,a=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(a+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=r=o=h:h instanceof Array?1===h.length?i=n=r=o=h[0]:2===h.length?(i=r=h[0],n=o=h[1]):3===h.length?(i=h[0],n=o=h[1],r=h[2]):(i=h[0],n=h[1],r=h[2],o=h[3]):i=n=r=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),n+r>u&&(c=n+r,n*=u/c,r*=u/c),i+o>u&&(c=i+o,i*=u/c,o*=u/c),t.moveTo(a+i,s),t.lineTo(a+l-n,s),0!==n&&t.quadraticCurveTo(a+l,s,a+l,s+n),t.lineTo(a+l,s+u-r),0!==r&&t.quadraticCurveTo(a+l,s+u,a+l-r,s+u),t.lineTo(a+o,s+u),0!==o&&t.quadraticCurveTo(a,s+u,a,s+u-o),t.lineTo(a,s+i),0!==i&&t.quadraticCurveTo(a,s,a+i,s)}}},function(t,e,i){var n=i(1);t.exports={updateSelectedMap:function(t){this._selectTargetMap=n.reduce(t||[],function(t,e){return t[e.name]=e,t},{})},select:function(t){var e=this._selectTargetMap,i=e[t],r=this.get("selectedMode");"single"===r&&n.each(e,function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t){var e=this._selectTargetMap[t];e&&(e.selected=!1)},toggleSelected:function(t){var e=this._selectTargetMap[t];return null!=e?(this[e.selected?"unSelect":"select"](t),e.selected):void 0},isSelected:function(t){var e=this._selectTargetMap[t];return e&&e.selected}}},function(t,e,i){function n(t){r.defaultEmphasis(t.label,r.LABEL_OPTIONS)}var r=i(8),o=i(1),a=i(12),s=i(11),l=s.addCommas,u=s.encodeHTML,h=i(2).extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},ifEnableAnimation:function(){if(a.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.ifEnableAnimation()},mergeOption:function(t,e,i,r){var a=this.constructor,s=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),l=t[s];if(!i||!i.data)return void(t[s]=null);if(l)l.mergeOption(i,e,!0);else{r&&n(i),o.each(i.data,function(t){t instanceof Array?(n(t[0]),n(t[1])):n(t)});var u={mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0};l=new a(i,this,e,u),l.__hostSeries=t}t[s]=l},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=o.isArray(i)?o.map(i,l).join(", "):l(i),r=e.getName(t),a=this.name;return(null!=i||r)&&(a+="
"),r&&(a+=u(r),null!=i&&(a+=" : ")),null!=i&&(a+=n),a},getData:function(){return this._data},setData:function(t){this._data=t}});o.mixin(h,r.dataFormatMixin),t.exports=h},function(t,e,i){t.exports=i(2).extendComponentView({type:"marker",init:function(){this.markerGroupMap={}},render:function(t,e,i){var n=this.markerGroupMap;for(var r in n)n[r].__keep=!1;var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this);for(var r in n)n[r].__keep||this.group.remove(n[r].group)},renderSeries:function(){}})},function(t,e,i){function n(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function r(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function o(t,e,i){var n=-1;do n=Math.max(l.getPrecision(t.get(e,i)),n),t=t.stackedOn;while(t);return n}function a(t,e,i,n,r,a){var s=[],l=v(e,n,t),u=e.indexOfNearest(n,l,!0);s[r]=e.get(i,u,!0),s[a]=e.get(n,u,!0);var h=o(e,n,u);return h>=0&&(s[a]=+s[a].toFixed(h)),s}var s=i(1),l=i(4),u=s.indexOf,h=s.curry,c={min:h(a,"min"),max:h(a,"max"),average:h(a,"average")},d=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!r(e)&&!s.isArray(e.coord)&&n){var o=n.dimensions,a=f(e,i,n,t);if(e=s.clone(e),e.type&&c[e.type]&&a.baseAxis&&a.valueAxis){var l=u(o,a.baseAxis.dim),h=u(o,a.valueAxis.dim);e.coord=c[e.type](i,a.baseDataDim,a.valueDataDim,l,h),e.value=e.coord[h]}else{for(var d=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],p=0;2>p;p++)if(c[d[p]]){var g=t.coordDimToDataDim(o[p])[0];d[p]=v(i,g,d[p])}e.coord=d}}return e},f=function(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(n.dataDimToCoordDim(r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0]):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0],r.valueDataDim=n.coordDimToDataDim(r.valueAxis.dim)[0]),r},p=function(t,e){return t&&t.containData&&e.coord&&!n(e)?t.containData(e.coord):!0},g=function(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value},v=function(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,r++)},!0),n/r}return t.getDataExtent(e,!0)["max"===i?1:0]};t.exports={dataTransform:d,dataFilter:p,dimValueGetter:g,getAxisInfo:f,numCalculate:v}},function(t,e){t.exports=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;r=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function o(t,e){var i=t.visual,n=[];p.isObject(i)?m(i,function(t){n.push(t)}):null!=i&&n.push(i);var r={color:1,symbol:1};e||1!==n.length||t.type in r||(n[1]=n[0]),t.visual=n}function a(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:c([0,1])}}function s(t,e){var i=this.option.visual;return i[Math.round(v(e,[0,1],[0,i.length-1],!0))]||{}}function l(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function u(t){var e=this.option.visual;return e[this.option.loop&&t!==x?t%e.length:t]}function h(){return this.option.visual[0]}function c(t){return{linear:function(e){return v(e,t,this.option.visual,!0)},category:u,piecewise:function(e,i){var n=d.call(this,i);return null==n&&(n=v(e,t,this.option.visual,!0)),n},fixed:h}}function d(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=_.findPieceIndex(t,i),r=i[n];if(r&&r.visual)return r.visual[this.type]}}function f(t,e,i){return t?i>=e:i>e}var p=i(1),g=i(17),v=i(4).linearMap,m=p.each,y=p.isObject,x=-1,_=function(t){var e=t.mappingMethod,i=t.type,a=this.option=p.clone(t);this.type=i,this.mappingMethod=e,this._normalizeData=w[e];var s=b[i];this.applyVisual=s.applyVisual,this.getColorMapper=s.getColorMapper,this._doMap=s._doMap[e],"piecewise"===e?(o(a),n(a)):"category"===e?a.categories?r(a):o(a,!0):(p.assert("linear"!==e||a.dataExtent),o(a))};_.prototype={constructor:_,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return p.bind(this._normalizeData,this)}};var b=_.visualHandlers={color:{applyVisual:l("color"),getColorMapper:function(){var t=this.option,e=p.map(t.visual,g.parse);return p.bind("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),u(this,t)}:function(t,i,n){var r=!!n;return!i&&(t=this._normalizeData(t)),n=g.fastMapToColor(t,e,n),r?n:p.stringify(n,"rgba")},this)},_doMap:{linear:function(t){return g.mapToColor(t,this.option.visual)},category:u,piecewise:function(t,e){var i=d.call(this,e);return null==i&&(i=g.mapToColor(t,this.option.visual)),i},fixed:h}},colorHue:a(function(t,e){return g.modifyHSL(t,e)}),colorSaturation:a(function(t,e){return g.modifyHSL(t,null,e)}),colorLightness:a(function(t,e){return g.modifyHSL(t,null,null,e)}),colorAlpha:a(function(t,e){return g.modifyAlpha(t,e)}),opacity:{applyVisual:l("opacity"),_doMap:c([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(p.isString(n))i("symbol",n);else if(y(n))for(var r in n)n.hasOwnProperty(r)&&i(r,n[r])},_doMap:{linear:s,category:u,piecewise:function(t,e){var i=d.call(this,e);return null==i&&(i=s.call(this,t)),i},fixed:h}},symbolSize:{applyVisual:l("symbolSize"),_doMap:c([0,1])}},w={linear:function(t){return v(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=_.findPieceIndex(t,e,!0);return null!=i?v(i,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?x:e},fixed:p.noop};_.addVisualHandler=function(t,e){b[t]=e},_.isValidType=function(t){return b.hasOwnProperty(t)},_.eachVisual=function(t,e,i){p.isObject(t)?p.each(t,e,i):e.call(i,t)},_.mapVisual=function(t,e,i){var n,r=p.isArray(t)?[]:p.isObject(t)?{}:(n=!0,null);return _.eachVisual(t,function(t,o){var a=e.call(i,t,o);n?r=a:r[o]=a}),r},_.retrieveVisuals=function(t){var e,i={};return t&&m(b,function(n,r){t.hasOwnProperty(r)&&(i[r]=t[r],e=!0)}),e?i:null},_.prepareVisualTypes=function(t){if(y(t)){var e=[];m(t,function(t,i){e.push(i)}),t=e}else{if(!p.isArray(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},_.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},_.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);o>n&&(o=n,r=i)}for(var r,o=1/0,a=0,s=e.length;s>a;a++){var l=e[a].value;if(null!=l){if(l===t)return a;i&&n(l,a)}}for(var a=0,s=e.length;s>a;a++){var u=e[a],h=u.interval,c=u.close;if(h){if(h[0]===-(1/0)){if(f(c[1],t,h[1]))return a}else if(h[1]===1/0){if(f(c[0],h[0],t))return a; +}else if(f(c[0],h[0],t)&&f(c[1],t,h[1]))return a;i&&n(h[0],a),i&&n(h[1],a)}}return i?t===1/0?e.length-1:t===-(1/0)?0:r:void 0},t.exports=_},function(t,e){t.exports=function(t,e){var i={};e.eachRawSeriesByType(t,function(t){var n=t.getRawData(),r={};if(!e.isSeriesFiltered(t)){var o=t.getData();o.each(function(t){var e=o.getRawIndex(t);r[e]=t}),n.each(function(e){var a=n.getItemModel(e),s=r[e],l=o.getItemVisual(s,"color",!0);if(l)n.setItemVisual(e,"color",l);else{var u=a.get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",u),o.setItemVisual(s,"color",u)}})}})}},function(t,e,i){var n=i(5),r=i(16),o={},a=Math.min,s=Math.max,l=Math.sin,u=Math.cos,h=n.create(),c=n.create(),d=n.create(),f=2*Math.PI;o.fromPoints=function(t,e,i){if(0!==t.length){var n,r=t[0],o=r[0],l=r[0],u=r[1],h=r[1];for(n=1;nf;f++){var x=m(t,i,o,u,p[f]);c[0]=a(x,c[0]),d[0]=s(x,d[0])}for(y=v(e,n,l,h,g),f=0;y>f;f++){var _=m(e,n,l,h,g[f]);c[1]=a(_,c[1]),d[1]=s(_,d[1])}c[0]=a(t,c[0]),d[0]=s(t,d[0]),c[0]=a(u,c[0]),d[0]=s(u,d[0]),c[1]=a(e,c[1]),d[1]=s(e,d[1]),c[1]=a(h,c[1]),d[1]=s(h,d[1])},o.fromQuadratic=function(t,e,i,n,o,l,u,h){var c=r.quadraticExtremum,d=r.quadraticAt,f=s(a(c(t,i,o),1),0),p=s(a(c(e,n,l),1),0),g=d(t,i,o,f),v=d(e,n,l,p);u[0]=a(t,o,g),u[1]=a(e,l,v),h[0]=s(t,o,g),h[1]=s(e,l,v)},o.fromArc=function(t,e,i,r,o,a,s,p,g){var v=n.min,m=n.max,y=Math.abs(o-a);if(1e-4>y%f&&y>1e-4)return p[0]=t-i,p[1]=e-r,g[0]=t+i,void(g[1]=e+r);if(h[0]=u(o)*i+t,h[1]=l(o)*r+e,c[0]=u(a)*i+t,c[1]=l(a)*r+e,v(p,h,c),m(g,h,c),o%=f,0>o&&(o+=f),a%=f,0>a&&(a+=f),o>a&&!s?a+=f:a>o&&s&&(o+=f),s){var x=a;a=o,o=x}for(var _=0;a>_;_+=Math.PI/2)_>o&&(d[0]=u(_)*i+t,d[1]=l(_)*r+e,v(p,d,p),m(g,d,g))},t.exports=o},function(t,e,i){var n=i(37),r=i(1),o=i(18),a=function(t){n.call(this,t)};a.prototype={constructor:a,type:"text",brush:function(t,e){var i=this.style,n=i.x||0,r=i.y||0,a=i.text;if(null!=a&&(a+=""),i.bind(t,this,e),a){this.setTransform(t);var s,l=i.textAlign;if(i.textVerticalAlign){var u=o.getBoundingRect(a,t.font,i.textAlign,"top");switch(s="middle",i.textVerticalAlign){case"middle":r-=u.height/2-u.lineHeight/2;break;case"bottom":r-=u.height-u.lineHeight/2;break;default:r+=u.lineHeight/2}}else s=i.textBaseline;t.font=i.textFont||i.font,t.textAlign=l||"left",t.textAlign!==l&&(t.textAlign="left"),t.textBaseline=s||"alphabetic",t.textBaseline!==s&&(t.textBaseline="alphabetic");for(var h=o.measureText("国",t.font).width,c=a.split("\n"),d=0;d=0?parseFloat(t)/100*e:parseFloat(t):t}var r=i(18),o=i(7),a=new o,s=function(){};s.prototype={constructor:s,drawRectText:function(t,e,i){var o=this.style,s=o.text;if(null!=s&&(s+=""),s){t.save();var l,u,h=o.textPosition,c=o.textDistance,d=o.textAlign,f=o.textFont||o.font,p=o.textBaseline,g=o.textVerticalAlign;i=i||r.getBoundingRect(s,f,d,p);var v=this.transform;if(v&&(a.copy(e),a.applyTransform(v),e=a),h instanceof Array){if(l=e.x+n(h[0],e.width),u=e.y+n(h[1],e.height),d=d||"left",p=p||"top",g){switch(g){case"middle":u-=i.height/2-i.lineHeight/2;break;case"bottom":u-=i.height-i.lineHeight/2;break;default:u+=i.lineHeight/2}p="middle"}}else{var m=r.adjustTextPositionOnRect(h,e,i,c);l=m.x,u=m.y,d=d||m.textAlign,p=p||m.textBaseline}t.textAlign=d||"left",t.textBaseline=p||"alphabetic";var y=o.textFill,x=o.textStroke;y&&(t.fillStyle=y),x&&(t.strokeStyle=x),t.font=f,t.shadowBlur=o.textShadowBlur,t.shadowColor=o.textShadowColor||"transparent",t.shadowOffsetX=o.textShadowOffsetX,t.shadowOffsetY=o.textShadowOffsetY;for(var _=s.split("\n"),b=0;b<_.length;b++)y&&t.fillText(_[b],l,u),x&&t.strokeText(_[b],l,u),u+=i.lineHeight;t.restore()}}},t.exports=s},function(t,e,i){function n(t){delete c[t]}/*! * ZRender, a high performance 2d drawing library. * * Copyright (c) 2013, Baidu Inc. @@ -19,15 +20,16 @@ var C=function(){var t=L[1]/L[0];this.animateTo({scale:[Math.max(1.1*L[0],L[0]+3 * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt */ -var r=i(61),o=i(11),a=i(131),s=i(134),l=i(135),h=!o.canvasSupported,u={canvas:i(133)},c={},d={};d.version="3.1.0",d.init=function(t,e){var i=new f(r(),t,e);return c[i.id]=i,i},d.dispose=function(t){if(t)t.dispose();else{for(var e in c)c[e].dispose();c={}}return d},d.getInstance=function(t){return c[t]},d.registerPainter=function(t,e){u[t]=e};var f=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new s,c=i.renderer;if(h){if(!u.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");c="vml"}else c&&u[c]||(c="canvas");var d=new u[c](e,r,i);this.storage=r,this.painter=d,o.node||(this.handler=new a(d.getViewportRoot(),r,d)),this.animation=new l({stage:{update:function(){n._needsRefresh&&n.refreshImmediately(),n._needsRefreshHover&&n.refreshHoverImmediately()}}}),this.animation.start(),this._needsRefresh;var f=r.delFromMap,p=r.addToMap;r.delFromMap=function(t){var e=r.get(t);f.call(r,t),e&&e.removeSelfFromZr(n)},r.addToMap=function(t){p.call(r,t),t.addSelfToZr(n)}};f.prototype={constructor:f,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(){this.painter.resize(),this.handler&&this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e,i){var n=r();return this.painter.pathToImage(n,t,e,i)},setDefaultCursorStyle:function(t){this.handler&&this.handler.setDefaultCursorStyle(t)},on:function(t,e,i){this.handler&&this.handler.on(t,e,i)},off:function(t,e){this.handler&&this.handler.off(t,e)},trigger:function(t,e){this.handler&&this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler&&this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,n(this.id)}},t.exports=d},function(t,e,i){var n=i(2),r=i(1);t.exports=function(t,e){r.each(e,function(e){e.update="updateView",n.registerAction(e,function(i,n){var r={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name);var n=t.getData();n.each(function(e){var i=n.getName(e);r[i]=t.isSelected(i)||!1})}),{name:i.name,selected:r}})})}},function(t,e,i){function n(t){if(!t.target||!t.target.draggable){var e=t.offsetX,i=t.offsetY,n=this.rectProvider&&this.rectProvider();n&&n.contain(e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function r(t){if(this._dragging&&(d.stop(t.event),"pinch"!==t.gestureEvent)){if(f.isTaken(this._zr,"globalPan"))return;var e=t.offsetX,i=t.offsetY,n=e-this._x,r=i-this._y;this._x=e,this._y=i;var o=this.target;if(o){var a=o.position;a[0]+=n,a[1]+=r,o.dirty()}d.stop(t.event),this.trigger("pan",n,r)}}function o(t){this._dragging=!1}function a(t){var e=t.wheelDelta>0?1.1:1/1.1;l.call(this,t,e,t.offsetX,t.offsetY)}function s(t){if(!f.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;l.call(this,t,e,t.pinchX,t.pinchY)}}function l(t,e,i,n){var r=this.rectProvider&&this.rectProvider();if(r&&r.contain(i,n)){d.stop(t.event);var o=this.target,a=this.zoomLimit;if(o){var s=o.position,l=o.scale,h=this.zoom=this.zoom||1;if(h*=e,a){var u=a.min||0,c=a.max||1/0;h=Math.max(Math.min(c,h),u)}var f=h/this.zoom;this.zoom=h,s[0]-=(i-s[0])*(f-1),s[1]-=(n-s[1])*(f-1),l[0]*=f,l[1]*=f,o.dirty()}this.trigger("zoom",e,i,n)}}function h(t,e,i){this.target=e,this.rectProvider=i,this.zoomLimit,this.zoom,this._zr=t;var l=c.bind,h=l(n,this),d=l(r,this),f=l(o,this),p=l(a,this),g=l(s,this);u.call(this),this.enable=function(e){this.disable(),null==e&&(e=!0),e!==!0&&"move"!==e&&"pan"!==e||(t.on("mousedown",h),t.on("mousemove",d),t.on("mouseup",f)),e!==!0&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",p),t.on("pinch",g))},this.disable=function(){t.off("mousedown",h),t.off("mousemove",d),t.off("mouseup",f),t.off("mousewheel",p),t.off("pinch",g)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}var u=i(21),c=i(1),d=i(23),f=i(107);c.mixin(h,u),t.exports=h},function(t,e){t.exports=function(t,e,i,n,r){function o(t,e,i){var n=e.length?e.slice():[e,e];return e[0]>e[1]&&n.reverse(),0>t&&n[0]+t0&&n[1]+t>i[1]&&(t=i[1]-n[1]),t}return t?("rigid"===n?(t=o(t,e,i),e[0]+=t,e[1]+=t):(t=o(t,e[r],i),e[r]+=t,"push"===n&&e[0]>e[1]&&(e[1-r]=e[r])),e):e}},function(t,e,i){var n=i(1),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameTextStyle:{},nameGap:15,silent:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#333",width:1,type:"solid"}},axisTick:{show:!0,inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{color:"#333",fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},o=n.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{interval:"auto"},axisLabel:{interval:"auto"}},r),a=n.merge({boundaryGap:[0,0],splitNumber:5},r),s=n.defaults({scale:!0,min:"dataMin",max:"dataMax"},a),l=n.defaults({},a);l.scale=!0,t.exports={categoryAxis:o,valueAxis:a,timeAxis:s,logAxis:l}},function(t,e,i){function n(t){var e=t.pieceList;t.hasSpecialVisual=!1,f.each(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function r(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(m(e,function(t,e){n[t]=e}),!f.isArray(i)){var r=[];f.isObject(i)?m(i,function(t,e){var i=n[e];r[null!=i?i:y]=t}):r[y]=i,i=t.visual=r}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function o(t,e){var i=t.visual,n=[];f.isObject(i)?m(i,function(t){n.push(t)}):null!=i&&n.push(i);var r={color:1,symbol:1};e||1!==n.length||t.type in r||(n[1]=n[0]),t.visual=n}function a(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:c([0,1])}}function s(t,e){var i=this.option.visual;return i[Math.round(g(e,[0,1],[0,i.length-1],!0))]||{}}function l(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function h(t){var e=this.option.visual;return e[this.option.loop&&t!==y?t%e.length:t]}function u(){return this.option.visual[0]}function c(t){return{linear:function(e){return g(e,t,this.option.visual,!0)},category:h,piecewise:function(e,i){var n=d.call(this,i);return null==n&&(n=g(e,t,this.option.visual,!0)),n},fixed:u}}function d(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=x.findPieceIndex(t,i),r=i[n];if(r&&r.visual)return r.visual[this.type]}}var f=i(1),p=i(17),g=i(4).linearMap,m=f.each,v=f.isObject,y=-1,x=function(t){var e=t.mappingMethod,i=t.type,a=this.option=f.clone(t);this.type=i,this.mappingMethod=e,this._normalizeData=b[e];var s=_[i];this.applyVisual=s.applyVisual,this.getColorMapper=s.getColorMapper,this._doMap=s._doMap[e],"piecewise"===e?(o(a),n(a)):"category"===e?a.categories?r(a):o(a,!0):(f.assert("linear"!==e||a.dataExtent),o(a))};x.prototype={constructor:x,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return f.bind(this._normalizeData,this)}};var _=x.visualHandlers={color:{applyVisual:l("color"),getColorMapper:function(){var t=this.option,e=f.map(t.visual,p.parse);return f.bind("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),h(this,t)}:function(t,i,n){var r=!!n;return!i&&(t=this._normalizeData(t)),n=p.fastMapToColor(t,e,n),r?n:f.stringify(n,"rgba")},this)},_doMap:{linear:function(t){return p.mapToColor(t,this.option.visual)},category:h,piecewise:function(t,e){var i=d.call(this,e);return null==i&&(i=p.mapToColor(t,this.option.visual)),i},fixed:u}},colorHue:a(function(t,e){return p.modifyHSL(t,e)}),colorSaturation:a(function(t,e){return p.modifyHSL(t,null,e)}),colorLightness:a(function(t,e){return p.modifyHSL(t,null,null,e)}),colorAlpha:a(function(t,e){return p.modifyAlpha(t,e)}),opacity:{applyVisual:l("opacity"),_doMap:c([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(f.isString(n))i("symbol",n);else if(v(n))for(var r in n)n.hasOwnProperty(r)&&i(r,n[r])},_doMap:{linear:s,category:h,piecewise:function(t,e){var i=d.call(this,e);return null==i&&(i=s.call(this,t)),i},fixed:u}},symbolSize:{applyVisual:l("symbolSize"),_doMap:c([0,1])}},b={linear:function(t){return g(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=x.findPieceIndex(t,e);return null!=i?g(i,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?y:e},fixed:f.noop};x.addVisualHandler=function(t,e){_[t]=e},x.isValidType=function(t){return _.hasOwnProperty(t)},x.eachVisual=function(t,e,i){f.isObject(t)?f.each(t,e,i):e.call(i,t)},x.mapVisual=function(t,e,i){var n,r=f.isArray(t)?[]:f.isObject(t)?{}:(n=!0,null);return x.eachVisual(t,function(t,o){var a=e.call(i,t,o);n?r=a:r[o]=a}),r},x.retrieveVisuals=function(t){var e,i={};return t&&m(_,function(n,r){t.hasOwnProperty(r)&&(i[r]=t[r],e=!0)}),e?i:null},x.prepareVisualTypes=function(t){if(v(t)){var e=[];m(t,function(t,i){e.push(i)}),t=e}else{if(!f.isArray(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},x.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},x.findPieceIndex=function(t,e){for(var i=0,n=e.length;n>i;i++){var r=e[i];if(null!=r.value&&r.value===t)return i}for(var i=0,n=e.length;n>i;i++){var r=e[i],o=r.interval;if(o)if(o[0]===-(1/0)){if(te&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(o-e)/(n-e);1!==s&&0!==s||(a=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?a:0}},function(t,e,i){"use strict";var n=i(1),r=i(30),o=function(t,e,i,n,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",r.call(this,o)};o.prototype={constructor:o},n.inherits(o,r),t.exports=o},function(t,e,i){"use strict";function n(t){return t>s||-s>t}var r=i(19),o=i(5),a=r.identity,s=5e-5,l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},h=l.prototype;h.transform=null,h.needLocalTransform=function(){return n(this.rotation)||n(this.position[0])||n(this.position[1])||n(this.scale[0]-1)||n(this.scale[1]-1)},h.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||r.create(),i?this.getLocalTransform(n):a(n),e&&(i?r.mul(n,t.transform,n):r.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,n)):void(n&&a(n))},h.getLocalTransform=function(t){t=t||[],a(t);var e=this.origin,i=this.scale,n=this.rotation,o=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),n&&r.rotate(t,t,n),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=o[0],t[5]+=o[1],t},h.setTransform=function(t){var e=this.transform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},h.restoreTransform=function(t){var e=this.invTransform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])};var u=[];h.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(r.mul(u,t.invTransform,e),e=u);var i=e[0]*e[0]+e[1]*e[1],o=e[2]*e[2]+e[3]*e[3],a=this.position,s=this.scale;n(i-1)&&(i=Math.sqrt(i)),n(o-1)&&(o=Math.sqrt(o)),e[0]<0&&(i=-i),e[3]<0&&(o=-o),a[0]=e[4],a[1]=e[5],s[0]=i,s[1]=o,this.rotation=Math.atan2(-e[1]/o,e[0]/i)}},h.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},h.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&o.applyTransform(i,i,n),i},h.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&o.applyTransform(i,i,n),i},t.exports=l},function(t,e,i){"use strict";function n(t){r.each(o,function(e){this[e]=r.bind(t[e],t)},this)}var r=i(1),o=["getDom","getZr","getWidth","getHeight","dispatchAction","on","off","getDataURL","getConnectedDataURL","getModel","getOption"];t.exports=n},function(t,e,i){var n=i(1);i(53),i(86),i(87);var r=i(114),o=i(2);o.registerLayout(n.curry(r,"bar")),o.registerVisual(function(t){t.eachSeriesByType("bar",function(t){var e=t.getData();e.setVisual("legendSymbol","roundRect")})}),i(36)},function(t,e,i){"use strict";var n=i(15),r=i(35);t.exports=n.extend({type:"series.bar",dependencies:["grid","polar"],getInitialData:function(t,e){return r(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),r=n.getLayout("offset"),o=n.getLayout("size"),a=e.getBaseAxis().isHorizontal()?0:1;return i[a]+=r+o/2,i}return[NaN,NaN]},brushSelector:"rect",defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,itemStyle:{normal:{barBorderColor:"#fff",barBorderWidth:0},emphasis:{barBorderColor:"#fff",barBorderWidth:0}}}})},function(t,e,i){"use strict";function n(t,e){var i=t.width>0?1:-1,n=t.height>0?1:-1;e=Math.min(e,Math.abs(t.width),Math.abs(t.height)),t.x+=i*e/2,t.y+=n*e/2,t.width-=i*e,t.height-=n*e}var r=i(1),o=i(3);r.extend(i(12).prototype,i(88)),t.exports=i(2).extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"===n&&this._renderOnCartesian(t,e,i),this.group},_renderOnCartesian:function(t,e,i){function a(e,i){var a=l.getItemLayout(e),s=l.getItemModel(e).get(p)||0;n(a,s);var h=new o.Rect({shape:r.extend({},a)});if(f){var u=h.shape,c=d?"height":"width",g={};u[c]=0,g[c]=a[c],o[i?"updateProps":"initProps"](h,{shape:g},t,e)}return h}var s=this.group,l=t.getData(),h=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),d=c.isHorizontal(),f=t.get("animation"),p=["itemStyle","normal","barBorderWidth"];l.diff(h).add(function(t){if(l.hasValue(t)){var e=a(t);l.setItemGraphicEl(t,e),s.add(e)}}).update(function(e,i){var r=h.getItemGraphicEl(i);if(!l.hasValue(e))return void s.remove(r);r||(r=a(e,!0));var u=l.getItemLayout(e),c=l.getItemModel(e).get(p)||0;n(u,c),o.updateProps(r,{shape:u},t,e),l.setItemGraphicEl(e,r),s.add(r)}).remove(function(e){var i=h.getItemGraphicEl(e);i&&(i.style.text="",o.updateProps(i,{shape:{width:0}},t,e,function(){s.remove(i)}))}).execute(),this._updateStyle(t,l,d),this._data=l},_updateStyle:function(t,e,i){function n(t,e,i,n,r){o.setText(t,e,i),t.text=n,"outside"===t.textPosition&&(t.textPosition=r)}e.eachItemGraphicEl(function(a,s){var l=e.getItemModel(s),h=e.getItemVisual(s,"color"),u=e.getItemVisual(s,"opacity"),c=e.getItemLayout(s),d=l.getModel("itemStyle.normal"),f=l.getModel("itemStyle.emphasis").getBarItemStyle();a.setShape("r",d.get("barBorderRadius")||0),a.useStyle(r.defaults({fill:h,opacity:u},d.getBarItemStyle()));var p=i?c.height>0?"bottom":"top":c.width>0?"left":"right",g=l.getModel("label.normal"),m=l.getModel("label.emphasis"),v=a.style;g.get("show")?n(v,g,h,r.retrieve(t.getFormattedLabel(s,"normal"),t.getRawValue(s)),p):v.text="",m.get("show")?n(f,m,h,r.retrieve(t.getFormattedLabel(s,"emphasis"),t.getRawValue(s)),p):f.text="",o.setHoverStyle(a,f)})},remove:function(t,e){var i=this.group;t.get("animation")?this._data&&this._data.eachItemGraphicEl(function(e){e.style.text="",o.updateProps(e,{shape:{width:0}},t,e.dataIndex,function(){i.remove(e)})}):i.removeAll()}})},function(t,e,i){t.exports={getBarItemStyle:i(32)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]])}},function(t,e,i){function n(t){return"_"+t+"Type"}function r(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){f.isArray(o)||(o=[o,o]);var a=h.createSymbol(r,-o[0]/2,-o[1]/2,o[0],o[1],n);return a.name=t,a}}function o(t){var e=new c({name:"line"});return a(e.shape,t),e}function a(t,e){var i=e[0],n=e[1],r=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,r&&(t.cpx1=r[0],t.cpy1=r[1])}function s(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),h=a.pointAt(s),c=u.sub([],h,l);if(u.normalize(c,c),e){e.attr("position",l);var d=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",h);var d=a.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",h);var f,p,g,m=5*r;if("end"===n.__position)f=[c[0]*m+h[0],c[1]*m+h[1]],p=c[0]>.8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var v=s/2,d=a.tangentAt(v),y=[d[1],-d[0]],x=a.pointAt(v);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]),f=[x[0]+y[0]*m,x[1]+y[1]*m],p="center",g="bottom";var _=-Math.atan2(d[1],d[0]);h[0].8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||p},position:f,scale:[r,r]})}}}}function l(t,e){d.Group.call(this),this._createLine(t,e)}var h=i(26),u=i(5),c=i(170),d=i(3),f=i(1),p=i(4),g=["fromSymbol","toSymbol"],m=l.prototype;m.beforeUpdate=s,m._createLine=function(t,e){var i=t.hostModel,a=t.getItemLayout(e),s=o(a);s.shape.percent=0,d.initProps(s,{shape:{percent:1}},i,e),this.add(s);var l=new d.Text({name:"label"});this.add(l),f.each(g,function(i){var o=r(i,t,e);this.add(o),this[n(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e)},m.updateData=function(t,e){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(e),l={shape:{}};a(l.shape,s),d.updateProps(o,l,i,e),f.each(g,function(i){var o=t.getItemVisual(e,i),a=n(i);if(this[a]!==o){var s=r(i,t,e);this.remove(this.childOfName(i)),this.add(s)}this[a]=o},this),this._updateCommonStl(t,e)},m._updateCommonStl=function(t,e){var i=t.hostModel,n=this.childOfName("line"),r=t.getItemModel(e),o=r.getModel("label.normal"),a=o.getModel("textStyle"),s=r.getModel("label.emphasis"),l=s.getModel("textStyle"),h=p.round(i.getRawValue(e)),u=t.getItemVisual(e,"color");isNaN(h)&&(h=t.getName(e)),n.useStyle(f.defaults({strokeNoScale:!0,fill:"none",stroke:u},r.getModel("lineStyle.normal").getLineStyle())),n.hoverStyle=r.getModel("lineStyle.emphasis").getLineStyle();var c=u||"#000",g=this.childOfName("label");g.setStyle({text:o.get("show")?f.retrieve(i.getFormattedLabel(e,"normal",t.dataType),h):"",textFont:a.getFont(),fill:a.getTextColor()||c}),g.hoverStyle={text:s.get("show")?f.retrieve(i.getFormattedLabel(e,"emphasis",t.dataType),h):"",textFont:l.getFont(),fill:l.getTextColor()||c},g.__textAlign=a.get("align"),g.__verticalAlign=a.get("baseline"),g.__position=o.get("position"),g.ignore=!g.style.text&&!g.hoverStyle.text,d.setHoverStyle(this)},m.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},m.setLinePoints=function(t){var e=this.childOfName("line");a(e.shape,t),e.dirty()},f.inherits(l,d.Group),t.exports=l},function(t,e,i){function n(t){return isNaN(t[0])||isNaN(t[1])}function r(t){return!n(t[0])&&!n(t[1])}function o(t){this._ctor=t||s,this.group=new a.Group}var a=i(3),s=i(89),l=o.prototype;l.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor;t.diff(e).add(function(e){if(r(t.getItemLayout(e))){var o=new n(t,e);t.setItemGraphicEl(e,o),i.add(o)}}).update(function(o,a){var s=e.getItemGraphicEl(a);return r(t.getItemLayout(o))?(s?s.updateData(t,o):s=new n(t,o),t.setItemGraphicEl(o,s),void i.add(s)):void i.remove(s)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},l.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},l.remove=function(){this.group.removeAll()},t.exports=o},function(t,e,i){var n=i(1),r=i(2),o=r.PRIORITY;i(92),i(93),r.registerVisual(n.curry(i(46),"line","circle","line")),r.registerLayout(n.curry(i(54),"line")),r.registerProcessor(o.PROCESSOR.STATISTIC,n.curry(i(126),"line")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return n(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},function(t,e,i){"use strict";function n(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function a(t){return t>=0?1:-1}function s(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=i.onZero?0:n.scale.getExtent()[0],o=n.dim,s="x"===o||"radius"===o?1:0;return e.mapArray([o],function(n,l){for(var h,u=e.stackedOn;u&&a(u.get(o,l))===a(n);){h=u;break}var c=[];return c[s]=e.get(i.dim,l),c[1-s]=h?h.get(o,l,!0):r,t.dataToPoint(c)},!0)}function l(t,e){return null!=e.dataIndex?e.dataIndex:null!=e.name?t.indexOfName(e.name):void 0}function h(t,e,i){var n=o(t.getAxis("x")),r=o(t.getAxis("y")),a=t.getBaseAxis().isHorizontal(),s=Math.min(n[0],n[1]),l=Math.min(r[0],r[1]),h=Math.max(n[0],n[1])-s,u=Math.max(r[0],r[1])-l,c=i.get("lineStyle.normal.width")||2,d=i.get("clipOverflow")?c/2:Math.max(h,u);a?(l-=d,u+=2*d):(s-=d,h+=2*d);var f=new v.Rect({shape:{x:s,y:l,width:h,height:u}});return e&&(f.shape[a?"width":"height"]=0,v.initProps(f,{shape:{width:h,height:u}},i)),f}function u(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),o=r.getExtent(),a=n.getExtent(),s=Math.PI/180,l=new v.Sector({shape:{cx:t.cx,cy:t.cy,r0:o[0],r:o[1],startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-a[0]*s,v.initProps(l,{shape:{endAngle:-a[1]*s}},i)),l}function c(t,e,i){return"polar"===t.type?u(t,e,i):h(t,e,i)}function d(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);a=new g(r,o),a.position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else x.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=l(r,n);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else x.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new y.Polyline({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new y.Polygon({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];return i&&i.isLabelIgnored?f.bind(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var o=this._polyline,a=this._polygon,s=t.hostModel,l=m(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,f=l.stackedOnNext;r&&(h=d(l.current,i,r),u=d(l.stackedOnCurrent,i,r),c=d(l.next,i,r),f=d(l.stackedOnNext,i,r)),o.shape.__points=l.current,o.shape.points=h,v.updateProps(o,{shape:{points:c}},s),a&&(a.setShape({points:h,stackedOnPoints:u}),v.updateProps(a,{shape:{points:c,stackedOnPoints:f,__points:l.next}},s));for(var p=[],g=l.status,y=0;y=0?1:-1}function n(t,e,n){for(var r,o=t.getBaseAxis(),a=t.getOtherAxis(o),s=o.onZero?0:a.scale.getExtent()[0],l=a.dim,h="x"===l||"radius"===l?1:0,u=e.stackedOn,c=e.get(l,n);u&&i(u.get(l,n))===i(c);){r=u;break}var d=[];return d[h]=e.get(o.dim,n),d[1-h]=r?r.get(l,n,!0):s,t.dataToPoint(d)}function r(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}t.exports=function(t,e,i,o,a,s){for(var l=r(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],m=s.dimensions,v=0;vw;w++){var S=e[b];if(b>=o||0>b)break;if(n(S)){if(x){b+=a;continue}break}if(b===i)t[a>0?"moveTo":"lineTo"](S[0],S[1]),c(f,S);else if(v>0){var M=b+a,I=e[M];if(x)for(;I&&n(e[M]);)M+=a,I=e[M];var A=.5,T=e[_],I=e[M];if(!I||n(I))c(p,S);else{n(I)&&!x&&(I=S),s.sub(d,I,T);var L,C;if("x"===y||"y"===y){var D="x"===y?0:1;L=Math.abs(S[D]-T[D]),C=Math.abs(S[D]-I[D])}else L=s.dist(S,T),C=s.dist(S,I);A=C/(C+L),u(p,S,d,-v*(1-A))}l(f,f,m),h(f,f,g),l(p,p,m),h(p,p,g),t.bezierCurveTo(f[0],f[1],p[0],p[1],S[0],S[1]),u(f,S,d,v*A)}else t.lineTo(S[0],S[1]);_=b,b+=a}return w}function o(t,e){var i=[1/0,1/0],n=[-(1/0),-(1/0)];if(e)for(var r=0;rn[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var a=i(6),s=i(5),l=s.min,h=s.max,u=s.scaleAndAdd,c=s.copy,d=[],f=[],p=[];t.exports={Polyline:a.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},buildPath:function(t,e){var i=e.points,a=0,s=i.length,l=o(i,e.smoothConstraint);if(e.connectNulls){for(;s>0&&n(i[s-1]);s--);for(;s>a&&n(i[a]);a++);}for(;s>a;)a+=r(t,i,a,s,s,1,l.min,l.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Polygon:a.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},buildPath:function(t,e){var i=e.points,a=e.stackedOnPoints,s=0,l=i.length,h=e.smoothMonotone,u=o(i,e.smoothConstraint),c=o(a,e.smoothConstraint);if(e.connectNulls){for(;l>0&&n(i[l-1]);l--);for(;l>s&&n(i[s]);s++);}for(;l>s;){var d=r(t,i,s,l,l,1,u.min,u.max,e.smooth,h,e.connectNulls);r(t,a,s+d-1,d,l,-1,c.min,c.max,e.stackedOnSmooth,h,e.connectNulls),s+=d+1,t.closePath()}}})}},function(t,e,i){var n=i(1),r=i(2);i(97),i(98),i(75)("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(n.curry(i(70),"pie")), -r.registerLayout(n.curry(i(100),"pie")),r.registerProcessor(n.curry(i(69),"pie"))},function(t,e,i){"use strict";var n=i(13),r=i(1),o=i(8),a=i(31),s=i(64),l=i(2).extendSeriesModel({type:"series.pie",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){l.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=a(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},getDataParams:function(t){var e=this._data,i=l.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},_defaultLabelLine:function(t){o.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,avoidLabelOverlap:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationEasing:"cubicOut",data:[]}});r.mixin(l,s),t.exports=l},function(t,e,i){function n(t,e,i,n){var o=e.getData(),a=this.dataIndex,s=o.getName(a),l=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),o.each(function(t){r(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),l,i)})}function r(t,e,i,n,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=i?n:0,h=[a*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function o(t,e){function i(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function n(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}s.Group.call(this);var r=new s.Sector({z2:2}),o=new s.Polyline,a=new s.Text;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function a(t,e,i,n,r){var o=n.getModel("textStyle"),a="inside"===r||"inner"===r;return{fill:o.getTextColor()||(a?"#fff":t.getItemVisual(e,"color")),opacity:t.getItemVisual(e,"opacity"),textFont:o.getFont(),text:l.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var s=i(3),l=i(1),h=o.prototype;h.updateData=function(t,e,i){function n(){a.stopAnimation(!0),a.animateTo({shape:{r:c.r+10}},300,"elasticOut")}function o(){a.stopAnimation(!0),a.animateTo({shape:{r:c.r}},300,"elasticOut")}var a=this.childAt(0),h=t.hostModel,u=t.getItemModel(e),c=t.getItemLayout(e),d=l.extend({},c);d.label=null,i?(a.setShape(d),a.shape.endAngle=c.startAngle,s.updateProps(a,{shape:{endAngle:c.endAngle}},h,e)):s.updateProps(a,{shape:d},h,e);var f=u.getModel("itemStyle"),p=t.getItemVisual(e,"color");a.useStyle(l.defaults({lineJoin:"bevel",fill:p},f.getModel("normal").getItemStyle())),a.hoverStyle=f.getModel("emphasis").getItemStyle(),r(this,t.getItemLayout(e),u.get("selected"),h.get("selectedOffset"),h.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&h.ifEnableAnimation()&&a.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),s.setHoverStyle(this)},h._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),l=t.getItemLayout(e),h=l.label,u=t.getItemVisual(e,"color");s.updateProps(i,{shape:{points:h.linePoints||[[h.x,h.y],[h.x,h.y],[h.x,h.y]]}},r,e),s.updateProps(n,{style:{x:h.x,y:h.y}},r,e),n.attr({style:{textVerticalAlign:h.verticalAlign,textAlign:h.textAlign,textFont:h.font},rotation:h.rotation,origin:[h.x,h.y],z2:10});var c=o.getModel("label.normal"),d=o.getModel("label.emphasis"),f=o.getModel("labelLine.normal"),p=o.getModel("labelLine.emphasis"),g=c.get("position")||d.get("position");n.setStyle(a(t,e,"normal",c,g)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=a(t,e,"emphasis",d,g),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var m=f.get("smooth");m&&m===!0&&(m=.4),i.setShape({smooth:m})},l.inherits(o,s.Group);var u=i(27).extend({type:"pie",init:function(){var t=new s.Group;this._sectorGroup=t},render:function(t,e,i,r){if(!r||r.from!==this.uid){var a=t.getData(),s=this._data,h=this.group,u=e.get("animation"),c=!s,d=l.curry(n,this.uid,t,u,i),f=t.get("selectedMode");if(a.diff(s).add(function(t){var e=new o(a,t);c&&e.eachChild(function(t){t.stopAnimation(!0)}),f&&e.on("click",d),a.setItemGraphicEl(t,e),h.add(e)}).update(function(t,e){var i=s.getItemGraphicEl(e);i.updateData(a,t),i.off("click"),f&&i.on("click",d),h.add(i),a.setItemGraphicEl(t,i)}).remove(function(t){var e=s.getItemGraphicEl(t);h.remove(e)}).execute(),u&&c&&a.count()>0){var p=a.getItemLayout(0),g=Math.max(i.getWidth(),i.getHeight())/2,m=l.bind(h.removeClipPath,h);h.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,m,t))}this._data=a}},_createClipPath:function(t,e,i,n,r,o,a){var l=new s.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return s.initProps(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),l}});t.exports=u},function(t,e,i){"use strict";function n(t,e,i,n,r,o,a){function s(e,i,n,r){for(var o=e;i>o;o++)if(t[o].y+=n,o>e&&i>o+1&&t[o+1].y>t[o].y+t[o].height)return void l(o,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,r,o){for(var a=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)u=t[g].y-c,0>u&&s(g,d,-u,r),c=t[g].y+t[g].height;0>a-c&&l(d-1,c-a);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);h(f,!1,e,i,n,r),h(p,!0,e,i,n,r)}function r(t,e,i,r,o,a){for(var s=[],l=[],h=0;hb?-1:1)*x,C=T;n=L+(0>b?-5:5),r=C,c=[[M,I],[A,T],[L,C]]}d=S?"center":b>0?"left":"right"}var D=g.getModel("textStyle").getFont(),P=g.get("rotate")?0>b?-_+Math.PI:-_:0,k=t.getFormattedLabel(i,"normal")||l.getName(i),z=o.getBoundingRect(k,D,d,"top");u=!!P,f.label={x:n,y:r,position:m,height:z.height,len:y,len2:x,linePoints:c,textAlign:d,verticalAlign:"middle",font:D,rotation:P},S||h.push(f.label)}),!u&&t.get("avoidLabelOverlap")&&r(h,a,s,e,i,n)}},function(t,e,i){var n=i(4),r=n.parsePercent,o=i(99),a=i(1),s=2*Math.PI,l=Math.PI/180;t.exports=function(t,e,i,h){e.eachSeriesByType(t,function(t){var e=t.get("center"),h=t.get("radius");a.isArray(h)||(h=[0,h]),a.isArray(e)||(e=[e,e]);var u=i.getWidth(),c=i.getHeight(),d=Math.min(u,c),f=r(e[0],u),p=r(e[1],c),g=r(h[0],d/2),m=r(h[1],d/2),v=t.getData(),y=-t.get("startAngle")*l,x=t.get("minAngle")*l,_=v.getSum("value"),b=Math.PI/(_||v.count())*2,w=t.get("clockwise"),S=t.get("roseType"),M=v.getDataExtent("value");M[0]=0;var I=s,A=0,T=y,L=w?1:-1;if(v.each("value",function(t,e){var i;i="area"!==S?0===_?b:t*b:s/(v.count()||1),x>i?(i=x,I-=x):A+=t;var r=T+L*i;v.setItemLayout(e,{angle:i,startAngle:T,endAngle:r,clockwise:w,cx:f,cy:p,r0:g,r:S?n.linearMap(t,M,[g,m]):m}),T=r},!0),s>I)if(.001>=I){var C=s/v.count();v.each(function(t){var e=v.getItemLayout(t);e.startAngle=y+L*t*C,e.endAngle=y+L*(t+1)*C})}else b=I/A,T=y,v.each("value",function(t,e){var i=v.getItemLayout(e),n=i.angle===x?x:t*b;i.startAngle=T,i.endAngle=T+L*n,T+=n});o(t,m,u,c)})}},function(t,e,i){"use strict";i(52),i(102)},function(t,e,i){function n(t,e){function i(t,e){var i=n.getAxis(t);return i.toGlobalCoord(i.dataToCoord(0))}var n=t.coordinateSystem,r=e.axis,o={},a=r.position,s=r.onZero?"onZero":a,l=r.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={x:{top:u[2],bottom:u[3]},y:{left:u[0],right:u[1]}};c.x.onZero=Math.max(Math.min(i("y"),c.x.bottom),c.x.top),c.y.onZero=Math.max(Math.min(i("x"),c.y.right),c.y.left),o.position=["y"===l?c.y[s]:u[0],"x"===l?c.x[s]:u[3]];var d={x:0,y:1};o.rotation=Math.PI/2*d[l];var f={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=f[a],r.onZero&&(o.labelOffset=c[l][a]-c[l].onZero),e.getModel("axisTick").get("inside")&&(o.tickDirection=-o.tickDirection),e.getModel("axisLabel").get("inside")&&(o.labelDirection=-o.labelDirection);var p=e.getModel("axisLabel").get("rotate");return o.labelRotation="top"===s?-p:p,o.labelInterval=r.getLabelInterval(),o.z2=1,o}var r=i(1),o=i(3),a=i(50),s=a.ifIgnoreOnTick,l=a.getInterval,h=["axisLine","axisLabel","axisTick","axisName"],u=["splitArea","splitLine"],c=i(2).extendComponentView({type:"axis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("grid",t.get("gridIndex")),o=n(i,t),s=new a(t,o);r.each(h,s.add,s),this.group.add(s.getGroup()),r.each(u,function(e){t.get(e+".show")&&this["_"+e](t,i,o.labelInterval)},this)}},_splitLine:function(t,e,i){var n=t.axis,a=t.getModel("splitLine"),h=a.getModel("lineStyle"),u=h.get("width"),c=h.get("color"),d=l(a,i);c=r.isArray(c)?c:[c];for(var f=e.coordinateSystem.getRect(),p=n.isHorizontal(),g=[],m=0,v=n.getTicksCoords(),y=[],x=[],_=0;_=0;r--){var o=i[r];if(o[n])break}if(0>r){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var s=a.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)},pop:function(t){var e=n(t),i=e[e.length-1];e.length>1&&e.pop();var r={};return o(i,function(t,i){for(var n=e.length-1;n>=0;n--){var t=e[n][i];if(t){r[i]=t;break}}}),r},clear:function(t){t[a]=null},count:function(t){return n(t).length}};t.exports=s},function(t,e,i){i(10).registerSubTypeDefaulter("dataZoom",function(t){return"slider"})},function(t,e){function i(t){return t[n]||(t[n]={})}var n="\x00_ec_interaction_mutex",r={take:function(t,e,n,r){var o=i(t),a=o[e];a&&a.onTakeAway&&a.onTakeAway(),o[e]={userKey:n,onTakeAway:r}},release:function(t,e,n){var r=i(t),o=r[e];o&&o.userKey===n&&(r[e]=null)},isTaken:function(t,e){return!!i(t)[e]}};t.exports=r},function(t,e,i){function n(t,e,i){r.positionGroup(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"))}var r=i(14),o=i(9),a=i(3);t.exports={layout:function(t,e,i){var o=r.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"));r.box(e.get("orient"),t,e.get("itemGap"),o.width,o.height),n(t,e,i)},addBackground:function(t,e){var i=o.normalizeCssArray(e.get("padding")),n=t.getBoundingRect(),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var s=new a.Rect({shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},style:r,silent:!0,z2:-1});a.subPixelOptimizeRect(s),t.add(s)}}},function(t,e,i){var n=i(1),r=i(44),o=i(113),a=function(t,e,i,n,o){r.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"};a.prototype={constructor:a,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),t},getLabelInterval:function(){var t=this._labelInterval;return t||(t=this._labelInterval=o(this)),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},toLocalCoord:null,toGlobalCoord:null},n.inherits(a,r),t.exports=a},function(t,e,i){"use strict";function n(t){return this._axes[t]}var r=i(1),o=function(t){this._axes={},this._dimList=[],this.name=t||""};o.prototype={constructor:o,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return r.map(this._dimList,n,this)},getAxesByScale:function(t){return t=t.toLowerCase(),r.filter(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;ri&&(i=Math.min(i,u),u-=i,t.width=i,c--)}),d=(u-s)/(c+(c-1)*h),d=Math.max(d,0);var f,p=0;a.each(i,function(t,e){t.width||(t.width=d),f=t,p+=t.width*(1+h)}),f&&(p-=f.width*h);var g=-p/2;a.each(i,function(t,i){r[e][i]=r[e][i]||{offset:g,width:t.width},g+=t.width*(1+h)})}),r}function o(t,e,i){var o=r(a.filter(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),s={};e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=n(t),l=o[r.index][a],h=l.offset,u=l.width,c=i.getOtherAxis(r),d=t.get("barMinHeight")||0,f=r.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=i.dataToPoints(e,!0);s[a]=s[a]||[],e.setLayout({offset:h,size:u}),e.each(c.dim,function(t,i){if(!isNaN(t)){s[a][i]||(s[a][i]={p:f,n:f});var n,r,o,l,g=t>=0?"p":"n",m=p[i],v=s[a][i][g];c.isHorizontal()?(n=v,r=m[1]+h,o=m[0]-v,l=u,Math.abs(o)o?-1:1)*d),s[a][i][g]+=o):(n=m[0]+h,r=v,o=u,l=m[1]-v,Math.abs(l)=l?-1:1)*d),s[a][i][g]+=l),e.setItemLayout(i,{x:n,y:r,width:o,height:l})}},!0)},this)}var a=i(1),s=i(4),l=s.parsePercent;t.exports=o},function(t,e,i){var n=i(3),r=i(1),o=Math.PI;t.exports=function(t,e){e=e||{},r.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new n.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),a=new n.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),s=new n.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut");var l=new n.Group;return l.add(a),l.add(s),l.add(i),l.resize=function(){var e=t.getWidth()/2,n=t.getHeight()/2;a.setShape({cx:e,cy:n});var r=a.shape.r;s.setShape({x:e-r,y:n-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},l.resize(),l}},function(t,e,i){function n(t,e){for(var i in e)_.hasClass(i)||("object"==typeof e[i]?t[i]=t[i]?c.merge(t[i],e[i],!1):c.clone(e[i]):null==t[i]&&(t[i]=e[i]))}function r(t){t=t,this.option={},this.option[w]=1,this._componentsMap={},this._seriesIndices=null,n(t,this._theme.option),c.merge(t,b,!1),this.mergeOption(t)}function o(t,e){c.isArray(e)||(e=e?[e]:[]);var i={};return p(e,function(e){i[e]=(t[e]||[]).slice()}),i}function a(t,e){var i={};p(e,function(t,e){var n=t.exist;n&&(i[n.id]=t)}),p(e,function(e,n){var r=e.option;if(c.assert(!r||null==r.id||!i[r.id]||i[r.id]===e,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&(i[r.id]=e),x(r)){var o=s(t,r,e.exist);e.keyInfo={mainType:t,subType:o}}}),p(e,function(t,e){var n=t.exist,r=t.option,o=t.keyInfo;if(x(r)){if(o.name=null!=r.name?r.name+"":n?n.name:"\x00-",n)o.id=n.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do o.id="\x00"+o.name+"\x00"+a++;while(i[o.id])}i[o.id]=t}})}function s(t,e,i){var n=e.type?e.type:i?i.subType:_.determineSubType(t,e);return n}function l(t){return m(t,function(t){return t.componentIndex})||[]}function h(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function u(t){}var c=i(1),d=i(8),f=i(12),p=c.each,g=c.filter,m=c.map,v=c.isArray,y=c.indexOf,x=c.isObject,_=i(10),b=i(118),w="\x00_ec_inner",S=f.extend({constructor:S,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new f(i),this._optionManager=n},setOption:function(t,e){c.assert(!(w in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption()},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):r.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&p(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,r){var s=d.normalizeToArray(t[e]),h=d.mappingToExists(n[e],s);a(e,h);var u=o(n,r);i[e]=[],n[e]=[],p(h,function(t,r){var o=t.exist,a=t.option;if(c.assert(x(a)||o,"Empty component definition"),a){var s=_.getClass(e,t.keyInfo.subType,!0);o&&o instanceof s?(o.mergeOption(a,this),o.optionUpdated(a,!1)):(o=new s(a,this,this,c.extend({dependentModels:u,componentIndex:r},t.keyInfo)),o.optionUpdated(null,!0))}else o.mergeOption({},this),o.optionUpdated({},!1);n[e][r]=o,i[e][r]=o.option},this),"series"===e&&(this._seriesIndices=l(n.series))}var i=this.option,n=this._componentsMap,r=[];p(t,function(t,e){null!=t&&(_.hasClass(e)?r.push(e):i[e]=null==i[e]?c.clone(t):c.merge(i[e],t,!0))}),_.topologicalTravel(r,_.getAllClassMainTypes(),e,this)},getOption:function(){var t=c.clone(this.option);return p(t,function(e,i){if(_.hasClass(i)){for(var e=d.normalizeToArray(e),n=e.length-1;n>=0;n--)d.isIdInner(e[n])&&e.splice(n,1);t[i]=e}}),delete t[w],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap[t];return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,o=this._componentsMap[e];if(!o||!o.length)return[];var a;if(null!=i)v(i)||(i=[i]),a=g(m(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=v(n);a=g(o,function(t){return s&&y(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=v(r);a=g(o,function(t){return l&&y(r,t.name)>=0||!l&&t.name===r})}return h(a,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(i)||t.hasOwnProperty(n))?{mainType:r,index:t[e],id:t[i],name:t[n]}:null}function i(e){return t.filter?g(e,t.filter):e}var n=t.query,r=t.mainType,o=e(n),a=o?this.queryComponents(o):this._componentsMap[r];return i(h(a,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,p(n,function(t,n){p(t,function(t,r){e.call(i,n,t,r)})});else if(c.isString(t))p(n[t],e,i);else if(x(t)){var r=this.findComponents(t);p(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){u(this),p(this._seriesIndices,function(i){var n=this._componentsMap.series[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){p(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,i){u(this),p(this._seriesIndices,function(n){var r=this._componentsMap.series[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return p(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return u(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){u(this);var i=g(this._componentsMap.series,t,e);this._seriesIndices=l(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=l(t.series);var e=[];p(t,function(t,i){e.push(i)}),_.topologicalTravel(e,_.getAllClassMainTypes(),function(e,i){p(t[e],function(t){t.restoreData()})})}});c.mixin(S,i(55)),t.exports=S},function(t,e,i){function n(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e){var i,n,r=[],o=[],a=t.timeline;if(t.baseOption&&(n=t.baseOption),(a||t.options)&&(n=n||{},r=(t.options||[]).slice()),t.media){n=n||{};var s=t.media;d(s,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))})}return n||(n=t),n.timeline||(n.timeline=a),d([n].concat(r).concat(h.map(o,function(t){return t.option})),function(t){d(e,function(e){e(t)})}),{baseOption:n,timelineOptions:r,mediaDefault:i,mediaList:o}}function o(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return h.each(t,function(t,e){var i=e.match(m);if(i&&i[1]&&i[2]){var o=i[1],s=i[2].toLowerCase();a(n[s],t,o)||(r=!1)}}),r}function a(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},d(e,function(e,i){if(null!=e){var n=t[i];if(c.hasClass(i)){e=u.normalizeToArray(e),n=u.normalizeToArray(n);var r=u.mappingToExists(n,e);t[i]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[i]=g(n,e,!0)}})}var h=i(1),u=i(8),c=i(10),d=h.each,f=h.clone,p=h.map,g=h.merge,m=/^(min|max)?(.+)$/;n.prototype={constructor:n,setOption:function(t,e){t=f(t,!0);var i=this._optionBackup,n=r.call(this,t,e);this._newBaseOption=n.baseOption,i?(l(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,f),this._mediaList=p(e.mediaList,f),this._mediaDefault=f(e.mediaDefault),this._currentMediaIndices=[],f(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=f(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,r=this._mediaDefault,a=[],l=[];if(!n.length&&!r)return l;for(var h=0,u=n.length;u>h;h++)o(n[h].query,e,i)&&a.push(h);return!a.length&&r&&(a=[-1]),a.length&&!s(a,this._currentMediaIndices)&&(l=p(a,function(t){return f(-1===t?r.option:n[t].option)})),this._currentMediaIndices=a,l}},t.exports=n},function(t,e){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||""),t.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],grid:{},textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},animation:!0,animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3}},function(t,e,i){t.exports={getAreaStyle:i(32)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]])}},function(t,e){t.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(t,e,i){var n=i(32)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getItemStyle:function(t){var e=n.call(this,t),i=this.getBorderLineDash();return i&&(e.lineDash=i),e},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){var n=i(32)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getLineStyle:function(t){var e=n.call(this,t),i=this.getLineDash();return i&&(e.lineDash=i),e},getLineDash:function(){var t=this.get("type");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){function n(t,e){return t&&t.getShallow(e)}var r=i(18);t.exports={getTextColor:function(){var t=this.ecModel;return this.getShallow("color")||t&&t.get("textStyle.color")},getFont:function(){var t=this.ecModel,e=t&&t.getModel("textStyle");return[this.getShallow("fontStyle")||n(e,"fontStyle"),this.getShallow("fontWeight")||n(e,"fontWeight"),(this.getShallow("fontSize")||n(e,"fontSize")||12)+"px",this.getShallow("fontFamily")||n(e,"fontFamily")||"sans-serif"].join(" ")},getTextRect:function(t){var e=this.get("textStyle")||{};return r.getBoundingRect(t,this.getFont(),e.align,e.baseline)},ellipsis:function(t,e,i){return r.ellipsis(t,this.getFont(),e,i)}}},function(t,e,i){function n(t,e){e=e.split(",");for(var i=t,n=0;ne&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var c;"string"==typeof r?c=i[r]:"function"==typeof r&&(c=r),c&&(e=e.downSample(s.dim,1/u,c,n),t.setData(e))}}},this)}},function(t,e,i){var n=i(1),r=i(33),o=i(4),a=i(38),s=r.prototype,l=a.prototype,h=Math.floor,u=Math.ceil,c=Math.pow,d=10,f=Math.log,p=r.extend({type:"log",getTicks:function(){return n.map(l.getTicks.call(this),function(t){return o.round(c(d,t))})},getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),c(d,t)},setExtent:function(t,e){t=f(t)/f(d),e=f(e)/f(d),l.setExtent.call(this,t,e)},getExtent:function(){var t=s.getExtent.call(this);return t[0]=c(d,t[0]),t[1]=c(d,t[1]),t},unionExtent:function(t){t[0]=f(t[0])/f(d),t[1]=f(t[1])/f(d),s.unionExtent.call(this,t)},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||0>=i)){var n=c(10,h(f(i/t)/Math.LN10)),r=t/i*n;.5>=r&&(n*=10);var a=[o.round(u(e[0]/n)*n),o.round(h(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:l.niceExtent});n.each(["contain","normalize"],function(t){p.prototype[t]=function(e){return e=f(e)/f(d),s[t].call(this,e)}}),p.create=function(){return new p},t.exports=p},function(t,e,i){var n=i(1),r=i(33),o=r.prototype,a=r.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?n.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),o.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return o.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(o.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},niceTicks:n.noop,niceExtent:n.noop});a.create=function(){return new a},t.exports=a},function(t,e,i){var n=i(1),r=i(4),o=i(9),a=i(38),s=a.prototype,l=Math.ceil,h=Math.floor,u=1e3,c=60*u,d=60*c,f=24*d,p=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][2]=0&&f():o>=0?f():i&&(c=setTimeout(f,-o)),h=l};return p.clear=function(){c&&(clearTimeout(c),c=null)},p}var o,a,s,l=(new Date).getTime(),h=0,u=0,c=null,d="function"==typeof t;if(e=e||0,d)return r();for(var f=[],p=0;p=0;r--)if(!n[r].silent&&n[r]!==i&&!n[r].ignore&&a(n[r],t,e))return n[r]}},f.mixin(I,m),f.mixin(I,p),t.exports=I},function(t,e,i){function n(){return!1}function r(t,e,i,n){var r=document.createElement(e),o=i.getWidth(),a=i.getHeight(),s=r.style;return s.position="absolute",s.left=0,s.top=0,s.width=o+"px",s.height=a+"px",r.width=o*n,r.height=a*n,r.setAttribute("data-zr-dom-id",t),r}var o=i(1),a=i(34),s=function(t,e,i){var s;i=i||a.devicePixelRatio,"string"==typeof t?s=r(t,"canvas",e,i):o.isObject(t)&&(s=t,t=s.id),this.id=t,this.dom=s;var l=s.style;l&&(s.onselectstart=n,l["-webkit-user-select"]="none",l["user-select"]="none",l["-webkit-touch-callout"]="none",l["-webkit-tap-highlight-color"]="rgba(0,0,0,0)"),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};s.prototype={constructor:s,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d");var t=this.dpr;1!=t&&this.ctx.scale(t,t)},createBackBuffer:function(){var t=this.dpr;this.domBack=r("back-"+this.id,"canvas",this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,o=this.domBack;r.width=t+"px",r.height=e+"px",n.width=t*i,n.height=e*i,1!=i&&this.ctx.scale(i,i),o&&(o.width=t*i,o.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e=this.dom,i=this.ctx,n=e.width,r=e.height,o=this.clearColor,a=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,n/l,r/l)),i.clearRect(0,0,n/l,r/l),o&&(i.save(),i.fillStyle=this.clearColor,i.fillRect(0,0,n/l,r/l),i.restore()),a){var h=this.domBack;i.save(),i.globalAlpha=s,i.drawImage(h,0,0,n/l,r/l),i.restore()}}},t.exports=s},function(t,e,i){"use strict";function n(t){return parseInt(t,10)}function r(t){return t?t.isBuildin?!0:"function"==typeof t.resize&&"function"==typeof t.refresh:!1}function o(t){t.__unusedCount++}function a(t){1==t.__unusedCount&&t.clear()}function s(t,e,i){return x.copy(t.getBoundingRect()),t.transform&&x.applyTransform(t.transform),_.width=e,_.height=i,!x.intersect(_)}function l(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;ir;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(r,1),a.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,v(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,v(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,d.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(o),this._doPaintList(t,e),this.eachBuildinLayer(a)},_doPaintList:function(t,e){function i(t){o.save(),o.globalAlpha=1,o.shadowBlur=0,n.__dirty=!0,o.drawImage(t.dom,0,0,u,c),o.restore(),n.ctx.restore()}for(var n,r,o,a,s,l,h=0,u=this._width,c=this._height,p=this._progress,g=0,m=t.length;m>g;g++){var v=t[g],x=this._singleCanvas?0:v.zlevel;r!==x&&(o&&o.restore(),a={},r=x,n=this.getLayer(r),n.isBuildin||f("ZLevel "+r+" has been used by unkown layer "+n.id),o=n.ctx,o.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear());var _=v.__frame;if(n.__dirty||e){if(_>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,y-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(p=l),s.__progress=p+1}_===p&&this._doPaintEl(v,s,!0,s.renderScope)}else s&&(i(s),s=null),this._doPaintEl(v,n,e,a);v.__dirty=!1}}s&&i(s),o&&o.restore(),this._furtherProgressive=!1,d.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&t.scale[0]&&t.scale[1]&&(!t.culling||!s(t,this._width,this._height))){var o=t.__clipPaths;(n.prevClipLayer!==e||l(o,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),h(o,r),n.prevClipLayer=e,n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new m("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&d.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,s=-1,l=this._domRoot;if(i[t])return void f("ZLevel "+t+" has been used already");if(!r(e))return void f("Layer of zlevel "+t+" is not valid");if(o>0&&t>n[0]){for(s=0;o-1>s&&!(n[s]t);s++);a=i[n[s]]}if(n.splice(s+1,0,t),a){var h=a.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nh;h++){var c=t[h],f=this._singleCanvas?0:c.zlevel,p=e[f],g=c.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||c.__dirty),g>=0){a!==g&&(a=g,l++);var v=c.__frame=l-1;if(!o){var x=Math.min(s,y-1);o=i[x],o||(o=i[x]=new m("progressive",this,this.dpr),o.initContext()),o.__maxProgress=0}o.__dirty=o.__dirty||c.__dirty,o.elCount++,o.__maxProgress=Math.max(o.__maxProgress,v),o.__maxProgress>=o.__progress&&(p.__dirty=!0)}else c.__frame=-1,o&&(o.__nextIdxNotProg=h,s++,o=null)}o&&(s++,o.__nextIdxNotProg=h),this.eachBuildinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,y),d.each(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?d.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&d.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(d.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;if(i.style.display="none",t=t||this._getWidth(),e=e||this._getHeight(),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers[n].resize(t,e);this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new m("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var i=this.storage.getDisplayList(!0),n={},r=0;rr;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,o.canvasSupported&&s(i,n)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n&&(n.parent=t,n.updateTransform(),e?(e=e.slice(),e.push(n)):e=[n]),t.isGroup){for(var r=t._children,o=0;oe;e++)this.delRoot(t[e]);else{var o;o="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,o);s>=0&&(this.delFromMap(o.id),this._roots.splice(s,1),o instanceof a&&o.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof a&&(t.__storage=this),t.dirty(),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,i=e[t];return i&&(delete e[t],i instanceof a&&(i.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:n},t.exports=l},function(t,e,i){"use strict";var n=i(1),r=i(23).Dispatcher,o=i(59),a=i(58),s=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time=0,r.call(this)};s.prototype={constructor:s,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ia;a++){var s=i[a],l=s.step(t);l&&(r.push(l),o.push(s))}for(var a=0;n>a;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;n=r.length;for(var a=0;n>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},start:function(){function t(){e._running&&(o(t),e._update())}var e=this;this._running=!0,this._time=(new Date).getTime(),o(t)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new a(t,e.loop,e.getter,e.setter);return i}},n.mixin(s,r),t.exports=s},function(t,e,i){function n(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=i(137);n.prototype={constructor:n,step:function(t){this._initialized||(this._startTime=(new Date).getTime()+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,o="function"==typeof n?n(e):e;return this.fire("frame",o),1==e?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(){var t=(new Date).getTime(),e=(t-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},t.exports=n},function(t,e){var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};t.exports=i},function(t,e,i){var n=i(60).normalizeRadian,r=2*Math.PI;t.exports={containStroke:function(t,e,i,o,a,s,l,h,u){if(0===l)return!1;var c=l;h-=t,u-=e;var d=Math.sqrt(h*h+u*u);if(d-c>i||i>d+c)return!1;if(Math.abs(o-a)%r<1e-4)return!0;if(s){var f=o;o=n(a),a=n(f)}else o=n(o),a=n(a);o>a&&(a+=r);var p=Math.atan2(u,h);return 0>p&&(p+=r),p>=o&&a>=p||p+r>=o&&a>=p+r}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,o,a,s,l,h,u,c){if(0===h)return!1;var d=h;if(c>e+d&&c>r+d&&c>a+d&&c>l+d||e-d>c&&r-d>c&&a-d>c&&l-d>c||u>t+d&&u>i+d&&u>o+d&&u>s+d||t-d>u&&i-d>u&&o-d>u&&s-d>u)return!1;var f=n.cubicProjectPoint(t,e,i,r,o,a,s,l,u,c,null);return d/2>=f}}},function(t,e){t.exports={containStroke:function(t,e,i,n,r,o,a){if(0===r)return!1;var s=r,l=0,h=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return Math.abs(o-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*o-a+h,c=u*u/(l*l+1);return s/2*s/2>=c}}},function(t,e,i){"use strict";function n(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>l||e>u&&n>u&&a>u&&l>u)return 0;var c=g.cubicRootAt(e,n,a,l,u,_);if(0===c)return 0;for(var d,f,p=0,m=-1,v=0;c>v;v++){var y=_[v],x=0===y||1===y?.5:1,w=g.cubicAt(t,i,o,s,y);h>w||(0>m&&(m=g.cubicExtrema(e,n,a,l,b),b[1]1&&r(),d=g.cubicAt(e,n,a,l,b[0]),m>1&&(f=g.cubicAt(e,n,a,l,b[1]))),p+=2==m?yd?x:-x:yf?x:-x:f>l?x:-x:yd?x:-x:d>l?x:-x)}return p}function a(t,e,i,n,r,o,a,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=g.quadraticRootAt(e,n,o,s,_);if(0===l)return 0;var h=g.quadraticExtremum(e,n,o);if(h>=0&&1>=h){for(var u=0,c=g.quadraticAt(e,n,o,h),d=0;l>d;d++){var f=0===_[d]||1===_[d]?.5:1,p=g.quadraticAt(t,i,r,_[d]);a>p||(u+=_[d]c?f:-f:c>o?f:-f)}return u}var f=0===_[0]||1===_[0]?.5:1,p=g.quadraticAt(t,i,r,_[0]);return a>p?0:e>o?f:-f}function s(t,e,i,n,r,o,a,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);_[0]=-l,_[1]=l;var h=Math.abs(n-r);if(1e-4>h)return 0;if(1e-4>h%y){n=0,r=y;var u=o?1:-1;return a>=_[0]+t&&a<=_[1]+t?u:0}if(o){var l=n;n=p(r),r=p(l)}else n=p(n),r=p(r);n>r&&(r+=y);for(var c=0,d=0;2>d;d++){var f=_[d];if(f+t>a){var g=Math.atan2(s,f),u=o?1:-1;0>g&&(g=y+g),(g>=n&&r>=g||g+y>=n&&r>=g+y)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),c+=u)}}return c}function l(t,e,i,r,l){for(var u=0,p=0,g=0,y=0,x=0,_=0;_1&&(i||(u+=m(p,g,y,x,r,l))),1==_&&(p=t[_],g=t[_+1],y=p,x=g),b){case h.M:y=t[_++],x=t[_++],p=y,g=x;break;case h.L:if(i){if(v(p,g,t[_],t[_+1],e,r,l))return!0}else u+=m(p,g,t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.C:if(i){if(c.containStroke(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else u+=o(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.Q:if(i){if(d.containStroke(p,g,t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else u+=a(p,g,t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case h.A:var w=t[_++],S=t[_++],M=t[_++],I=t[_++],A=t[_++],T=t[_++],L=(t[_++],1-t[_++]),C=Math.cos(A)*M+w,D=Math.sin(A)*I+S;_>1?u+=m(p,g,C,D,r,l):(y=C,x=D);var P=(r-w)*I/M+w;if(i){if(f.containStroke(w,S,I,A,A+T,L,e,P,l))return!0}else u+=s(w,S,I,A,A+T,L,P,l);p=Math.cos(A+T)*M+w,g=Math.sin(A+T)*I+S;break;case h.R:y=p=t[_++],x=g=t[_++];var k=t[_++],z=t[_++],C=y+k,D=x+z;if(i){if(v(y,x,C,x,e,r,l)||v(C,x,C,D,e,r,l)||v(C,D,y,D,e,r,l)||v(y,D,y,x,e,r,l))return!0}else u+=m(C,x,C,D,r,l),u+=m(y,D,y,x,r,l);break;case h.Z:if(i){if(v(p,g,y,x,e,r,l))return!0}else u+=m(p,g,y,x,r,l);p=y,g=x}}return i||n(g,x)||(u+=m(p,g,y,x,r,l)||0),0!==u}var h=i(29).CMD,u=i(140),c=i(139),d=i(142),f=i(138),p=i(60).normalizeRadian,g=i(16),m=i(81),v=u.containStroke,y=2*Math.PI,x=1e-4,_=[-1,-1,-1],b=[-1,-1];t.exports={contain:function(t,e,i){return l(t,0,!1,e,i)},containStroke:function(t,e,i,n){return l(t,e,!0,i,n)}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,o,a,s,l,h){if(0===s)return!1;var u=s;if(h>e+u&&h>r+u&&h>a+u||e-u>h&&r-u>h&&a-u>h||l>t+u&&l>i+u&&l>o+u||t-u>l&&i-u>l&&o-u>l)return!1;var c=n.quadraticProjectPoint(t,e,i,r,o,a,l,h,null);return u/2>=c}}},function(t,e,i){"use strict";function n(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var o=i(23),a=function(){this._track=[]};a.prototype={constructor:a,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,s=n.length;s>a;a++){var l=n[a],h=o.clientToLocal(i,l);r.points.push([h.zrX,h.zrY]),r.touches.push(l)}this._track.push(r)}},_recognize:function(t){for(var e in s)if(s.hasOwnProperty(e)){var i=s[e](this._track,t);if(i)return i}}};var s={pinch:function(t,e){var i=t.length;if(i){var o=(t[i-1]||{}).points,a=(t[i-2]||{}).points||o;if(a&&a.length>1&&o&&o.length>1){var s=n(o)/n(a);!isFinite(s)&&(s=1),e.pinchScale=s;var l=r(o);return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}};t.exports=a},function(t,e){var i=function(){this.head=null,this.tail=null,this._len=0},n=i.prototype;n.insert=function(t){var e=new r(t);return this.insertEntry(e),e},n.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._len++},n.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--; -},n.len=function(){return this._len};var r=function(t){this.value=t,this.next,this.prev},o=function(t){this._list=new i,this._map={},this._maxSize=t||10},a=o.prototype;a.put=function(t,e){var i=this._list,n=this._map;if(null==n[t]){var r=i.len();if(r>=this._maxSize&&r>0){var o=i.head;i.remove(o),delete n[o.key]}var a=i.insert(e);a.key=t,n[t]=a}},a.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},a.clear=function(){this._list.clear(),this._map={}},t.exports=o},function(t,e,i){var n=i(6);t.exports=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i0},extendFrom:function(t,e){if(t){var i=this;for(var n in t)!t.hasOwnProperty(n)||!e&&i.hasOwnProperty(n)||(i[n]=t[n])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},createLinearGradient:function(t,e,i){var n=e.x*i.width+i.x,r=e.x2*i.width+i.x,o=e.y*i.height+i.y,a=e.y2*i.height+i.y,s=t.createLinearGradient(n,o,r,a);return s},createRadialGradient:function(t,e,i){var n=i.width,r=i.height,o=Math.min(n,r),a=e.x*n+i.x,s=e.y*r+i.y,l=e.r*o,h=t.createRadialGradient(a,s,0,a,s,l);return h},getGradient:function(t,e,i){for(var n="radial"===e.type?"createRadialGradient":"createLinearGradient",r=this[n](t,e,i),o=e.colorStops,a=0;ay;y++)r(d,d,t[y]),o(f,f,t[y]);r(d,d,h[0]),o(f,f,h[1])}for(var y=0,x=t.length;x>y;y++){var _=t[y];if(i)u=t[y?y-1:x-1],c=t[(y+1)%x];else{if(0===y||y===x-1){p.push(n.clone(t[y]));continue}u=t[y-1],c=t[y+1]}n.sub(g,c,u),a(g,g,e);var b=s(_,u),w=s(_,c),S=b+w;0!==S&&(b/=S,w/=S),a(m,g,-b),a(v,g,w);var M=l([],_,m),I=l([],_,v);h&&(o(M,M,d),r(M,M,f),o(I,I,d),r(I,I,f)),p.push(M),p.push(I)}return i&&p.push(p.shift()),p}},function(t,e,i){function n(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}var r=i(5);t.exports=function(t,e){for(var i=t.length,o=[],a=0,s=1;i>s;s++)a+=r.distance(t[s-1],t[s]);var l=a/2;l=i>l?i:l;for(var s=0;l>s;s++){var h,u,c,d=s/(l-1)*(e?i:i-1),f=Math.floor(d),p=d-f,g=t[f%i];e?(h=t[(f-1+i)%i],u=t[(f+1)%i],c=t[(f+2)%i]):(h=t[0===f?f:f-1],u=t[f>i-2?i-1:f+1],c=t[f>i-3?i-1:f+2]);var m=p*p,v=p*m;o.push([n(h[0],g[0],u[0],c[0],p,m,v),n(h[1],g[1],u[1],c[1],p,m,v)])}return o}},function(t,e,i){t.exports=i(6).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),h=Math.sin(o);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,o,a,!s)}})},function(t,e,i){"use strict";function n(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?c:h)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?c:h)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?u:l)(t.x1,t.cpx1,t.x2,e),(i?u:l)(t.y1,t.cpy1,t.y2,e)]}var r=i(16),o=i(5),a=r.quadraticSubdivide,s=r.cubicSubdivide,l=r.quadraticAt,h=r.cubicAt,u=r.quadraticDerivativeAt,c=r.cubicDerivativeAt,d=[];t.exports=i(6).extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,l=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,f=e.percent;0!==f&&(t.moveTo(i,n),null==u||null==c?(1>f&&(a(i,l,r,f,d),l=d[1],r=d[2],a(n,h,o,f,d),h=d[1],o=d[2]),t.quadraticCurveTo(l,h,r,o)):(1>f&&(s(i,l,u,r,f,d),l=d[1],u=d[2],r=d[3],s(n,h,c,o,f,d),h=d[1],c=d[2],o=d[3]),t.bezierCurveTo(l,h,u,c,r,o)))},pointAt:function(t){return n(this.shape,t,!1)},tangentAt:function(t){var e=n(this.shape,t,!0);return o.normalize(e,e)}})},function(t,e,i){"use strict";t.exports=i(6).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.percent;0!==a&&(t.moveTo(i,n),1>a&&(r=i*(1-a)+r*a,o=n*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})},function(t,e,i){var n=i(62);t.exports=i(6).extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){n.buildPath(t,e,!0)}})},function(t,e,i){var n=i(62);t.exports=i(6).extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){n.buildPath(t,e,!1)}})},function(t,e,i){var n=i(63);t.exports=i(6).extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,o=e.width,a=e.height;e.r?n.buildPath(t,e):t.rect(i,r,o,a),t.closePath()}})},function(t,e,i){t.exports=i(6).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(a),u=Math.sin(a);t.moveTo(h*r+i,u*r+n),t.lineTo(h*o+i,u*o+n),t.arc(i,n,o,a,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,a,l),t.closePath()}})},function(t,e,i){"use strict";var n=i(58),r=i(1),o=r.isString,a=r.isFunction,s=r.isObject,l=i(47),h=function(){this.animators=[]};h.prototype={constructor:h,animate:function(t,e){var i,o=!1,a=this,s=this.__zr;if(t){var h=t.split("."),u=a;o="shape"===h[0];for(var c=0,d=h.length;d>c;c++)u&&(u=u[h[c]]);u&&(i=u)}else i=a;if(!i)return void l('Property "'+t+'" is not existed in element '+a.id);var f=a.animators,p=new n(i,e);return p.during(function(t){a.dirty(o)}).done(function(){f.splice(r.indexOf(f,p),1)}),f.push(p),s&&s.animation.addAnimator(p),p},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r){function s(){h--,h||r&&r()}o(i)?(r=n,n=i,i=0):a(n)?(r=n,n="linear",i=0):a(i)?(r=i,i=0):a(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i,n,r);var l=this.animators.slice(),h=l.length;h||r&&r();for(var u=0;u0&&this.animate(t,!1).when(null==n?500:n,a).delay(o||0),this}},t.exports=h},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}i.prototype={constructor:i,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this._dispatchProxy(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(r,o,t),this._dispatchProxy(e,"drag",t.event);var a=this.findHover(i,n,e),s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this._dispatchProxy(s,"dragleave",t.event),a&&a!==s&&this._dispatchProxy(a,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this._dispatchProxy(e,"dragend",t.event),this._dropTarget&&this._dispatchProxy(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},t.exports=i},function(t,e,i){function n(t,e,i,n,r,o,a,s,l,h,u){var g=l*(p/180),y=f(g)*(t-i)/2+d(g)*(e-n)/2,x=-1*d(g)*(t-i)/2+f(g)*(e-n)/2,_=y*y/(a*a)+x*x/(s*s);_>1&&(a*=c(_),s*=c(_));var b=(r===o?-1:1)*c((a*a*(s*s)-a*a*(x*x)-s*s*(y*y))/(a*a*(x*x)+s*s*(y*y)))||0,w=b*a*x/s,S=b*-s*y/a,M=(t+i)/2+f(g)*w-d(g)*S,I=(e+n)/2+d(g)*w+f(g)*S,A=v([1,0],[(y-w)/a,(x-S)/s]),T=[(y-w)/a,(x-S)/s],L=[(-1*y-w)/a,(-1*x-S)/s],C=v(T,L);m(T,L)<=-1&&(C=p),m(T,L)>=1&&(C=0),0===o&&C>0&&(C-=2*p),1===o&&0>C&&(C+=2*p),u.addData(h,M,I,a,s,A,C,g,o)}function r(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===m[0]&&m.shift();for(var v=0;vr;r++){var o=t[r];o.__dirty&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var s=new a(e);return s.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},s}}},function(t,e,i){function n(t,e){var i,n,o,u,c,d,f=t.data,p=r.M,g=r.C,m=r.L,v=r.R,y=r.A,x=r.Q;for(o=0,u=0;oc;c++){var d=s[c];d[0]=f[o++],d[1]=f[o++],a(d,d,e),f[u++]=d[0],f[u++]=d[1]}}}var r=i(29).CMD,o=i(5),a=o.applyTransform,s=[[],[],[]],l=Math.sqrt,h=Math.atan2;t.exports=n},function(t,e,i){if(!i(11).canvasSupported){var n,r="urn:schemas-microsoft-com:vml",o=window,a=o.document,s=!1;try{!a.namespaces.zrvml&&a.namespaces.add("zrvml",r),n=function(t){return a.createElement("')}}catch(l){n=function(t){return a.createElement("<"+t+' xmlns="'+r+'" class="zrvml">')}}var h=function(){if(!s){s=!0;var t=a.styleSheets;t.length<31?a.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};t.exports={doc:a,initVML:h,createNode:n}}},function(t,e,i){"use strict";function n(t){return null==t.value?t:t.value}var r=i(13),o=i(31),a=i(278),s=i(1),l={_baseAxisDim:null,getInitialData:function(t,e){var i,a,s=e.getComponent("xAxis",this.get("xAxisIndex")),l=e.getComponent("yAxis",this.get("yAxisIndex")),h=s.get("type"),u=l.get("type");"category"===h?(t.layout="horizontal",i=s.getCategories(),a=!0):"category"===u?(t.layout="vertical",i=l.getCategories(),a=!0):t.layout=t.layout||"horizontal",this._baseAxisDim="horizontal"===t.layout?"x":"y";var c=t.data,d=this.dimensions=["base"].concat(this.valueDimensions);o(d,c);var f=new r(d,this);return f.initData(c,i?i.slice():null,function(t,e,i,r){var o=n(t);return a?"base"===e?i:o[r-1]:o[r]}),f},coordDimToDataDim:function(t){var e=this.valueDimensions.slice(),i=["base"],n={horizontal:{x:i,y:e},vertical:{x:e,y:i}};return n[this.get("layout")][t]},dataDimToCoordDim:function(t){var e;return s.each(["x","y"],function(i,n){var r=this.coordDimToDataDim(i);s.indexOf(r,t)>=0&&(e=i)},this),e},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},h={init:function(){var t=this._whiskerBoxDraw=new a(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};t.exports={seriesModelMixin:l,viewMixin:h}},function(t,e,i){var n=i(1),r={retrieveTargetInfo:function(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var r=t.targetNodeId;if(null!=r&&(n=i.getNodeById(r)))return{node:n}}},getPathToRoot:function(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()},aboveViewRoot:function(t,e){var i=r.getPathToRoot(t);return n.indexOf(i,e)>=0}};t.exports=r},function(t,e,i){function n(t){I.call(this),this.zr=t,this.group=new T.Group,this._brushType,this._brushOption,this._containerRect=null,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._mounted=!1,this._uid="brushController_"+W++,this._handlers={},P(Z,function(t,e){this._handlers[e]=D(t,this)},this)}function r(t){var e=this.zr;if(p(this)){var i=A.bind(function(t){this.enableBrush(!1),t&&t()},this,t.onRelease);L.take(e,B,this._uid,i),e.setDefaultCursorStyle("crosshair")}P(this._handlers,function(t,i){e.on(i,t)}),this._brushType=t.brushType,this._brushOption=A.merge(A.clone(H),t,!0)}function o(){var t=this.zr;L.release(t,B,this._uid),t.setDefaultCursorStyle("default"),P(this._handlers,function(e,i){t.off(i,e)}),this._brushType=this._brushOption=null}function a(t){var e=q[t.brushType].createCover.call(this,t);return s(e),e.__brushOption=t,this.group.add(e),e}function s(t){t.traverse(function(t){t.z=R})}function l(t){var e=t.__brushOption,i=q[e.brushType];i.updateCoverShape.call(this,t),i.updateCommon.call(this,t)}function h(t,e){var i=this.group.transformCoordToLocal(t,e);return!this._containerRect||this._containerRect.contain(i[0],i[1])}function u(){P(this._covers,function(t){this.group.remove(t)},this),this._covers.length=0}function c(t){var e=k(this._covers,function(t){var e=t.__brushOption;return{brushType:e.brushType,range:A.clone(e.range)}});this.trigger("brush",e,!!t)}function d(){var t=this._track;if(!t.length)return!1;var e=t[t.length-1],i=t[0],n=e[0]-i[0],r=e[1]-i[1],o=E(n*n+r*r,.5);return o>V}function f(){var t=this.group,e=t.parent;e&&e.remove(t)}function p(t){return!t._containerRect}function g(){return k(this._track,function(t){return this.group.transformCoordToLocal(t[0],t[1])},this)}function m(){var t=g.call(this),e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function v(t,e){t.add(new T.Rect({name:"rect",style:e.brushStyle,silent:!0,draggable:!0,cursor:"move",drift:D(b,this,t,"nswe"),ondragend:D(c,this,!0)}))}function y(t){var e=t.__brushOption;t.childAt(0).useStyle(e.brushStyle);var i=e.transformable;t.childAt(0).attr({silent:!i,cursor:i?"move":"default"})}function x(t,e,i,n,r,o){t.childOfName(e).setShape({x:i,y:n,width:r,height:o})}function _(t,e,i,n){var r=[z(t,i),z(e,n)],o=[O(t,i),O(e,n)];return[[r[0],o[0]],[r[1],o[1]]]}function b(t,e,i,n){var r=t.__brushOption,o=r.range,a=[i,n];P(e.split(""),function(t){var e=G[t];o[e[0]][e[1]]+=a[e[0]]}),r.range=_(o[0][0],o[1][0],o[0][1],o[1][1]),l.call(this,t),c.call(this,!1)}function w(t,e,i){var n=t.__brushOption.range;P(n,function(t){t[0]+=e,t[1]+=i}),l.call(this,t),c.call(this,!1)}function S(t){var e=t.event;e.preventDefault&&e.preventDefault()}function M(t,e){var i=t.offsetX,n=t.offsetY,r=this._creatingCover,o=this._brushOption;if(h.call(this,i,n)&&(this._track.push([i,n]),d.call(this))){r||("single"===o.brushMode&&u.call(this),r=this._creatingCover=a.call(this,A.clone(o)),this._covers.push(r));var l=q[this._brushType],f=r.__brushOption;f.range=l.getCreatingRange.call(this,e),e&&(l.endCreating&&(l.endCreating.call(this,r),s(r)),l.updateCommon.call(this,r)),l.updateCoverShape.call(this,r),c.call(this,e)}e&&r&&(this._creatingCover=null)}var I=i(21),A=i(1),T=i(3),L=i(107),C=i(45),D=A.bind,P=A.each,k=A.map,z=Math.min,O=Math.max,E=Math.pow,R=1e4,V=2,N=6,B="globalPan",G={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},F={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},H={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.15)"},transformable:!0,brushMode:"single"},W=0;n.prototype={constructor:n,enableBrush:function(t){return this._mounted?(this._brushType&&o.call(this),t.brushType&&r.call(this,t),this):void 0},mount:function(t,e){return this._mounted=!0,f.call(this),this._containerRect=e!==!1?e||t.getBoundingRect():null,t.add(this.group),this},eachCover:function(t,e){P(this._covers,t,e)},updateCovers:function(t){function e(t,e){var i=t.__brushOption;return null!=i.id?i.id:s+e}function i(t,e){return null!=t.id?t.id:s+e}function n(e){u[e]=a.call(c,t[e]),l.call(c,u[e])}function r(e,i){var n=u[e]=h[i],r=t[e];r.brushType!==n.__brushOption.brushType&&(c.group.remove(n),n=a.call(c,r)),n.__brushOption=r,l.call(c,u[e])}function o(t){c.group.remove(h[t])}if(this._mounted){t=A.map(t,function(t){return A.merge(A.clone(H),t,!0)});var s="\x00-brush-index-",h=this._covers,u=this._covers=[],c=this;return new C(h,t,e,i).add(n).update(r).remove(o).execute(),this}},unmount:function(){return this.enableBrush(!1),f.call(this),this._covers=[],this._mounted=!1,this},dispose:function(){this.unmount(),this.off()}},A.mixin(n,I);var Z={mousedown:function(t){if(!t.target||!t.target.draggable){S(t);var e=t.offsetX,i=t.offsetY;h.call(this,e,i)&&(this._dragging=!0,this._track=[[e,i]])}},mousemove:function(t){this._dragging&&(S(t),M.call(this,t,!1))},mouseup:function(t){this._dragging&&(S(t),M.call(this,t,!0),this._dragging=!1,this._track=[])}},q={line:{createCover:function(t){var e=new T.Group;return v.call(this,e,t),e},getCreatingRange:function(){var t=m.call(this),e=z(t[0][0],t[1][0]),i=O(t[0][0],t[1][0]);return[e,i]},updateCoverShape:function(t){var e=t.__brushOption,i=e.range,n=e.brushStyle.width;t.childOfName("rect").setShape({x:i[0],y:-n/2,width:i[1]-i[0],height:n})},updateCommon:y},rect:{createCover:function(t){var e=new T.Group;return v.call(this,e,t),P(["w","e","n","s","se","sw","ne","nw"],function(t){e.add(new T.Rect({name:t,__cursor:F[t]+"-resize",style:{opacity:0},draggable:!0,drift:D(b,this,e,t),ondragend:D(c,this,!0)}))},this),e},getCreatingRange:function(){var t=m.call(this);return _(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t){var e=t.__brushOption,i=e.range,n=e.brushStyle.lineWidth||0,r=O(n,N),o=i[0][0],a=i[1][0],s=o-n/2,l=a-n/2,h=i[0][1],u=i[1][1],c=h-r+n/2,d=u-r+n/2,f=h-o,p=u-a,g=f+n,m=p+n;x(t,"rect",o,a,f,p),e.transformable&&(x(t,"w",s,l,r,m),x(t,"e",c,l,r,m),x(t,"n",s,l,g,r),x(t,"s",s,d,g,r),x(t,"nw",s,l,r,r),x(t,"ne",c,l,r,r),x(t,"sw",s,d,r,r),x(t,"se",c,d,r,r))},updateCommon:function(t){y.call(this,t);var e=t.__brushOption.transformable;P(["w","e","n","s","se","sw","ne","nw"],function(i){var n=t.childOfName(i);n.attr({silent:!e,cursor:e?n.__cursor:"default"})},this)}},polygon:{createCover:function(t){var e=new T.Group;return e.add(new T.Polyline({style:t.brushStyle,silent:!0})),e},getCreatingRange:function(t){return this._track.slice()},endCreating:function(t){t.remove(t.childAt(0)),t.add(new T.Polygon({draggable:!0,drift:D(w,this,t),ondragend:D(c,this,!0)}))},updateCoverShape:function(t){t.childAt(0).setShape({points:t.__brushOption.range})},updateCommon:y}};t.exports=n},function(t,e,i){function n(t,e){var i=this.getBoundingRect(),n=t.getBoxLayoutParams();n.aspect=i.width/i.height*.75;var r=a.getLayoutRect(n,{width:e.getWidth(),height:e.getHeight()});this.setViewRect(r.x,r.y,r.width,r.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function r(t,e){s.each(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}var o=i(339),a=i(14),s=i(1),l={},h={dimensions:o.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",function(t,a){var s=t.get("map"),h=l[s],u=new o(s+a,s,h&&h.geoJson,h&&h.specialAreas,t.get("nameMap"));u.zoomLimit=t.get("scaleLimit"),i.push(u),r(u,t),t.coordinateSystem=u,u.model=t,u.resize=n,u.resize(t,e)}),t.eachSeries(function(t){var e=t.get("coordinateSystem");if("geo"===e){var n=t.get("geoIndex")||0;t.coordinateSystem=i[n]}});var a={};return t.eachSeriesByType("map",function(t){var e=t.get("map");a[e]=a[e]||[],a[e].push(t)}),s.each(a,function(t,a){var h=l[a],u=s.map(t,function(t){return t.get("nameMap")}),c=new o(a,a,h&&h.geoJson,h&&h.specialAreas,s.mergeAll(u));c.zoomLimit=s.retrieve.apply(null,s.map(t,function(t){return t.get("scaleLimit")})),i.push(c),c.resize=n,c.resize(t[0],e),s.each(t,function(t){t.coordinateSystem=c,r(c,t)})}),i},registerMap:function(t,e,i){e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),l[t]={geoJson:e,specialAreas:i}},getMap:function(t){return l[t]},getFilledRegions:function(t,e){var i=(t||[]).slice(),n=h.getMap(e),r=n&&n.geoJson;if(!r)return t;for(var o={},a=r.features,s=0;s=0;o--){var a=n[o],s=r[o],l=a[0]-s[0]/2,h=a[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return o}return-1}}),s=n.prototype;s.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray(function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i})}),e.symbolProxy=o.createSymbol(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)}),this.group.add(e)},s.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},s.remove=function(){this.group.removeAll()},t.exports=n},function(t,e,i){function n(t){return null==t.cpx1||null==t.cpy1}var r=i(3),o=i(5),a=r.Line.prototype,s=r.BezierCurve.prototype;t.exports=r.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(n(e)?a:s).buildPath(t,e)},pointAt:function(t){return n(this.shape)?a.pointAt.call(this,t):s.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=n(e)?[e.x2-e.x1,e.y2-e.y1]:s.tangentAt.call(this,t);return o.normalize(i,i)}})},function(t,e,i){var n=i(1),r=i(2);i(172),i(173),r.registerVisual(n.curry(i(46),"scatter","circle",null)),r.registerLayout(n.curry(i(54),"scatter")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.scatter",dependencies:["grid","polar"],getInitialData:function(t,e){var i=n(t.data,this,e);return i},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{normal:{opacity:.8}}}})},function(t,e,i){var n=i(39),r=i(169);i(2).extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new n,this._largeSymbolDraw=new r},render:function(t,e,i){var n=t.getData(),r=this._largeSymbolDraw,o=this._normalSymbolDraw,a=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?r:o;this._symbolDraw=s,s.updateData(n),a.add(s.group),a.remove(s===r?o.group:r.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)}})},function(t,e,i){i(106),i(40),i(41),i(180),i(181),i(176),i(177),i(104),i(103)},function(t,e,i){function n(t,e){var i=[1/0,-(1/0)];return h(e,function(e){var n=e.getData();n&&h(e.coordDimToDataDim(t),function(t){var e=n.getDataExtent(t);e[0]i[1]&&(i[1]=e[1])})},this),i}function r(t,e,i){var n=i.getAxisModel(),r=n.axis.scale,a=[0,100],s=[t.start,t.end],c=[];return e=e.slice(),o(e,n,r),h(["startValue","endValue"],function(e){c.push(null!=t[e]?r.parse(t[e]):null)}),h([0,1],function(t){var i=c[t],n=s[t];null!=n||null==i?(null==n&&(n=a[t]),i=r.parse(l.linearMap(n,a,e,!0))):n=l.linearMap(i,e,a,!0),c[t]=i,s[t]=n}),{valueWindow:u(c),percentWindow:u(s)}}function o(t,e,i){return h(["min","max"],function(n,r){var o=e.get(n,!0);null!=o&&(o+"").toLowerCase()!=="data"+n&&(t[r]=i.parse(o))}),e.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0)),t}function a(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=e||0===n[0]&&100===n[1],a=!e&&l.getPixelPrecision(r,[0,500]),s=!(e||20>a&&a>=0),h=e||o||s;i.setRange&&i.setRange(h?null:+r[0].toFixed(a),h?null:+r[1].toFixed(a))}}var s=i(1),l=i(4),h=s.each,u=l.asc,c=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this.ecModel=n,this._dataZoomModel=i};c.prototype={constructor:c,hostedBy:function(t){return this._dataZoomModel===t},getDataExtent:function(){return this._dataExtent.slice()},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[];return this.ecModel.eachSeries(function(e){this._axisIndex===e.get(this._dimName+"AxisIndex")&&t.push(e)},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,r=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(a=t)}),a},reset:function(t){if(t===this._dataZoomModel){var e=this._dataExtent=n(this._dimName,this.getTargetSeriesModels()),i=r(t.option,e,this);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,a(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,a(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow,a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&"category"===a.get("type")&&(r="empty"),h(n,function(t){var n=t.getData();n&&h(t.coordDimToDataDim(i),function(i){"empty"===r?t.setData(n.map(i,function(t){return e(t)?t:NaN})):n.filterSelf(i,e)})})}}},t.exports=c},function(t,e,i){t.exports=i(40).extend({type:"dataZoom.inside",defaultOption:{zoomLock:!1}})},function(t,e,i){function n(t,e,i,n){e=e.slice();var r=n.axisModels[0];if(r){var a=o(t,r,i),s=a.signal*(e[1]-e[0])*a.pixel/a.pixelLength;return h(s,e,[0,100],"rigid"),e}}function r(t,e,i,n,r,s){i=i.slice();var l=r.axisModels[0];if(l){var h=o(e,l,n),u=h.pixel-h.pixelStart,c=u/h.pixelLength*(i[1]-i[0])+i[0];return t=Math.max(t,0),i[0]=(i[0]-c)*t+c,i[1]=(i[1]-c)*t+c,a(i)}}function o(t,e,i){var n=e.axis,r=i.rectProvider(),o={};return"x"===n.dim?(o.pixel=t[0],o.pixelLength=r.width,o.pixelStart=r.x,o.signal=n.inverse?1:-1):(o.pixel=t[1],o.pixelLength=r.height,o.pixelStart=r.y,o.signal=n.inverse?-1:1),o}function a(t){var e=[0,100];return!(t[0]<=e[1])&&(t[0]=e[1]),!(t[1]<=e[1])&&(t[1]=e[1]),!(t[0]>=e[0])&&(t[0]=e[0]),!(t[1]>=e[0])&&(t[1]=e[0]),t}var s=i(41),l=i(1),h=i(77),u=i(182),c=l.bind,d=s.extend({type:"dataZoom.inside", -init:function(t,e){this._range},render:function(t,e,i,n){d.superApply(this,"render",arguments),u.shouldRecordRange(n,t.id)&&(this._range=t.getPercentRange());var r=this.getTargetInfo().cartesians,o=l.map(r,function(t){return u.generateCoordId(t.model)});l.each(r,function(e){var n=e.model;u.register(i,{coordId:u.generateCoordId(n),allCoordIds:o,coordinateSystem:n.coordinateSystem,dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:c(this._onPan,this,e),zoomGetRange:c(this._onZoom,this,e)})},this)},remove:function(){u.unregister(this.api,this.dataZoomModel.id),d.superApply(this,"remove",arguments),this._range=null},dispose:function(){u.unregister(this.api,this.dataZoomModel.id),d.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,r){return this._range=n([i,r],this._range,e,t)},_onZoom:function(t,e,i,n,o){var a=this.dataZoomModel;return a.option.zoomLock?this._range:this._range=r(1/i,[n,o],this._range,e,t,a)}});t.exports=d},function(t,e,i){var n=i(40);t.exports=n.extend({type:"dataZoom.select"})},function(t,e,i){t.exports=i(41).extend({type:"dataZoom.select"})},function(t,e,i){var n=i(40),r=n.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});t.exports=r},function(t,e,i){function n(t){return"x"===t?"y":"x"}var r=i(1),o=i(3),a=i(130),s=i(41),l=o.Rect,h=i(4),u=h.linearMap,c=i(14),d=i(77),f=h.asc,p=r.bind,g=r.each,m=7,v=1,y=30,x="horizontal",_="vertical",b=5,w=["line","bar","candlestick","scatter"],S=s.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){return S.superApply(this,"render",arguments),a.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){S.superApply(this,"remove",arguments),a.clear(this,"_dispatchZoomAction")},dispose:function(){S.superApply(this,"dispose",arguments),a.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new o.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===x?{right:n.width-i.x-i.width,top:n.height-y-m,width:i.width,height:y}:{right:m,top:i.y,width:y,height:i.height},a=c.getLayoutParams(t.option);r.each(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var s=c.getLayoutRect(a,n,t.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===_&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==x||r?i===x&&r?{scale:a?[-1,1]:[-1,-1]}:i!==_||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size;this._displayables.barGroup.add(new l({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():t.otherDim,s=n.getDataExtent(a),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var h=[0,e[1]],c=[0,e[0]],d=[[e[0],0],[0,0]],f=[],p=c[1]/(n.count()-1),g=0,m=Math.round(n.count()/e[0]);n.each([a],function(t,e){if(m>0&&e%m)return void(g+=p);var i=null==t||isNaN(t)||""===t?null:u(t,s,h,!0);null!=i&&(d.push([g,i]),f.push([g,i])),g+=p});var v=this.dataZoomModel;this._displayables.barGroup.add(new o.Polygon({shape:{points:d},style:r.defaults({fill:v.get("dataBackgroundColor")},v.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new o.Polyline({shape:{points:f},style:v.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,o=this.ecModel;return t.eachTargetAxis(function(a,s){var l=t.getAxisProxy(a.name,s).getTargetSeriesModels();r.each(l,function(t){if(!(i||e!==!0&&r.indexOf(w,t.get("type"))<0)){var l=n(a.name),h=o.getComponent(a.axis,s).axis;i={thisAxis:h,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:t.coordinateSystem.getOtherAxis(h).inverse}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,a=this.dataZoomModel;n.add(t.filler=new l({draggable:!0,cursor:"move",drift:p(this._onDragMove,this,"all"),ondragstart:p(this._showDataInfo,this,!0),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new l(o.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:v,fill:"rgba(0,0,0,0)"}})));var s=a.get("handleIcon");g([0,1],function(t){var r=o.makePath(s,{style:{strokeNoScale:!0},rectHover:!0,cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:p(this._onDragMove,this,t),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1)},{x:-.5,y:0,width:1,height:1},"center"),l=r.getBoundingRect();this._handleHeight=h.parsePercent(a.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,r.setStyle(a.getModel("handleStyle").getItemStyle());var u=a.get("handleColor");null!=u&&(r.style.fill=u),n.add(e[t]=r);var c=a.textStyleModel;this.group.add(i[t]=new o.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",fill:c.getTextColor(),textFont:c.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[u(t[0],[0,100],e,!0),u(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this._handleEnds,n=this._getViewExtent();d(e,i,n,"all"===t||this.dataZoomModel.get("zoomLock")?"rigid":"cross",t),this._range=f([u(i[0],n,[0,100],!0),u(i[1],n,[0,100],!0)])},_updateView:function(){var t=this._displayables,e=this._handleEnds,i=f(e.slice()),n=this._size;g([0,1],function(i){var r=t.handles[i],o=this._handleHeight;r.attr({scale:[o,o],position:[e[i],n[1]/2-o/2]})},this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:n[1]}),this._updateDataInfo()},_updateDataInfo:function(){function t(t){var e=o.getTransform(i.handles[t].parent,this.group),s=o.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+b,u=o.applyTransform([h[t]+(0===t?-l:l),this._size[1]/2],e);n[t].setStyle({x:u[0],y:u[1],textVerticalAlign:r===x?"middle":s,textAlign:r===x?s:"center",text:a[t]})}var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,a=["",""];if(e.get("showDetail")){var s,l;e.eachTargetAxis(function(t,i){s||(s=e.getAxisProxy(t.name,i).getDataValueWindow(),l=this.ecModel.getComponent(t.axis,i).axis)},this),s&&(a=[this._formatLabel(s[0],l),this._formatLabel(s[1],l)])}var h=f(this._handleEnds.slice());t.call(this,0),t.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter");if(r.isFunction(n))return n(t);var o=i.get("labelPrecision");return null!=o&&"auto"!==o||(o=e.getPixelPrecision()),t=null==t&&isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20)),r.isString(n)&&(t=n.replace("{value}",t)),t},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._applyBarTransform([e,i],!0);this._updateInterval(t,n[0]),this._updateView(),this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_applyBarTransform:function(t,e){var i=this._displayables.barGroup.getLocalTransform();return o.applyTransform(t,i,e)},_findCoordRect:function(){var t,e=this.getTargetInfo();if(e.cartesians.length)t=e.cartesians[0].model.coordinateSystem.getRect();else{var i=this.api.getWidth(),n=this.api.getHeight();t={x:.2*i,y:.2*n,width:.6*i,height:.6*n}}return t}});t.exports=S},function(t,e,i){function n(t){var e=t.getZr();return e[p]||(e[p]={})}function r(t,e,i){var n=new c(t.getZr());return n.enable(),n.on("pan",f(a,i)),n.on("zoom",f(s,i)),n}function o(t){u.each(t,function(e,i){e.count||(e.controller.off("pan").off("zoom"),delete t[i])})}function a(t,e,i){l(t,function(n){return n.panGetRange(t.controller,e,i)})}function s(t,e,i,n){l(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function l(t,e){var i=[];u.each(t.dataZoomInfos,function(t){var n=e(t);n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})}),t.dispatchAction(i)}function h(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var u=i(1),c=i(76),d=i(130),f=u.curry,p="\x00_ec_dataZoom_roams",g={register:function(t,e){var i=n(t),a=e.dataZoomId,s=e.coordId;u.each(i,function(t,i){var n=t.dataZoomInfos;n[a]&&u.indexOf(e.allCoordIds,s)<0&&(delete n[a],t.count--)}),o(i);var l=i[s];l||(l=i[s]={coordId:s,dataZoomInfos:{},count:0},l.controller=r(t,e,l),l.dispatchAction=u.curry(h,t));var c=e.coordinateSystem.getRect().clone();l.controller.rectProvider=function(){return c},d.createOrUpdate(l,"dispatchAction",e.throttleRate,"fixRate"),!l.dataZoomInfos[a]&&l.count++,l.dataZoomInfos[a]=e},unregister:function(t,e){var i=n(t);u.each(i,function(t){var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),o(i)},shouldRecordRange:function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].dataZoomId===e)return!1;return!0},generateCoordId:function(t){return t.type+"\x00_"+t.id}};t.exports=g},function(t,e,i){i(106),i(40),i(41),i(178),i(179),i(104),i(103)},function(t,e,i){i(185),i(187),i(186);var n=i(2);n.registerProcessor(i(188))},function(t,e,i){"use strict";var n=i(1),r=i(12),o=i(2).extendComponentModel({type:"legend",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){o.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:"top",align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0}});t.exports=o},function(t,e,i){function n(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function r(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function o(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var a=i(1),s=i(26),l=i(3),h=i(108),u=a.curry;t.exports=i(2).extendComponentView({type:"legend",init:function(){this._symbolTypeStore={}},render:function(t,e,i){var s=this.group;if(s.removeAll(),t.get("show")){var c=t.get("selectedMode"),d=t.get("align");"auto"===d&&(d="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left");var f={};a.each(t.getData(),function(a){var h=a.get("name");if(""===h||"\n"===h)return void s.add(new l.Group({newline:!0}));var p=e.getSeriesByName(h)[0];if(!f[h])if(p){var g=p.getData(),m=g.getVisual("color");"function"==typeof m&&(m=m(p.getDataParams(0)));var v=g.getVisual("legendSymbol")||"roundRect",y=g.getVisual("symbol"),x=this._createItem(h,a,t,v,y,d,m,c);x.on("click",u(n,h,i)).on("mouseover",u(r,p,"",i)).on("mouseout",u(o,p,"",i)),f[h]=!0}else e.eachRawSeries(function(e){if(!f[h]&&e.legendDataProvider){var s=e.legendDataProvider(),l=s.indexOfName(h);if(0>l)return;var p=s.getItemVisual(l,"color"),g="roundRect",m=this._createItem(h,a,t,g,null,d,p,c);m.on("click",u(n,h,i)).on("mouseover",u(r,e,h,i)).on("mouseout",u(o,e,h,i)),f[h]=!0}},this)},this),h.layout(s,t,i),h.addBackground(s,t)}},_createItem:function(t,e,i,n,r,o,a,h){var u=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.isSelected(t),p=new l.Group,g=e.getModel("textStyle"),m=e.get("icon");if(n=m||n,p.add(s.createSymbol(n,0,0,u,c,f?a:d)),!m&&r&&(r!==n||"none"==r)){var v=.8*c;"none"===r&&(r="circle"),p.add(s.createSymbol(r,(u-v)/2,(c-v)/2,v,v,f?a:d))}var y="left"===o?u+5:-5,x=o,_=i.get("formatter");"string"==typeof _&&_?t=_.replace("{name}",t):"function"==typeof _&&(t=_(t));var b=new l.Text({style:{text:t,x:y,y:c/2,fill:f?g.getTextColor():d,textFont:g.getFont(),textAlign:x,textVerticalAlign:"middle"}});return p.add(b),p.add(new l.Rect({shape:p.getBoundingRect(),invisible:!0})),p.eachChild(function(t){t.silent=!h}),this.group.add(p),l.setHoverStyle(p),p}})},function(t,e,i){function n(t,e,i){var n,r={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var s=i.getData();o.each(s,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);e in r?r[e]=r[e]&&n:r[e]=n}})}),{name:e.name,selected:r}}var r=i(2),o=i(1);r.registerAction("legendToggleSelect","legendselectchanged",o.curry(n,"toggleSelected")),r.registerAction("legendSelect","legendselected",o.curry(n,"select")),r.registerAction("legendUnSelect","legendunselected",o.curry(n,"unSelect"))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i=0&&(h=+h.toFixed(m)),p.coord[d]=g.coord[d]=h,n=[p,g,{type:o,valueIndex:n.valueIndex,value:h}]}return n=[c.dataTransform(t,n[0]),c.dataTransform(t,n[1]),l.extend({},n[2])],n[2].type=n[2].type||"",l.merge(n[2],n[0]),l.merge(n[2],n[1]),n};i(66).extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,o=e.__to;r.each(function(e){a(r,e,!0,t,i),a(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap[t.name].updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var o=e.getItemModel(i);a(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||x[r?0:1],symbol:o.get("symbol",!0)||y[r?0:1],color:o.get("itemStyle.normal.color")||u.getVisual("color")})}var o=t.coordinateSystem,h=t.name,u=t.getData(),c=this.markerGroupMap,f=c[h];f||(f=c[h]=new d),this.group.add(f.group);var p=s(o,t,e),g=p.from,m=p.to,v=p.line;e.__from=g,e.__to=m,e.setData(v);var y=e.get("symbol"),x=e.get("symbolSize");l.isArray(y)||(y=[y,y]),"number"==typeof x&&(x=[x,x]),p.from.each(function(t){r(g,t,!0),r(m,t,!1)}),v.each(function(t){var e=v.getItemModel(t).get("lineStyle.normal.color");v.setItemVisual(t,{color:e||g.getItemVisual(t,"color")}),v.setItemLayout(t,[g.getItemLayout(t),m.getItemLayout(t)]),v.setItemVisual(t,{fromSymbolSize:g.getItemVisual(t,"symbolSize"),fromSymbol:g.getItemVisual(t,"symbol"),toSymbolSize:m.getItemVisual(t,"symbolSize"),toSymbol:m.getItemVisual(t,"symbol")})}),f.updateData(v),p.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),f.__keep=!0,f.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){t.exports=i(65).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}})},function(t,e,i){function n(t,e,i){var n=e.coordinateSystem;t.each(function(r){var o,a=t.getItemModel(r),l=s.parsePercent(a.getShallow("x"),i.getWidth()),h=s.parsePercent(a.getShallow("y"),i.getHeight());if(isNaN(l)||isNaN(h)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var u=t.get(n.dimensions[0],r),c=t.get(n.dimensions[1],r);o=n.dataToPoint([u,c])}}else o=[l,h];isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h),t.setItemLayout(r,o)})}function r(t,e,i){var n;n=t?a.map(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new l(n,i),o=a.map(i.get("data"),a.curry(h.dataTransform,e));return t&&(o=a.filter(o,a.curry(h.dataFilter,t))),r.initData(o,null,t?h.dimValueGetter:function(t){return t.value}),r}var o=i(39),a=i(1),s=i(4),l=i(13),h=i(67);i(66).extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(n(e.getData(),t,i),this.markerGroupMap[t.name].updateLayout(e))},this)},renderSeries:function(t,e,i,a){var s=t.coordinateSystem,l=t.name,h=t.getData(),u=this.markerGroupMap,c=u[l];c||(c=u[l]=new o);var d=r(s,t,e);e.setData(d),n(e.getData(),t,a),d.each(function(t){var i=d.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),d.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||h.getVisual("color"),symbol:i.getShallow("symbol")})}),c.updateData(d),this.group.add(c.group),d.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),c.__keep=!0,c.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){"use strict";var n=i(2),r=i(3),o=i(14);n.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),n.extendComponentView({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),h=new r.Text({style:{text:t.get("text"),textFont:a.getFont(),fill:a.getTextColor(),textBaseline:"top"},z2:10}),u=h.getBoundingRect(),c=t.get("subtext"),d=new r.Text({style:{text:c,textFont:s.getFont(),fill:s.getTextColor(),y:u.height+t.get("itemGap"),textBaseline:"top"},z2:10}),f=t.get("link"),p=t.get("sublink");h.silent=!f,d.silent=!p,f&&h.on("click",function(){window.open(f,"_"+t.get("target"))}),p&&d.on("click",function(){window.open(p,"_"+t.get("subtarget"))}),n.add(h),c&&n.add(d);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=o.getLayoutRect(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),"middle"===l&&(l="center"),"left"!==l&&"right"!==l&&"center"!==l&&(l="left"),"right"===l?v.x+=v.width:"center"===l&&(v.x+=v.width/2)),n.attr("position",[v.x,v.y]),h.setStyle("textAlign",l),d.setStyle("textAlign",l),g=n.getBoundingRect();var y=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new r.Rect({shape:{x:g.x-y[3],y:g.y-y[0],width:g.width+y[1]+y[3],height:g.height+y[0]+y[2]},style:x,silent:!0});r.subPixelOptimizeRect(_),n.add(_)}}})},function(t,e,i){i(200),i(201),i(207),i(205),i(203),i(204),i(206),i(202)},function(t,e,i){var n=i(22),r=i(1),o=i(2).extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){o.superApply(this,"mergeDefaultAndTheme",arguments),r.each(this.option.feature,function(t,e){var i=n.get(e);i&&r.merge(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}});t.exports=o},function(t,e,i){(function(e){function n(t){return 0===t.indexOf("my")}var r=i(22),o=i(1),a=i(3),s=i(12),l=i(45),h=i(108),u=i(18);t.exports=i(2).extendComponentView({type:"toolbox",render:function(t,e,i){function c(o,a){var l,h=v[o],u=v[a],c=g[h],f=new s(c,t,t.ecModel);if(h&&!u){if(n(h))l={model:f,onclick:f.option.onclick,featureName:h};else{var p=r.get(h);if(!p)return;l=new p(f,e,i)}m[h]=l}else{if(l=m[u],!l)return;l.model=f,l.ecModel=e,l.api=i}return!h&&u?void(l.dispose&&l.dispose(e,i)):!f.get("show")||l.unusable?void(l.remove&&l.remove(e,i)):(d(f,l,h),f.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(l.render&&l.render(f,e,i)))}function d(n,r,s){var l=n.getModel("iconStyle"),h=r.getIcons?r.getIcons():n.get("icon"),u=n.get("title")||{};if("string"==typeof h){var c=h,d=u;h={},u={},h[s]=c,u[s]=d}var g=n.iconPaths={};o.each(h,function(s,h){var c=l.getModel("normal").getItemStyle(),d=l.getModel("emphasis").getItemStyle(),m={x:-p/2,y:-p/2,width:p,height:p},v=0===s.indexOf("image://")?(m.image=s.slice(8),new a.Image({style:m})):a.makePath(s.replace("path://",""),{style:c,hoverStyle:d,rectHover:!0},m,"center");a.setHoverStyle(v),t.get("showTitle")&&(v.__title=u[h],v.on("mouseover",function(){v.setStyle({text:u[h],textPosition:d.textPosition||"bottom",textFill:d.fill||d.stroke||"#000",textAlign:d.textAlign||"center"})}).on("mouseout",function(){v.setStyle({textFill:null})})),v.trigger(n.get("iconStatus."+h)||"normal"),f.add(v),v.on("click",o.bind(r.onclick,r,e,i,h)),g[h]=v})}var f=this.group;if(f.removeAll(),t.get("show")){var p=+t.get("itemSize"),g=t.get("feature")||{},m=this._features||(this._features={}),v=[];o.each(g,function(t,e){v.push(e)}),new l(this._featureNames||[],v).add(c).update(c).remove(o.curry(c,null)).execute(),this._featureNames=v,h.layout(f,t,i),h.addBackground(f,t),f.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=u.getBoundingRect(e,n.font),o=t.position[0]+f.position[0],a=t.position[1]+f.position[1]+p,s=!1;a+r.height>i.getHeight()&&(n.textPosition="top",s=!0);var l=s?-5-r.height:p+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",l],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,l],n.textAlign="left")}})}},remove:function(t,e){o.each(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){o.each(this._features,function(i){i.dispose&&i.dispose(t,e)})}})}).call(e,i(213))},function(t,e,i){"use strict";function n(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}var r=i(22),o=i(1);n.defaultOption={show:!0,type:["rect","polygon","keep","clear"],icon:{rect:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",polygon:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",keep:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",clear:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5"},title:{rect:"矩形选择",polygon:"圈选",keep:"保持选择",clear:"清除选择"}};var a=n.prototype;a.render=function(t,e,i){var n,r;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,r=t.brushOption.brushMode||"single"}),this._brushType=n,this._brushMode=r,o.each(t.get("type",!0),function(e){"clear"!==e&&"keep"!==e&&t.setIconStatus(e,e===n?"emphasis":"normal"),"keep"===e&&t.setIconStatus(e,"multiple"===r?"emphasis":"normal")})},a.getIcons=function(){ -var t=this.model,e=t.get("icon",!0),i={};return o.each(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},a.onclick=function(t,e,i){var e=this.api,n=this._brushType,r=this._brushMode;"clear"===i?e.dispatchAction({type:"brush",brushRanges:[]}):e.dispatchAction({type:"enableBrush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===r?"single":"multiple":r}})},r.register("brush",n),t.exports=n},function(t,e,i){function n(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function r(t){var e=[];return p.each(t,function(t,i){var n=t.categoryAxis,r=t.valueAxis,o=r.dim,a=[" "].concat(p.map(t.series,function(t){return t.name})),s=[n.model.getCategories()];p.each(t.series,function(t){s.push(t.getRawData().mapArray(o,function(t){return t}))});for(var l=[a.join(v)],h=0;ha;a++)n[a]=arguments[a];i.push((o?o+v:"")+n.join(v))}),i.join("\n")}).join("\n\n"+m+"\n\n")}function a(t){var e=n(t);return{value:p.filter([r(e.seriesGroupByCategoryAxis),o(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+m+"\n\n"),meta:e.meta}}function s(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function l(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(v)>=0?!0:void 0}function h(t){for(var e=t.split(/\n+/g),i=s(e.shift()).split(y),n=[],r=p.map(i,function(t){return{name:t,data:[]}}),o=0;o1?"emphasis":"normal")}var h=i(1),u=i(4),c=i(167),d=i(7),f=i(28),p=i(105),g=h.each,m=u.asc;i(183);var v="\x00_ec_\x00toolbox-dataZoom_";n.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:{zoom:"区域缩放",back:"区域缩放还原"}};var y=n.prototype;y.render=function(t,e,i){l(t,e)},y.onclick=function(t,e,i){x[i].call(this)},y.remove=function(t,e){this._brushController.unmount()},y.dispose=function(t,e){var i=e.getZr();this._brushController.dispose(),this._controllerGroup&&i.remove(this._controllerGroup)};var x={zoom:function(){function t(){this.model.setIconStatus("zoom","normal"),this._isZoomActive=!1}var e=!this._isZoomActive,i=this._brushController;e?(this._isZoomActive=e,this.model.setIconStatus("zoom","emphasis"),i.enableBrush({brushType:"rect",brushStyle:{lineWidth:3,stroke:"#333",fill:"rgba(0,0,0,0.2)"},onRelease:h.bind(t,this)})):i.enableBrush(!1)},back:function(){this._dispatchAction(p.pop(this.ecModel))}};y._onBrush=function(t,e){if(e&&t.length){var i=t[0];this._brushController.updateCovers([]);var n={},o=this.ecModel;o.eachComponent("grid",function(t,e){var l=t.coordinateSystem,h=r(l,o),u=a(i,h);if(u){var c=s(u,h,0,"x"),d=s(u,h,1,"y");c&&(n[c.dataZoomId]=c),d&&(n[d.dataZoomId]=d)}},this),p.push(o,n),this._dispatchAction(n)}},y._dispatchAction=function(t){var e=[];g(t,function(t){e.push(t)}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:h.clone(e,!0)})},i(22).register("dataZoom",n),i(2).registerPreprocessor(function(t){function e(t,e){if(e){var r=t+"Index",o=e[r];null==o||h.isArray(o)||(o=o===!1?[]:[o]),i(t,function(e,i){if(null==o||-1!==h.indexOf(o,i)){var a={type:"select",$fromToolbox:!0,id:v+t+i};a[r]=i,n.push(a)}})}}function i(e,i){var n=t[e];h.isArray(n)||(n=n?[n]:[]),g(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);h.isArray(n)||(t.dataZoom=n=[n]);var r=t.toolbox;if(r&&(h.isArray(r)&&(r=r[0]),r&&r.feature)){var o=r.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}}),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(1);n.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"},option:{},seriesIndex:{}};var o=n.prototype;o.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return r.each(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var a={line:function(t,e,i,n){return"bar"===t?r.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?r.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0):void 0},tiled:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:""},n.get("option.tiled")||{},!0):void 0}},s=[["line","bar"],["stack","tiled"]];o.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(a[i]){var l={series:[]},h=function(t){var e=t.subType,o=t.id,s=a[i](e,o,t,n);s&&(r.defaults(s,t.option),l.series.push(s));var h=t.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim,d=t.get(c+"AxisIndex"),f=c+"Axis";l[f]=l[f]||[];for(var p=0;d>=p;p++)l[f][d]=l[f][d]||{};l[f][d].boundaryGap="bar"===i}}};r.each(s,function(t){r.indexOf(t,i)>=0&&r.each(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},h),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l})}};var l=i(2);l.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),i(22).register("magicType",n),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(105);n.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:"还原"};var o=n.prototype;o.onclick=function(t,e,i){r.clear(t),e.dispatchAction({type:"restore",from:this.uid})},i(22).register("restore",n),i(2).registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),t.exports=n},function(t,e,i){function n(t){this.model=t}var r=i(11);n.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:"保存为图片",type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:["右键另存为图片"]},n.prototype.unusable=!r.canvasSupported;var o=n.prototype;o.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=i.get("type",!0)||"png";r.download=n+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(r.href=a,"function"==typeof MouseEvent){var s=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(s)}else{var l=i.get("lang"),h='',u=window.open();u.document.write(h)}},i(22).register("saveAsImage",n),t.exports=n},function(t,e,i){i(210),i(211),i(2).registerAction({type:"showTip",event:"showTip",update:"none"},function(){}),i(2).registerAction({type:"hideTip",event:"hideTip",update:"none"},function(){})},function(t,e,i){function n(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return l.map(g,function(t){return t+"transition:"+i}).join(";")}function r(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),d(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function o(t){t=t;var e=[],i=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.getModel("textStyle"),s=t.get("padding");return i&&e.push(n(i)),o&&(p.canvasSupported?e.push("background-Color:"+o):(e.push("background-Color:#"+h.toHex(o)),e.push("filter:alpha(opacity=70)"))),d(["width","color","radius"],function(i){var n="border-"+i,r=f(n),o=t.get(r);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(r(a)),null!=s&&e.push("padding:"+c.normalizeCssArray(s).join("px ")+"px"),e.join(";")+";"}function a(t,e){var i=document.createElement("div"),n=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r.enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(!r.enterable){var i=n.handler;u.normalizeEvent(t,e),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r.enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1},s(i,t)}function s(t,e){function i(t){n(t.target)&&t.preventDefault()}function n(i){for(;i&&i!==e;){if(i===t)return!0;i=i.parentNode}}u.addEventListener(e,"touchstart",i),u.addEventListener(e,"touchmove",i),u.addEventListener(e,"touchend",i)}var l=i(1),h=i(17),u=i(23),c=i(9),d=l.each,f=c.toCamelCase,p=i(11),g=["","-webkit-","-moz-","-o-"],m="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";a.prototype={constructor:a,enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=m+o(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){var e=this.el;e.innerHTML=t,e.style.display=t?"block":"none"},moveTo:function(t,e){var i=this.el.style;i.left=t+"px",i.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this.enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(l.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}},t.exports=a},function(t,e,i){i(2).extendComponentModel({type:"tooltip",defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove",alwaysShowContent:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:!0,animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",lineStyle:{color:"#555",width:1,type:"solid"},crossStyle:{color:"#555",width:1,type:"dashed",textStyle:{}},shadowStyle:{color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff",fontSize:14}}})},function(t,e,i){function n(t,e){if(!t||!e)return!1;var i=g.round;return i(t[0])===i(e[0])&&i(t[1])===i(e[1])}function r(t,e,i,n){return{x1:t,y1:e,x2:i,y2:n}}function o(t,e,i,n){return{x:t,y:e,width:i,height:n}}function a(t,e,i,n,r,o){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:o,clockwise:!0}}function s(t,e,i,n,r){var o=i.clientWidth,a=i.clientHeight,s=20;return t+o+s>n?t-=o+s:t+=s,e+a+s>r?e-=a+s:e+=s,[t,e]}function l(t,e,i){var n=i.clientWidth,r=i.clientHeight,o=5,a=0,s=0,l=e.width,h=e.height;switch(t){case"inside":a=e.x+l/2-n/2,s=e.y+h/2-r/2;break;case"top":a=e.x+l/2-n/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-n/2,s=e.y+h+o;break;case"left":a=e.x-n-o,s=e.y+h/2-r/2;break;case"right":a=e.x+l+o,s=e.y+h/2-r/2}return[a,s]}function h(t,e,i,n,r,o,a){var h=a.getWidth(),u=a.getHeight(),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),"function"==typeof t&&(t=t([e,i],r,n.el,c)),f.isArray(t))e=m(t[0],h),i=m(t[1],u);else if("string"==typeof t&&o){var d=l(t,c,n.el);e=d[0],i=d[1]}else{var d=s(e,i,n.el,h,u);e=d[0],i=d[1]}n.moveTo(e,i)}function u(t){var e=t.coordinateSystem,i=t.get("tooltip.trigger",!0);return!(!e||"cartesian2d"!==e.type&&"polar"!==e.type&&"singleAxis"!==e.type||"item"===i)}var c=i(209),d=i(3),f=i(1),p=i(9),g=i(4),m=g.parsePercent,v=i(11);i(2).extendComponentView({type:"tooltip",_axisPointers:{},init:function(t,e){if(!v.node){var i=new c(e.getDom(),e);this._tooltipContent=i,e.on("showTip",this._manuallyShowTip,this),e.on("hideTip",this._manuallyHideTip,this)}},render:function(t,e,i){if(!v.node){this.group.removeAll(),this._axisPointers={},this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastHover={};var n=this._tooltipContent;n.update(),n.enterable=t.get("enterable"),this._alwaysShowContent=t.get("alwaysShowContent"),this._seriesGroupByAxis=this._prepareAxisTriggerData(t,e);var r=this._crossText;if(r&&this.group.add(r),null!=this._lastX&&null!=this._lastY){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){o._manuallyShowTip({x:o._lastX,y:o._lastY})})}var a=this._api.getZr();a.off("click",this._tryShow),a.off("mousemove",this._mousemove),a.off("mouseout",this._hide),a.off("globalout",this._hide),"click"===t.get("triggerOn")?a.on("click",this._tryShow,this):(a.on("mousemove",this._mousemove,this),a.on("mouseout",this._hide,this),a.on("globalout",this._hide,this))}},_mousemove:function(t){var e=this._tooltipModel.get("showDelay"),i=this;clearTimeout(this._showTimeout),e>0?this._showTimeout=setTimeout(function(){i._tryShow(t)},e):this._tryShow(t)},_manuallyShowTip:function(t){if(t.from!==this.uid){var e=this._ecModel,i=t.seriesIndex,n=t.dataIndex,r=e.getSeriesByIndex(i),o=this._api;if(null==t.x||null==t.y){if(r||e.eachSeries(function(t){u(t)&&!r&&(r=t)}),r){var a=r.getData();null==n&&(n=a.indexOfName(t.name));var s,l,h=a.getItemGraphicEl(n),c=r.coordinateSystem;if(c&&c.dataToPoint){var d=c.dataToPoint(a.getValues(f.map(c.dimensions,function(t){return r.coordDimToDataDim(t)[0]}),n,!0));s=d&&d[0],l=d&&d[1]}else if(h){var p=h.getBoundingRect().clone();p.applyTransform(h.transform),s=p.x+p.width/2,l=p.y+p.height/2}null!=s&&null!=l&&this._tryShow({offsetX:s,offsetY:l,target:h,event:{}})}}else{var h=o.getZr().handler.findHover(t.x,t.y);this._tryShow({offsetX:t.x,offsetY:t.y,target:h,event:{}})}}},_manuallyHideTip:function(t){t.from!==this.uid&&this._hide()},_prepareAxisTriggerData:function(t,e){var i={};return e.eachSeries(function(t){if(u(t)){var e,n,r=t.coordinateSystem;"cartesian2d"===r.type?(e=r.getBaseAxis(),n=e.dim+e.index):"singleAxis"===r.type?(e=r.getAxis(),n=e.dim+e.type):(e=r.getBaseAxis(),n=e.dim+r.name),i[n]=i[n]||{coordSys:[],series:[]},i[n].coordSys.push(r),i[n].series.push(t)}},this),i},_tryShow:function(t){var e=t.target,i=this._tooltipModel,n=i.get("trigger"),r=this._ecModel,o=this._api;if(i)if(this._lastX=t.offsetX,this._lastY=t.offsetY,e&&null!=e.dataIndex){var a=e.dataModel||r.getSeriesByIndex(e.seriesIndex),s=e.dataIndex,l=a.getData().getItemModel(s);"axis"===(l.get("tooltip.trigger")||n)?this._showAxisTooltip(i,r,t):(this._ticket="",this._hideAxisPointer(),this._resetLastHover(),this._showItemTooltipContent(a,s,e.dataType,t)),o.dispatchAction({type:"showTip",from:this.uid,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex})}else"item"===n?this._hide():this._showAxisTooltip(i,r,t),"cross"===i.get("axisPointer.type")&&o.dispatchAction({type:"showTip",from:this.uid,x:t.offsetX,y:t.offsetY})},_showAxisTooltip:function(t,e,i){var r=t.getModel("axisPointer"),o=r.get("type");if("cross"===o){var a=i.target;if(a&&null!=a.dataIndex){var s=e.getSeriesByIndex(a.seriesIndex),l=a.dataIndex;this._showItemTooltipContent(s,l,a.dataType,i)}}this._showAxisPointer();var h=!0;f.each(this._seriesGroupByAxis,function(t){var e=t.coordSys,a=e[0],s=[i.offsetX,i.offsetY];if(!a.containPoint(s))return void this._hideAxisPointer(a.name);h=!1;var l=a.dimensions,u=a.pointToData(s,!0);s=a.dataToPoint(u);var c=a.getBaseAxis(),d=r.get("axis");"auto"===d&&(d=c.dim);var p=!1,g=this._lastHover;if("cross"===o)n(g.data,u)&&(p=!0),g.data=u;else{var m=f.indexOf(l,d);g.data===u[m]&&(p=!0),g.data=u[m]}"cartesian2d"!==a.type||p?"polar"!==a.type||p?"singleAxis"!==a.type||p||this._showSinglePointer(r,a,d,s):this._showPolarPointer(r,a,d,s):this._showCartesianPointer(r,a,d,s),"cross"!==o&&this._dispatchAndShowSeriesTooltipContent(a,t.series,s,u,p)},this),this._tooltipModel.get("show")||this._hideAxisPointer(),h&&this._hide()},_showCartesianPointer:function(t,e,i,n){function a(i,n,o){var a="x"===i?r(n[0],o[0],n[0],o[1]):r(o[0],n[1],o[1],n[1]),s=l._getPointerElement(e,t,i,a);u?d.updateProps(s,{shape:a},t):s.attr({shape:a})}function s(i,n,r){var a=e.getAxis(i),s=a.getBandWidth(),h=r[1]-r[0],c="x"===i?o(n[0]-s/2,r[0],s,h):o(r[0],n[1]-s/2,h,s),f=l._getPointerElement(e,t,i,c);u?d.updateProps(f,{shape:c},t):f.attr({shape:c})}var l=this,h=t.get("type"),u="cross"!==h&&"category"===e.getBaseAxis().type;if("cross"===h)a("x",n,e.getAxis("y").getGlobalExtent()),a("y",n,e.getAxis("x").getGlobalExtent()),this._updateCrossText(e,n,t);else{var c=e.getAxis("x"===i?"y":"x"),f=c.getGlobalExtent();"cartesian2d"===e.type&&("line"===h?a:s)(i,n,f)}},_showSinglePointer:function(t,e,i,n){function o(i,n,o){var s=e.getAxis(),h=s.orient,u="horizontal"===h?r(n[0],o[0],n[0],o[1]):r(o[0],n[1],o[1],n[1]),c=a._getPointerElement(e,t,i,u);l?d.updateProps(c,{shape:u},t):c.attr({shape:u})}var a=this,s=t.get("type"),l="cross"!==s&&"category"===e.getBaseAxis().type,h=e.getRect(),u=[h.y,h.y+h.height];o(i,n,u)},_showPolarPointer:function(t,e,i,n){function o(i,n,o){var a,s=e.pointToCoord(n);if("angle"===i){var h=e.coordToPoint([o[0],s[1]]),u=e.coordToPoint([o[1],s[1]]);a=r(h[0],h[1],u[0],u[1])}else a={cx:e.cx,cy:e.cy,r:s[0]};var c=l._getPointerElement(e,t,i,a);f?d.updateProps(c,{shape:a},t):c.attr({shape:a})}function s(i,n,r){var o,s=e.getAxis(i),h=s.getBandWidth(),u=e.pointToCoord(n),c=Math.PI/180;o="angle"===i?a(e.cx,e.cy,r[0],r[1],(-u[1]-h/2)*c,(-u[1]+h/2)*c):a(e.cx,e.cy,u[0]-h/2,u[0]+h/2,0,2*Math.PI);var p=l._getPointerElement(e,t,i,o);f?d.updateProps(p,{shape:o},t):p.attr({shape:o})}var l=this,h=t.get("type"),u=e.getAngleAxis(),c=e.getRadiusAxis(),f="cross"!==h&&"category"===e.getBaseAxis().type;if("cross"===h)o("angle",n,c.getExtent()),o("radius",n,u.getExtent()),this._updateCrossText(e,n,t);else{var p=e.getAxis("radius"===i?"angle":"radius"),g=p.getExtent();("line"===h?o:s)(i,n,g)}},_updateCrossText:function(t,e,i){var n=i.getModel("crossStyle"),r=n.getModel("textStyle"),o=this._tooltipModel,a=this._crossText;a||(a=this._crossText=new d.Text({style:{textAlign:"left",textVerticalAlign:"bottom"}}),this.group.add(a));var s=t.pointToData(e),l=t.dimensions;s=f.map(s,function(e,i){var n=t.getAxis(l[i]);return e="category"===n.type||"time"===n.type?n.scale.getLabel(e):p.addCommas(e.toFixed(n.getPixelPrecision()))}),a.setStyle({fill:r.getTextColor()||n.get("color"),textFont:r.getFont(),text:s.join(", "),x:e[0]+5,y:e[1]-5}),a.z=o.get("z"),a.zlevel=o.get("zlevel")},_getPointerElement:function(t,e,i,n){var r=this._tooltipModel,o=r.get("z"),a=r.get("zlevel"),s=this._axisPointers,l=t.name;if(s[l]=s[l]||{},s[l][i])return s[l][i];var h=e.get("type"),u=e.getModel(h+"Style"),c="shadow"===h,f=u[c?"getAreaStyle":"getLineStyle"](),p="polar"===t.type?c?"Sector":"radius"===i?"Circle":"Line":c?"Rect":"Line";c?f.stroke=null:f.fill=null;var g=s[l][i]=new d[p]({style:f,z:o,zlevel:a,silent:!0,shape:n});return this.group.add(g),g},_dispatchAndShowSeriesTooltipContent:function(t,e,i,n,r){var o=this._tooltipModel,a=this._tooltipContent,s=t.getBaseAxis(),l=f.map(e,function(t){return{seriesIndex:t.seriesIndex,dataIndex:t.getAxisTooltipDataIndex?t.getAxisTooltipDataIndex(t.coordDimToDataDim(s.dim),n,s):t.getData().indexOfNearest(t.coordDimToDataDim(s.dim)[0],n["x"===s.dim||"radius"===s.dim?0:1])}}),u=this._lastHover,c=this._api;if(u.payloadBatch&&!r&&c.dispatchAction({type:"downplay",batch:u.payloadBatch}),r||(c.dispatchAction({type:"highlight",batch:l}),u.payloadBatch=l),c.dispatchAction({type:"showTip",dataIndex:l[0].dataIndex,seriesIndex:l[0].seriesIndex,from:this.uid}),s&&o.get("showContent")&&o.get("show")){var d,g=o.get("formatter"),m=o.get("position"),v=f.map(e,function(t,e){return t.getDataParams(l[e].dataIndex)});a.show(o);var y=l[0].dataIndex;if(!r){if(this._ticket="",g){if("string"==typeof g)d=p.formatTpl(g,v);else if("function"==typeof g){var x=this,_="axis_"+t.name+"_"+y,b=function(t,e){t===x._ticket&&(a.setContent(e),h(m,i[0],i[1],a,v,null,c))};x._ticket=_,d=g(v,_,b)}}else{var w=e[0].getData().getName(y);d=(w?w+"
":"")+f.map(e,function(t,e){return t.formatTooltip(l[e].dataIndex,!0)}).join("
")}a.setContent(d)}h(m,i[0],i[1],a,v,null,c)}},_showItemTooltipContent:function(t,e,i,n){var r=this._api,o=t.getData(i),a=o.getItemModel(e),s=this._tooltipModel,l=this._tooltipContent,u=a.getModel("tooltip");if(u.parentModel?u.parentModel.parentModel=s:u.parentModel=this._tooltipModel,u.get("showContent")&&u.get("show")){var c,d=u.get("formatter"),f=u.get("position"),g=t.getDataParams(e,i);if(d){if("string"==typeof d)c=p.formatTpl(d,g);else if("function"==typeof d){var m=this,v="item_"+t.name+"_"+e,y=function(t,e){t===m._ticket&&(l.setContent(e),h(f,n.offsetX,n.offsetY,l,g,n.target,r))};m._ticket=v,c=d(g,v,y)}}else c=t.formatTooltip(e,!1,i);l.show(u),l.setContent(c),h(f,n.offsetX,n.offsetY,l,g,n.target,r)}},_showAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.show()})}else this.group.eachChild(function(t){t.show()}),this.group.show()},_resetLastHover:function(){var t=this._lastHover;t.payloadBatch&&this._api.dispatchAction({type:"downplay",batch:t.payloadBatch}),this._lastHover={}},_hideAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.hide()})}else this.group.children().length&&this.group.hide()},_hide:function(){clearTimeout(this._showTimeout),this._hideAxisPointer(),this._resetLastHover(),this._alwaysShowContent||this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._api.dispatchAction({type:"hideTip",from:this.uid}),this._lastX=this._lastY=null},dispose:function(t,e){if(!v.node){var i=e.getZr();this._tooltipContent.hide(),i.off("click",this._tryShow),i.off("mousemove",this._mousemove),i.off("mouseout",this._hide),i.off("globalout",this._hide),e.off("showTip",this._manuallyShowTip),e.off("hideTip",this._manuallyHideTip)}}})},function(t,e,i){function n(t,e){var i=t.get("center"),n=t.get("radius"),r=e.getWidth(),o=e.getHeight(),a=s.parsePercent;this.cx=a(i[0],r),this.cy=a(i[1],o);var l=this.getRadiusAxis(),h=Math.min(r,o)/2;l.setExtent(0,a(n,h))}function r(t,e){var i=this,n=i.getAngleAxis(),r=i.getRadiusAxis();if(n.scale.setExtent(1/0,-(1/0)),r.scale.setExtent(1/0,-(1/0)),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();r.scale.unionExtent(e.getDataExtent("radius","category"!==r.type)),n.scale.unionExtent(e.getDataExtent("angle","category"!==n.type))}}),h(n,n.model),h(r,r.model),"category"===n.type&&!n.onBand){var o=n.getExtent(),a=360/n.scale.count();n.inverse?o[1]+=a:o[1]-=a,n.setExtent(o[0],o[1])}}function o(t,e){if(t.type=e.get("type"),t.scale=l.createScaleByModel(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,"angleAxis"===e.mainType){var i=e.get("startAngle");t.inverse=e.get("inverse")^e.get("clockwise"),t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}var a=i(352),s=i(4),l=i(25),h=l.niceScaleExtent;i(353);var u={dimensions:a.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,s){var l=new a(s);l.resize=n,l.update=r;var h=l.getRadiusAxis(),u=l.getAngleAxis(),c=t.findAxisModel("radiusAxis"),d=t.findAxisModel("angleAxis");o(h,c),o(u,d),l.resize(t,e),i.push(l),t.coordinateSystem=l}),t.eachSeries(function(t){"polar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("polarIndex")])}),i}};i(24).register("polar",u)},function(t,e){function i(){c&&h&&(c=!1,h.length?u=h.concat(u):d=-1,u.length&&n())}function n(){if(!c){var t=a(i);c=!0;for(var e=u.length;e;){for(h=u,u=[];++d1)for(var i=1;i=0?parseFloat(t)/100*e:parseFloat(t):t},E=function(t,e,i){var n=a.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=D(n[0],n[1],n[2]),t.opacity=i*n[3])},R=function(t){var e=a.parse(t);return[D(e[0],e[1],e[2]),e[3]]},V=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof f){var r,o=0,a=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){r="gradient";var d=i.transform,p=[n.x*u,n.y*c],g=[n.x2*u,n.y2*c];d&&(b(p,p,d),b(g,g,d));var m=g[0]-p[0],v=g[1]-p[1];o=180*Math.atan2(m,v)/Math.PI,0>o&&(o+=360),1e-6>o&&(o=0)}else{r="gradientradial";var p=[n.x*u,n.y*c],d=i.transform,y=i.scale,x=u,w=c;a=[(p[0]-h.x)/x,(p[1]-h.y)/w],d&&b(p,p,d),x/=y[0]*M,w/=y[1]*M;var S=_(x,w);s=0/S,l=2*n.r/S-s}var I=n.colorStops.slice();I.sort(function(t,e){return t.offset-e.offset});for(var A=I.length,T=[],L=[],C=0;A>C;C++){var D=I[C],P=R(D.color);L.push(D.offset*l+s+" "+P[0]),0!==C&&C!==A-1||T.push(P)}if(A>=2){var k=T[0][0],z=T[1][0],O=T[0][1]*e.opacity,V=T[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=k,t.color2=z,t.colors=L.join(","),t.opacity=V,t.opacity2=O}"radial"===r&&(t.focusposition=a.join(","))}else E(t,n,e.opacity)},N=function(t,e){null!=e.lineJoin&&(t.joinstyle=e.lineJoin),null!=e.miterLimit&&(t.miterlimit=e.miterLimit*M),null!=e.lineCap&&(t.endcap=e.lineCap),null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof f||E(t,e.stroke,e.opacity)},B=function(t,e,i,n){var r="fill"==e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof f&&k(t,o),o||(o=p.createNode(e)),r?V(o,i,n):N(o,i),P(t,o)):(t[r?"filled":"stroked"]="false",k(t,o))},G=[[],[],[]],F=function(t,e){var i,n,r,a,s,l,h=o.M,u=o.C,c=o.L,d=o.A,f=o.Q,p=[];for(a=0;a.01?F&&(H+=270/M):Math.abs(W-E)<1e-10?F&&O>H||!F&&H>O?A-=270/M:A+=270/M:F&&E>W||!F&&W>E?S+=270/M:S-=270/M),p.push(Z,g(((O-R)*P+C)*M-I),w,g(((E-V)*k+D)*M-I),w,g(((O+R)*P+C)*M-I),w,g(((E+V)*k+D)*M-I),w,g((H*P+C)*M-I),w,g((W*k+D)*M-I),w,g((S*P+C)*M-I),w,g((A*k+D)*M-I)),s=S,l=A;break;case o.R:var q=G[0],j=G[1];q[0]=t[a++],q[1]=t[a++],j[0]=q[0]+t[a++],j[1]=q[1]+t[a++],e&&(b(q,q,e),b(j,j,e)),q[0]=g(q[0]*M-I),j[0]=g(j[0]*M-I),q[1]=g(q[1]*M-I),j[1]=g(j[1]*M-I),p.push(" m ",q[0],w,q[1]," l ",j[0],w,q[1]," l ",j[0],w,j[1]," l ",q[0],w,j[1]);break;case o.Z:p.push(" x ")}if(i>0){p.push(n);for(var U=0;i>U;U++){var X=G[U];e&&b(X,X,e),p.push(g(X[0]*M-I),w,g(X[1]*M-I),i-1>U?w:"")}}}return p.join("")};d.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=p.createNode("shape"),L(i),this._vmlEl=i),B(i,"fill",e,this),B(i,"stroke",e,this);var n=this.transform,r=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(r&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];a*=m(v(s))}o.weight=a+"px"}var l=this.path;this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=F(l.data,this.transform),i.style.zIndex=z(this.zlevel,this.z,this.z2),P(t,i),e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},d.prototype.onRemove=function(t){k(t,this._vmlEl),this.removeRectText(t)},d.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)};var H=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};u.prototype.brushVML=function(t){var e,i,n=this.style,r=n.image;if(H(r)){var o=r.src;if(o===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var a=r.runtimeStyle,s=a.width,l=a.height;a.width="auto",a.height="auto",e=r.width,i=r.height,a.width=s,a.height=l,this._imageSrc=o,this._imageWidth=e,this._imageHeight=i}r=o}else r===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(r){var h=n.x||0,u=n.y||0,c=n.width,d=n.height,f=n.sWidth,v=n.sHeight,y=n.sx||0,x=n.sy||0,M=f&&v,I=this._vmlEl;I||(I=p.doc.createElement("div"),L(I),this._vmlEl=I);var A,T=I.style,C=!1,D=1,k=1;if(this.transform&&(A=this.transform,D=m(A[0]*A[0]+A[1]*A[1]),k=m(A[2]*A[2]+A[3]*A[3]),C=A[1]||A[2]),C){var O=[h,u],E=[h+c,u],R=[h,u+d],V=[h+c,u+d];b(O,O,A),b(E,E,A),b(R,R,A),b(V,V,A);var N=_(O[0],E[0],R[0],V[0]),B=_(O[1],E[1],R[1],V[1]),G=[];G.push("M11=",A[0]/D,w,"M12=",A[2]/k,w,"M21=",A[1]/D,w,"M22=",A[3]/k,w,"Dx=",g(h*D+A[4]),w,"Dy=",g(u*k+A[5])),T.padding="0 "+g(N)+"px "+g(B)+"px 0",T.filter=S+".Matrix("+G.join("")+", SizingMethod=clip)"}else A&&(h=h*D+A[4],u=u*k+A[5]),T.filter="",T.left=g(h)+"px",T.top=g(u)+"px";var F=this._imageEl,W=this._cropEl;F||(F=p.doc.createElement("div"),this._imageEl=F);var Z=F.style;if(M){if(e&&i)Z.width=g(D*e*c/f)+"px",Z.height=g(k*i*d/v)+"px";else{var q=new Image,j=this;q.onload=function(){q.onload=null,e=q.width,i=q.height,Z.width=g(D*e*c/f)+"px",Z.height=g(k*i*d/v)+"px",j._imageWidth=e,j._imageHeight=i,j._imageSrc=r},q.src=r}W||(W=p.doc.createElement("div"),W.style.overflow="hidden",this._cropEl=W);var U=W.style;U.width=g((c+y*c/f)*D),U.height=g((d+x*d/v)*k),U.filter=S+".Matrix(Dx="+-y*c/f*D+",Dy="+-x*d/v*k+")",W.parentNode||I.appendChild(W),F.parentNode!=W&&W.appendChild(F)}else Z.width=g(D*c)+"px",Z.height=g(k*d)+"px",I.appendChild(F),W&&W.parentNode&&(I.removeChild(W),this._cropEl=null);var X="",Y=n.opacity;1>Y&&(X+=".Alpha(opacity="+g(100*Y)+") "),X+=S+".AlphaImageLoader(src="+r+", SizingMethod=scale)",Z.filter=X,I.style.zIndex=z(this.zlevel,this.z,this.z2),P(t,I),n.text&&this.drawRectText(t,this.getBoundingRect())}},u.prototype.onRemove=function(t){k(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},u.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)};var W,Z="normal",q={},j=0,U=100,X=document.createElement("div"),Y=function(t){var e=q[t];if(!e){j>U&&(j=0,q={});var i,n=X.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(r){}e={style:n.fontStyle||Z,variant:n.fontVariant||Z,weight:n.fontWeight||Z,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},q[t]=e,j++}return e};s.measureText=function(t,e){var i=p.doc;W||(W=i.createElement("div"),W.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",p.doc.body.appendChild(W));try{W.style.font=e}catch(n){}return W.innerHTML="",W.appendChild(i.createTextNode(t)),{width:W.offsetWidth}};for(var K=new r,Q=function(t,e,i,n){var r=this.style,o=r.text;if(o){var a,l,h=r.textAlign,u=Y(r.textFont),c=u.style+" "+u.variant+" "+u.weight+" "+u.size+'px "'+u.family+'"',d=r.textBaseline,f=r.textVerticalAlign;i=i||s.getBoundingRect(o,c,h,d);var m=this.transform;if(m&&!n&&(K.copy(e),K.applyTransform(m),e=K),n)a=e.x,l=e.y;else{var v=r.textPosition,y=r.textDistance;if(v instanceof Array)a=e.x+O(v[0],e.width),l=e.y+O(v[1],e.height),h=h||"left",d=d||"top";else{var x=s.adjustTextPositionOnRect(v,e,i,y);a=x.x,l=x.y,h=h||x.textAlign,d=d||x.textBaseline}}if(f){switch(f){case"middle":l-=i.height/2;break;case"bottom":l-=i.height}d="top"}var _=u.size;switch(d){case"hanging":case"top":l+=_/1.75;break;case"middle":break;default:l-=_/2.25}switch(h){case"left":break;case"center":a-=i.width/2;break;case"right":a-=i.width}var S,M,I,A=p.createNode,T=this._textVmlEl;T?(I=T.firstChild,S=I.nextSibling,M=S.nextSibling):(T=A("line"),S=A("path"),M=A("textpath"),I=A("skew"),M.style["v-text-align"]="left",L(T),S.textpathok=!0,M.on=!0,T.from="0 0",T.to="1000 0.05",P(T,I),P(T,S),P(T,M),this._textVmlEl=T);var D=[a,l],k=T.style;m&&n?(b(D,D,m),I.on=!0,I.matrix=m[0].toFixed(3)+w+m[2].toFixed(3)+w+m[1].toFixed(3)+w+m[3].toFixed(3)+",0,0",I.offset=(g(D[0])||0)+","+(g(D[1])||0),I.origin="0 0",k.left="0px",k.top="0px"):(I.on=!1,k.left=g(a)+"px",k.top=g(l)+"px"),M.string=C(o);try{M.style.font=c}catch(E){}B(T,"fill",{fill:n?r.fill:r.textFill,opacity:r.opacity},this),B(T,"stroke",{stroke:n?r.stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash},this),T.style.zIndex=z(this.zlevel,this.z,this.z2),P(t,T)}},$=function(t){k(t,this._textVmlEl),this._textVmlEl=null},J=function(t){P(t,this._textVmlEl)},tt=[l,h,u,d,c],et=0;et0&&(i*=3,e=[h*i+a*(1-i),u*i+s*(1-i)]),t.setLayout([r,o,e])})}}},function(t,e,i){var n=i(5);t.exports=function(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.normal.curveness")||0,i=n.clone(t.node1.getLayout()),r=n.clone(t.node2.getLayout()),o=[i,r];e>0&&o.push([(i[0]+r[0])/2-(i[1]-r[1])*e,(i[1]+r[1])/2-(r[0]-i[0])*e]),t.setLayout(o)})}},function(t,e,i){var n=i(220);t.exports=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),n(i)}}},function(t,e,i){var n=i(13),r=i(358),o=i(235),a=i(31),s=i(24),l=i(1),h=i(35);t.exports=function(t,e,i,u,c){for(var d=new r(u),f=0;f "+y)))}var x,_=i.get("coordinateSystem");if("cartesian2d"===_||"polar"===_)x=h(t,i,i.ecModel);else{var b=s.get(_),w=a((b&&"view"!==b.type?b.dimensions||[]:[]).concat(["value"]),t);x=new n(w,i),x.initData(t)}var S=new n(["value"],i);return S.initData(g,p),c&&c(x,S),o({mainData:x,struct:d,structAttr:"graph",datas:{node:x,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),d.update(),d}},function(t,e,i){function n(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return n&&(i.fill=n),i}function r(t,e,i,n){e.off("click"),t.get("selectedMode")&&e.on("click",function(r){for(var a=r.target;!a.__region;)a=a.parent;if(a){var s=a.__region,l={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",name:s.name,from:n.uid};l[t.mainType+"Id"]=t.id,i.dispatchAction(l),o(t,e)}})}function o(t,e){e.eachChild(function(e){e.__region&&e.trigger(t.isSelected(e.__region.name)?"emphasis":"normal")})}function a(t,e){var i=new l.Group;this._controller=new s(t.getZr(),e?i:null,null),this.group=i,this._updateGroup=e}var s=i(76),l=i(3),h=i(1);a.prototype={constructor:a,draw:function(t,e,i,a,s){var u=t.getData&&t.getData(),c=t.coordinateSystem,d=this.group,f=c.scale,p={position:c.position,scale:f};!d.childAt(0)||s?d.attr(p):l.updateProps(d,p,t),d.removeAll();var g=["itemStyle","normal"],m=["itemStyle","emphasis"],v=["label","normal"],y=["label","emphasis"];h.each(c.regions,function(e){var i=new l.Group,r=new l.CompoundPath({shape:{paths:[]}});i.add(r);var o,a=t.getRegionModel(e.name)||t,s=a.getModel(g),c=a.getModel(m),p=n(s,f),x=n(c,f),_=a.getModel(v),b=a.getModel(y);if(u){o=u.indexOfName(e.name);var w=u.getItemVisual(o,"color",!0);w&&(p.fill=w)}var S=_.getModel("textStyle"),M=b.getModel("textStyle");h.each(e.contours,function(t){var e=new l.Polygon({shape:{points:t}});r.shape.paths.push(e)}),r.setStyle(p),r.style.strokeNoScale=!0,r.culling=!0;var I=_.get("show"),A=b.get("show"),T=u&&isNaN(u.get("value",o)),L=u&&u.getItemLayout(o);if(!u||T&&(I||A)||L&&L.showLabel){var C=u?o:e.name,D=t.getFormattedLabel(C,"normal"),P=t.getFormattedLabel(C,"emphasis"),k=new l.Text({style:{text:I?D||e.name:"",fill:S.getTextColor(),textFont:S.getFont(),textAlign:"center",textVerticalAlign:"middle"},hoverStyle:{text:A?P||e.name:"",fill:M.getTextColor(),textFont:M.getFont()},position:e.center.slice(),scale:[1/f[0],1/f[1]],z2:10,silent:!0});i.add(k)}if(u)u.setItemGraphicEl(o,i);else{var a=t.getRegionModel(e.name);r.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:a&&a.option||{}}}i.__region=e,l.setHoverStyle(i,x),d.add(i)}),this._updateController(t,e,i),r(t,d,i,a),o(t,d)},remove:function(){this.group.removeAll(),this._controller.dispose()},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}var r=t.coordinateSystem,o=this._controller;o.zoomLimit=t.get("scaleLimit"),o.zoom=r.getZoom(),o.enable(t.get("roam")||!1);var a=t.mainType;o.off("pan").on("pan",function(t,e){i.dispatchAction(h.extend(n(),{dx:t,dy:e}))}),o.off("zoom").on("zoom",function(t,e,r){if(i.dispatchAction(h.extend(n(),{zoom:t,originX:e,originY:r})),this._updateGroup){var o=this.group,a=o.scale;o.traverse(function(t){"text"===t.type&&t.attr("scale",[1/a[0],1/a[1]])})}},this),o.rectProvider=function(){return r.getViewRectAfterRoam()}}},t.exports=a},function(t,e,i){i(234),i(348),i(318);var n=i(2);n.extendComponentView({type:"parallel"}),n.registerPreprocessor(i(349))},function(t,e,i){var n=i(2),r=i(1),o=i(11),a=i(362),s=i(79),l=i(236),h=s.mapVisual,u=i(8),c=s.eachVisual,d=i(4),f=r.isArray,p=r.each,g=d.asc,m=d.linearMap,v=r.noop,y=n.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-(1/0),1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:null,min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:["#bf444c","#d88273","#f6efa6"],formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;o.canvasSupported||(i.realtime=!1),!e&&l.replaceVisualOption(this.option,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=r.bind(t,this),this.controllerVisuals=l.createVisualMappings(this.option.controller,e,t),this.targetVisuals=l.createVisualMappings(this.option.target,e,t)},resetTargetSeries:function(){var t=this.option,e=null==t.seriesIndex;t.seriesIndex=e?[]:u.normalizeToArray(t.seriesIndex),e&&this.ecModel.eachSeries(function(e,i){t.seriesIndex.push(i)})},eachTargetSeries:function(t,e){r.each(this.option.seriesIndex,function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},formatValueText:function(t,e){function i(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(s)}var n,o,a=this.option,s=a.precision,l=this.dataBound,h=a.formatter;return r.isArray(t)&&(t=t.slice(),n=!0),o=e?t:n?[i(t[0]),i(t[1])]:i(t),r.isString(h)?h.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):r.isFunction(h)?n?h(t[0],t[1]):h(t):n?t[0]===l[0]?"< "+o[1]:t[1]===l[1]?"> "+o[0]:o[0]+" - "+o[1]:o},resetExtent:function(){var t=this.option,e=g([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){f(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),p(this.stateList,function(e){var i=t[e];if(r.isString(i)){var n=a.get(i,"active",d);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},p(n,function(t,e){if(s.isValidType(e)){var i=a.get(e,"inactive",d);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");p(this.stateList,function(o){var a=this.itemSize,s=t[o];s||(s=t[o]={color:d?n:[n]}),null==s.symbol&&(s.symbol=e&&r.clone(e)||(d?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&r.clone(i)||(d?a[0]:[a[0],a[0]])),s.symbol=h(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-(1/0);c(l,function(t){t>u&&(u=t)}),s.symbolSize=h(l,function(t){return m(t,[0,u],[0,a[0]],!0)})}},this)}var n=this.option,o={inRange:n.inRange,outOfRange:n.outOfRange},l=n.target||(n.target={}),u=n.controller||(n.controller={});r.merge(l,o),r.merge(u,o);var d=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),e.call(this,l,"outOfRange","inRange"),i.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:v,getValueState:v});t.exports=y},function(t,e,i){var n=i(1),r=i(3),o=i(9),a=i(14),s=i(2),l=i(79);t.exports=s.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){return this.visualMapModel=t,t.get("show")===!1?void this.group.removeAll():void this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,i=o.normalizeCssArray(e.get("padding")||0),n=t.getBoundingRect();t.add(new r.Rect({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){function r(t){return h[t]}function o(t,e){h[t]=e}i=i||{};var a=i.forceState,s=this.visualMapModel,h={};if("symbol"===e&&(h.symbol=s.get("itemSymbol")),"color"===e){var u=s.get("contentColor");h.color=u}var c=s.controllerVisuals[a||s.getValueState(t)],d=l.prepareVisualTypes(c);return n.each(d,function(n){var a=c[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",a=c.__alphaForOpacity),l.dependsOn(n,e)&&a&&a.applyVisual(t,r,o)}),h[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;a.positionGroup(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:n.noop})},function(t,e,i){var n=i(14),r={getItemAlign:function(t,e,i){var r=t.option,o=r.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},s="horizontal"===r.orient?1:0,l=[["left","right","width"],["top","bottom","height"]],h=l[s],u=[0,null,10],c={},d=0;3>d;d++)c[l[1-s][d]]=u[d],c[h[d]]=2===d?i[0]:r[h[d]];var f=[["x","width",3],["y","height",0]][s],p=n.getLayoutRect(c,a,r.padding);return h[(p.margin[f[2]]||0)+p[f[0]]+.5*p[f[1]]<.5*a[f[1]]?0:1]}};t.exports=r},function(t,e,i){function n(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var r=i(1),o=r.each;t.exports=function(t){var e=t&&t.visualMap;r.isArray(e)||(e=e?[e]:[]),o(e,function(t){if(t){n(t,"splitList")&&!n(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&r.isArray(e)&&o(e,function(t){r.isObject(t)&&(n(t,"start")&&!n(t,"min")&&(t.min=t.start),n(t,"end")&&!n(t,"max")&&(t.max=t.end))})}})}},function(t,e,i){i(10).registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})},function(t,e,i){function n(t,e){t.eachTargetSeries(function(e){var i=e.getData();o.applyVisual(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))})}var r=i(2),o=i(236);i(1);r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,function(t){t.eachComponent("visualMap",function(e){n(e,t)})})},function(t,e,i){var n=i(2),r={type:"selectDataRange",event:"dataRangeSelected",update:"update"};n.registerAction(r,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})})},function(t,e,i){function n(){s.call(this)}function r(t){this.name=t,this.zoomLimit,s.call(this),this._roamTransform=new n,this._viewTransform=new n,this._center,this._zoom}var o=i(5),a=i(19),s=i(83),l=i(1),h=i(7),u=o.applyTransform;l.mixin(n,s),r.prototype={constructor:r,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new h(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){i=i,n=n,this.transformTo(t,e,i,n),this._viewRect=new h(t,e,i,n)},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),o=this._viewTransform;o.transform=r.calculateTransform(new h(t,e,i,n)),o.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransform},_updateCenterAndZoom:function(){var t=this._viewTransform.getLocalTransform(),e=this._roamTransform,i=this.getDefaultCenter(),n=this.getCenter(),r=this.getZoom();n=o.applyTransform([],n,t),i=o.applyTransform([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[r,r],this._updateTransform()},_updateTransform:function(){var t=this._roamTransform,e=this._viewTransform;e.parent=t,t.updateTransform(),e.updateTransform(),e.transform&&a.copy(this.transform||(this.transform=[]),e.transform),this.transform?(this.invTransform=this.invTransform||[],a.invert(this.invTransform,this.transform)):this.invTransform=null,this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t){var e=this.transform;return e?u([],t,e):[t[0],t[1]]},pointToData:function(t){var e=this.invTransform;return e?u([],t,e):[t[0],t[1]]}},l.mixin(r,s),t.exports=r},function(t,e,i){function n(t,e,i){if(this.name=t,this.contours=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}var r=i(363),o=i(7),a=i(71),s=i(5);n.prototype={constructor:n,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],l=[],h=this.contours,u=0;un;n++)if(r.contain(i[n],t[0],t[1]))return!0;return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),a=r.width/r.height;i?n||(n=i/a):i=a*n;for(var l=new o(t,e,i,n),h=r.calculateTransform(l),u=this.contours,c=0;cf;f++){var g=u[f];r[g]&&r[g].applyVisual(t,l,h)}}var c={};n.each(t,function(t){var i=r.prepareVisualTypes(e[t]);c[t]=i});var d;null==s?i.each(u,!0):i.each([s],u,!0)}};t.exports=a},function(t,e,i){var n=i(2);i(238),i(239),n.registerVisual(i(241)),n.registerLayout(i(240))},function(t,e,i){"use strict";var n=i(1),r=i(15),o=i(165),a=r.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],valueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,layout:null,boxWidth:[7,50],itemStyle:{normal:{color:"#fff",borderWidth:1},emphasis:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});n.mixin(a,o.seriesModelMixin,!0),t.exports=a},function(t,e,i){"use strict";function n(t,e,i){var n=e.getItemModel(i),r=n.getModel(h),o=e.getItemVisual(i,"color"),s=r.getItemStyle(["borderColor"]),l=t.childAt(t.whiskerIndex);l.style.set(s),l.style.stroke=o,l.dirty();var c=t.childAt(t.bodyIndex);c.style.set(s),c.style.stroke=o,c.dirty();var d=n.getModel(u).getItemStyle();a.setHoverStyle(t,d)}var r=i(1),o=i(27),a=i(3),s=i(165),l=o.extend({type:"boxplot",getStyleUpdater:function(){return n}});r.mixin(l,s.viewMixin,!0);var h=["itemStyle","normal"],u=["itemStyle","emphasis"];t.exports=l},function(t,e,i){function n(t){var e=[],i=[];return t.eachSeriesByType("boxplot",function(t){var n=t.getBaseAxis(),r=a.indexOf(i,n);0>r&&(r=i.length,i[r]=n,e[r]={axis:n,seriesModels:[]}),e[r].seriesModels.push(t)}),e}function r(t){var e,i,n=t.axis,r=t.seriesModels,o=r.length,s=t.boxWidthList=[],u=t.boxOffsetList=[],c=[];if("category"===n.type)i=n.getBandWidth();else{var d=0;h(r,function(t){d=Math.max(d,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])/d}h(r,function(t){var e=t.get("boxWidth");a.isArray(e)||(e=[e,e]),c.push([l(e[0],i)||0,l(e[1],i)||0])});var f=.8*i-2,p=f/o*.3,g=(f-p*(o-1))/o,m=g/2-f/2;h(r,function(t,e){u.push(m),m+=p+g,s.push(Math.min(Math.max(g,c[e][0]),c[e][1]))})}function o(t,e,i){var n=t.coordinateSystem,r=t.getData(),o=t.dimensions,a=t.get("layout"),s=i/2;r.each(o,function(){function t(t){var i=[];i[f]=c,i[p]=t;var r;return isNaN(c)||isNaN(t)?r=[NaN,NaN]:(r=n.dataToPoint(i),r[f]+=e),r}function i(t,e){var i=t.slice(),n=t.slice();i[f]+=s,n[f]-=s,e?x.push(i,n):x.push(n,i)}function l(t){var e=[t.slice(),t.slice()];e[0][f]-=s,e[1][f]+=s,y.push(e)}var h=arguments,u=o.length,c=h[0],d=h[u],f="horizontal"===a?0:1,p=1-f,g=t(h[3]),m=t(h[1]),v=t(h[5]),y=[[m,t(h[2])],[v,t(h[4])]];l(m),l(v),l(g);var x=[];i(y[0][1],0),i(y[1][1],1),r.setItemLayout(d,{chartLayout:a,initBaseline:g[p],median:g,bodyEnds:x,whiskerEnds:y})})}var a=i(1),s=i(4),l=s.parsePercent,h=a.each;t.exports=function(t){var e=n(t);h(e,function(t){var e=t.seriesModels;e.length&&(r(t), -h(e,function(e,i){o(e,t.boxOffsetList[i],t.boxWidthList[i])}))})}},function(t,e){var i=["itemStyle","normal","borderColor"];t.exports=function(t,e){var n=t.get("color");t.eachRawSeriesByType("boxplot",function(e){var r=n[e.seriesIndex%n.length],o=e.getData();o.setVisual({legendSymbol:"roundRect",color:e.get(i)||r}),t.isSeriesFiltered(e)||o.each(function(t){var e=o.getItemModel(t);o.setItemVisual(t,{color:e.get(i,!0)})})})}},function(t,e,i){var n=i(2);i(243),i(244),n.registerPreprocessor(i(247)),n.registerVisual(i(246)),n.registerLayout(i(245))},function(t,e,i){"use strict";var n=i(1),r=i(15),o=i(165),a=i(9),s=a.encodeHTML,l=a.addCommas,h=r.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],valueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},formatTooltip:function(t,e){var i=n.map(this.valueDimensions,function(e){return e+": "+l(this._data.get(e,t))},this);return s(this.name)+"
"+i.join("
")}});n.mixin(h,o.seriesModelMixin,!0),t.exports=h},function(t,e,i){"use strict";function n(t,e,i){var n=e.getItemModel(i),r=n.getModel(h),o=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor"),l=r.getItemStyle(["color","color0","borderColor","borderColor0"]),c=t.childAt(t.whiskerIndex);c.useStyle(l),c.style.stroke=s;var d=t.childAt(t.bodyIndex);d.useStyle(l),d.style.fill=o,d.style.stroke=s;var f=n.getModel(u).getItemStyle();a.setHoverStyle(t,f)}var r=i(1),o=i(27),a=i(3),s=i(165),l=o.extend({type:"candlestick",getStyleUpdater:function(){return n}});r.mixin(l,s.viewMixin,!0);var h=["itemStyle","normal"],u=["itemStyle","emphasis"];t.exports=l},function(t,e){function i(t,e){var i,a=t.getBaseAxis(),s="category"===a.type?a.getBandWidth():(i=a.getExtent(),Math.abs(i[1]-i[0])/e.count());return s/2-2>r?s/2-2:s-r>o?r:Math.max(s-o,n)}var n=2,r=5,o=4;t.exports=function(t){t.eachSeriesByType("candlestick",function(t){var e=t.coordinateSystem,n=t.getData(),r=t.dimensions,o=t.get("layout"),a=i(t,n);n.each(r,function(){function t(t){var i=[];return i[c]=h,i[d]=t,isNaN(h)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function i(t,e){var i=t.slice(),n=t.slice();i[c]+=a/2,n[c]-=a/2,e?M.push(i,n):M.push(n,i)}var s=arguments,l=r.length,h=s[0],u=s[l],c="horizontal"===o?0:1,d=1-c,f=s[1],p=s[2],g=s[3],m=s[4],v=Math.min(f,p),y=Math.max(f,p),x=t(v),_=t(y),b=t(g),w=t(m),S=[[w,_],[b,x]],M=[];i(_,0),i(x,1),n.setItemLayout(u,{chartLayout:o,sign:f>p?-1:p>f?1:0,initBaseline:f>p?_[d]:x[d],bodyEnds:M,whiskerEnds:S})},!0)})}},function(t,e){var i=["itemStyle","normal","borderColor"],n=["itemStyle","normal","borderColor0"],r=["itemStyle","normal","color"],o=["itemStyle","normal","color0"];t.exports=function(t,e){t.eachRawSeriesByType("candlestick",function(e){var a=e.getData();a.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||a.each(function(t){var e=a.getItemModel(t),s=a.getItemLayout(t).sign;a.setItemVisual(t,{color:e.get(s>0?r:o),borderColor:e.get(s>0?i:n)})})})}},function(t,e,i){var n=i(1);t.exports=function(t){t&&n.isArray(t.series)&&n.each(t.series,function(t){n.isObject(t)&&"k"===t.type&&(t.type="candlestick")})}},function(t,e,i){var n=i(1),r=i(2);i(249),i(250),r.registerVisual(n.curry(i(46),"effectScatter","circle",null)),r.registerLayout(n.curry(i(54),"effectScatter"))},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){var i=n(t.data,this,e);return i},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,symbolSize:10}})},function(t,e,i){var n=i(39),r=i(277);i(2).extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new n(r)},render:function(t,e,i){var n=t.getData(),r=this._symbolDraw;r.updateData(n),this.group.add(r.group)},updateLayout:function(){this._symbolDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)}})},function(t,e,i){var n=i(1),r=i(2);i(252),i(253),r.registerVisual(n.curry(i(70),"funnel")),r.registerLayout(i(254)),r.registerProcessor(n.curry(i(69),"funnel"))},function(t,e,i){"use strict";var n=i(13),r=i(8),o=i(31),a=i(2).extendSeriesModel({type:"series.funnel",init:function(t){a.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this._defaultLabelLine(t)},getInitialData:function(t,e){var i=o(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},_defaultLabelLine:function(t){r.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelLine:{normal:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},emphasis:{}},itemStyle:{normal:{borderColor:"#fff",borderWidth:1},emphasis:{}}}});t.exports=a},function(t,e,i){function n(t,e){function i(){a.ignore=a.hoverIgnore,s.ignore=s.hoverIgnore}function n(){a.ignore=a.normalIgnore,s.ignore=s.normalIgnore}o.Group.call(this);var r=new o.Polygon,a=new o.Polyline,s=new o.Text;this.add(r),this.add(a),this.add(s),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function r(t,e,i,n){var r=n.getModel("textStyle"),o=n.get("position"),s="inside"===o||"inner"===o||"center"===o;return{fill:r.getTextColor()||(s?"#fff":t.getItemVisual(e,"color")),textFont:r.getFont(),text:a.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var o=i(3),a=i(1),s=n.prototype,l=["itemStyle","normal","opacity"];s.updateData=function(t,e,i){var n=this.childAt(0),r=t.hostModel,s=t.getItemModel(e),h=t.getItemLayout(e),u=t.getItemModel(e).get(l);u=null==u?1:u,n.useStyle({}),i?(n.setShape({points:h.points}),n.setStyle({opacity:0}),o.initProps(n,{style:{opacity:u}},r,e)):o.updateProps(n,{style:{opacity:u},shape:{points:h.points}},r,e);var c=s.getModel("itemStyle"),d=t.getItemVisual(e,"color");n.setStyle(a.defaults({fill:d},c.getModel("normal").getItemStyle(["opacity"]))),n.hoverStyle=c.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),o.setHoverStyle(this)},s._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),h=l.label,u=t.getItemVisual(e,"color");o.updateProps(i,{shape:{points:h.linePoints||h.linePoints}},a,e),o.updateProps(n,{style:{x:h.x,y:h.y}},a,e),n.attr({style:{textAlign:h.textAlign,textVerticalAlign:h.verticalAlign,textFont:h.font},rotation:h.rotation,origin:[h.x,h.y],z2:10});var c=s.getModel("label.normal"),d=s.getModel("label.emphasis"),f=s.getModel("labelLine.normal"),p=s.getModel("labelLine.emphasis");n.setStyle(r(t,e,"normal",c)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:u}),i.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=r(t,e,"emphasis",d),i.hoverStyle=p.getModel("lineStyle").getLineStyle()},a.inherits(n,o.Group);var h=i(27).extend({type:"funnel",render:function(t,e,i){var r=t.getData(),o=this._data,a=this.group;r.diff(o).add(function(t){var e=new n(r,t);r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(r,t),a.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=r},remove:function(){this.group.removeAll(),this._data=null}});t.exports=h},function(t,e,i){function n(t,e){return a.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function r(t,e){for(var i=t.mapArray("value",function(t){return t}),n=[],r="ascending"===e,o=0,a=t.count();a>o;o++)n[o]=o;return n.sort(function(t,e){return r?i[t]-i[e]:i[e]-i[t]}),n}function o(t){t.each(function(e){var i,n,r,o,a=t.getItemModel(e),s=a.getModel("label.normal"),l=s.get("position"),h=a.getModel("labelLine.normal"),u=t.getItemLayout(e),c=u.points,d="inner"===l||"inside"===l||"center"===l;if(d)n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,r=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center",o=[[n,r],[n,r]];else{var f,p,g,m=h.get("length");"left"===l?(f=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,g=f-m,n=g-5,i="right"):(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left");var v=p;o=[[f,p],[g,v]],r=v}u.label={linePoints:o,x:n,y:r,verticalAlign:"middle",textAlign:i,inside:d}})}var a=i(14),s=i(4),l=s.parsePercent;t.exports=function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),a=t.get("sort"),h=n(t,e),u=r(i,a),c=[l(t.get("minSize"),h.width),l(t.get("maxSize"),h.width)],d=i.getDataExtent("value"),f=t.get("min"),p=t.get("max");null==f&&(f=Math.min(d[0],0)),null==p&&(p=d[1]);var g=t.get("funnelAlign"),m=t.get("gap"),v=(h.height-m*(i.count()-1))/i.count(),y=h.y,x=function(t,e){var n,r=i.get("value",t)||0,o=s.linearMap(r,[f,p],c,!0);switch(g){case"left":n=h.x;break;case"center":n=h.x+(h.width-o)/2;break;case"right":n=h.x+h.width-o}return[[n,e],[n+o,e]]};"ascending"===a&&(v=-v,m=-m,y+=h.height,u=u.reverse());for(var _=0;_=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=P;P++){var k=Math.cos(I),z=Math.sin(I);if(y.get("show")){var O=new a.Line({shape:{x1:k*g+f,y1:z*g+p,x2:k*(g-S)+f,y2:z*(g-S)+p},style:L,silent:!0});"auto"===L.stroke&&O.setStyle({stroke:n(P/b)}),d.add(O)}if(_.get("show")){var E=r(s.round(P/b*(v-m)+m),_.get("formatter")),R=new a.Text({style:{text:E,x:k*(g-S-5)+f,y:z*(g-S-5)+p,fill:D.getTextColor(),textFont:D.getFont(),textVerticalAlign:-.4>z?"top":z>.4?"bottom":"middle",textAlign:-.4>k?"left":k>.4?"right":"center"},silent:!0});"auto"===R.style.fill&&R.setStyle({fill:n(P/b)}),d.add(R)}if(x.get("show")&&P!==b){for(var V=0;w>=V;V++){var k=Math.cos(I),z=Math.sin(I),N=new a.Line({shape:{x1:k*g+f,y1:z*g+p,x2:k*(g-M)+f,y2:z*(g-M)+p},silent:!0,style:C});"auto"===C.stroke&&N.setStyle({stroke:n((P+V/w)/b)}),d.add(N),I+=T}I-=T}else I+=A}},_renderPointer:function(t,e,i,n,r,h,u,c){var d=[+t.get("min"),+t.get("max")],f=[h,u];c||(f=f.reverse());var p=t.getData(),g=this._data,m=this.group;p.diff(g).add(function(e){var i=new o({shape:{angle:h}});a.updateProps(i,{shape:{angle:s.linearMap(p.get("value",e),d,f,!0)}},t),m.add(i),p.setItemGraphicEl(e,i)}).update(function(e,i){var n=g.getItemGraphicEl(i);a.updateProps(n,{shape:{angle:s.linearMap(p.get("value",e),d,f,!0)}},t),m.add(n),p.setItemGraphicEl(e,n)}).remove(function(t){var e=g.getItemGraphicEl(t);m.remove(e)}).execute(),p.eachItemGraphicEl(function(t,e){var i=p.getItemModel(e),o=i.getModel("pointer");t.setShape({x:r.cx,y:r.cy,width:l(o.get("width"),r.r),r:l(o.get("length"),r.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n((p.get("value",e)-d[0])/(d[1]-d[0]))),a.setHoverStyle(t,i.getModel("itemStyle.emphasis").getItemStyle())}),this._data=p},_renderTitle:function(t,e,i,n,r){var o=t.getModel("title");if(o.get("show")){var s=o.getModel("textStyle"),h=o.get("offsetCenter"),u=r.cx+l(h[0],r.r),c=r.cy+l(h[1],r.r),d=new a.Text({style:{x:u,y:c,text:t.getData().getName(0),fill:s.getTextColor(),textFont:s.getFont(),textAlign:"center",textVerticalAlign:"middle"}});this.group.add(d)}},_renderDetail:function(t,e,i,n,o){var h=t.getModel("detail"),u=t.get("min"),c=t.get("max");if(h.get("show")){var d=h.getModel("textStyle"),f=h.get("offsetCenter"),p=o.cx+l(f[0],o.r),g=o.cy+l(f[1],o.r),m=l(h.get("width"),o.r),v=l(h.get("height"),o.r),y=t.getData().get("value",0),x=new a.Rect({shape:{x:p-m/2,y:g-v/2,width:m,height:v},style:{text:r(y,h.get("formatter")),fill:h.get("backgroundColor"),textFill:d.getTextColor(),textFont:d.getFont()}});"auto"===x.style.textFill&&x.setStyle("textFill",n(s.linearMap(y,[u,c],[0,1],!0))),x.setStyle(h.getItemStyle(["color"])),this.group.add(x)}}});t.exports=u},function(t,e,i){t.exports=i(6).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-i(a)*o*(o>=r/3?1:2),l=e.y-n(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(a)*o,e.y+n(a)*o),t.lineTo(e.x+i(e.angle)*r,e.y+n(e.angle)*r),t.lineTo(e.x-i(a)*o,e.y-n(a)*o),t.lineTo(s,l)}})},function(t,e,i){var n=i(2),r=i(1);i(260),i(261),i(270),n.registerProcessor(i(263)),n.registerVisual(r.curry(i(46),"graph","circle",null)),n.registerVisual(i(264)),n.registerVisual(i(267)),n.registerLayout(i(271)),n.registerLayout(i(265)),n.registerLayout(i(269)),n.registerCoordinateSystem("graphView",{create:i(266)})},function(t,e,i){"use strict";var n=i(13),r=i(1),o=i(8),a=i(12),s=i(222),l=i(2).extendSeriesModel({type:"series.graph",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){l.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){l.superApply(this,"mergeDefaultAndTheme",arguments),o.defaultEmphasis(t.edgeLabel,o.LABEL_OPTIONS)},getInitialData:function(t,e){function i(t,e){t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels,i=t.getShallow("category"),n=e[i];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t});var i=o.getModel("edgeLabel"),n=function(t,e){var r=(t||"").split(".");"label"===r[0]&&(e=e||i.getModel(r.slice(1)));var o=a.prototype.getModel.call(this,r,e);return o.getModel=n,o};e.wrapMethod("getItemModel",function(t){return t.getModel=n,t})}var n=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;return r&&n?s(r,n,this,!0,i).data:void 0},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),r=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),a=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),h=a+" > "+s;return r.value&&(h+=" : "+r.value),h}return l.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=r.map(this.option.categories||[],function(t){return null!=t.value?t:r.extend({value:0},t)}),e=new n(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,force:{initLayout:null,repulsion:50,gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}});t.exports=l},function(t,e,i){function n(t,e){return t.getVisual("opacity")||t.getModel().get(e)}var r=i(39),o=i(90),a=i(76),s=i(3),l=i(262),h=i(1),u=["itemStyle","normal","opacity"],c=["lineStyle","normal","opacity"];i(2).extendChartView({type:"graph",init:function(t,e){var i=new r,n=new o,s=this.group,l=new a(e.getZr(),s);s.add(i.group),s.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._controller=l,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var r=this._symbolDraw,o=this._lineDraw,a=this.group;if("view"===n.type){var h={position:n.position,scale:n.scale};this._firstRender?a.attr(h):s.updateProps(a,h,t)}l(t.getGraph(),this._getNodeGlobalScale(t));var u=t.getData();r.updateData(u);var c=t.getEdgeData();o.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,f=t.get("force.layoutAnimation");d&&this._startForceLayoutIteration(d,f),u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e);t.off("drag").off("dragend");var n=u.getItemModel(e).get("draggable");n&&t.on("drag",function(){d&&(d.warmUp(),!this._layouting&&this._startForceLayoutIteration(d,f),d.setFixed(e),u.setItemLayout(e,t.position))},this).on("dragend",function(){d&&d.setUnfixed(e)},this),t.setDraggable(n&&d),t.off("mouseover",this._focusNodeAdjacency),t.off("mouseout",this._unfocusAll),i.get("focusNodeAdjacency")&&(t.on("mouseover",this._focusNodeAdjacency,this),t.on("mouseout",this._unfocusAll,this))},this),this._firstRender=!1},_focusNodeAdjacency:function(t){function e(t,e){var i=n(t,e),r=t.getGraphicEl();null==i&&(i=1),r.traverse(function(t){t.trigger("normal"),"group"!==t.type&&t.setStyle("opacity",.1*i)})}function i(t,e){var i=n(t,e),r=t.getGraphicEl();r.traverse(function(t){t.trigger("emphasis"),"group"!==t.type&&t.setStyle("opacity",i)})}var r=this._model.getData(),o=r.graph,a=t.target,s=a.dataIndex,l=a.dataType;if(null!==s&&"edge"!==l){o.eachNode(function(t){e(t,u)}),o.eachEdge(function(t){e(t,c)});var d=o.getNodeByIndex(s);h.each(d.edges,function(t){t.dataIndex<0||(i(t,c),i(t.node1,u),i(t.node2,u))})}},_unfocusAll:function(){var t=this._model.getData(),e=t.graph;e.eachNode(function(t){var e=n(t,u);t.getGraphicEl().traverse(function(t){t.trigger("normal"),"group"!==t.type&&t.setStyle("opacity",e)})}),e.eachEdge(function(t){var e=n(t,c);t.getGraphicEl().traverse(function(t){t.trigger("normal"),"group"!==t.type&&t.setStyle("opacity",e)})})},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())})}()},_updateController:function(t,e){var i=this._controller,n=this.group;return i.rectProvider=function(){var t=n.getBoundingRect();return t.applyTransform(n.transform),t},"view"!==t.coordinateSystem.type?void i.disable():(i.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),void i.off("pan").off("zoom").on("pan",function(i,n){e.dispatchAction({seriesId:t.id,type:"graphRoam",dx:i,dy:n})}).on("zoom",function(i,n,r){e.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:i,originX:n,originY:r}),this._updateNodeAndLinkScale(),l(t.getGraph(),this._getNodeGlobalScale(t)),this._lineDraw.updateLayout()},this))},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,r=n&&n[0]||1,o=e.getZoom(),a=(o-1)*i+1;return a/r},updateLayout:function(t){l(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}})},function(t,e,i){function n(t,e,i){for(var n,r=t[0],o=t[1],d=t[2],f=1/0,p=i*i,g=.1,m=.1;.9>=m;m+=.1){a[0]=h(r[0],o[0],d[0],m),a[1]=h(r[1],o[1],d[1],m);var v=c(u(a,e)-p);f>v&&(f=v,n=m)}for(var y=0;32>y;y++){var x=n+g;s[0]=h(r[0],o[0],d[0],n),s[1]=h(r[1],o[1],d[1],n),l[0]=h(r[0],o[0],d[0],x),l[1]=h(r[1],o[1],d[1],x);var v=u(s,e)-p;if(c(v)<.01)break;var _=u(l,e)-p;g/=2,0>v?_>=0?n+=g:n-=g:_>=0?n-=g:n+=g}return n}var r=i(16),o=i(5),a=[],s=[],l=[],h=r.quadraticAt,u=o.distSquare,c=Math.abs;t.exports=function(t,e){var i=[],a=r.quadraticSubdivide,s=[[],[],[]],l=[[],[]],h=[];e/=2,t.eachEdge(function(t,r){var u=t.getLayout(),c=t.getVisual("fromSymbol"),d=t.getVisual("toSymbol");u.__original||(u.__original=[o.clone(u[0]),o.clone(u[1])],u[2]&&u.__original.push(o.clone(u[2])));var f=u.__original;if(null!=u[2]){if(o.copy(s[0],f[0]),o.copy(s[1],f[2]),o.copy(s[2],f[1]),c&&"none"!=c){var p=t.node1.getVisual("symbolSize");p instanceof Array&&(p=(p[0]+p[1])/2);var g=n(s,f[0],p*e);a(s[0][0],s[1][0],s[2][0],g,i),s[0][0]=i[3],s[1][0]=i[4],a(s[0][1],s[1][1],s[2][1],g,i),s[0][1]=i[3],s[1][1]=i[4]}if(d&&"none"!=d){var p=t.node1.getVisual("symbolSize");p instanceof Array&&(p=(p[0]+p[1])/2);var g=n(s,f[1],p*e);a(s[0][0],s[1][0],s[2][0],g,i),s[1][0]=i[1],s[2][0]=i[2],a(s[0][1],s[1][1],s[2][1],g,i),s[1][1]=i[1],s[2][1]=i[2]}o.copy(u[0],s[0]),o.copy(u[1],s[2]),o.copy(u[2],s[1])}else o.copy(l[0],f[0]),o.copy(l[1],f[1]),o.sub(h,l[1],l[0]),o.normalize(h,h),c&&"none"!=c&&o.scaleAndAdd(l[0],l[0],h,t.node1.getVisual("symbolSize")*e),d&&"none"!=d&&o.scaleAndAdd(l[1],l[1],h,-t.node2.getVisual("symbolSize")*e),o.copy(u[0],l[0]),o.copy(u[1],l[1])})}},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getGraph(),r=n.data,o=i.mapArray(i.getName);r.filterSelf(function(t){var i=r.getItemModel(t),n=i.getShallow("category");if(null!=n){"number"==typeof n&&(n=o[n]);for(var a=0;as;s++){var m=t[s];m.fixed||(n.sub(o,l,m.p),n.scaleAndAdd(m.p,m.p,o,h*d))}for(var s=0;a>s;s++)for(var c=t[s],v=s+1;a>v;v++){var f=t[v];n.sub(o,f.p,c.p);var p=n.len(o);0===p&&(n.set(o,Math.random()-.5,Math.random()-.5),p=1);var y=(c.rep+f.rep)/p/p;!c.fixed&&r(c.pp,c.pp,o,y),!f.fixed&&r(f.pp,f.pp,o,-y)}for(var x=[],s=0;a>s;s++){var m=t[s];m.fixed||(n.sub(x,m.p,m.pp),n.scaleAndAdd(m.p,m.p,x,d),n.copy(m.pp,m.p))}d=.992*d,i&&i(t,e,.01>d)}}}},function(t,e,i){var n=i(268),r=i(4),o=i(221),a=i(219),s=i(5);t.exports=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},l=t.getGraph(),h=l.data,u=l.edgeData,c=t.getModel("force"),d=c.get("initLayout");t.preservedPoints?h.each(function(t){var e=h.getId(t);h.setItemLayout(t,i[e]||[NaN,NaN])}):d&&"none"!==d?"circular"===d&&a(t):o(t);var f=h.getDataExtent("value"),p=c.get("repulsion"),g=c.get("edgeLength"),m=h.mapArray("value",function(t,e){var i=h.getItemLayout(e),n=r.linearMap(t,f,[0,p])||p/2;return{w:n,rep:n,p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),v=u.mapArray("value",function(t,e){var i=l.getEdgeByIndex(e);return{n1:m[i.node1.dataIndex],n2:m[i.node2.dataIndex],d:g,curveness:i.getModel().get("lineStyle.normal.curveness")||0}}),e=t.coordinateSystem,y=e.getBoundingRect(),x=n(m,v,{rect:y,gravity:c.get("gravity")}),_=x.step;x.step=function(t){for(var e=0,n=m.length;n>e;e++)m[e].fixed&&s.copy(m[e].p,l.getNodeByIndex(e).getLayout());_(function(e,n,r){for(var o=0,a=e.length;a>o;o++)e[o].fixed||l.getNodeByIndex(o).setLayout(e[o].p),i[h.getId(o)]=e[o].p;for(var o=0,a=n.length;a>o;o++){var u=n[o],c=l.getEdgeByIndex(o),d=u.n1.p,f=u.n2.p,p=c.getLayout();p=p?p.slice():[],p[0]=p[0]||[],p[1]=p[1]||[],s.copy(p[0],d),s.copy(p[1],f),u.curveness>0&&(p[2]=[(d[0]+f[0])/2-(d[1]-f[1])*u.curveness,(d[1]+f[1])/2-(f[0]-d[0])*u.curveness]),c.setLayout(p)}t&&t(r)})},t.forceLayout=x,t.preservedPoints=i,x.step()}else t.forceLayout=null})}},function(t,e,i){var n=i(2),r=i(218),o={type:"graphRoam",event:"graphRoam",update:"none"};n.registerAction(o,function(t,e){e.eachComponent({mainType:"series",query:t},function(e){var i=e.coordinateSystem,n=r.updateCenterAndZoom(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})})},function(t,e,i){var n=i(221),r=i(220);t.exports=function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var o=t.getData();o.each(i.dimensions,function(t,e,n){isNaN(t)||isNaN(e)?o.setItemLayout(n,[NaN,NaN]):o.setItemLayout(n,i.dataToPoint([t,e]))}),r(o.graph)}else e&&"none"!==e||n(t)})}},function(t,e,i){i(274),i(275)},function(t,e,i){function n(){var t=o.createCanvas();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}var r=256,o=i(1);n.prototype={update:function(t,e,i,n,o,a){var s=this._getBrush(),l=this._getGradient(t,o,"inRange"),h=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),f=t.length;c.width=e,c.height=i;for(var p=0;f>p;++p){var g=t[p],m=g[0],v=g[1],y=g[2],x=n(y);d.globalAlpha=x,d.drawImage(s,m-u,v-u)}for(var _=d.getImageData(0,0,c.width,c.height),b=_.data,w=0,S=b.length,M=this.minOpacity,I=this.maxOpacity,A=I-M;S>w;){var x=b[w+3]/256,T=4*Math.floor(x*(r-1));if(x>0){var L=a(x)?l:h;x>0&&(x=x*A+M),b[w++]=L[T],b[w++]=L[T+1],b[w++]=L[T+2],b[w++]=L[T+3]*x*256}else w+=4}return d.putImageData(_,0,0),c},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=o.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,r=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[],a=0,s=0;256>s;s++)e[i](s/255,!0,o),r[a++]=o[0],r[a++]=o[1],r[a++]=o[2],r[a++]=o[3];return r}},t.exports=n},function(t,e,i){var n=i(15),r=i(35);t.exports=n.extend({type:"series.heatmap",getInitialData:function(t,e){return r(t.data,this,e)},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,xAxisIndex:0,yAxisIndex:0,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}})},function(t,e,i){function n(t,e,i){var n=t[1]-t[0];e=l.map(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}});var r=e.length,o=0;return function(t){for(var n=o;r>n;n++){var a=e[n].interval;if(a[0]<=t&&t<=a[1]){o=n;break}}if(n===r)for(var n=o-1;n>=0;n--){var a=e[n].interval;if(a[0]<=t&&t<=a[1]){o=n;break; -}}return n>=0&&r>n&&i[n]}}function r(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function o(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var a=i(3),s=i(273),l=i(1);t.exports=i(2).extendChartView({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type?this._renderOnCartesian(r,t,i):o(r)&&this._renderOnGeo(r,t,n,i)},_renderOnCartesian:function(t,e,i){var n=t.getAxis("x"),r=t.getAxis("y"),o=this.group,s=n.getBandWidth(),h=r.getBandWidth(),u=e.getData(),c="itemStyle.normal",d="itemStyle.emphasis",f="label.normal",p="label.emphasis",g=e.getModel(c).getItemStyle(["color"]),m=e.getModel(d).getItemStyle(),v=e.getModel("label.normal"),y=e.getModel("label.emphasis");u.each(["x","y","z"],function(i,n,r,x){var _=u.getItemModel(x),b=t.dataToPoint([i,n]);if(!isNaN(r)){var w=new a.Rect({shape:{x:b[0]-s/2,y:b[1]-h/2,width:s,height:h},style:{fill:u.getItemVisual(x,"color"),opacity:u.getItemVisual(x,"opacity")}});u.hasItemOption&&(g=_.getModel(c).getItemStyle(["color"]),m=_.getModel(d).getItemStyle(),v=_.getModel(f),y=_.getModel(p));var S=e.getRawValue(x),M="-";S&&null!=S[2]&&(M=S[2]),v.getShallow("show")&&(a.setText(g,v),g.text=e.getFormattedLabel(x,"normal")||M),y.getShallow("show")&&(a.setText(m,y),m.text=e.getFormattedLabel(x,"emphasis")||M),w.setStyle(g),a.setHoverStyle(w,u.hasItemOption?m:l.extend({},m)),o.add(w),u.setItemGraphicEl(x,w)}})},_renderOnGeo:function(t,e,i,o){var l=i.targetVisuals.inRange,h=i.targetVisuals.outOfRange,u=e.getData(),c=this._hmLayer||this._hmLayer||new s;c.blurSize=e.get("blurSize"),c.pointSize=e.get("pointSize"),c.minOpacity=e.get("minOpacity"),c.maxOpacity=e.get("maxOpacity");var d=t.getViewRect().clone(),f=t.getRoamTransform().transform;d.applyTransform(f);var p=Math.max(d.x,0),g=Math.max(d.y,0),m=Math.min(d.width+d.x,o.getWidth()),v=Math.min(d.height+d.y,o.getHeight()),y=m-p,x=v-g,_=u.mapArray(["lng","lat","value"],function(e,i,n){var r=t.dataToPoint([e,i]);return r[0]-=p,r[1]-=g,r.push(n),r}),b=i.getExtent(),w="visualMap.continuous"===i.type?r(b,i.option.range):n(b,i.getPieceList(),i.option.selected);c.update(_,y,x,l.color.getNormalizer(),{inRange:l.color.getColorMapper(),outOfRange:h.color.getColorMapper()},w);var S=new a.Image({style:{width:y,height:x,x:p,y:g,image:c.canvas},silent:!0});this.group.add(S)}})},function(t,e,i){function n(t,e){a.Group.call(this);var i=new s(t,e);this.add(i),this._updateEffectSymbol(t,e)}function r(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}function o(){var t=this.__p1,e=this.__p2,i=this.__cp1,n=this.__t,r=this.position,o=u.quadraticAt,a=u.quadraticDerivativeAt;r[0]=o(t[0],i[0],e[0],n),r[1]=o(t[1],i[1],e[1],n);var s=a(t[0],i[0],e[0],n),l=a(t[1],i[1],e[1],n);this.rotation=-Math.atan2(l,s)-Math.PI/2,this.ignore=!1}var a=i(3),s=i(89),l=i(1),h=i(26),u=i(16),c=n.prototype;c._updateEffectSymbol=function(t,e){var i=t.getItemModel(e),n=i.getModel("effect"),a=n.get("symbolSize"),s=n.get("symbol");l.isArray(a)||(a=[a,a]);var u=n.get("color")||t.getItemVisual(e,"color"),c=this.childAt(1),d=1e3*n.get("period"),f=n.get("loop");if(this._symbolType!==s||d!==this._period||f!==this._loop){c=h.createSymbol(s,-.5,-.5,1,1,u),c.ignore=!0,c.z2=100,this._symbolType=s,this._period=d,this._loop=f,this.add(c),c.__t=0;var p=c.animate("",f).when(d,{__t:1}).delay(e/t.count()*d/2).during(l.bind(o,c));if(!f){var g=this;p.done(function(){g.remove(c)})}p.start()}c.setStyle("shadowColor",u),c.setStyle(n.getItemStyle(["color"])),c.attr("scale",a);var m=t.getItemLayout(e);r(c,m),c.setColor(u),c.attr("scale",a)},c.updateData=function(t,e){this.childAt(0).updateData(t,e),this._updateEffectSymbol(t,e)},c.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=this.childAt(1);if(i){var n=t.getItemLayout(e);r(i,n)}},l.inherits(n,a.Group),t.exports=n},function(t,e,i){function n(t){return a.isArray(t)||(t=[+t,+t]),t}function r(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function o(t,e){c.call(this);var i=new u(t,e),n=new c;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var a=i(1),s=i(26),l=i(3),h=i(4),u=i(49),c=l.Group,d=3,f=o.prototype;f.stopEffectAnimation=function(){this.childAt(1).removeAll()},f.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;d>o;o++){var a=s.createSymbol(e,-.5,-.5,1,1,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[1,1]});var l=-o/d*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale,t.rippleScale]}).delay(l).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(l).start(),n.add(a)}r(n,t)},f.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;n>o;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}r(i,t)},f.highlight=function(){this.trigger("emphasis")},f.downplay=function(){this.trigger("normal")},f.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var r=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=n(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"color");r.attr("scale",s),r.traverse(function(t){t.attr({fill:l})});var u=o.getShallow("symbolOffset");if(u){var c=r.position;c[0]=h.parsePercent(u[0],s[0]),c[1]=h.parsePercent(u[1],s[1])}r.rotation=(o.getShallow("symbolRotate")||0)*Math.PI/180||0;var d={};if(d.showEffectOn=i.get("showEffectOn"),d.rippleScale=o.get("rippleEffect.scale"),d.brushType=o.get("rippleEffect.brushType"),d.period=1e3*o.get("rippleEffect.period"),d.effectOffset=e/t.count(),d.z=o.getShallow("z")||0,d.zlevel=o.getShallow("zlevel")||0,d.symbolType=a,d.color=l,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===d.showEffectOn)this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d;else{this._effectCfg=null,this.stopEffectAnimation();var f=this.childAt(0),p=function(){f.trigger("emphasis"),"render"!==d.showEffectOn&&this.startEffectAnimation(d)},g=function(){f.trigger("normal"),"render"!==d.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",p,this).on("mouseout",g,this).on("emphasis",p,this).on("normal",g,this)}this._effectCfg=d},f.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},a.inherits(o,c),t.exports=o},function(t,e,i){function n(t,e,i,n){l.Group.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}function r(t,e,i){return s.map(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function o(t){var e={};return s.each(t,function(t,i){e["ends"+i]=t}),e}function a(t){this.group=new l.Group,this.styleUpdater=t}var s=i(1),l=i(3),h=i(6),u=h.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}}),c=n.prototype;c._createContent=function(t,e,i){var n=t.getItemLayout(e),a="horizontal"===n.chartLayout?1:0,h=0;this.add(new l.Polygon({shape:{points:i?r(n.bodyEnds,a,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=h++;var c=s.map(n.whiskerEnds,function(t){return i?r(t,a,n):t});this.add(new u({shape:o(c),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=h++},c.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,r=t.getItemLayout(e),a=l[i?"initProps":"updateProps"];a(this.childAt(this.bodyIndex),{shape:{points:r.bodyEnds}},n,e),a(this.childAt(this.whiskerIndex),{shape:o(r.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},s.inherits(n,l.Group);var d=a.prototype;d.updateData=function(t){var e=this.group,i=this._data,r=this.styleUpdater;t.diff(i).add(function(i){if(t.hasValue(i)){var o=new n(t,i,r,!0);t.setItemGraphicEl(i,o),e.add(o)}}).update(function(o,a){var s=i.getItemGraphicEl(a);return t.hasValue(o)?(s?s.updateData(t,o):s=new n(t,o,r),e.add(s),void t.setItemGraphicEl(o,s)):void e.remove(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)}).execute(),this._data=t},d.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.exports=a},function(t,e,i){i(280),i(281);var n=i(1),r=i(2);r.registerLayout(i(282)),r.registerVisual(n.curry(i(80),"lines","lineStyle"))},function(t,e,i){"use strict";var n=i(15),r=i(13),o=i(1),a=i(24);t.exports=n.extend({type:"series.lines",dependencies:["grid","polar"],getInitialData:function(t,e){function i(t,e,i,n){return t.coord&&t.coord[n]}var n=[],s=[],l=[];o.each(t.data,function(t){n.push(t[0]),s.push(t[1]),l.push(o.extend(o.extend({},o.isArray(t[0])?null:t[0]),o.isArray(t[1])?null:t[1]))});var h=a.get(t.coordinateSystem),u=h.dimensions,c=new r(u,this),d=new r(u,this),f=new r(["value"],this);return c.initData(n,null,i),d.initData(s,null,i),f.initData(l),this.fromData=c,this.toData=d,f},formatTooltip:function(t){var e=this.fromData.getName(t),i=this.toData.getName(t);return e+" > "+i},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,geoIndex:0,effect:{show:!1,period:4,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,label:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}})},function(t,e,i){var n=i(90),r=i(276),o=i(89);i(2).extendChartView({type:"lines",init:function(){},render:function(t,e,i){var a=t.getData(),s=this._lineDraw,l=t.get("effect.show");l!==this._hasEffet&&(s&&s.remove(),s=this._lineDraw=new n(l?r:o),this._hasEffet=l);var h=t.get("zlevel"),u=t.get("effect.trailLength"),c=i.getZr();if(c.painter.getLayer(h).clear(!0),null!=this._lastZlevel&&c.configLayer(this._lastZlevel,{motionBlur:!1}),l&&u){c.configLayer(h,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(u/10+.9,1),0)})}this.group.add(s.group),s.updateData(a),this._lastZlevel=h},updateLayout:function(t,e,i){this._lineDraw.updateLayout();var n=i.getZr();n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0)}})},function(t,e){t.exports=function(t){t.eachSeriesByType("lines",function(t){var e=t.coordinateSystem,i=t.fromData,n=t.toData,r=t.getData(),o=e.dimensions;i.each(o,function(t,n,r){i.setItemLayout(r,e.dataToPoint([t,n]))}),n.each(o,function(t,i,r){n.setItemLayout(r,e.dataToPoint([t,i]))}),r.each(function(t){var e,o=i.getItemLayout(t),a=n.getItemLayout(t),s=r.getItemModel(t).get("lineStyle.normal.curveness");s>0&&(e=[(o[0]+a[0])/2-(o[1]-a[1])*s,(o[1]+a[1])/2-(a[0]-o[0])*s]),r.setItemLayout(t,[o,a,e])})})}},function(t,e,i){var n=i(2),r=n.PRIORITY;i(284),i(285),i(217),i(168),n.registerLayout(i(288)),n.registerVisual(i(289)),n.registerProcessor(r.PROCESSOR.STATISTIC,i(287)),n.registerPreprocessor(i(286)),i(75)("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}])},function(t,e,i){var n=i(13),r=i(15),o=i(1),a=i(31),s=i(9),l=s.encodeHTML,h=s.addCommas,u=i(64),c=i(168),d=r.extend({type:"series.map",needsDrawMap:!1,seriesGroup:[],init:function(t){t=this._fillOption(t,t.map),this.option=t,d.superApply(this,"init",arguments),this.updateSelectedMap(t.data)},getInitialData:function(t){var e=a(["value"],t.data||[]),i=new n(e,this);return i.initData(t.data),i},mergeOption:function(t){t.data&&(t=this._fillOption(t,this.option.map)),d.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},_fillOption:function(t,e){return t=o.extend({},t),t.data=c.getFilledRegions(t.data,e),t},getRawValue:function(t){return this._data.get("value",t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this._data,i=h(this.getRawValue(t)),n=e.getName(t),r=this.seriesGroup,o=[],a=0;a"+n+" : "+i},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"china",left:"center",top:"center",showLegendSymbol:!0,dataRangeHoverLink:!0,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,textStyle:{color:"#000"}},emphasis:{show:!0,textStyle:{color:"rgb(100,0,0)"}}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215, 0, 0.8)"}}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});o.mixin(d,u),t.exports=d},function(t,e,i){var n=i(3),r=i(223);i(2).extendChartView({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),n&&"geoRoam"===n.type&&"series"===n.component&&n.name===t.name){var a=this._mapDraw;a&&o.add(a.group)}else if(t.needsDrawMap){var a=this._mapDraw||new r(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},_renderSymbols:function(t,e,i){var r=t.originalData,o=this.group;r.each("value",function(e,i){if(!isNaN(e)){var a=r.getItemLayout(i);if(a&&a.point){var s=a.point,l=a.offset,h=new n.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:10});if(!l){var u=t.mainSeries.getData(),c=r.getName(i),d=c,f=u.indexOfName(c),p=r.getItemModel(i),g=p.getModel("label.normal"),m=p.getModel("label.emphasis"),v=g.getModel("textStyle"),y=m.getModel("textStyle"),x=u.getItemGraphicEl(f);h.setStyle({textPosition:"bottom"});var _=function(){h.setStyle({text:m.get("show")?d:"",textFill:y.getTextColor(),textFont:y.getFont()})},b=function(){h.setStyle({text:g.get("show")?d:"",textFill:v.getTextColor(),textFont:v.getFont()})};x.on("mouseover",_).on("mouseout",b).on("emphasis",_).on("normal",b),b()}o.add(h)}}})}})},function(t,e,i){var n=i(1);t.exports=function(t){var e=[];n.each(t.series,function(t){"map"===t.type&&e.push(t)}),n.each(e,function(t){t.map=t.map||t.mapType,n.defaults(t,t.mapLocation)})}},function(t,e,i){function n(t,e){for(var i={},n=["value"],r=0;ru;u++)s=Math.min(s,i[o][u]),l=Math.max(l,i[o][u]),a+=i[o][u];var c;return c="min"===e?s:"max"===e?l:"average"===e?a/h:a,0===h?NaN:c})}var r=i(1);t.exports=function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.get("map");e[i]=e[i]||[],e[i].push(t)}),r.each(e,function(t,e){for(var i=n(r.map(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),o=0;o=0?e:NaN}})}function r(t){return+t.replace("dim","")}function o(t,e){var i=0;s.each(t,function(t){var e=r(t);e>i&&(i=e)});var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var o=[],a=0;i>=a;a++)o.push("dim"+a);return o}var a=i(13),s=i(1),l=i(15),h=i(31);t.exports=l.extend({type:"series.parallel",dependencies:["parallel"],getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),r=i.parallelAxisIndex,l=t.data,u=i.dimensions,c=o(u,l),d=s.map(c,function(t,i){var o=s.indexOf(t,u),a=o>=0&&e.getComponent("parallelAxis",r[o]);return a&&"category"===a.get("type")?(n(a,t,l),{name:t,type:"ordinal"}):0>o&&h.guessOrdinal(l,i)?{name:t,type:"ordinal"}:t}),f=new a(d,this);return f.initData(l),this.option.progressive&&(this.option.animation=!1),f},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,r){t===e&&n.push(i.getRawIndex(r))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:2,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}})},function(t,e,i){function n(t,e,i){var n=t.model,r=t.getRect(),o=new l.Rect({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),a="horizontal"===n.get("layout")?"width":"height";return o.setShape(a,0),l.initProps(o,{shape:{width:r.width,height:r.height}},e,i),o}function r(t,e,i,n){for(var r=[],o=0;o"+a.map(n,function(t,i){return t.name+" : "+e[i]}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}});t.exports=s},function(t,e,i){function n(t){return o.isArray(t)||(t=[+t,+t]),t}var r=i(3),o=i(1),a=i(26);t.exports=i(2).extendChartView({type:"radar",render:function(t,e,i){function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",r=t.getItemVisual(e,"color");if("none"!==i){var o=a.createSymbol(i,-.5,-.5,1,1,r);return o.attr({style:{strokeNoScale:!0},z2:100,scale:n(t.getItemVisual(e,"symbolSize"))}),o}}function l(e,i,n,o,a,l){n.removeAll();for(var h=0;hh;h++){var c=n[h];c.setLayout({x:o},!0),c.setLayout({dx:e},!0);for(var d=0,f=c.outEdges.length;f>d;d++)r.push(c.outEdges[d].node2)}n=r,++o}s(t,o),a=(i-e)/(o-1),l(t,a)}function s(t,e){A.each(t,function(t){t.outEdges.length||t.setLayout({x:e-1},!0)})}function l(t,e){A.each(t,function(t){var i=t.getLayout().x*e;t.setLayout({x:i},!0)})}function h(t,e,i,n,r){var o=I().key(function(t){return t.getLayout().x}).sortKeys(w).entries(t).map(function(t){return t.values});u(t,o,e,i,n),c(o,n,i);for(var a=1;r>0;r--)a*=.99,d(o,a),c(o,n,i),p(o,a),c(o,n,i)}function u(t,e,i,n,r){var o=[];A.each(e,function(t){var e=t.length,i=0;A.each(t,function(t){i+=t.getLayout().value});var a=(n-(e-1)*r)/i;o.push(a)}),o.sort(function(t,e){return t-e});var a=o[0];A.each(e,function(t){A.each(t,function(t,e){t.setLayout({y:e},!0);var i=t.getLayout().value*a;t.setLayout({dy:i},!0)})}),A.each(i,function(t){var e=+t.getValue()*a;t.setLayout({dy:e},!0)})}function c(t,e,i){A.each(t,function(t){var n,r,o,a=0,s=t.length;for(t.sort(b),o=0;s>o;o++){if(n=t[o],r=a-n.getLayout().y,r>0){var l=n.getLayout().y+r;n.setLayout({y:l},!0)}a=n.getLayout().y+n.getLayout().dy+e}if(r=a-e-i,r>0){var l=n.getLayout().y-r;for(n.setLayout({y:l},!0),a=n.getLayout().y,o=s-2;o>=0;--o)n=t[o],r=n.getLayout().y+n.getLayout().dy+e-a,r>0&&(l=n.getLayout().y-r,n.setLayout({y:l},!0)),a=n.getLayout().y}})}function d(t,e){A.each(t.slice().reverse(),function(t){A.each(t,function(t){if(t.outEdges.length){var i=x(t.outEdges,f)/x(t.outEdges,S),n=t.getLayout().y+(i-_(t))*e;t.setLayout({y:n},!0)}})})}function f(t){return _(t.node2)*t.getValue()}function p(t,e){A.each(t,function(t){A.each(t,function(t){if(t.inEdges.length){var i=x(t.inEdges,g)/x(t.inEdges,S),n=t.getLayout().y+(i-_(t))*e;t.setLayout({y:n},!0)}})})}function g(t){return _(t.node1)*t.getValue()}function m(t){A.each(t,function(t){t.outEdges.sort(v),t.inEdges.sort(y)}),A.each(t,function(t){var e=0,i=0;A.each(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),A.each(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function v(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function y(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function x(t,e){var i,n=0,r=t.length,o=-1;if(1===arguments.length)for(;++ot?-1:t>e?1:t==e?0:NaN}function S(t){return t.getValue()}var M=i(14),I=i(361),A=i(1);t.exports=function(t,e,i){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),a=t.get("nodeGap"),s=n(t,e);t.layoutInfo=s;var l=s.width,h=s.height,u=t.getGraph(),c=u.nodes,d=u.edges;o(c);var f=c.filter(function(t){return 0===t.getLayout().value}),p=0!==f.length?0:t.get("layoutIterations");r(c,d,i,a,l,h,p)})}},function(t,e,i){var n=i(79);t.exports=function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),i=e.nodes;i.sort(function(t,e){return t.getLayout().value-e.getLayout().value});var r=i[0].getLayout().value,o=i[i.length-1].getLayout().value;i.forEach(function(e){var i=new n({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:t.get("color")}),a=i.mapValueToVisual(e.getLayout().value);e.setVisual("color",a);var s=e.getModel(),l=s.get("itemStyle.normal.color");null!=l&&e.setVisual("color",l)})})}},function(t,e,i){var n=i(2);i(306),i(307),i(308),n.registerVisual(i(310)),n.registerLayout(i(309))},function(t,e,i){function n(t,e){this.group=new o.Group,t.add(this.group),this._onSelect=e||s.noop}function r(t,e,i,n,r,o){var a=[[r?t:t-u,e],[t+i,e],[t+i,e+n],[r?t:t-u,e+n]];return!o&&a.splice(2,0,[t+i+u,e+n/2]),!r&&a.push([t,e+n/2]),a}var o=i(3),a=i(14),s=i(1),l=8,h=8,u=5;n.prototype={constructor:n,render:function(t,e,i){var n=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),n.get("show")&&i){var o=n.getModel("itemStyle.normal"),s=o.getModel("textStyle"),l={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:e.getWidth(),height:e.getHeight() -},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,i,l,s),this._renderContent(n,i,l,o,s),a.positionGroup(r,l.pos,l.box)}},_prepare:function(t,e,i,n){for(var r=e;r;r=r.parentNode){var o=r.getModel().get("name"),a=n.getTextRect(o),s=Math.max(a.width+2*l,i.emptyItemWidth);i.totalWidth+=s+h,i.renderList.push({node:r,text:o,width:s})}},_renderContent:function(t,e,i,n,l){for(var u=0,c=i.emptyItemWidth,d=t.get("height"),f=a.getAvailableSize(i.pos,i.box),p=i.totalWidth,g=i.renderList,m=g.length-1;m>=0;m--){var v=g[m],y=v.width,x=v.text;p>f.width&&(p-=y-c,y=c,x=""),this.group.add(new o.Polygon({shape:{points:r(u,0,y,d,m===g.length-1,0===m)},style:s.defaults(n.getItemStyle(),{lineJoin:"bevel",text:x,textFill:l.getTextColor(),textFont:l.getFont()}),z:10,onclick:s.bind(this._onSelect,this,v.node)})),u+=y+h}},remove:function(){this.group.removeAll()}},t.exports=n},function(t,e,i){function n(t,e){var i=0;s.each(t.children,function(t){n(t,e);var r=t.value;s.isArray(r)&&(r=r[0]),i+=r});var r=t.value;e>=0&&(s.isArray(r)?r=r[0]:t.value=new Array(e)),(null==r||isNaN(r))&&(r=i),0>r&&(r=0),e>=0?t.value[0]=r:t.value=r}function r(t,e){var i=e.get("color");if(i){t=t||[];var n;if(s.each(t,function(t){var e=new l(t),i=e.get("color");(e.get("itemStyle.normal.color")||i&&"none"!==i)&&(n=!0)}),!n){var r=t[0]||(t[0]={});r.color=i.slice()}return t}}var o=i(15),a=i(359),s=i(1),l=i(12),h=i(9),u=h.encodeHTML,c=h.addCommas;t.exports=o.extend({type:"series.treemap",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",visualDimension:0,zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{normal:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}}},label:{normal:{show:!0,position:"inside",textStyle:{color:"#fff",ellipsis:!0}}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},color:"none",colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i=t.data||[],o=t.name;null==o&&(o=t.name);var l={name:o,children:t.data},h=(i[0]||{}).value;n(l,s.isArray(h)?h.length:-1);var u=t.levels||[];return u=t.levels=r(u,e),a.createTree(l,this,u).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=c(s.isArray(i)?i[0]:i),r=e.getName(t);return u(r)+": "+n},getDataParams:function(t){for(var e=o.prototype.getDataParams.apply(this,arguments),i=this.getData(),n=i.tree.getNodeByDataIndex(t),r=e.treePathInfo=[];n;){var a=n.dataIndex;r.push({name:n.name,dataIndex:a,value:this.getRawValue(a)}),n=n.parentNode}return r.reverse(),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},s.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap={},this._idIndexMapCount=0);var i=e[t];return null==i&&(e[t]=i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}})},function(t,e,i){function n(){return{nodeGroup:[],background:[],content:[]}}function r(t,e,i,n,r,l,h,u,c,d){function f(e){E.dataIndex=h.dataIndex,E.seriesIndex=t.seriesIndex;var i=A.borderWidth,n=Math.max(T-2*i,0),r=Math.max(L-2*i,0);E.culling=!0,E.setShape({x:i,y:i,width:n,height:r});var o=h.getVisual("color",!0);p(E,function(){var t={fill:o},e=h.getModel("itemStyle.emphasis").getItemStyle();g(t,e,o,n,r),E.setStyle(t),s.setHoverStyle(E,e)}),e.add(E)}function p(t,e){C?!t.invisible&&l.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function g(e,i,n,r,o){var a=h.getModel(),s=a.get("name");if(A.isLeafRoot){var l=t.get("drillDownIcon",!0);s=l?l+" "+s:test}y(s,e,a,_,n,r,o),y(s,i,a,b,n,r,o)}function y(t,e,i,n,r,o,a){var l=i.getModel(n),h=l.getModel("textStyle");s.setText(e,l,r),e.textAlign=h.get("align"),e.textVerticalAlign=h.get("baseline");var u=h.getTextRect(t);!l.getShallow("show")||u.height>a?e.text="":u.width>o?e.text=h.get("ellipsis")?h.ellipsis(t,o):"":e.text=t}function x(t,n,a,s){var l=null!=P&&i[t][P],h=r[t];return l?(i[t][P]=null,w(h,l,t)):C||(l=new n({z:o(a,s)}),l.__tmDepth=a,l.__tmStorageName=t,I(h,l,t)),e[t][D]=l}function w(t,e,i){var n=t[D]={};n.old="nodeGroup"===i?e.position.slice():a.extend({},e.shape)}function I(t,e,i){var o=t[D]={},a=h.parentNode;if(a&&(!n||"drillDown"===n.direction)){var s=0,l=0,u=r.background[a.getRawIndex()];!n&&u&&u.old&&(s=u.old.width,l=u.old.height),o.old="nodeGroup"===i?[0,l]:{x:s,y:l,width:0,height:0}}o.fadein="nodeGroup"!==i}if(h){var A=h.getLayout();if(A&&A.isInView){var T=A.width,L=A.height,C=A.invisible,D=h.getRawIndex(),P=u&&u.getRawIndex(),k=x("nodeGroup",m);if(k){if(c.add(k),k.attr("position",[A.x||0,A.y||0]),k.__tmNodeWidth=T,k.__tmNodeHeight=L,A.isAboveViewRoot)return k;var z=x("background",v,d,S);z&&(z.setShape({x:0,y:0,width:T,height:L}),p(z,function(){z.setStyle("fill",h.getVisual("borderColor",!0))}),k.add(z));var O=h.viewChildren;if(!O||!O.length){var E=x("content",v,d,M);E&&f(k)}return k}}}}function o(t,e){var i=t*w+e;return(i-1)/i}var a=i(1),s=i(3),l=i(45),h=i(166),u=i(305),c=i(76),d=i(7),f=i(19),p=i(360),g=a.bind,m=s.Group,v=s.Rect,y=a.each,x=3,_=["label","normal"],b=["label","emphasis"],w=10,S=1,M=2;t.exports=i(2).extendChartView({type:"treemap",init:function(t,e){this._containerGroup,this._storage=n(),this._oldTree,this._breadcrumb,this._controller,this._state="ready",this._mayClick},render:function(t,e,i,n){var r=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(a.indexOf(r,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=h.retrieveTargetInfo(n,t),s=n&&n.type,l=t.layoutInfo,u=!this._oldTree,c=this._storage,d="treemapRootToNode"===s&&o&&c?{rootNodeGroup:c.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);u||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new m,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function o(t,e,i,n,r){function s(t){return t.getId()}function h(a,s){var l=null!=a?t[a]:null,h=null!=s?e[s]:null,u=m(l,h,i,r);u&&o(l&&l.viewChildren||[],h&&h.viewChildren||[],u,n,r+1)}n?(e=t,y(t,function(t,e){!t.isRemoved()&&h(e,e)})):new l(e,t,s,s).add(h).update(h).remove(a.curry(h,null)).execute()}function s(t){var e=n();return t&&y(t,function(t,i){var n=e[i];y(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function h(){y(v,function(t){y(t,function(t){t.parent&&t.parent.remove(t)})}),y(g,function(t){t.invisible=!0,t.dirty()})}var u=e.getData().tree,c=this._oldTree,d=n(),f=n(),p=this._storage,g=[],m=a.curry(r,e,f,p,i,d,g);o(u.root?[u.root]:[],c&&c.root?[c.root]:[],t,u===c||!c,0);var v=s(p);return this._oldTree=u,this._storage=f,{lastsForAnimation:d,willDeleteEls:v,renderFinally:h}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var r=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=p.createWrap();y(e.willDeleteEls,function(t,e){y(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var h=0,u=0;l.__tmWillDelete||(h=l.__tmNodeWidth/2,u=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[h,u],style:{opacity:0}}:{shape:{x:h,y:u,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,r,o)}})}),y(this._storage,function(t,i){y(t,function(t,n){var l=e.lastsForAnimation[i][n],h={};l&&("nodeGroup"===i?l.old&&(h.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(h.shape=a.extend({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),h.style={opacity:1}):1!==t.style.opacity&&(h.style={opacity:1})),s.add(t,h,r,o))})},this),this._state="animating",s.done(g(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new c(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",g(this._onPan,this)),e.on("zoom",g(this._onZoom,this)));var i=new d(0,0,t.getWidth(),t.getHeight());e.rectProvider=function(){return i}},_clearController:function(){var t=this._controller;t&&(t.off("pan").off("zoom"),t=null)},_onPan:function(t,e){if(this._mayClick=!1,"animating"!==this._state&&(Math.abs(t)>x||Math.abs(e)>x)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onZoom:function(t,e,i){if(this._mayClick=!1,"animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var r=n.getLayout();if(!r)return;var o=new d(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,i-=a.y;var s=f.create();f.translate(s,s,[-e,-i]),f.scale(s,s,[t,t]),f.translate(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){function e(t){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var r=n.hostTree.data.getItemModel(n.dataIndex),o=r.get("link",!0),a=r.get("target",!0)||"blank";o&&window.open(o,a)}}}}t.on("mousedown",function(t){"ready"===this._state&&(this._mayClick=!0)},this),t.on("mouseup",function(t){this._mayClick&&(this._mayClick=!1,"ready"===this._state&&e.call(this,t))},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(h.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new u(this.group,g(n,this)))).render(t,e,i.node)},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=n(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var r=this._storage.background[n.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}},this),i}})},function(t,e,i){for(var n=i(2),r=i(166),o=function(){},a=["treemapZoomToNode","treemapRender","treemapMove"],s=0;sM;){var A=v[M];S.push(A),S.area+=A.getLayout().area;var T=h(S,b,e.squareRatio);w>=T?(M++,w=T):(S.area-=S.pop().getLayout().area,u(S,b,y,f,!1),b=_(y.width,y.height),S.length=S.area=0,w=1/0)}if(S.length&&u(S,b,y,f,!0),!i){var L=g.get("childrenVisibleMin");null!=L&&L>m&&(i=!0)}for(var M=0,I=v.length;I>M;M++)r(v[M],e,i,n+1)}}}function o(t,e,i,n,r,o){var h=t.children||[],u=n.sort;"asc"!==u&&"desc"!==u&&(u=null);var c=null!=n.leafDepth&&n.leafDepth<=o;if(r&&!c)return t.viewChildren=[];h=p.filter(h,function(t){return!t.isRemoved()}),s(h,u);var d=l(e,h,u);if(0===d.sum)return t.viewChildren=[];if(d.sum=a(e,i,d.sum,u,h),0===d.sum)return t.viewChildren=[];for(var f=0,g=h.length;g>f;f++){var m=h[f].getValue()/d.sum*i;h[f].setLayout({area:m})}return c&&(h.length&&t.setLayout({isLeafRoot:!0},!0),h.length=0),t.viewChildren=h,t.setLayout({dataExtent:d.dataExtent},!0),h}function a(t,e,i,n,r){if(!n)return i;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var h=r["asc"===n?a-l-1:l].getValue();o>h/i*e&&(s=l,i-=h)}return"asc"===n?r.splice(0,a-s):r.splice(s,a-s),i}function s(t,e){return e&&t.sort(function(t,i){return"asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue()}),t}function l(t,e,i){for(var n=0,r=0,o=e.length;o>r;r++)n+=e[r].getValue();var a,s=t.get("visualDimension");if(e&&e.length)if("value"===s&&i)a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&a.reverse();else{var a=[1/0,-(1/0)];S(e,function(t){var e=t.getValue(s);ea[1]&&(a[1]=e)})}else a=[NaN,NaN];return{sum:n,dataExtent:a}}function h(t,e,i){for(var n,r=0,o=1/0,a=0,s=t.length;s>a;a++)n=t[a].getLayout().area,n&&(o>n&&(o=n),n>r&&(r=n));var l=t.area*t.area,h=e*e*i;return l?x(h*r/l,l/(h*o)):1/0}function u(t,e,i,n,r){var o=e===i.width?0:1,a=1-o,s=["x","y"],l=["width","height"],h=i[s[o]],u=e?t.area/e:0;(r||u>i[l[a]])&&(u=i[l[a]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],p={},g=u?f.getLayout().area/u:0,m=p[l[a]]=x(u-2*n,0),v=i[s[o]]+i[l[o]]-h,y=c===d-1||g>v?v:g,b=p[l[o]]=x(y-2*n,0);p[s[a]]=i[s[a]]+_(n,m/2),p[s[o]]=h+_(n,b/2),h+=y,f.setLayout(p,!0)}i[s[a]]+=u,i[l[a]]-=u}function c(t,e,i,n,r){var o=(e||{}).node,a=[n,r];if(!o||o===i)return a;for(var s,l=n*r,h=l*t.option.zoomToNodeRatio;s=o.parentNode;){for(var u=0,c=s.children,d=0,f=c.length;f>d;d++)u+=c[d].getValue();var p=o.getValue();if(0===p)return a;h*=u/p;var m=s.getModel("itemStyle.normal").get("borderWidth");isFinite(m)&&(h+=4*m*m+4*m*Math.pow(h,.5)),h>g.MAX_SAFE_INTEGER&&(h=g.MAX_SAFE_INTEGER),o=s}l>h&&(h=l);var v=Math.pow(h/l,.5);return[n*v,r*v]}function d(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var r=i.node,o=r.getLayout();if(!o)return n;for(var a=[o.width/2,o.height/2],s=r;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}function f(t,e,i,n,r){var o=t.getLayout(),a=i[r],s=a&&a===t;if(!(a&&!s||r===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new y(e.x-o.x,e.y-o.y,e.width,e.height);S(t.viewChildren||[],function(t){f(t,l,i,n,r+1)})}}var p=i(1),g=i(4),m=i(14),v=i(166),y=i(7),v=i(166),x=Math.max,_=Math.min,b=g.parsePercent,w=p.retrieve,S=p.each;t.exports=n},function(t,e,i){function n(t,e,i,s,h,c){var d=t.getModel(),p=t.getLayout();if(p&&!p.invisible&&p.isInView){var m,v=t.getModel(g),y=i[t.depth],x=r(v,e,y,s),_=v.get("borderColor"),b=v.get("borderColorSaturation");null!=b&&(m=o(x,t),_=a(b,m)),t.setVisual("borderColor",_);var w=t.viewChildren;if(w&&w.length){var S=l(t,d,p,v,x,w);f.each(w,function(t,e){if(t.depth>=h.length||t===h[t.depth]){var r=u(d,x,t,e,S,c);n(t,r,i,s,h,c)}})}else m=o(x,t),t.setVisual("color",m)}}function r(t,e,i,n){var r=f.extend({},e);return f.each(["color","colorAlpha","colorSaturation"],function(o){var a=t.get(o,!0);null==a&&i&&(a=i[o]),null==a&&(a=e[o]),null==a&&(a=n.get(o)),null!=a&&(r[o]=a)}),r}function o(t){var e=s(t,"color");if(e){var i=s(t,"colorAlpha"),n=s(t,"colorSaturation");return n&&(e=d.modifyHSL(e,null,null,n)),i&&(e=d.modifyAlpha(e,i)),e}}function a(t,e){return null!=e?d.modifyHSL(e,null,null,t):null}function s(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function l(t,e,i,n,r,o){if(o&&o.length){var a=h(e,"color")||null!=r.color&&"none"!==r.color&&(h(e,"colorAlpha")||h(e,"colorSaturation"));if(a){var s=e.get("colorMappingBy"),l={type:a.name,dataExtent:i.dataExtent,visual:a.range};"color"!==l.type||"index"!==s&&"id"!==s?l.mappingMethod="linear":(l.mappingMethod="category",l.loop=!0);var u=new c(l);return u.__drColorMappingBy=s,u}}}function h(t,e){var i=t.get(e);return p(i)&&i.length?{name:e,range:i}:null}function u(t,e,i,n,r,o){var a=f.extend({},e);if(r){var s=r.type,l="color"===s&&r.__drColorMappingBy,h="index"===l?n:"id"===l?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(h)}return a}var c=i(79),d=i(17),f=i(1),p=f.isArray,g="itemStyle.normal";t.exports=function(t,e,i){var r={mainType:"series",subType:"treemap",query:i};t.eachComponent(r,function(t){var e=t.getData().tree,i=e.root,r=t.getModel(g);if(!i.isRemoved()){var o=f.map(e.levelModels,function(t){return t?t.get(g):null});n(i,{},o,r,t.getViewRoot().getAncestors(),t)}})}},function(t,e,i){"use strict";i(212),i(312)},function(t,e,i){"use strict";function n(t,e,i,n){var r=t.coordToPoint([e,n]),o=t.coordToPoint([i,n]);return{x1:r[0],y1:r[1],x2:o[0],y2:o[1]}}var r=i(1),o=i(3),a=i(12),s=["axisLine","axisLabel","axisTick","splitLine","splitArea"];i(2).extendComponentView({type:"angleAxis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("polar",t.get("polarIndex")),n=t.axis,o=i.coordinateSystem,a=o.getRadiusAxis().getExtent(),l=n.getTicksCoords();"category"!==n.type&&l.pop(),r.each(s,function(e){t.get(e+".show")&&this["_"+e](t,o,l,a)},this)}},_axisLine:function(t,e,i,n){var r=t.getModel("axisLine.lineStyle"),a=new o.Circle({shape:{cx:e.cx,cy:e.cy,r:n[1]},style:r.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,a){var s=t.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),h=r.map(i,function(t){return new o.Line({shape:n(e,a[1],a[1]+l,t)})});this.group.add(o.mergePath(h,{style:s.getModel("lineStyle").getLineStyle()}))},_axisLabel:function(t,e,i,n){for(var r=t.axis,s=t.get("data"),l=t.getModel("axisLabel"),h=l.getModel("textStyle"),u=t.getFormattedLabels(),c=l.get("margin"),d=r.getLabelsCoords(),f=0;fm?"left":"right",x=Math.abs(g[1]-v)/p<.3?"middle":g[1]>v?"top":"bottom",_=h;s&&s[f]&&s[f].textStyle&&(_=new a(s[f].textStyle,h)),this.group.add(new o.Text({style:{x:g[0],y:g[1],fill:_.getTextColor(),text:u[f],textAlign:y,textVerticalAlign:x,textFont:_.getFont()},silent:!0}))}},_splitLine:function(t,e,i,a){var s=t.getModel("splitLine"),l=s.getModel("lineStyle"),h=l.get("color"),u=0;h=h instanceof Array?h:[h];for(var c=[],d=0;d0)},c),f=new o(t,d);r.each(s,f.add,f);var p=f.getGroup();this.group.add(p),this._refreshBrushController(p,h,t)}},_refreshBrushController:function(t,e,i){var n=i.axis,o=r.map(i.activeIntervals,function(t){return{brushType:"line",range:[n.dataToCoord(t[0],!0),n.dataToCoord(t[1],!0)]}});this._brushController.mount(t).enableBrush({brushType:"line",brushStyle:e}).updateCovers(o)},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=r.map(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});i.option.realtime^!e||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});t.exports=l},function(t,e,i){"use strict";function n(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotation:e.getModel("axisLabel").get("rotate"),z2:1}}var r=i(1),o=i(3),a=i(50),s=["axisLine","axisLabel","axisTick","axisName"],l=["splitLine","splitArea"];i(2).extendComponentView({type:"radiusAxis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("polar",t.get("polarIndex")),o=i.coordinateSystem.getAngleAxis(),h=t.axis,u=i.coordinateSystem,c=h.getTicksCoords(),d=o.getExtent()[0],f=h.getExtent(),p=n(u,t,d),g=new a(t,p);r.each(s,g.add,g),this.group.add(g.getGroup()),r.each(l,function(e){t.get(e+".show")&&this["_"+e](t,u,d,f,c)},this)}},_splitLine:function(t,e,i,n,a){var s=t.getModel("splitLine"),l=s.getModel("lineStyle"),h=l.get("color"),u=0;h=h instanceof Array?h:[h];for(var c=[],d=0;d=b;b++){for(var I=[],A=0;A=0||"+"===i?"left":"right"},s={horizontal:i>=0||"+"===i?"top":"bottom", -vertical:"middle"},l={horizontal:0,vertical:b/2},h="vertical"===r?o.height:o.width,u=t.getModel("controlStyle"),c=u.get("show"),d=c?u.get("itemSize"):0,f=c?u.get("itemGap"):0,p=d+f,g=t.get("label.normal.rotate")||0;g=g*b/180;var m,v,y,x,_=u.get("position",!0),c=u.get("show",!0),w=c&&u.get("showPlayBtn",!0),S=c&&u.get("showPrevBtn",!0),M=c&&u.get("showNextBtn",!0),I=0,A=h;return"left"===_||"bottom"===_?(w&&(m=[0,0],I+=p),S&&(v=[I,0],I+=p),M&&(y=[A-d,0],A-=p)):(w&&(m=[A-d,0],A-=p),S&&(v=[0,0],I+=p),M&&(y=[A-d,0],A-=p)),x=[I,A],t.get("inverse")&&x.reverse(),{viewRect:o,mainLength:h,orient:r,rotation:l[r],labelRotation:g,labelPosOpt:i,labelAlign:a[r],labelBaseline:s[r],playPosition:m,prevBtnPosition:v,nextBtnPosition:y,axisExtent:x,controlSize:d,controlGap:f}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function r(t,e,i,n,r){t[n]+=i[n][r]-e[n][r]}var o=this._mainGroup,a=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=g.create(),h=s.x,u=s.y+s.height;g.translate(l,l,[-h,-u]),g.rotate(l,l,-b/2),g.translate(l,l,[h,u]),s=s.clone(),s.applyTransform(l)}var c=n(s),d=n(o.getBoundingRect()),f=n(a.getBoundingRect()),p=o.position,m=a.position;m[0]=p[0]=c[0][0];var v=t.labelPosOpt;if(isNaN(v)){var y="+"===v?0:1;r(p,d,c,1,y),r(m,f,c,1,1-y)}else{var y=v>=0?0:1;r(p,d,c,1,y),m[1]=p[1]+v}o.attr("position",p),a.attr("position",m),o.rotation=a.rotation=t.rotation,i(o),i(a)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),r=f.createScaleByModel(e,n),o=i.getDataExtent("value");r.setExtent(o[0],o[1]),this._customizeScale(r,i),r.niceTicks();var a=new c("value",r,t.axisExtent,n);return a.model=e,a},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],function(t){return t})},t.getTicksLabels=function(){return s.map(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new l.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var r=i.getExtent();n.get("lineStyle.show")&&e.add(new l.Line({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:s.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var r=n.getData(),a=i.scale.getTicks();_(a,function(t,a){var s=i.dataToCoord(t),h=r.getItemModel(a),u=h.getModel("itemStyle.normal"),c=h.getModel("itemStyle.emphasis"),d={position:[s,0],onclick:x(this._changeTimeline,this,a)},f=o(h,u,e,d);l.setHoverStyle(f,c.getItemStyle()),h.get("tooltip")?(f.dataIndex=a,f.dataModel=n):f.dataIndex=f.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var r=n.getModel("label.normal");if(r.get("show")){var o=n.getData(),a=i.scale.getTicks(),s=f.getFormattedLabels(i,r.get("formatter")),h=i.getLabelInterval();_(a,function(n,r){if(!i.isLabelIgnored(r,h)){var a=o.getItemModel(r),u=a.getModel("label.normal.textStyle"),c=a.getModel("label.emphasis.textStyle"),d=i.dataToCoord(n),f=new l.Text({style:{text:s[r],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline,textFont:u.getFont(),fill:u.getTextColor()},position:[d,0],rotation:t.labelRotation-t.rotation,onclick:x(this._changeTimeline,this,r),silent:!1});e.add(f),l.setHoverStyle(f,c.getItemStyle())}},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,d){if(t){var f={position:t,origin:[a/2,0],rotation:d?-s:0,rectHover:!0,style:h,onclick:o},p=r(n,i,c,f);e.add(p),l.setHoverStyle(p,u)}}var a=t.controlSize,s=t.rotation,h=n.getModel("controlStyle.normal").getItemStyle(),u=n.getModel("controlStyle.emphasis").getItemStyle(),c=[0,-a/2,a,a],d=n.getPlayState(),f=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",x(this._changeTimeline,this,f?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",x(this._changeTimeline,this,f?"+":"-")),o(t.playPosition,"controlStyle."+(d?"stopIcon":"playIcon"),x(this._handlePlayClick,this,!d),!0)},_renderCurrentPointer:function(t,e,i,n){var r=n.getData(),s=n.getCurrentIndex(),l=r.getItemModel(s).getModel("checkpointStyle"),h=this,u={onCreate:function(t){t.draggable=!0,t.drift=x(h._handlePointerDrag,h),t.ondragend=x(h._handlePointerDragend,h),a(t,s,i,n,!0)},onUpdate:function(t){a(t,s,i,n)}};this._currentPointer=o(l,l,this._mainGroup,{},this._currentPointer,u)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,r=m.asc(n.getExtent().slice());i>r[1]&&(i=r[1]),is&&(n=s,e=o)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}})},function(t,e,i){var n=i(1),r=i(44),o=i(25),a=function(t,e,i,n){r.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};a.prototype={constructor:a,getLabelInterval:function(){var t=this.model,e=t.getModel("label.normal"),i=e.get("interval");if(null!=i&&"auto"!=i)return i;var i=this._autoLabelInterval;return i||(i=this._autoLabelInterval=o.getAxisLabelInterval(n.map(this.scale.getTicks(),this.dataToCoord,this),o.getFormattedLabels(this,e.get("formatter")),e.getModel("textStyle").getFont(),"horizontal"===t.get("orient"))),i},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},n.inherits(a,r),t.exports=a},function(t,e,i){var n=i(10),r=i(13),o=i(1),a=i(8),s=n.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{normal:{},emphasis:{}},label:{normal:{textStyle:{color:"#000"}},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){s.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,n=this._names=[];if("category"===i){var s=[];o.each(e,function(t,e){var i,r=a.getDataItemValue(t);o.isObject(t)?(i=o.clone(t),i.value=e):i=e,s.push(i),o.isString(r)||null!=r&&!isNaN(r)||(r=""),n.push(r+"")}),e=s}var l={category:"ordinal",time:"time"}[i]||"number",h=this._data=new r([{name:"value",type:l}],this);h.initData(e,n)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}});t.exports=s},function(t,e,i){var n=i(56);t.exports=n.extend({type:"timeline"})},function(t,e,i){function n(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),r(t),o(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});o(n,"position")||(n.position=t.controlPosition),"none"!==n.position||o(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}a.each(t.data||[],function(t){a.isObject(t)&&!a.isArray(t)&&(!o(t,"value")&&o(t,"name")&&(t.value=t.name),r(t))})}function r(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},r=n.normal||(n.normal={}),s={normal:1,emphasis:1};a.each(n,function(t,e){s[e]||o(r,e)||(r[e]=t)}),i.label&&!o(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function o(t,e){return t.hasOwnProperty(e)}var a=i(1);t.exports=function(t){var e=t&&t.timeline;a.isArray(e)||(e=e?[e]:[]),a.each(e,function(t){t&&n(t)})}},function(t,e,i){var n=i(2);n.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline")}),n.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)})},function(t,e,i){i(10).registerSubTypeDefaulter("timeline",function(){return"slider"})},function(t,e,i){i(337),i(338)},function(t,e,i){var n=i(225),r=i(1),o=i(4),a=[20,140],s=n.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:!0},optionUpdated:function(t,e){s.superApply(this,"optionUpdated",arguments),this.resetTargetSeries(),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){s.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=a[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=a[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):r.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){n.prototype.completeVisualOption.apply(this,arguments),r.each(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=o.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e}});t.exports=s},function(t,e,i){function n(t,e,i,n){return new h.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,ondragend:n})}function r(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function o(t,e,i,n){return t?[[0,-y(e,x(i,0))],[b,0],[0,y(e,x(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function a(t,e,i){var n=_/2,r=t.get("hoverLinkDataSize");return r&&(n=m(r,e,i,!0)/2),n}function s(t){return!t.get("realtime")&&t.get("hoverLinkOnHandle")}var l=i(226),h=i(3),u=i(1),c=i(4),d=i(77),f=i(82),p=i(227),g=i(8),m=c.linearMap,v=u.each,y=Math.min,x=Math.max,_=12,b=6,w=l.extend({type:"visualMap.continuous",init:function(){w.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var r=this.visualMapModel,o=r.get("textGap"),a=r.itemSize,s=this._shapes.barGroup,l=this._applyTransform([a[0]/2,0===i?-o:a[1]+o],s),u=this._applyTransform(0===i?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new h.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:n,textFont:d.getFont(),fill:d.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,r=e.itemSize,o=this._orient,a=this._useHandle,s=p.getItemAlign(e,this.api,r),l=i.barGroup=this._createBarGroup(s);l.add(i.outOfRange=n()),l.add(i.inRange=n(null,a?"move":null,u.bind(this._dragHandle,this,"all",!1),u.bind(this._dragHandle,this,"all",!0)));var h=e.textStyleModel.getTextRect("国"),c=x(h.width,h.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(l,0,r,c,o,s),this._createHandle(l,1,r,c,o,s)),this._createIndicator(l,r,c,o),t.add(l)},_createHandle:function(t,e,i,o,a){var s=u.bind(this._dragHandle,this,e,!1),l=u.bind(this._dragHandle,this,e,!0),c=n(r(e,o),"move",s,l);c.position[0]=i[0],t.add(c);var d=this.visualMapModel.textStyleModel,f=new h.Text({draggable:!0,drift:s,ondragend:l,style:{x:0,y:0,text:"",textFont:d.getFont(),fill:d.getTextColor()}});this.group.add(f);var p=["horizontal"===a?o/2:1.5*o,"horizontal"===a?0===e?-(1.5*o):1.5*o:0===e?-o/2:o/2],g=this._shapes;g.handleThumbs[e]=c,g.handleLabelPoints[e]=p,g.handleLabels[e]=f},_createIndicator:function(t,e,i,r){var o=n([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,s=new h.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),fill:a.getTextColor()}});this.group.add(s);var l=["horizontal"===r?i/2:b+3,0],u=this._shapes;u.indicator=o,u.indicatorLabel=s,u.indicatorLabelPoint=l},_dragHandle:function(t,e,i,n){if(this._useHandle){this._dragging=!e;var r=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,r[1]),this._updateView(),(e||this.visualMapModel.get("realtime"))&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e&&!this._hovering?this._clearHoverLinkToSeries():s(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[m(e[0],i,n,!0),m(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds;d(e,n,[0,i.itemSize[1]],"all"===t?"rigid":"push",t);var r=i.getExtent(),o=[0,i.itemSize[1]];this._dataInterval=[m(n[0],o,r,!0),m(n[1],o,r,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,r=[0,e.itemSize[1]],o=t?r:this._handleEnds,a=this._createBarVisual(this._dataInterval,i,o,"inRange"),s=this._createBarVisual(i,i,r,"outOfRange");n.inRange.setStyle({fill:a.barColor,opacity:a.opacity}).setShape("points",a.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(o,a)},_createBarVisual:function(t,e,i,n){var r={forceState:n,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,r),a=[this.getControllerVisual(t[0],"symbolSize",r),this.getControllerVisual(t[1],"symbolSize",r)],s=this._createBarPoints(i,a);return{barColor:new f(0,0,1,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var i=100,n=[],r=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;i>o;o++){var a=t[0]+r*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new h.Group("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,o=i.handleLabels;v([0,1],function(a){var s=r[a];s.setStyle("fill",e.handlesColor[a]),s.position[1]=t[a];var l=h.applyTransform(i.handleLabelPoints[a],h.getTransform(s,this.group));o[a].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[a]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===a?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,a=r.getExtent(),s=r.itemSize,l=[0,s[1]],u=m(t,a,l,!0),c=this._shapes,d=c.indicator;if(d){d.position[1]=u,d.attr("invisible",!1),d.setShape("points",o(!!i,n,u,s[1]));var f={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",f);d.setStyle("fill",p);var g=h.applyTransform(c.indicatorLabelPoint,h.getTransform(d,this.group)),v=c.indicatorLabel;v.attr("invisible",!1);var y=this._applyTransform("left",c.barGroup),x=this._orient;v.setStyle({text:(i?i:"")+r.formatValueText(e),textVerticalAlign:"horizontal"===x?y:"middle",textAlign:"horizontal"===x?"center":y,x:g[0],y:g[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=y(x(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],o=i.getExtent();t=y(x(r[0],t),r[1]);var l=a(i,o,r),h=[t-l,t+l],u=m(t,r,o,!0),c=[m(h[0],r,o,!0),m(h[1],r,o,!0)];h[0]r[1]&&(c[1]=1/0),e&&(c[0]===-(1/0)?this._showIndicator(u,c[1],"< ",l):c[1]===1/0?this._showIndicator(u,c[0],"> ",l):this._showIndicator(u,u,"≈ ",l));var d=this._hoverLinkDataIndices,f=[];(e||s(i))&&(f=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var p=g.compressBatches(d,f);this._dispatchHighDown("downplay",p[0]),this._dispatchHighDown("highlight",p[1])}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target;if(e&&null!=e.dataIndex){var i=e.dataModel||this.ecModel.getSeriesByIndex(e.seriesIndex),n=i.getData(e.dataType),r=n.getDimension(this.visualMapModel.getDataDimension(n)),o=n.get(r,e.dataIndex,!0);this._showIndicator(o,o)}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",t),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var r=h.getTransform(e,n?null:this.group);return h[u.isArray(t)?"applyTransform":"transformDirection"](t,r,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});t.exports=w},function(t,e,i){function n(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var r=i(225),o=i(1),a=i(79),s=r.extend({type:"visualMap.piecewise",defaultOption:{selected:null,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0},optionUpdated:function(t,e){s.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetTargetSeries(),this.resetExtent();var i=this._mode=this._determineMode();l[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=o.clone(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=o.map(this._pieceList,function(t){var t=o.clone(t);return"inRange"!==e&&(t.visual=null),t}))})},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,r=(e?i:t).selected||{};if(i.selected=r,o.each(n,function(t,e){var i=this.getSelectedMapKey(t);i in r||(r[i]=!0)},this),"single"===i.selectedMode){var a=!1;o.each(n,function(t,e){var i=this.getSelectedMapKey(t);r[i]&&(a?r[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=o.clone(t)},getValueState:function(t){var e=a.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){var r=a.findPieceIndex(e,this._pieceList);r===t&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e}}),l={splitNumber:function(){var t=this.option,e=t.precision,i=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var r=(i[1]-i[0])/n;+r.toFixed(e)!==r&&5>e;)e++;t.precision=e,r=+r.toFixed(e);for(var o=0,a=i[0];n>o;o++,a+=r){var s=o===n-1?i[1]:a+r;this._pieceList.push({text:this.formatValueText([a,s]),index:o,interval:[a,s]})}},categories:function(){var t=this.option;o.each(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),n(t,this._pieceList)},pieces:function(){var t=this.option;o.each(t.pieces,function(t,e){o.isObject(t)||(t={value:t});var i,n={text:"",index:e};if(null!=t.label&&(n.text=t.label,i=!0),t.hasOwnProperty("value"))n.value=t.value,i||(n.text=this.formatValueText(n.value));else{var r=t.min,s=t.max;null==r&&(r=-(1/0)),null==s&&(s=1/0),r===s&&(n.value=r),n.interval=[r,s],i||(n.text=this.formatValueText([r,s]))}n.visual=a.retrieveVisuals(t),this._pieceList.push(n)},this),n(t,this._pieceList)}};t.exports=s},function(t,e,i){var n=i(226),r=i(1),o=i(3),a=i(26),s=i(14),l=i(227),h=n.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var i=t.piece,a=new o.Group;a.onclick=r.bind(this._onItemClick,this,i),this._enableHoverLink(a,t.indexInModelPieceList);var s=this._getRepresentValue(i);if(this._createItemSymbol(a,s,[0,0,c[0],c[1]]),f){var d=this.visualMapModel.getValueState(s);a.add(new o.Text({style:{x:"right"===u?-n:c[0]+n,y:c[1]/2,text:i.text,textVerticalAlign:"middle",textAlign:u,textFont:l,fill:h,opacity:"outOfRange"===d?.5:1}}))}e.add(a)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,l=a.getFont(),h=a.getTextColor(),u=this._getItemAlign(),c=i.itemSize,d=this._getViewData(),f=!d.endsText,p=!f;p&&this._renderEndsText(e,d.endsText[0],c),r.each(d.viewPieceList,t,this),p&&this._renderEndsText(e,d.endsText[1],c),s.box(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:i.findTargetDataIndices(e)})}t.on("mouseover",r.bind(i,this,"highlight")).on("mouseout",r.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return l.getItemAlign(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i){if(e){var n=new o.Group,r=this.visualMapModel.textStyleModel;n.add(new o.Text({style:{x:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:"center",text:e,textFont:r.getFont(),fill:r.getTextColor()}})),t.add(n)}},_getViewData:function(){var t=this.visualMapModel,e=r.map(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_getRepresentValue:function(t){var e;if(this.visualMapModel.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=(i[0]+i[1])/2}return e},_createItemSymbol:function(t,e,i){t.add(a.createSymbol(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=r.clone(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,r.each(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});t.exports=h},function(t,e,i){i(2).registerPreprocessor(i(228)),i(229),i(230),i(333),i(334),i(231)},function(t,e,i){i(2).registerPreprocessor(i(228)),i(229),i(230),i(335),i(336),i(231)},function(t,e,i){function n(t,e,i,n,r){s.call(this,t),this.map=e,this._nameCoordMap={},this.loadGeoJson(i,n,r)}var r=i(344),o=i(1),a=i(7),s=i(232),l=[i(342),i(343),i(341)];n.prototype={constructor:n,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i>1^-(1&a),s=s>>1^-(1&s),a+=n,s+=r,n=a,r=s,i.push([a/1024,s/1024])}return i}function o(t){for(var e=[],i=0;i=0;i--)l.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;n>i;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}}),u={type:"value",dim:null,parallelIndex:null,areaSelectStyle:{ -width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};o.merge(h.prototype,i(51)),s("parallel",h,n,u),t.exports=h},function(t,e,i){function n(t,e,i){this._axesMap={},this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}var r=i(14),o=i(25),a=i(1),s=i(347),l=i(19),h=i(5),u=a.each,c=Math.PI;n.prototype={type:"parallel",constructor:n,_init:function(t,e,i){var n=t.dimensions,r=t.parallelAxisIndex;u(n,function(t,i){var n=r[i],a=e.getComponent("parallelAxis",n),l=this._axesMap[t]=new s(t,o.createScaleByModel(a),[0,0],a.get("type"),n),h="category"===l.type;l.onBand=h&&a.get("boundaryGap"),l.inverse=a.get("inverse"),a.axis=l,l.model=a},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();u(this.dimensions,function(t){var e=this._axesMap[t];e.scale.unionExtent(n.getDataExtent(t)),o.niceScaleExtent(e,e.model)},this)}},this)},resize:function(t,e){this._rect=r.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes(t)},getRect:function(){return this._rect},_layoutAxes:function(t){var e=this._rect,i=t.get("layout"),n=this._axesMap,r=this.dimensions,o=[e.width,e.height],a="horizontal"===i?0:1,s=o[a],h=o[1-a],d=[0,h];u(n,function(t){var e=t.inverse?1:0;t.setExtent(d[e],d[1-e])}),u(r,function(t,n){var o=s*n/(r.length-1),a={horizontal:{x:o,y:h},vertical:{x:0,y:o}},u={horizontal:c/2,vertical:0},d=[a[i].x+e.x,a[i].y+e.y],f=u[i],p=l.create();l.rotate(p,p,f),l.translate(p,p,d),this._axesLayout[t]={position:d,rotation:f,transform:p,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap[t]},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap[e].dataToCoord(t),e)},eachActiveState:function(t,e,i){for(var n=this.dimensions,r=this._axesMap,o=!1,a=0,s=n.length;s>a;a++)"normal"!==r[n[a]].model.getActiveState()&&(o=!0);for(var l=0,h=t.count();h>l;l++){var u,c=t.getValues(n,l);if(o){u="active";for(var a=0,s=n.length;s>a;a++){var d=n[a],f=r[d].model.getActiveState(c[a],a);if("inactive"===f){u="inactive";break}}}else u="normal";e.call(i,u,l)}},axisCoordToPoint:function(t,e){var i=this._axesLayout[e],n=[t,0];return h.applyTransform(n,n,i.transform),n},getAxisLayout:function(t){return a.clone(this._axesLayout[t])}},t.exports=n},function(t,e,i){var n=i(1),r=i(44),o=function(t,e,i,n,o){r.call(this,t,e,i),this.type=n||"value",this.axisIndex=o};o.prototype={constructor:o,model:null},n.inherits(o,r),t.exports=o},function(t,e,i){var n=i(1),r=i(10);i(345),r.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",parallelAxisDefault:null},init:function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&n.merge(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=n.filter(this.dependentModels.parallelAxis,function(t){return t.get("parallelIndex")===this.componentIndex});n.each(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}})},function(t,e,i){function n(t){if(!t.parallel){var e=!1;o.each(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}}function r(t){var e=a.normalizeToArray(t.parallelAxis);o.each(e,function(e){if(o.isObject(e)){var i=e.parallelIndex||0,n=a.normalizeToArray(t.parallel)[i];n&&n.parallelAxisDefault&&o.merge(e,n.parallelAxisDefault,!1)}})}var o=i(1),a=i(8);t.exports=function(t){n(t),r(t)}},function(t,e,i){"use strict";function n(t,e){e=e||[0,360],o.call(this,"angle",t,e),this.type="category"}var r=i(1),o=i(44);n.prototype={constructor:n,dataToAngle:o.prototype.dataToCoord,angleToData:o.prototype.coordToData},r.inherits(n,o),t.exports=n},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(1),o=i(10),a=i(68),s=o.extend({type:"polarAxis",axis:null});r.merge(s.prototype,i(51));var l={angle:{polarIndex:0,startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{polarIndex:0,splitNumber:5}};a("angle",s,n,l.angle),a("radius",s,n,l.radius)},function(t,e,i){"use strict";var n=i(354),r=i(350),o=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new n,this._angleAxis=new r};o.prototype={constructor:o,type:"polar",dimensions:["radius","angle"],containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},dataToPoints:function(t){return t.mapArray(this.dimensions,function(t,e){return this.dataToPoint([t,e])},this)},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),r=n.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);n.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=o>l?1:-1;o>l||l>a;)l+=360*h;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,r=-Math.sin(i)*e+this.cy;return[n,r]}},t.exports=o},function(t,e,i){"use strict";i(351),i(2).extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){i.getComponent("polar",t.getShallow("polarIndex"))===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}})},function(t,e,i){"use strict";function n(t,e){o.call(this,"radius",t,e),this.type="category"}var r=i(1),o=i(44);n.prototype={constructor:n,dataToRadius:o.prototype.dataToCoord,radiusToData:o.prototype.coordToData},r.inherits(n,o),t.exports=n},function(t,e,i){function n(t,e,i){o.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}var r=i(1),o=i(44);r.inherits(n,o),t.exports=n},function(t,e,i){function n(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=r.map(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new o(i,new a);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.startAngle}var r=i(1),o=i(355),a=i(38),s=i(4),l=i(25);n.prototype.getIndicatorAxes=function(){return this._indicatorAxes},n.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},n.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e],n=i.angle,r=this.cx+t*Math.cos(n),o=this.cy-t*Math.sin(n);return[r,o]},n.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var r,o=Math.atan2(-i,e),a=1/0,s=-1,l=0;lu&&(r=h,s=l,a=u)}return[s,+(r&&r.coodToData(n))]},n.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=s.parsePercent(i[0],n),this.cy=s.parsePercent(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=s.parsePercent(t.get("radius"),a),r.each(this._indicatorAxes,function(t,e){t.setExtent(0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},n.prototype.update=function(t,e){function i(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var n=this._indicatorAxes,o=this._model;r.each(n,function(t){t.scale.setExtent(1/0,-(1/0))}),t.eachSeriesByType("radar",function(e,i){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===o){var a=e.getData();r.each(n,function(t){t.scale.unionExtent(a.getDataExtent(t.dim))})}},this);var a=o.get("splitNumber");r.each(n,function(t,e){var n=l.getScaleExtent(t,t.model);l.niceScaleExtent(t,t.model);var r=t.model,o=t.scale,h=r.get("min"),u=r.get("max"),c=o.getInterval();if(null!=h&&null!=u)o.setInterval((u-h)/a);else if(null!=h){var d;do d=h+c*a,o.setExtent(+h,d),o.setInterval(c),c=i(c);while(dn[0]&&isFinite(f)&&isFinite(n[0]))}else{var p=o.getTicks().length-1;p>a&&(c=i(c));var g=Math.round((n[0]+n[1])/2/c)*c,m=Math.round(a/2);o.setExtent(s.round(g-m*c),s.round(g+(a-m)*c)),o.setInterval(c)}})},n.dimensions=[],n.create=function(t,e){var i=[];return t.eachComponent("radar",function(r){var o=new n(r,t,e);i.push(o),r.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},i(24).register("radar",n),t.exports=n},function(t,e,i){function n(t,e){return s.defaults({show:e},t)}var r=i(78),o=r.valueAxis,a=i(12),s=i(1),l=i(51),h=i(2).extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),r=this.get("axisTick"),o=this.get("axisLabel"),h=this.get("name.textStyle"),u=this.get("name.show"),c=this.get("name.formatter"),d=this.get("nameGap"),f=s.map(this.get("indicator")||[],function(f){return null!=f.max&&f.max>0?f.min=0:null!=f.min&&f.min<0&&(f.max=0),f=s.merge(s.clone(f),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:r,axisLabel:o,name:f.text,nameLocation:"end",nameGap:d,nameTextStyle:h},!1),u||(f.name=""),"string"==typeof c?f.name=c.replace("{value}",f.name):"function"==typeof c&&(f.name=c(f.name,f)),s.extend(new a(f,null,this.ecModel),l)},this);this.getIndicatorModels=function(){return f}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:s.merge({lineStyle:{color:"#bbb"}},o.axisLine),axisLabel:n(o.axisLabel,!1),axisTick:n(o.axisTick,!1),splitLine:n(o.splitLine,!0),splitArea:n(o.splitArea,!0),indicator:[]}});t.exports=h},function(t,e,i){"use strict";function n(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function r(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}var o=i(1),a=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=a.prototype;s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[t]){var r=new n(t,e);return r.hostGraph=this,this.nodes.push(r),i[t]=r,r}},s.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},s.getNodeById=function(t){return this._nodesMap[t]},s.addEdge=function(t,e,i){var o=this._nodesMap,a=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),t instanceof n||(t=o[t]),e instanceof n||(e=o[e]),t&&e){var s=t.id+"-"+e.id;if(!a[s]){var l=new r(t,e,i);return l.hostGraph=this,this._directed&&(t.outEdges.push(l),e.inEdges.push(l)),t.edges.push(l),t!==e&&e.edges.push(l),this.edges.push(l),a[s]=l,l}}},s.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},s.getEdge=function(t,e){t instanceof n&&(t=t.id),e instanceof n&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},s.eachNode=function(t,e){for(var i=this.nodes,n=i.length,r=0;n>r;r++)i[r].dataIndex>=0&&t.call(e,i[r],r)},s.eachEdge=function(t,e){for(var i=this.edges,n=i.length,r=0;n>r;r++)i[r].dataIndex>=0&&i[r].node1.dataIndex>=0&&i[r].node2.dataIndex>=0&&t.call(e,i[r],r)},s.breadthFirstTraverse=function(t,e,i,r){if(e instanceof n||(e=this._nodesMap[e]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;ar;r++)i[r].dataIndex=-1;for(var r=0,o=t.count();o>r;r++)i[t.getRawIndex(r)].dataIndex=r;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var r=0,o=n.length;o>r;r++)n[r].dataIndex=-1;for(var r=0,o=e.count();o>r;r++)n[e.getRawIndex(r)].dataIndex=r},s.clone=function(){for(var t=new a(this._directed),e=this.nodes,i=this.edges,n=0;n=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};o.mixin(n,l("hostGraph","data")),o.mixin(r,l("hostGraph","edgeData")),a.Node=n,a.Edge=r,t.exports=a},function(t,e,i){function n(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=o.map(e||[],function(e){return new a(e,t,t.ecModel)})}function r(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}var o=i(1),a=i(12),s=i(13),l=i(235),h=i(31),u=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};u.prototype={constructor:u,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},o.isString(t)&&(t={order:t});var n,r=t.order||"preorder",a=this[t.attr||"children"];"preorder"===r&&(n=e.call(i,this));for(var s=0;!n&&se&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].getNodeById(t);if(r)return r}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].contains(t);if(r)return r}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,i=e.data.getItemModel(this.dataIndex),n=this.getLevelModel();return i.getModel(t,(n||e.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)}},n.prototype={constructor:n,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},n.createTree=function(t,e,i){function o(t,e){c.push(t);var i=new u(t.name,a);e?r(i,e):a.root=i,a._nodes.push(i);var n=t.children;if(n)for(var s=0;so;o++){var s=e[o];s.el.animateTo(s.target,s.time,s.delay,s.easing,n)}return this}}}var r=i(1);t.exports={createWrap:n}},function(t,e,i){function n(){function t(e,n){if(n>=i.length)return e;for(var o=-1,a=e.length,s=i[n++],l={},h={};++o=i.length)return t;var a=[],s=n[o++];return r.each(t,function(t,i){a.push({key:i,values:e(t,o)})}),s?a.sort(function(t,e){return s(t.key,e.key)}):a}var i=[],n=[];return{key:function(t){return i.push(t),this},sortKeys:function(t){return n[i.length-1]=t,this},entries:function(i){return e(t(i,0),0)}}}var r=i(1);t.exports=n},function(t,e,i){var n=i(1),r={get:function(t,e,i){var r=n.clone((o[t]||{})[e]);return i&&n.isArray(r)?r[r.length-1]:r}},o={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};t.exports=r},function(t,e,i){function n(t,e){return Math.abs(t-e)0?1.1:1/1.1;l.call(this,t,e,t.offsetX,t.offsetY)}function s(t){if(!f.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;l.call(this,t,e,t.pinchX,t.pinchY)}}function l(t,e,i,n){var r=this.rectProvider&&this.rectProvider();if(r&&r.contain(i,n)){d.stop(t.event);var o=this.target,a=this.zoomLimit;if(o){var s=o.position,l=o.scale,u=this.zoom=this.zoom||1;if(u*=e,a){var h=a.min||0,c=a.max||1/0;u=Math.max(Math.min(c,u),h)}var f=u/this.zoom;this.zoom=u,s[0]-=(i-s[0])*(f-1),s[1]-=(n-s[1])*(f-1),l[0]*=f,l[1]*=f,o.dirty()}this.trigger("zoom",e,i,n)}}function u(t,e,i){this.target=e,this.rectProvider=i,this.zoomLimit,this.zoom,this._zr=t;var l=c.bind,u=l(n,this),d=l(r,this),f=l(o,this),p=l(a,this),g=l(s,this);h.call(this),this.enable=function(e){this.disable(),null==e&&(e=!0),e!==!0&&"move"!==e&&"pan"!==e||(t.on("mousedown",u),t.on("mousemove",d),t.on("mouseup",f)),e!==!0&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",p),t.on("pinch",g))},this.disable=function(){t.off("mousedown",u),t.off("mousemove",d),t.off("mouseup",f),t.off("mousewheel",p),t.off("pinch",g)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}var h=i(22),c=i(1),d=i(24),f=i(113);c.mixin(u,h),t.exports=u},function(t,e){t.exports=function(t,e,i,n,r){function o(t,e,i){var n=e.length?e.slice():[e,e];return e[0]>e[1]&&n.reverse(),0>t&&n[0]+t0&&n[1]+t>i[1]&&(t=i[1]-n[1]),t}return t?("rigid"===n?(t=o(t,e,i),e[0]+=t,e[1]+=t):(t=o(t,e[r],i),e[r]+=t,"push"===n&&e[0]>e[1]&&(e[1-r]=e[r])),e):e}},function(t,e,i){var n=i(1),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncateLength:null,nameTruncateEllipsis:"...",nameTextStyle:{},nameGap:15,silent:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#333",width:1,type:"solid"}},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},o=n.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{interval:"auto"},axisLabel:{interval:"auto"}},r),a=n.merge({boundaryGap:[0,0],splitNumber:5},r),s=n.defaults({scale:!0,min:"dataMin",max:"dataMax"},a),l=n.defaults({},a);l.scale=!0,t.exports={categoryAxis:o,valueAxis:a,timeAxis:s,logAxis:l}},function(t,e){var i={},n="\x00__throttleOriginMethod",r="\x00__throttleRate",o="\x00__throttleType";i.throttle=function(t,e,i){function n(){u=(new Date).getTime(),h=null,t.apply(a,s||[])}var r,o,a,s,l=0,u=0,h=null;e=e||0;var c=function(){r=(new Date).getTime(),a=this,s=arguments,o=r-(i?l:u)-e,clearTimeout(h),i?h=setTimeout(n,e):o>=0?n():h=setTimeout(n,-o),l=r};return c.clear=function(){h&&(clearTimeout(h),h=null)},c},i.createOrUpdate=function(t,e,a,s){var l=t[e];if(l){var u=l[n]||l,h=l[o],c=l[r];if(c!==a||h!==s){if(null==a||!s)return t[e]=u;l=t[e]=i.throttle(u,a,"debounce"===s),l[n]=u,l[o]=s,l[r]=a}return l}},i.clear=function(t,e){var i=t[e];i&&i[n]&&(t[e]=i[n])},t.exports=i},function(t,e){t.exports={containStroke:function(t,e,i,n,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return Math.abs(o-t)<=s/2;l=(e-n)/(t-i),u=(t*n-i*e)/(t-i);var h=l*o-a+u,c=h*h/(l*l+1);return s/2*s/2>=c}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,o,a,s,l,u){if(0===s)return!1;var h=s;if(u>e+h&&u>r+h&&u>a+h||e-h>u&&r-h>u&&a-h>u||l>t+h&&l>i+h&&l>o+h||t-h>l&&i-h>l&&o-h>l)return!1;var c=n.quadraticProjectPoint(t,e,i,r,o,a,l,u,null);return h/2>=c}}},function(t,e){t.exports=function(t,e,i,n,r,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(o-e)/(n-e);1!==s&&0!==s||(a=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?a:0}},function(t,e,i){"use strict";var n=i(1),r=i(29),o=function(t,e,i,n,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,r.call(this,o)};o.prototype={constructor:o},n.inherits(o,r),t.exports=o},function(t,e,i){"use strict";function n(t){return t>s||-s>t}var r=i(19),o=i(5),a=r.identity,s=5e-5,l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},u=l.prototype;u.transform=null,u.needLocalTransform=function(){return n(this.rotation)||n(this.position[0])||n(this.position[1])||n(this.scale[0]-1)||n(this.scale[1]-1)},u.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||r.create(),i?this.getLocalTransform(n):a(n),e&&(i?r.mul(n,t.transform,n):r.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,n)):void(n&&a(n))},u.getLocalTransform=function(t){t=t||[],a(t);var e=this.origin,i=this.scale,n=this.rotation,o=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),n&&r.rotate(t,t,n),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=o[0],t[5]+=o[1],t},u.setTransform=function(t){var e=this.transform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},u.restoreTransform=function(t){var e=this.invTransform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])};var h=[];u.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(r.mul(h,t.invTransform,e),e=h);var i=e[0]*e[0]+e[1]*e[1],o=e[2]*e[2]+e[3]*e[3],a=this.position,s=this.scale;n(i-1)&&(i=Math.sqrt(i)),n(o-1)&&(o=Math.sqrt(o)),e[0]<0&&(i=-i),e[3]<0&&(o=-o),a[0]=e[4],a[1]=e[5],s[0]=i,s[1]=o,this.rotation=Math.atan2(-e[1]/o,e[0]/i)}},u.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},u.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&o.applyTransform(i,i,n),i},u.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&o.applyTransform(i,i,n),i},t.exports=l},function(t,e,i){"use strict";function n(t){r.each(o,function(e){this[e]=r.bind(t[e],t)},this)}var r=i(1),o=["getDom","getZr","getWidth","getHeight","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption"];t.exports=n},function(t,e,i){var n=i(1);i(54),i(90),i(91);var r=i(120),o=i(2);o.registerLayout(n.curry(r,"bar")),o.registerVisual(function(t){t.eachSeriesByType("bar",function(t){var e=t.getData();e.setVisual("legendSymbol","roundRect")})}),i(36)},function(t,e,i){"use strict";var n=i(15),r=i(35);t.exports=n.extend({type:"series.bar",dependencies:["grid","polar"],getInitialData:function(t,e){return r(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),r=n.getLayout("offset"),o=n.getLayout("size"),a=e.getBaseAxis().isHorizontal()?0:1;return i[a]+=r+o/2,i}return[NaN,NaN]},brushSelector:"rect",defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,itemStyle:{normal:{borderColor:"#fff",borderWidth:0},emphasis:{}}}})},function(t,e,i){"use strict";function n(t,e){var i=t.width>0?1:-1,n=t.height>0?1:-1;e=Math.min(e,Math.abs(t.width),Math.abs(t.height)),t.x+=i*e/2,t.y+=n*e/2,t.width-=i*e,t.height-=n*e}var r=i(1),o=i(3);r.extend(i(9).prototype,i(92)),t.exports=i(2).extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"===n&&this._renderOnCartesian(t,e,i),this.group},_renderOnCartesian:function(t,e,i){function a(e,i){var a=l.getItemLayout(e),s=l.getItemModel(e).get(p)||0;n(a,s);var u=new o.Rect({shape:r.extend({},a)});if(f){var h=u.shape,c=d?"height":"width",g={};h[c]=0,g[c]=a[c],o[i?"updateProps":"initProps"](u,{shape:g},t,e)}return u}var s=this.group,l=t.getData(),u=this._data,h=t.coordinateSystem,c=h.getBaseAxis(),d=c.isHorizontal(),f=t.get("animation"),p=["itemStyle","normal","barBorderWidth"];l.diff(u).add(function(t){if(l.hasValue(t)){var e=a(t);l.setItemGraphicEl(t,e),s.add(e)}}).update(function(e,i){var r=u.getItemGraphicEl(i);if(!l.hasValue(e))return void s.remove(r);r||(r=a(e,!0));var h=l.getItemLayout(e),c=l.getItemModel(e).get(p)||0;n(h,c),o.updateProps(r,{shape:h},t,e),l.setItemGraphicEl(e,r),s.add(r)}).remove(function(e){var i=u.getItemGraphicEl(e);i&&(i.style.text="",o.updateProps(i,{shape:{width:0}},t,e,function(){s.remove(i)}))}).execute(),this._updateStyle(t,l,d),this._data=l},_updateStyle:function(t,e,i){function n(t,e,i,n,r){o.setText(t,e,i),t.text=n,"outside"===t.textPosition&&(t.textPosition=r)}e.eachItemGraphicEl(function(a,s){var l=e.getItemModel(s),u=e.getItemVisual(s,"color"),h=e.getItemVisual(s,"opacity"),c=e.getItemLayout(s),d=l.getModel("itemStyle.normal"),f=l.getModel("itemStyle.emphasis").getBarItemStyle();a.setShape("r",d.get("barBorderRadius")||0),a.useStyle(r.defaults({fill:u,opacity:h},d.getBarItemStyle()));var p=i?c.height>0?"bottom":"top":c.width>0?"left":"right",g=l.getModel("label.normal"),v=l.getModel("label.emphasis"),m=a.style;g.get("show")?n(m,g,u,r.retrieve(t.getFormattedLabel(s,"normal"),t.getRawValue(s)),p):m.text="",v.get("show")?n(f,v,u,r.retrieve(t.getFormattedLabel(s,"emphasis"),t.getRawValue(s)),p):f.text="",o.setHoverStyle(a,f)})},remove:function(t,e){var i=this.group;t.get("animation")?this._data&&this._data.eachItemGraphicEl(function(e){e.style.text="",o.updateProps(e,{shape:{width:0}},t,e.dataIndex,function(){i.remove(e)})}):i.removeAll()}})},function(t,e,i){var n=i(31)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getBarItemStyle:function(t){var e=n.call(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}}},function(t,e,i){function n(t){return"_"+t+"Type"}function r(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){f.isArray(o)||(o=[o,o]);var a=u.createSymbol(r,-o[0]/2,-o[1]/2,o[0],o[1],n);return a.name=t,a}}function o(t){var e=new c({name:"line"});return a(e.shape,t),e}function a(t,e){var i=e[0],n=e[1],r=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,r&&(t.cpx1=r[0],t.cpy1=r[1])}function s(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=h.sub([],u,l);if(h.normalize(c,c),e){e.attr("position",l);var d=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",u);var d=a.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",u);var f,p,g,v=5*r;if("end"===n.__position)f=[c[0]*v+u[0],c[1]*v+u[1]],p=c[0]>.8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,d=a.tangentAt(m),y=[d[1],-d[0]],x=a.pointAt(m);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]),f=[x[0]+y[0]*v,x[1]+y[1]*v],p="center",g="bottom";var _=-Math.atan2(d[1],d[0]);u[0].8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||p},position:f,scale:[r,r]})}}}}function l(t,e,i){d.Group.call(this),this._createLine(t,e,i)}var u=i(26),h=i(5),c=i(172),d=i(3),f=i(1),p=i(4),g=["fromSymbol","toSymbol"],v=l.prototype;v.beforeUpdate=s,v._createLine=function(t,e,i){var a=t.hostModel,s=t.getItemLayout(e),l=o(s);l.shape.percent=0,d.initProps(l,{shape:{percent:1}},a,e),this.add(l);var u=new d.Text({name:"label"});this.add(u),f.each(g,function(i){var o=r(i,t,e);this.add(o),this[n(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},v.updateData=function(t,e,i){var o=t.hostModel,s=this.childOfName("line"),l=t.getItemLayout(e),u={shape:{}};a(u.shape,l),d.updateProps(s,u,o,e),f.each(g,function(i){var o=t.getItemVisual(e,i),a=n(i);if(this[a]!==o){this.remove(this.childOfName(i));var s=r(i,t,e);this.add(s)}this[a]=o},this),this._updateCommonStl(t,e,i)},v._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=i&&i.lineStyle,a=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);o=u.getModel("lineStyle.normal").getLineStyle(),a=u.getModel("lineStyle.emphasis").getLineStyle(),s=u.getModel("label.normal"),l=u.getModel("label.emphasis")}var h=t.getItemVisual(e,"color");isNaN(c)&&(c=t.getName(e)),r.useStyle(f.defaults({strokeNoScale:!0,fill:"none",stroke:h},o)),r.hoverStyle=a;var c,g,v=s.getShallow("show"),m=l.getShallow("show"),y=this.childOfName("label");if((v||m)&&(c=p.round(n.getRawValue(e)),g=h||"#000"),v){var x=s.getModel("textStyle");y.setStyle({text:f.retrieve(n.getFormattedLabel(e,"normal",t.dataType),c),textFont:x.getFont(),fill:x.getTextColor()||g}),y.__textAlign=x.get("align"),y.__verticalAlign=x.get("baseline"),y.__position=s.get("position")}else y.setStyle("text","");if(m){var _=l.getModel("textStyle");y.hoverStyle={text:f.retrieve(n.getFormattedLabel(e,"emphasis",t.dataType),c),textFont:_.getFont(),fill:_.getTextColor()||g}}else y.hoverStyle={text:""};y.ignore=!v&&!m,d.setHoverStyle(this)},v.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},v.setLinePoints=function(t){var e=this.childOfName("line");a(e.shape,t),e.dirty()},f.inherits(l,d.Group),t.exports=l},function(t,e,i){function n(t){return isNaN(t[0])||isNaN(t[1])}function r(t){return!n(t[0])&&!n(t[1])}function o(t){this._ctor=t||s,this.group=new a.Group}var a=i(3),s=i(93),l=o.prototype;l.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,o=t.hostModel,a={lineStyle:o.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:o.getModel("lineStyle.emphasis").getLineStyle(),labelModel:o.getModel("label.normal"),hoverLabelModel:o.getModel("label.emphasis")};t.diff(e).add(function(e){if(r(t.getItemLayout(e))){var o=new n(t,e,a);t.setItemGraphicEl(e,o),i.add(o)}}).update(function(o,s){var l=e.getItemGraphicEl(s);return r(t.getItemLayout(o))?(l?l.updateData(t,o,a):l=new n(t,o,a),t.setItemGraphicEl(o,l),void i.add(l)):void i.remove(l)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},l.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},l.remove=function(){this.group.removeAll()},t.exports=o},function(t,e,i){var n=i(1),r=i(2),o=r.PRIORITY;i(96),i(97),r.registerVisual(n.curry(i(46),"line","circle","line")),r.registerLayout(n.curry(i(55),"line")),r.registerProcessor(o.PROCESSOR.STATISTIC,n.curry(i(132),"line")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return n(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},function(t,e,i){"use strict";function n(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function a(t){return t>=0?1:-1}function s(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=i.onZero?0:n.scale.getExtent()[0],o=n.dim,s="x"===o||"radius"===o?1:0;return e.mapArray([o],function(n,l){for(var u,h=e.stackedOn;h&&a(h.get(o,l))===a(n);){u=h;break}var c=[];return c[s]=e.get(i.dim,l),c[1-s]=u?u.get(o,l,!0):r,t.dataToPoint(c)},!0)}function l(t,e){return null!=e.dataIndex?e.dataIndex:null!=e.name?t.indexOfName(e.name):void 0}function u(t,e,i){var n=o(t.getAxis("x")),r=o(t.getAxis("y")),a=t.getBaseAxis().isHorizontal(),s=Math.min(n[0],n[1]),l=Math.min(r[0],r[1]),u=Math.max(n[0],n[1])-s,h=Math.max(r[0],r[1])-l,c=i.get("lineStyle.normal.width")||2,d=i.get("clipOverflow")?c/2:Math.max(u,h);a?(l-=d,h+=2*d):(s-=d,u+=2*d);var f=new x.Rect({shape:{x:s,y:l,width:u,height:h}});return e&&(f.shape[a?"width":"height"]=0,x.initProps(f,{shape:{width:u,height:h}},i)),f}function h(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),o=r.getExtent(),a=n.getExtent(),s=Math.PI/180,l=new x.Sector({shape:{cx:t.cx,cy:t.cy,r0:o[0],r:o[1],startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-a[0]*s,x.initProps(l,{shape:{endAngle:-a[1]*s}},i)),l}function c(t,e,i){return"polar"===t.type?h(t,e,i):u(t,e,i)}function d(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a=0;r--)if(i[r].dimension<2){n=i[r];break}if(n&&"cartesian2d"===e.type){var o=n.dimension,a=t.dimensions[o],s=t.getDataExtent(a),l=n.stops,u=[];l[0].interval&&l.sort(function(t,e){return t.interval[0]-e.interval[0]});for(var h=l[0],c=l[l.length-1],d=h.interval?f(h.interval[0],s):h.value,p=c.interval?f(c.interval[1],s):c.value,v=p-d,r=0;r=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);a=new m(r,o),a.position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else b.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=l(r,n);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else b.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new _.Polyline({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new _.Polygon({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];return i&&i.isLabelIgnored?g.bind(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var o=this._polyline,a=this._polygon,s=t.hostModel,l=y(this._data,t,this._stackedOnPoints,e,this._coordSys,i),u=l.current,h=l.stackedOnCurrent,c=l.next,f=l.stackedOnNext;r&&(u=d(l.current,i,r),h=d(l.stackedOnCurrent,i,r),c=d(l.next,i,r),f=d(l.stackedOnNext,i,r)),o.shape.__points=l.current,o.shape.points=u,x.updateProps(o,{shape:{points:c}},s),a&&(a.setShape({points:u,stackedOnPoints:h}),x.updateProps(a,{shape:{points:c,stackedOnPoints:f,__points:l.next}},s));for(var p=[],g=l.status,v=0;v=0?1:-1}function n(t,e,n){for(var r,o=t.getBaseAxis(),a=t.getOtherAxis(o),s=o.onZero?0:a.scale.getExtent()[0],l=a.dim,u="x"===l||"radius"===l?1:0,h=e.stackedOn,c=e.get(l,n);h&&i(h.get(l,n))===i(c);){r=h;break}var d=[];return d[u]=e.get(o.dim,n),d[1-u]=r?r.get(l,n,!0):s,t.dataToPoint(d)}function r(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}t.exports=function(t,e,i,o,a,s){for(var l=r(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],v=s.dimensions,m=0;mw;w++){var S=e[b];if(b>=o||0>b)break;if(n(S)){if(x){b+=a;continue}break}if(b===i)t[a>0?"moveTo":"lineTo"](S[0],S[1]),c(f,S);else if(m>0){var M=b+a,A=e[M];if(x)for(;A&&n(e[M]);)M+=a,A=e[M];var I=.5,T=e[_],A=e[M];if(!A||n(A))c(p,S);else{n(A)&&!x&&(A=S),s.sub(d,A,T);var L,C;if("x"===y||"y"===y){var D="x"===y?0:1;L=Math.abs(S[D]-T[D]),C=Math.abs(S[D]-A[D])}else L=s.dist(S,T),C=s.dist(S,A);I=C/(C+L),h(p,S,d,-m*(1-I))}l(f,f,v),u(f,f,g),l(p,p,v),u(p,p,g),t.bezierCurveTo(f[0],f[1],p[0],p[1],S[0],S[1]),h(f,S,d,m*I)}else t.lineTo(S[0],S[1]);_=b,b+=a}return w}function o(t,e){var i=[1/0,1/0],n=[-(1/0),-(1/0)];if(e)for(var r=0;rn[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var a=i(6),s=i(5),l=s.min,u=s.max,h=s.scaleAndAdd,c=s.copy,d=[],f=[],p=[];t.exports={Polyline:a.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},buildPath:function(t,e){var i=e.points,a=0,s=i.length,l=o(i,e.smoothConstraint);if(e.connectNulls){for(;s>0&&n(i[s-1]);s--);for(;s>a&&n(i[a]);a++);}for(;s>a;)a+=r(t,i,a,s,s,1,l.min,l.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Polygon:a.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},buildPath:function(t,e){var i=e.points,a=e.stackedOnPoints,s=0,l=i.length,u=e.smoothMonotone,h=o(i,e.smoothConstraint),c=o(a,e.smoothConstraint);if(e.connectNulls){for(;l>0&&n(i[l-1]);l--);for(;l>s&&n(i[s]);s++);}for(;l>s;){var d=r(t,i,s,l,l,1,h.min,h.max,e.smooth,u,e.connectNulls);r(t,a,s+d-1,d,l,-1,c.min,c.max,e.stackedOnSmooth,u,e.connectNulls),s+=d+1,t.closePath()}}})}},function(t,e,i){var n=i(1),r=i(2);i(101),i(102),i(78)("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(n.curry(i(73),"pie")),r.registerLayout(n.curry(i(104),"pie")),r.registerProcessor(n.curry(i(71),"pie"))},function(t,e,i){"use strict";var n=i(13),r=i(1),o=i(8),a=i(30),s=i(67),l=i(2).extendSeriesModel({type:"series.pie",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){l.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=a(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},getDataParams:function(t){var e=this._data,i=l.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},_defaultLabelLine:function(t){o.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,avoidLabelOverlap:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationEasing:"cubicOut",data:[]}});r.mixin(l,s),t.exports=l},function(t,e,i){function n(t,e,i,n){var o=e.getData(),a=this.dataIndex,s=o.getName(a),l=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),o.each(function(t){r(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),l,i)})}function r(t,e,i,n,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=i?n:0,u=[a*l,s*l];r?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function o(t,e){function i(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function n(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}s.Group.call(this);var r=new s.Sector({z2:2}),o=new s.Polyline,a=new s.Text;this.add(r), +this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function a(t,e,i,n,r){var o=n.getModel("textStyle"),a="inside"===r||"inner"===r;return{fill:o.getTextColor()||(a?"#fff":t.getItemVisual(e,"color")),opacity:t.getItemVisual(e,"opacity"),textFont:o.getFont(),text:l.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var s=i(3),l=i(1),u=o.prototype;u.updateData=function(t,e,i){function n(){a.stopAnimation(!0),a.animateTo({shape:{r:c.r+10}},300,"elasticOut")}function o(){a.stopAnimation(!0),a.animateTo({shape:{r:c.r}},300,"elasticOut")}var a=this.childAt(0),u=t.hostModel,h=t.getItemModel(e),c=t.getItemLayout(e),d=l.extend({},c);d.label=null,i?(a.setShape(d),a.shape.endAngle=c.startAngle,s.updateProps(a,{shape:{endAngle:c.endAngle}},u,e)):s.updateProps(a,{shape:d},u,e);var f=h.getModel("itemStyle"),p=t.getItemVisual(e,"color");a.useStyle(l.defaults({lineJoin:"bevel",fill:p},f.getModel("normal").getItemStyle())),a.hoverStyle=f.getModel("emphasis").getItemStyle(),r(this,t.getItemLayout(e),h.get("selected"),u.get("selectedOffset"),u.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoverAnimation")&&u.ifEnableAnimation()&&a.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),s.setHoverStyle(this)},u._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),l=t.getItemLayout(e),u=l.label,h=t.getItemVisual(e,"color");s.updateProps(i,{shape:{points:u.linePoints||[[u.x,u.y],[u.x,u.y],[u.x,u.y]]}},r,e),s.updateProps(n,{style:{x:u.x,y:u.y}},r,e),n.attr({style:{textVerticalAlign:u.verticalAlign,textAlign:u.textAlign,textFont:u.font},rotation:u.rotation,origin:[u.x,u.y],z2:10});var c=o.getModel("label.normal"),d=o.getModel("label.emphasis"),f=o.getModel("labelLine.normal"),p=o.getModel("labelLine.emphasis"),g=c.get("position")||d.get("position");n.setStyle(a(t,e,"normal",c,g)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:h,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=a(t,e,"emphasis",d,g),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var v=f.get("smooth");v&&v===!0&&(v=.4),i.setShape({smooth:v})},l.inherits(o,s.Group);var h=i(27).extend({type:"pie",init:function(){var t=new s.Group;this._sectorGroup=t},render:function(t,e,i,r){if(!r||r.from!==this.uid){var a=t.getData(),s=this._data,u=this.group,h=e.get("animation"),c=!s,d=l.curry(n,this.uid,t,h,i),f=t.get("selectedMode");if(a.diff(s).add(function(t){var e=new o(a,t);c&&e.eachChild(function(t){t.stopAnimation(!0)}),f&&e.on("click",d),a.setItemGraphicEl(t,e),u.add(e)}).update(function(t,e){var i=s.getItemGraphicEl(e);i.updateData(a,t),i.off("click"),f&&i.on("click",d),u.add(i),a.setItemGraphicEl(t,i)}).remove(function(t){var e=s.getItemGraphicEl(t);u.remove(e)}).execute(),h&&c&&a.count()>0){var p=a.getItemLayout(0),g=Math.max(i.getWidth(),i.getHeight())/2,v=l.bind(u.removeClipPath,u);u.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,v,t))}this._data=a}},_createClipPath:function(t,e,i,n,r,o,a){var l=new s.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return s.initProps(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),l}});t.exports=h},function(t,e,i){"use strict";function n(t,e,i,n,r,o,a){function s(e,i,n,r){for(var o=e;i>o;o++)if(t[o].y+=n,o>e&&i>o+1&&t[o+1].y>t[o].y+t[o].height)return void l(o,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function u(t,e,i,n,r,o){for(var a=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=r+h>u?Math.sqrt((r+h+c)*(r+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var h,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)h=t[g].y-c,0>h&&s(g,d,-h,r),c=t[g].y+t[g].height;0>a-c&&l(d-1,c-a);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);u(f,!1,e,i,n,r),u(p,!0,e,i,n,r)}function r(t,e,i,r,o,a){for(var s=[],l=[],u=0;ub?-1:1)*x,C=T;n=L+(0>b?-5:5),r=C,c=[[M,A],[I,T],[L,C]]}d=S?"center":b>0?"left":"right"}var D=g.getModel("textStyle").getFont(),P=g.get("rotate")?0>b?-_+Math.PI:-_:0,k=t.getFormattedLabel(i,"normal")||l.getName(i),z=o.getBoundingRect(k,D,d,"top");h=!!P,f.label={x:n,y:r,position:v,height:z.height,len:y,len2:x,linePoints:c,textAlign:d,verticalAlign:"middle",font:D,rotation:P},S||u.push(f.label)}),!h&&t.get("avoidLabelOverlap")&&r(u,a,s,e,i,n)}},function(t,e,i){var n=i(4),r=n.parsePercent,o=i(103),a=i(1),s=2*Math.PI,l=Math.PI/180;t.exports=function(t,e,i,u){e.eachSeriesByType(t,function(t){var e=t.get("center"),u=t.get("radius");a.isArray(u)||(u=[0,u]),a.isArray(e)||(e=[e,e]);var h=i.getWidth(),c=i.getHeight(),d=Math.min(h,c),f=r(e[0],h),p=r(e[1],c),g=r(u[0],d/2),v=r(u[1],d/2),m=t.getData(),y=-t.get("startAngle")*l,x=t.get("minAngle")*l,_=m.getSum("value"),b=Math.PI/(_||m.count())*2,w=t.get("clockwise"),S=t.get("roseType"),M=m.getDataExtent("value");M[0]=0;var A=s,I=0,T=y,L=w?1:-1;if(m.each("value",function(t,e){var i;i="area"!==S?0===_?b:t*b:s/(m.count()||1),x>i?(i=x,A-=x):I+=t;var r=T+L*i;m.setItemLayout(e,{angle:i,startAngle:T,endAngle:r,clockwise:w,cx:f,cy:p,r0:g,r:S?n.linearMap(t,M,[g,v]):v}),T=r},!0),s>A)if(.001>=A){var C=s/m.count();m.each(function(t){var e=m.getItemLayout(t);e.startAngle=y+L*t*C,e.endAngle=y+L*(t+1)*C})}else b=A/I,T=y,m.each("value",function(t,e){var i=m.getItemLayout(e),n=i.angle===x?x:t*b;i.startAngle=T,i.endAngle=T+L*n,T+=n});o(t,v,h,c)})}},function(t,e,i){"use strict";i(53),i(106)},function(t,e,i){function n(t,e){function i(t,e){var i=n.getAxis(t);return i.toGlobalCoord(i.dataToCoord(0))}var n=t.coordinateSystem,r=e.axis,o={},a=r.position,s=r.onZero?"onZero":a,l=r.dim,u=n.getRect(),h=[u.x,u.x+u.width,u.y,u.y+u.height],c={x:{top:h[2],bottom:h[3]},y:{left:h[0],right:h[1]}};c.x.onZero=Math.max(Math.min(i("y"),c.x.bottom),c.x.top),c.y.onZero=Math.max(Math.min(i("x"),c.y.right),c.y.left),o.position=["y"===l?c.y[s]:h[0],"x"===l?c.x[s]:h[3]],o.rotation=Math.PI/2*("x"===l?0:1);var d={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=d[a],r.onZero&&(o.labelOffset=c[l][a]-c[l].onZero),e.getModel("axisTick").get("inside")&&(o.tickDirection=-o.tickDirection),e.getModel("axisLabel").get("inside")&&(o.labelDirection=-o.labelDirection);var f=e.getModel("axisLabel").get("rotate");return o.labelRotation="top"===s?-f:f,o.labelInterval=r.getLabelInterval(),o.z2=1,o}var r=i(1),o=i(3),a=i(50),s=a.ifIgnoreOnTick,l=a.getInterval,u=["axisLine","axisLabel","axisTick","axisName"],h=["splitArea","splitLine"],c=i(2).extendComponentView({type:"axis",render:function(t,e){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new o.Group,this.group.add(this._axisGroup),t.get("show")){var s=e.getComponent("grid",t.get("gridIndex")),l=n(s,t),c=new a(t,l);r.each(u,c.add,c),this._axisGroup.add(c.getGroup()),r.each(h,function(e){t.get(e+".show")&&this["_"+e](t,s,l.labelInterval)},this),o.groupTransition(i,this._axisGroup,t)}},_splitLine:function(t,e,i){var n=t.axis,a=t.getModel("splitLine"),u=a.getModel("lineStyle"),h=u.get("color"),c=l(a,i);h=r.isArray(h)?h:[h];for(var d=e.coordinateSystem.getRect(),f=n.isHorizontal(),p=0,g=n.getTicksCoords(),v=n.scale.getTicks(),m=[],y=[],x=u.getLineStyle(),_=0;_=0;r--){var o=i[r];if(o[n])break}if(0>r){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var s=a.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)},pop:function(t){var e=n(t),i=e[e.length-1];e.length>1&&e.pop();var r={};return o(i,function(t,i){for(var n=e.length-1;n>=0;n--){var t=e[n][i];if(t){r[i]=t;break}}}),r},clear:function(t){t[a]=null},count:function(t){return n(t).length}};t.exports=s},function(t,e,i){i(10).registerSubTypeDefaulter("dataZoom",function(t){return"slider"})},function(t,e,i){function n(t){V.call(this),this._zr=t,this.group=new B.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+et++,this._handlers={},W(it,function(t,e){this._handlers[e]=N.bind(t,this)},this)}function r(t,e){var i=t._zr;t._enableGlobalPan||G.take(i,Q,t._uid),W(t._handlers,function(t,e){i.on(e,t)}),t._brushType=e.brushType,t._brushOption=N.merge(N.clone(tt),e,!0)}function o(t){var e=t._zr;G.release(e,Q,t._uid),W(t._handlers,function(t,i){e.off(i,t)}),t._brushType=t._brushOption=null}function a(t,e){var i=nt[e.brushType].createCover(t,e);return u(i),i.__brushOption=e,t.group.add(i),i}function s(t,e){var i=c(e);return i.endCreating&&(i.endCreating(t,e),u(e)),e}function l(t,e){var i=e.__brushOption;c(e).updateCoverShape(t,e,i.range,i)}function u(t){t.traverse(function(t){t.z=X,t.z2=X})}function h(t,e){c(e).updateCommon(t,e),l(t,e)}function c(t){return nt[t.__brushOption.brushType]}function d(t,e,i){var n=t._panels;if(!n)return!0;var r;return W(n,function(t){t.contain(e,i)&&(r=t)}),r}function f(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null!=n?i[n]:!0}function p(t){var e=t._covers,i=e.length;return W(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function g(t,e){var i=Z(t._covers,function(t){var e=t.__brushOption,i=N.clone(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function v(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],r=i[0]-n[0],o=i[1]-n[1],a=U(r*r+o*o,.5);return a>Y}function m(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function y(t,e,i,n){var r=new B.Group;return r.add(new B.Rect({name:"main",style:w(i),silent:!0,draggable:!0,cursor:"move",drift:H(t,e,r,"nswe"),ondragend:H(g,e,{isEnd:!0})})),W(n,function(i){r.add(new B.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:H(t,e,r,i),ondragend:H(g,e,{isEnd:!0})}))}),r}function x(t,e,i,n){var r=n.brushStyle.lineWidth||0,o=j(r,$),a=i[0][0],s=i[1][0],l=a-r/2,u=s-r/2,h=i[0][1],c=i[1][1],d=h-o+r/2,f=c-o+r/2,p=h-a,g=c-s,v=p+r,m=g+r;b(t,e,"main",a,s,p,g),n.transformable&&(b(t,e,"w",l,u,o,m),b(t,e,"e",d,u,o,m),b(t,e,"n",l,u,v,o),b(t,e,"s",l,f,v,o),b(t,e,"nw",l,u,o,o),b(t,e,"ne",d,u,o,o),b(t,e,"sw",l,f,o,o),b(t,e,"se",d,f,o,o))}function _(t,e){var i=e.__brushOption,n=i.transformable,r=e.childAt(0);r.useStyle(w(i)),r.attr({silent:!n,cursor:n?"move":"default"}),W(["w","e","n","s","se","sw","ne","nw"],function(i){var r=e.childOfName(i),o=A(t,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?J[o]+"-resize":null})})}function b(t,e,i,n,r,o,a){var s=e.childOfName(i);s&&s.setShape(D(C(t,e,[[n,r],[n+o,r+a]])))}function w(t){return N.defaults({strokeNoScale:!0},t.brushStyle)}function S(t,e,i,n){var r=[q(t,i),q(e,n)],o=[j(t,i),j(e,n)];return[[r[0],o[0]],[r[1],o[1]]]}function M(t){return B.getTransform(t.group)}function A(t,e){if(e.length>1){e=e.split("");var i=[A(t,e[0]),A(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=B.transformDirection(n[e],M(t));return r[i]}function I(t,e,i,n,r,o,a,s){var l=n.__brushOption,u=t(l.range),c=L(i,o,a);W(r.split(""),function(t){var e=K[t];u[e[0]][e[1]]+=c[e[0]]}),l.range=e(S(u[0][0],u[1][0],u[0][1],u[1][1])),h(i,n),g(i,{isEnd:!1})}function T(t,e,i,n,r){var o=e.__brushOption.range,a=L(t,i,n);W(o,function(t){t[0]+=a[0],t[1]+=a[1]}),h(t,e),g(t,{isEnd:!1})}function L(t,e,i){var n=t.group,r=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function C(t,e,i){var n=f(t,e);if(n===!0)return N.clone(i);var r=n.getBoundingRect();return N.map(i,function(t){var e=t[0];e=j(e,r.x),e=q(e,r.x+r.width);var i=t[1];return i=j(i,r.y),i=q(i,r.y+r.height),[e,i]})}function D(t){var e=q(t[0][0],t[1][0]),i=q(t[0][1],t[1][1]),n=j(t[0][0],t[1][0]),r=j(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:r-i}}function P(t,e){var i=e.offsetX,n=e.offsetY,r=t._zr;if(t._brushType){for(var o,a=t._panels,s=t._covers,l=0;lt[1]&&t.reverse(),t}function r(t,e){for(var i=!0,n=0;n=0){i=!1;for(var o=0;o=0?(i=n.getBoundingRect().clone(),i.applyTransform(s.getTransform(n))):i=n.grid.getRect().clone(),e.push({panelId:t.panelId,rect:i})}),e},u.makeCoordInfoList=function(t,e){var i=[];return l(h,function(n){var r=t[n+"Index"];null!=r&&"none"!==r&&("all"===r||a.isArray(r)||(r=[r]),e.eachComponent({mainType:n},function(t,e){if(!("all"!==r&&a.indexOf(r,e)<0)){var o,s;"xAxis"===n||"yAxis"===n?o=t.axis.grid:s=t.coordinateSystem;for(var l,u=0,h=i.length;h>u;u++){var d=i[u];if("yAxis"===n&&!d.yAxis&&d.xAxis){var f=o.getCartesian(d.xAxisIndex,e);if(f){s=f,l=d;break}}}!l&&i.push(l={}),l[n]=t,l[n+"Index"]=e,l.panelId=n+c+e,l.coordSys=s||o.getCartesian(l.xAxisIndex,l.yAxisIndex),l.coordSys?i[n+"Has"]=!0:i.pop()}}))}),i},u.controlSeries=function(t,e,i){var n=r(t,e.coordInfoList);return n===!0||n&&n.coordSys===i.coordinateSystem};var f={lineX:a.curry(o,"x"),lineY:a.curry(o,"y"),rect:function(t,e,i){var r=e.coordSys,o=r[d[t]]([i[0][0],i[1][0]]),a=r[d[t]]([i[0][1],i[1][1]]);return[n([o[0],a[0]]),n([o[1],a[1]])]},polygon:function(t,e,i){var n=e.coordSys;return a.map(i,n[d[t]],n)}};t.exports=u},function(t,e,i){function n(t){return t[r]||(t[r]={})}var r="\x00_ec_interaction_mutex",o={take:function(t,e,i){var r=n(t);r[e]=i},release:function(t,e,i){var r=n(t),o=r[e];o===i&&(r[e]=null)},isTaken:function(t,e){return!!n(t)[e]}};i(2).registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),t.exports=o},function(t,e,i){function n(t,e,i){r.positionGroup(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"))}var r=i(14),o=i(11),a=i(3);t.exports={layout:function(t,e,i){var o=r.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},e.get("padding"));r.box(e.get("orient"),t,e.get("itemGap"),o.width,o.height),n(t,e,i)},addBackground:function(t,e){var i=o.normalizeCssArray(e.get("padding")),n=t.getBoundingRect(),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var s=new a.Rect({shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},style:r,silent:!0,z2:-1});a.subPixelOptimizeRect(s),t.add(s)}}},function(t,e,i){var n=i(1),r=i(42),o=i(119),a=function(t,e,i,n,o){r.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"};a.prototype={constructor:a,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),t},getLabelInterval:function(){var t=this._labelInterval;return t||(t=this._labelInterval=o(this)),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},toLocalCoord:null,toGlobalCoord:null},n.inherits(a,r),t.exports=a},function(t,e,i){"use strict";function n(t){return this._axes[t]}var r=i(1),o=function(t){this._axes={},this._dimList=[],this.name=t||""};o.prototype={constructor:o,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return r.map(this._dimList,n,this)},getAxesByScale:function(t){return t=t.toLowerCase(),r.filter(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;ri&&(i=Math.min(i,h),h-=i,t.width=i,c--)}),d=(h-s)/(c+(c-1)*u),d=Math.max(d,0);var f,p=0;a.each(i,function(t,e){t.width||(t.width=d),f=t,p+=t.width*(1+u)}),f&&(p-=f.width*u);var g=-p/2;a.each(i,function(t,i){r[e][i]=r[e][i]||{offset:g,width:t.width},g+=t.width*(1+u)})}),r}function o(t,e,i){var o=r(a.filter(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),s={};e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=n(t),l=o[r.index][a],u=l.offset,h=l.width,c=i.getOtherAxis(r),d=t.get("barMinHeight")||0,f=r.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=i.dataToPoints(e,!0);s[a]=s[a]||[],e.setLayout({offset:u,size:h}),e.each(c.dim,function(t,i){if(!isNaN(t)){s[a][i]||(s[a][i]={p:f,n:f});var n,r,o,l,g=t>=0?"p":"n",v=p[i],m=s[a][i][g];c.isHorizontal()?(n=m,r=v[1]+u,o=v[0]-m,l=h,Math.abs(o)o?-1:1)*d),s[a][i][g]+=o):(n=v[0]+u,r=m,o=h,l=v[1]-m,Math.abs(l)=l?-1:1)*d),s[a][i][g]+=l),e.setItemLayout(i,{x:n,y:r,width:o,height:l})}},!0)},this)}var a=i(1),s=i(4),l=s.parsePercent;t.exports=o},function(t,e,i){var n=i(3),r=i(1),o=Math.PI;t.exports=function(t,e){e=e||{},r.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new n.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),a=new n.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),s=new n.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut");var l=new n.Group;return l.add(a),l.add(s),l.add(i),l.resize=function(){var e=t.getWidth()/2,n=t.getHeight()/2;a.setShape({cx:e,cy:n});var r=a.shape.r;s.setShape({x:e-r,y:n-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},l.resize(),l}},function(t,e,i){function n(t,e){for(var i in e)_.hasClass(i)||("object"==typeof e[i]?t[i]=t[i]?c.merge(t[i],e[i],!1):c.clone(e[i]):null==t[i]&&(t[i]=e[i]))}function r(t){t=t,this.option={},this.option[w]=1,this._componentsMap={},this._seriesIndices=null,n(t,this._theme.option),c.merge(t,b,!1),this.mergeOption(t)}function o(t,e){c.isArray(e)||(e=e?[e]:[]);var i={};return p(e,function(e){i[e]=(t[e]||[]).slice()}),i}function a(t,e){var i={};p(e,function(t,e){var n=t.exist;n&&(i[n.id]=t)}),p(e,function(e,n){var r=e.option;if(c.assert(!r||null==r.id||!i[r.id]||i[r.id]===e,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&(i[r.id]=e),x(r)){var o=s(t,r,e.exist);e.keyInfo={mainType:t,subType:o}}}),p(e,function(t,e){var n=t.exist,r=t.option,o=t.keyInfo;if(x(r)){if(o.name=null!=r.name?r.name+"":n?n.name:"\x00-",n)o.id=n.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do o.id="\x00"+o.name+"\x00"+a++;while(i[o.id])}i[o.id]=t}})}function s(t,e,i){var n=e.type?e.type:i?i.subType:_.determineSubType(t,e);return n}function l(t){return v(t,function(t){return t.componentIndex})||[]}function u(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function h(t){}var c=i(1),d=i(8),f=i(9),p=c.each,g=c.filter,v=c.map,m=c.isArray,y=c.indexOf,x=c.isObject,_=i(10),b=i(124),w="\x00_ec_inner",S=f.extend({constructor:S,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new f(i),this._optionManager=n},setOption:function(t,e){c.assert(!(w in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption()},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):r.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&p(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,r){var s=d.normalizeToArray(t[e]),u=d.mappingToExists(n[e],s);a(e,u);var h=o(n,r);i[e]=[],n[e]=[],p(u,function(t,r){var o=t.exist,a=t.option;if(c.assert(x(a)||o,"Empty component definition"),a){var s=_.getClass(e,t.keyInfo.subType,!0);o&&o instanceof s?(o.mergeOption(a,this),o.optionUpdated(a,!1)):(o=new s(a,this,this,c.extend({dependentModels:h,componentIndex:r},t.keyInfo)),o.optionUpdated(null,!0))}else o.mergeOption({},this),o.optionUpdated({},!1);n[e][r]=o,i[e][r]=o.option},this),"series"===e&&(this._seriesIndices=l(n.series))}var i=this.option,n=this._componentsMap,r=[];p(t,function(t,e){null!=t&&(_.hasClass(e)?r.push(e):i[e]=null==i[e]?c.clone(t):c.merge(i[e],t,!0))}),_.topologicalTravel(r,_.getAllClassMainTypes(),e,this)},getOption:function(){var t=c.clone(this.option);return p(t,function(e,i){if(_.hasClass(i)){for(var e=d.normalizeToArray(e),n=e.length-1;n>=0;n--)d.isIdInner(e[n])&&e.splice(n,1);t[i]=e}}),delete t[w],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap[t];return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,o=this._componentsMap[e];if(!o||!o.length)return[];var a;if(null!=i)m(i)||(i=[i]),a=g(v(i,function(t){return o[t]}),function(t){ +return!!t});else if(null!=n){var s=m(n);a=g(o,function(t){return s&&y(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=m(r);a=g(o,function(t){return l&&y(r,t.name)>=0||!l&&t.name===r})}return u(a,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(i)||t.hasOwnProperty(n))?{mainType:r,index:t[e],id:t[i],name:t[n]}:null}function i(e){return t.filter?g(e,t.filter):e}var n=t.query,r=t.mainType,o=e(n),a=o?this.queryComponents(o):this._componentsMap[r];return i(u(a,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,p(n,function(t,n){p(t,function(t,r){e.call(i,n,t,r)})});else if(c.isString(t))p(n[t],e,i);else if(x(t)){var r=this.findComponents(t);p(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){h(this),p(this._seriesIndices,function(i){var n=this._componentsMap.series[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){p(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,i){h(this),p(this._seriesIndices,function(n){var r=this._componentsMap.series[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return p(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return h(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){h(this);var i=g(this._componentsMap.series,t,e);this._seriesIndices=l(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=l(t.series);var e=[];p(t,function(t,i){e.push(i)}),_.topologicalTravel(e,_.getAllClassMainTypes(),function(e,i){p(t[e],function(t){t.restoreData()})})}});c.mixin(S,i(56)),t.exports=S},function(t,e,i){function n(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e,i){var n,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;d(l,function(t){t&&t.option&&(t.query?a.push(t):n||(n=t))})}return r||(r=t),r.timeline||(r.timeline=s),d([r].concat(o).concat(u.map(a,function(t){return t.option})),function(t){d(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:o,mediaDefault:n,mediaList:a}}function o(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return u.each(t,function(t,e){var i=e.match(v);if(i&&i[1]&&i[2]){var o=i[1],s=i[2].toLowerCase();a(n[s],t,o)||(r=!1)}}),r}function a(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},d(e,function(e,i){if(null!=e){var n=t[i];if(c.hasClass(i)){e=h.normalizeToArray(e),n=h.normalizeToArray(n);var r=h.mappingToExists(n,e);t[i]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[i]=g(n,e,!0)}})}var u=i(1),h=i(8),c=i(10),d=u.each,f=u.clone,p=u.map,g=u.merge,v=/^(min|max)?(.+)$/;n.prototype={constructor:n,setOption:function(t,e){t=f(t,!0);var i=this._optionBackup,n=r.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(l(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,f),this._mediaList=p(e.mediaList,f),this._mediaDefault=f(e.mediaDefault),this._currentMediaIndices=[],f(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=f(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,r=this._mediaDefault,a=[],l=[];if(!n.length&&!r)return l;for(var u=0,h=n.length;h>u;u++)o(n[u].query,e,i)&&a.push(u);return!a.length&&r&&(a=[-1]),a.length&&!s(a,this._currentMediaIndices)&&(l=p(a,function(t){return f(-1===t?r.option:n[t].option)})),this._currentMediaIndices=a,l}},t.exports=n},function(t,e){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||""),t.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],grid:{},textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:!0,animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3}},function(t,e,i){t.exports={getAreaStyle:i(31)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]])}},function(t,e){t.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(t,e,i){var n=i(31)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getItemStyle:function(t){var e=n.call(this,t),i=this.getBorderLineDash();return i&&(e.lineDash=i),e},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){var n=i(31)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getLineStyle:function(t){var e=n.call(this,t),i=this.getLineDash();return i&&(e.lineDash=i),e},getLineDash:function(){var t=this.get("type");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){function n(t,e){return t&&t.getShallow(e)}var r=i(18);t.exports={getTextColor:function(){var t=this.ecModel;return this.getShallow("color")||t&&t.get("textStyle.color")},getFont:function(){var t=this.ecModel,e=t&&t.getModel("textStyle");return[this.getShallow("fontStyle")||n(e,"fontStyle"),this.getShallow("fontWeight")||n(e,"fontWeight"),(this.getShallow("fontSize")||n(e,"fontSize")||12)+"px",this.getShallow("fontFamily")||n(e,"fontFamily")||"sans-serif"].join(" ")},getTextRect:function(t){var e=this.get("textStyle")||{};return r.getBoundingRect(t,this.getFont(),e.align,e.baseline)},ellipsis:function(t,e,i){return r.ellipsis(t,this.getFont(),e,i)}}},function(t,e,i){function n(t,e){e=e.split(",");for(var i=t,n=0;ne&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var c;"string"==typeof r?c=i[r]:"function"==typeof r&&(c=r),c&&(e=e.downSample(s.dim,1/h,c,n),t.setData(e))}}},this)}},function(t,e,i){var n=i(1),r=i(32),o=i(4),a=i(38),s=r.prototype,l=a.prototype,u=Math.floor,h=Math.ceil,c=Math.pow,d=10,f=Math.log,p=r.extend({type:"log",getTicks:function(){return n.map(l.getTicks.call(this),function(t){return o.round(c(d,t))})},getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),c(d,t)},setExtent:function(t,e){t=f(t)/f(d),e=f(e)/f(d),l.setExtent.call(this,t,e)},getExtent:function(){var t=s.getExtent.call(this);return t[0]=c(d,t[0]),t[1]=c(d,t[1]),t},unionExtent:function(t){t[0]=f(t[0])/f(d),t[1]=f(t[1])/f(d),s.unionExtent.call(this,t)},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||0>=i)){var n=c(10,u(f(i/t)/Math.LN10)),r=t/i*n;.5>=r&&(n*=10);var a=[o.round(h(e[0]/n)*n),o.round(u(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:l.niceExtent});n.each(["contain","normalize"],function(t){p.prototype[t]=function(e){return e=f(e)/f(d),s[t].call(this,e)}}),p.create=function(){return new p},t.exports=p},function(t,e,i){var n=i(1),r=i(32),o=r.prototype,a=r.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?n.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),o.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return o.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(o.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},niceTicks:n.noop,niceExtent:n.noop});a.create=function(){return new a},t.exports=a},function(t,e,i){var n=i(1),r=i(4),o=i(11),a=i(38),s=a.prototype,l=Math.ceil,u=Math.floor,h=1e3,c=60*h,d=60*c,f=24*d,p=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][2]=0;r--)if(!n[r].silent&&n[r]!==i&&!n[r].ignore&&a(n[r],t,e))return n[r]}},f.mixin(A,v),f.mixin(A,p),t.exports=A},function(t,e,i){function n(){return!1}function r(t,e,i,n){var r=document.createElement(e),o=i.getWidth(),a=i.getHeight(),s=r.style;return s.position="absolute",s.left=0,s.top=0,s.width=o+"px",s.height=a+"px",r.width=o*n,r.height=a*n,r.setAttribute("data-zr-dom-id",t),r}var o=i(1),a=i(33),s=i(64),l=i(63),u=function(t,e,i){var s;i=i||a.devicePixelRatio,"string"==typeof t?s=r(t,"canvas",e,i):o.isObject(t)&&(s=t,t=s.id),this.id=t,this.dom=s;var l=s.style;l&&(s.onselectstart=n,l["-webkit-user-select"]="none",l["user-select"]="none",l["-webkit-touch-callout"]="none",l["-webkit-tap-highlight-color"]="rgba(0,0,0,0)"),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};u.prototype={constructor:u,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d");var t=this.dpr;1!=t&&this.ctx.scale(t,t)},createBackBuffer:function(){var t=this.dpr;this.domBack=r("back-"+this.id,"canvas",this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,o=this.domBack;r.width=t+"px",r.height=e+"px",n.width=t*i,n.height=e*i,1!=i&&this.ctx.scale(i,i),o&&(o.width=t*i,o.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e=this.dom,i=this.ctx,n=e.width,r=e.height,o=this.clearColor,a=this.motionBlur&&!t,u=this.lastFrameAlpha,h=this.dpr;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,n/h,r/h)),i.clearRect(0,0,n/h,r/h),o){var c;o.colorStops?(c=o.__canvasGradient||s.getGradient(i,o,{x:0,y:0,width:n/h,height:r/h}),o.__canvasGradient=c):o.image&&(c=l.prototype.getCanvasPattern.call(o,i)),i.save(),i.fillStyle=c||o,i.fillRect(0,0,n/h,r/h),i.restore()}if(a){var d=this.domBack;i.save(),i.globalAlpha=u,i.drawImage(d,0,0,n/h,r/h),i.restore()}}},t.exports=u},function(t,e,i){"use strict";function n(t){return parseInt(t,10)}function r(t){return t?t.isBuildin?!0:"function"==typeof t.resize&&"function"==typeof t.refresh:!1}function o(t){t.__unusedCount++}function a(t){1==t.__unusedCount&&t.clear()}function s(t,e,i){return x.copy(t.getBoundingRect()),t.transform&&x.applyTransform(t.transform),_.width=e,_.height=i,!x.intersect(_)}function l(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;ir;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(r,1),a.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,m(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,m(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,d.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(o),this._doPaintList(t,e),this.eachBuildinLayer(a)},_doPaintList:function(t,e){function i(t){o.save(),o.globalAlpha=1,o.shadowBlur=0,n.__dirty=!0,o.drawImage(t.dom,0,0,h,c),o.restore(),n.ctx.restore()}for(var n,r,o,a,s,l,u=0,h=this._width,c=this._height,p=this._progress,g=0,v=t.length;v>g;g++){var m=t[g],x=this._singleCanvas?0:m.zlevel,_=m.__frame;if(0>_&&s&&(i(s),s=null),r!==x&&(o&&o.restore(),a={},r=x,n=this.getLayer(r),n.isBuildin||f("ZLevel "+r+" has been used by unkown layer "+n.id),o=n.ctx,o.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear()),n.__dirty||e){if(_>=0){if(!s){if(s=this._progressiveLayers[Math.min(u++,y-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(p=l),s.__progress=p+1}_===p&&this._doPaintEl(m,s,!0,s.renderScope)}else this._doPaintEl(m,n,e,a);m.__dirty=!1}}s&&i(s),o&&o.restore(),this._furtherProgressive=!1,d.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&t.scale[0]&&t.scale[1]&&(!t.culling||!s(t,this._width,this._height))){var o=t.__clipPaths;(n.prevClipLayer!==e||l(o,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),u(o,r),n.prevClipLayer=e,n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new v("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&d.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,s=-1,l=this._domRoot;if(i[t])return void f("ZLevel "+t+" has been used already");if(!r(e))return void f("Layer of zlevel "+t+" is not valid");if(o>0&&t>n[0]){for(s=0;o-1>s&&!(n[s]t);s++);a=i[n[s]]}if(n.splice(s+1,0,t),a){var u=a.dom;u.nextSibling?l.insertBefore(e.dom,u.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nu;u++){var c=t[u],f=this._singleCanvas?0:c.zlevel,p=e[f],g=c.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||c.__dirty),g>=0){a!==g&&(a=g,l++);var m=c.__frame=l-1;if(!o){var x=Math.min(s,y-1);o=i[x],o||(o=i[x]=new v("progressive",this,this.dpr),o.initContext()),o.__maxProgress=0}o.__dirty=o.__dirty||c.__dirty,o.elCount++,o.__maxProgress=Math.max(o.__maxProgress,m),o.__maxProgress>=o.__progress&&(p.__dirty=!0)}else c.__frame=-1,o&&(o.__nextIdxNotProg=u,s++,o=null)}o&&(s++,o.__nextIdxNotProg=u),this.eachBuildinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,y),d.each(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?d.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&d.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(d.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;if(i.style.display="none",t=t||this._getWidth(),e=e||this._getHeight(),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers[n].resize(t,e);this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new v("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var i=this.storage.getDisplayList(!0),n={},r=0;rr;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,o.canvasSupported&&s(i,n)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n&&(n.parent=t,n.updateTransform(),e?(e=e.slice(),e.push(n)):e=[n]),t.isGroup){for(var r=t._children,o=0;oe;e++)this.delRoot(t[e]);else{var o;o="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,o);s>=0&&(this.delFromMap(o.id),this._roots.splice(s,1),o instanceof a&&o.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof a&&(t.__storage=this),t.dirty(),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,i=e[t];return i&&(delete e[t],i instanceof a&&(i.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:n},t.exports=l},function(t,e,i){"use strict";var n=i(1),r=i(24).Dispatcher,o=i(60),a=i(59),s=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time=0,r.call(this)};s.prototype={constructor:s,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ia;a++){var s=i[a],l=s.step(t);l&&(r.push(l),o.push(s))}for(var a=0;n>a;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;n=r.length;for(var a=0;n>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},start:function(){function t(){e._running&&(o(t),e._update())}var e=this;this._running=!0,this._time=(new Date).getTime(),o(t)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new a(t,e.loop,e.getter,e.setter);return i}},n.mixin(s,r),t.exports=s},function(t,e,i){function n(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=i(143);n.prototype={constructor:n,step:function(t){this._initialized||(this._startTime=(new Date).getTime()+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,o="function"==typeof n?n(e):e; +return this.fire("frame",o),1==e?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(){var t=(new Date).getTime(),e=(t-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},t.exports=n},function(t,e){var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};t.exports=i},function(t,e,i){var n=i(61).normalizeRadian,r=2*Math.PI;t.exports={containStroke:function(t,e,i,o,a,s,l,u,h){if(0===l)return!1;var c=l;u-=t,h-=e;var d=Math.sqrt(u*u+h*h);if(d-c>i||i>d+c)return!1;if(Math.abs(o-a)%r<1e-4)return!0;if(s){var f=o;o=n(a),a=n(f)}else o=n(o),a=n(a);o>a&&(a+=r);var p=Math.atan2(h,u);return 0>p&&(p+=r),p>=o&&a>=p||p+r>=o&&a>=p+r}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,o,a,s,l,u,h,c){if(0===u)return!1;var d=u;if(c>e+d&&c>r+d&&c>a+d&&c>l+d||e-d>c&&r-d>c&&a-d>c&&l-d>c||h>t+d&&h>i+d&&h>o+d&&h>s+d||t-d>h&&i-d>h&&o-d>h&&s-d>h)return!1;var f=n.cubicProjectPoint(t,e,i,r,o,a,s,l,h,c,null);return d/2>=f}}},function(t,e,i){"use strict";function n(t,e){return Math.abs(t-e)e&&h>n&&h>a&&h>l||e>h&&n>h&&a>h&&l>h)return 0;var c=g.cubicRootAt(e,n,a,l,h,_);if(0===c)return 0;for(var d,f,p=0,v=-1,m=0;c>m;m++){var y=_[m],x=0===y||1===y?.5:1,w=g.cubicAt(t,i,o,s,y);u>w||(0>v&&(v=g.cubicExtrema(e,n,a,l,b),b[1]1&&r(),d=g.cubicAt(e,n,a,l,b[0]),v>1&&(f=g.cubicAt(e,n,a,l,b[1]))),p+=2==v?yd?x:-x:yf?x:-x:f>l?x:-x:yd?x:-x:d>l?x:-x)}return p}function a(t,e,i,n,r,o,a,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=g.quadraticRootAt(e,n,o,s,_);if(0===l)return 0;var u=g.quadraticExtremum(e,n,o);if(u>=0&&1>=u){for(var h=0,c=g.quadraticAt(e,n,o,u),d=0;l>d;d++){var f=0===_[d]||1===_[d]?.5:1,p=g.quadraticAt(t,i,r,_[d]);a>p||(h+=_[d]c?f:-f:c>o?f:-f)}return h}var f=0===_[0]||1===_[0]?.5:1,p=g.quadraticAt(t,i,r,_[0]);return a>p?0:e>o?f:-f}function s(t,e,i,n,r,o,a,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);_[0]=-l,_[1]=l;var u=Math.abs(n-r);if(1e-4>u)return 0;if(1e-4>u%y){n=0,r=y;var h=o?1:-1;return a>=_[0]+t&&a<=_[1]+t?h:0}if(o){var l=n;n=p(r),r=p(l)}else n=p(n),r=p(r);n>r&&(r+=y);for(var c=0,d=0;2>d;d++){var f=_[d];if(f+t>a){var g=Math.atan2(s,f),h=o?1:-1;0>g&&(g=y+g),(g>=n&&r>=g||g+y>=n&&r>=g+y)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),c+=h)}}return c}function l(t,e,i,r,l){for(var h=0,p=0,g=0,y=0,x=0,_=0;_1&&(i||(h+=v(p,g,y,x,r,l))),1==_&&(p=t[_],g=t[_+1],y=p,x=g),b){case u.M:y=t[_++],x=t[_++],p=y,g=x;break;case u.L:if(i){if(m(p,g,t[_],t[_+1],e,r,l))return!0}else h+=v(p,g,t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case u.C:if(i){if(c.containStroke(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else h+=o(p,g,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case u.Q:if(i){if(d.containStroke(p,g,t[_++],t[_++],t[_],t[_+1],e,r,l))return!0}else h+=a(p,g,t[_++],t[_++],t[_],t[_+1],r,l)||0;p=t[_++],g=t[_++];break;case u.A:var w=t[_++],S=t[_++],M=t[_++],A=t[_++],I=t[_++],T=t[_++],L=(t[_++],1-t[_++]),C=Math.cos(I)*M+w,D=Math.sin(I)*A+S;_>1?h+=v(p,g,C,D,r,l):(y=C,x=D);var P=(r-w)*A/M+w;if(i){if(f.containStroke(w,S,A,I,I+T,L,e,P,l))return!0}else h+=s(w,S,A,I,I+T,L,P,l);p=Math.cos(I+T)*M+w,g=Math.sin(I+T)*A+S;break;case u.R:y=p=t[_++],x=g=t[_++];var k=t[_++],z=t[_++],C=y+k,D=x+z;if(i){if(m(y,x,C,x,e,r,l)||m(C,x,C,D,e,r,l)||m(C,D,y,D,e,r,l)||m(y,D,y,x,e,r,l))return!0}else h+=v(C,x,C,D,r,l),h+=v(y,D,y,x,r,l);break;case u.Z:if(i){if(m(p,g,y,x,e,r,l))return!0}else h+=v(p,g,y,x,r,l);p=y,g=x}}return i||n(g,x)||(h+=v(p,g,y,x,r,l)||0),0!==h}var u=i(28).CMD,h=i(83),c=i(145),d=i(84),f=i(144),p=i(61).normalizeRadian,g=i(16),v=i(85),m=h.containStroke,y=2*Math.PI,x=1e-4,_=[-1,-1,-1],b=[-1,-1];t.exports={contain:function(t,e,i){return l(t,0,!1,e,i)},containStroke:function(t,e,i,n){return l(t,e,!0,i,n)}}},function(t,e,i){"use strict";function n(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var o=i(24),a=function(){this._track=[]};a.prototype={constructor:a,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,s=n.length;s>a;a++){var l=n[a],u=o.clientToLocal(i,l);r.points.push([u.zrX,u.zrY]),r.touches.push(l)}this._track.push(r)}},_recognize:function(t){for(var e in s)if(s.hasOwnProperty(e)){var i=s[e](this._track,t);if(i)return i}}};var s={pinch:function(t,e){var i=t.length;if(i){var o=(t[i-1]||{}).points,a=(t[i-2]||{}).points||o;if(a&&a.length>1&&o&&o.length>1){var s=n(o)/n(a);!isFinite(s)&&(s=1),e.pinchScale=s;var l=r(o);return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}};t.exports=a},function(t,e){var i=function(){this.head=null,this.tail=null,this._len=0},n=i.prototype;n.insert=function(t){var e=new r(t);return this.insertEntry(e),e},n.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._len++},n.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len};var r=function(t){this.value=t,this.next,this.prev},o=function(t){this._list=new i,this._map={},this._maxSize=t||10},a=o.prototype;a.put=function(t,e){var i=this._list,n=this._map;if(null==n[t]){var r=i.len();if(r>=this._maxSize&&r>0){var o=i.head;i.remove(o),delete n[o.key]}var a=i.insert(e);a.key=t,n[t]=a}},a.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},a.clear=function(){this._list.clear(),this._map={}},t.exports=o},function(t,e,i){var n=i(6);t.exports=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;iy;y++)r(d,d,t[y]),o(f,f,t[y]);r(d,d,u[0]),o(f,f,u[1])}for(var y=0,x=t.length;x>y;y++){var _=t[y];if(i)h=t[y?y-1:x-1],c=t[(y+1)%x];else{if(0===y||y===x-1){p.push(n.clone(t[y]));continue}h=t[y-1],c=t[y+1]}n.sub(g,c,h),a(g,g,e);var b=s(_,h),w=s(_,c),S=b+w;0!==S&&(b/=S,w/=S),a(v,g,-b),a(m,g,w);var M=l([],_,v),A=l([],_,m);u&&(o(M,M,d),r(M,M,f),o(A,A,d),r(A,A,f)),p.push(M),p.push(A)}return i&&p.push(p.shift()),p}},function(t,e,i){function n(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}var r=i(5);t.exports=function(t,e){for(var i=t.length,o=[],a=0,s=1;i>s;s++)a+=r.distance(t[s-1],t[s]);var l=a/2;l=i>l?i:l;for(var s=0;l>s;s++){var u,h,c,d=s/(l-1)*(e?i:i-1),f=Math.floor(d),p=d-f,g=t[f%i];e?(u=t[(f-1+i)%i],h=t[(f+1)%i],c=t[(f+2)%i]):(u=t[0===f?f:f-1],h=t[f>i-2?i-1:f+1],c=t[f>i-3?i-1:f+2]);var v=p*p,m=p*v;o.push([n(u[0],g[0],h[0],c[0],p,v,m),n(u[1],g[1],h[1],c[1],p,v,m)])}return o}},function(t,e,i){t.exports=i(6).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+i,u*r+n),t.arc(i,n,r,o,a,!s)}})},function(t,e,i){"use strict";function n(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?c:u)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?c:u)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?h:l)(t.x1,t.cpx1,t.x2,e),(i?h:l)(t.y1,t.cpy1,t.y2,e)]}var r=i(16),o=i(5),a=r.quadraticSubdivide,s=r.cubicSubdivide,l=r.quadraticAt,u=r.cubicAt,h=r.quadraticDerivativeAt,c=r.cubicDerivativeAt,d=[];t.exports=i(6).extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,l=e.cpx1,u=e.cpy1,h=e.cpx2,c=e.cpy2,f=e.percent;0!==f&&(t.moveTo(i,n),null==h||null==c?(1>f&&(a(i,l,r,f,d),l=d[1],r=d[2],a(n,u,o,f,d),u=d[1],o=d[2]),t.quadraticCurveTo(l,u,r,o)):(1>f&&(s(i,l,h,r,f,d),l=d[1],h=d[2],r=d[3],s(n,u,c,o,f,d),u=d[1],c=d[2],o=d[3]),t.bezierCurveTo(l,u,h,c,r,o)))},pointAt:function(t){return n(this.shape,t,!1)},tangentAt:function(t){var e=n(this.shape,t,!0);return o.normalize(e,e)}})},function(t,e,i){"use strict";t.exports=i(6).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.percent;0!==a&&(t.moveTo(i,n),1>a&&(r=i*(1-a)+r*a,o=n*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})},function(t,e,i){var n=i(65);t.exports=i(6).extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){n.buildPath(t,e,!0)}})},function(t,e,i){var n=i(65);t.exports=i(6).extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){n.buildPath(t,e,!1)}})},function(t,e,i){var n=i(66);t.exports=i(6).extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,o=e.width,a=e.height;e.r?n.buildPath(t,e):t.rect(i,r,o,a),t.closePath()}})},function(t,e,i){t.exports=i(6).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(a),h=Math.sin(a);t.moveTo(u*r+i,h*r+n),t.lineTo(u*o+i,h*o+n),t.arc(i,n,o,a,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,a,l),t.closePath()}})},function(t,e,i){"use strict";var n=i(59),r=i(1),o=r.isString,a=r.isFunction,s=r.isObject,l=i(47),u=function(){this.animators=[]};u.prototype={constructor:u,animate:function(t,e){var i,o=!1,a=this,s=this.__zr;if(t){var u=t.split("."),h=a;o="shape"===u[0];for(var c=0,d=u.length;d>c;c++)h&&(h=h[u[c]]);h&&(i=h)}else i=a;if(!i)return void l('Property "'+t+'" is not existed in element '+a.id);var f=a.animators,p=new n(i,e);return p.during(function(t){a.dirty(o)}).done(function(){f.splice(r.indexOf(f,p),1)}),f.push(p),s&&s.animation.addAnimator(p),p},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r){function s(){u--,u||r&&r()}o(i)?(r=n,n=i,i=0):a(n)?(r=n,n="linear",i=0):a(i)?(r=i,i=0):a(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i,n,r);var l=this.animators.slice(),u=l.length;u||r&&r();for(var h=0;h0&&this.animate(t,!1).when(null==n?500:n,a).delay(o||0),this}},t.exports=u},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}i.prototype={constructor:i,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this._dispatchProxy(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(r,o,t),this._dispatchProxy(e,"drag",t.event);var a=this.findHover(i,n,e),s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this._dispatchProxy(s,"dragleave",t.event),a&&a!==s&&this._dispatchProxy(a,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this._dispatchProxy(e,"dragend",t.event),this._dropTarget&&this._dispatchProxy(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},t.exports=i},function(t,e,i){function n(t,e,i,n,r,o,a,s,l,u,h){var g=l*(p/180),y=f(g)*(t-i)/2+d(g)*(e-n)/2,x=-1*d(g)*(t-i)/2+f(g)*(e-n)/2,_=y*y/(a*a)+x*x/(s*s);_>1&&(a*=c(_),s*=c(_));var b=(r===o?-1:1)*c((a*a*(s*s)-a*a*(x*x)-s*s*(y*y))/(a*a*(x*x)+s*s*(y*y)))||0,w=b*a*x/s,S=b*-s*y/a,M=(t+i)/2+f(g)*w-d(g)*S,A=(e+n)/2+d(g)*w+f(g)*S,I=m([1,0],[(y-w)/a,(x-S)/s]),T=[(y-w)/a,(x-S)/s],L=[(-1*y-w)/a,(-1*x-S)/s],C=m(T,L);v(T,L)<=-1&&(C=p),v(T,L)>=1&&(C=0),0===o&&C>0&&(C-=2*p),1===o&&0>C&&(C+=2*p),h.addData(u,M,A,a,s,I,C,g,o)}function r(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===v[0]&&v.shift();for(var m=0;mr;r++){var o=t[r];o.__dirty&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var s=new a(e);return s.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},s}}},function(t,e,i){function n(t,e){var i,n,o,h,c,d,f=t.data,p=r.M,g=r.C,v=r.L,m=r.R,y=r.A,x=r.Q;for(o=0,h=0;oc;c++){var d=s[c];d[0]=f[o++],d[1]=f[o++],a(d,d,e),f[h++]=d[0],f[h++]=d[1]}}}var r=i(28).CMD,o=i(5),a=o.applyTransform,s=[[],[],[]],l=Math.sqrt,u=Math.atan2;t.exports=n},function(t,e,i){if(!i(12).canvasSupported){var n,r="urn:schemas-microsoft-com:vml",o=window,a=o.document,s=!1;try{!a.namespaces.zrvml&&a.namespaces.add("zrvml",r),n=function(t){return a.createElement("')}}catch(l){n=function(t){return a.createElement("<"+t+' xmlns="'+r+'" class="zrvml">')}}var u=function(){if(!s){s=!0;var t=a.styleSheets;t.length<31?a.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};t.exports={doc:a,initVML:u,createNode:n}}},function(t,e,i){"use strict";function n(t){return null==t.value?t:t.value}var r=i(13),o=i(30),a=i(282),s=i(1),l={_baseAxisDim:null,getInitialData:function(t,e){var i,a,s=e.getComponent("xAxis",this.get("xAxisIndex")),l=e.getComponent("yAxis",this.get("yAxisIndex")),u=s.get("type"),h=l.get("type");"category"===u?(t.layout="horizontal",i=s.getCategories(),a=!0):"category"===h?(t.layout="vertical",i=l.getCategories(),a=!0):t.layout=t.layout||"horizontal",this._baseAxisDim="horizontal"===t.layout?"x":"y";var c=t.data,d=this.dimensions=["base"].concat(this.valueDimensions);o(d,c);var f=new r(d,this);return f.initData(c,i?i.slice():null,function(t,e,i,r){var o=n(t);return a?"base"===e?i:o[r-1]:o[r]}),f},coordDimToDataDim:function(t){var e=this.valueDimensions.slice(),i=["base"],n={horizontal:{x:i,y:e},vertical:{x:e,y:i}};return n[this.get("layout")][t]},dataDimToCoordDim:function(t){var e;return s.each(["x","y"],function(i,n){var r=this.coordDimToDataDim(i);s.indexOf(r,t)>=0&&(e=i)},this),e},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},u={init:function(){var t=this._whiskerBoxDraw=new a(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};t.exports={seriesModelMixin:l,viewMixin:u}},function(t,e,i){var n=i(1),r={retrieveTargetInfo:function(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var r=t.targetNodeId;if(null!=r&&(n=i.getNodeById(r)))return{node:n}}},getPathToRoot:function(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()},aboveViewRoot:function(t,e){var i=r.getPathToRoot(t);return n.indexOf(i,e)>=0}};t.exports=r},function(t,e,i){function n(t,e){var i=this.getBoundingRect(),n=t.getBoxLayoutParams(),r=t.get("aspectScale")||.75;n.aspect=i.width/i.height*r;var o=a.getLayoutRect(n,{width:e.getWidth(),height:e.getHeight()});this.setViewRect(o.x,o.y,o.width,o.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function r(t,e){s.each(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}var o=i(353),a=i(14),s=i(1),l={},u={dimensions:o.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",function(t,a){var s=t.get("map"),u=l[s],h=new o(s+a,s,u&&u.geoJson,u&&u.specialAreas,t.get("nameMap"));h.zoomLimit=t.get("scaleLimit"),i.push(h),r(h,t),t.coordinateSystem=h,h.model=t,h.resize=n,h.resize(t,e)}),t.eachSeries(function(t){var e=t.get("coordinateSystem");if("geo"===e){var n=t.get("geoIndex")||0;t.coordinateSystem=i[n]}});var a={};return t.eachSeriesByType("map",function(t){var e=t.get("map");a[e]=a[e]||[],a[e].push(t)}),s.each(a,function(t,a){var u=l[a],h=s.map(t,function(t){return t.get("nameMap")}),c=new o(a,a,u&&u.geoJson,u&&u.specialAreas,s.mergeAll(h));c.zoomLimit=s.retrieve.apply(null,s.map(t,function(t){return t.get("scaleLimit")})),i.push(c),c.resize=n,c.resize(t[0],e),s.each(t,function(t){t.coordinateSystem=c,r(c,t)})}),i},registerMap:function(t,e,i){e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),l[t]={geoJson:e,specialAreas:i}},getMap:function(t){return l[t]},getFilledRegions:function(t,e){var i=(t||[]).slice(),n=u.getMap(e),r=n&&n.geoJson;if(!r)return t;for(var o={},a=r.features,s=0;sf;f++){var g=h[f];o[g]&&o[g].applyVisual(t,l,u)}}var c={};r.each(t,function(t){var i=o.prepareVisualTypes(e[t]);c[t]=i});var d;null==s?i.each(h,!0):i.each([s],h,!0)}};t.exports=s},function(t,e,i){function n(){this.group=new r.Group,this._symbolEl=new a({})}var r=i(3),o=i(26),a=r.extendShape({shape:{points:null,sizes:null},symbolProxy:null,buildPath:function(t,e){for(var i=e.points,n=e.sizes,r=this.symbolProxy,o=r.shape,a=0;a=0;o--){var a=n[o],s=r[o],l=a[0]-s[0]/2,u=a[1]-s[1]/2;if(t>=l&&e>=u&&t<=l+s[0]&&e<=u+s[1])return o}return-1}}),s=n.prototype;s.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray(function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i})}),e.symbolProxy=o.createSymbol(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)}),this.group.add(e)},s.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},s.remove=function(){this.group.removeAll()},t.exports=n},function(t,e,i){function n(t){return null==t.cpx1||null==t.cpy1}var r=i(3),o=i(5),a=r.Line.prototype,s=r.BezierCurve.prototype;t.exports=r.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(n(e)?a:s).buildPath(t,e)},pointAt:function(t){return n(this.shape)?a.pointAt.call(this,t):s.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=n(e)?[e.x2-e.x1,e.y2-e.y1]:s.tangentAt.call(this,t);return o.normalize(i,i)}})},function(t,e,i){var n=i(1),r=i(2);i(174),i(175),r.registerVisual(n.curry(i(46),"scatter","circle",null)),r.registerLayout(n.curry(i(55),"scatter")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.scatter",dependencies:["grid","polar"],getInitialData:function(t,e){var i=n(t.data,this,e);return i},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{normal:{opacity:.8}}}})},function(t,e,i){var n=i(39),r=i(171);i(2).extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new n,this._largeSymbolDraw=new r},render:function(t,e,i){var n=t.getData(),r=this._largeSymbolDraw,o=this._normalSymbolDraw,a=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?r:o;this._symbolDraw=s,s.updateData(n),a.add(s.group),a.remove(s===r?o.group:r.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)}})},function(t,e,i){i(110),i(40),i(41),i(182),i(183),i(178),i(179),i(108),i(107)},function(t,e,i){function n(t,e){var i=[1/0,-(1/0)];return u(e,function(e){var n=e.getData();n&&u(e.coordDimToDataDim(t),function(t){var e=n.getDataExtent(t);e[0]i[1]&&(i[1]=e[1])})},this),i}function r(t,e,i){var n=i.getAxisModel(),r=n.axis.scale,a=[0,100],s=[t.start,t.end],c=[];return e=e.slice(),o(e,n,r),u(["startValue","endValue"],function(e){c.push(null!=t[e]?r.parse(t[e]):null)}),u([0,1],function(t){var i=c[t],n=s[t];null!=n||null==i?(null==n&&(n=a[t]),i=r.parse(l.linearMap(n,a,e,!0))):n=l.linearMap(i,e,a,!0),c[t]=i,s[t]=n}),{valueWindow:h(c),percentWindow:h(s)}}function o(t,e,i){return u(["min","max"],function(n,r){var o=e.get(n,!0);null!=o&&(o+"").toLowerCase()!=="data"+n&&(t[r]=i.parse(o))}),e.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0)),t}function a(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=e||0===n[0]&&100===n[1],a=!e&&l.getPixelPrecision(r,[0,500]),s=!(e||20>a&&a>=0),u=e||o||s;i.setRange&&i.setRange(u?null:+r[0].toFixed(a),u?null:+r[1].toFixed(a))}}var s=i(1),l=i(4),u=s.each,h=l.asc,c=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this.ecModel=n,this._dataZoomModel=i};c.prototype={constructor:c,hostedBy:function(t){return this._dataZoomModel===t},getDataExtent:function(){return this._dataExtent.slice()},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[];return this.ecModel.eachSeries(function(e){this._axisIndex===e.get(this._dimName+"AxisIndex")&&t.push(e)},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,r=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(a=t)}),a},reset:function(t){if(t===this._dataZoomModel){var e=this._dataExtent=n(this._dimName,this.getTargetSeriesModels()),i=r(t.option,e,this);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,a(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,a(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow,a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&"category"===a.get("type")&&(r="empty"),u(n,function(t){var n=t.getData();n&&u(t.coordDimToDataDim(i),function(i){"empty"===r?t.setData(n.map(i,function(t){return e(t)?t:NaN})):n.filterSelf(i,e)})})}}},t.exports=c},function(t,e,i){t.exports=i(40).extend({type:"dataZoom.inside",defaultOption:{zoomLock:!1}})},function(t,e,i){function n(t,e,i,n){e=e.slice();var r=n.axisModels[0];if(r){var a=o(t,r,i),s=a.signal*(e[1]-e[0])*a.pixel/a.pixelLength;return u(s,e,[0,100],"rigid"),e}}function r(t,e,i,n,r,s){i=i.slice();var l=r.axisModels[0];if(l){var u=o(e,l,n),h=u.pixel-u.pixelStart,c=h/u.pixelLength*(i[1]-i[0])+i[0];return t=Math.max(t,0),i[0]=(i[0]-c)*t+c,i[1]=(i[1]-c)*t+c,a(i)}}function o(t,e,i){var n=e.axis,r=i.rectProvider(),o={};return"x"===n.dim?(o.pixel=t[0],o.pixelLength=r.width,o.pixelStart=r.x,o.signal=n.inverse?1:-1):(o.pixel=t[1],o.pixelLength=r.height,o.pixelStart=r.y,o.signal=n.inverse?-1:1),o}function a(t){var e=[0,100];return!(t[0]<=e[1])&&(t[0]=e[1]),!(t[1]<=e[1])&&(t[1]=e[1]),!(t[0]>=e[0])&&(t[0]=e[0]),!(t[1]>=e[0])&&(t[1]=e[0]),t}var s=i(41),l=i(1),u=i(80),h=i(184),c=l.bind,d=s.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){d.superApply(this,"render",arguments), +h.shouldRecordRange(n,t.id)&&(this._range=t.getPercentRange());var r=this.getTargetInfo().cartesians,o=l.map(r,function(t){return h.generateCoordId(t.model)});l.each(r,function(e){var n=e.model;h.register(i,{coordId:h.generateCoordId(n),allCoordIds:o,coordinateSystem:n.coordinateSystem,dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:c(this._onPan,this,e),zoomGetRange:c(this._onZoom,this,e)})},this)},dispose:function(){h.unregister(this.api,this.dataZoomModel.id),d.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,r){return this._range=n([i,r],this._range,e,t)},_onZoom:function(t,e,i,n,o){var a=this.dataZoomModel;return a.option.zoomLock?this._range:this._range=r(1/i,[n,o],this._range,e,t,a)}});t.exports=d},function(t,e,i){var n=i(40);t.exports=n.extend({type:"dataZoom.select"})},function(t,e,i){t.exports=i(41).extend({type:"dataZoom.select"})},function(t,e,i){var n=i(40),r=n.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});t.exports=r},function(t,e,i){function n(t){return"x"===t?"y":"x"}var r=i(1),o=i(3),a=i(82),s=i(41),l=o.Rect,u=i(4),h=u.linearMap,c=i(14),d=i(80),f=u.asc,p=r.bind,g=r.each,v=7,m=1,y=30,x="horizontal",_="vertical",b=5,w=["line","bar","candlestick","scatter"],S=s.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){return S.superApply(this,"render",arguments),a.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){S.superApply(this,"remove",arguments),a.clear(this,"_dispatchZoomAction")},dispose:function(){S.superApply(this,"dispose",arguments),a.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new o.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===x?{right:n.width-i.x-i.width,top:n.height-y-v,width:i.width,height:y}:{right:v,top:i.y,width:y,height:i.height},a=c.getLayoutParams(t.option);r.each(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var s=c.getLayoutRect(a,n,t.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===_&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==x||r?i===x&&r?{scale:a?[-1,1]:[-1,-1]}:i!==_||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size;this._displayables.barGroup.add(new l({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():t.otherDim,s=n.getDataExtent(a),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var u=[0,e[1]],c=[0,e[0]],d=[[e[0],0],[0,0]],f=[],p=c[1]/(n.count()-1),g=0,v=Math.round(n.count()/e[0]);n.each([a],function(t,e){if(v>0&&e%v)return void(g+=p);var i=null==t||isNaN(t)||""===t?null:h(t,s,u,!0);null!=i&&(d.push([g,i]),f.push([g,i])),g+=p});var m=this.dataZoomModel;this._displayables.barGroup.add(new o.Polygon({shape:{points:d},style:r.defaults({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new o.Polyline({shape:{points:f},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,o=this.ecModel;return t.eachTargetAxis(function(a,s){var l=t.getAxisProxy(a.name,s).getTargetSeriesModels();r.each(l,function(t){if(!(i||e!==!0&&r.indexOf(w,t.get("type"))<0)){var l=n(a.name),u=o.getComponent(a.axis,s).axis;i={thisAxis:u,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:t.coordinateSystem.getOtherAxis(u).inverse}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,a=this.dataZoomModel;n.add(t.filler=new l({draggable:!0,cursor:"move",drift:p(this._onDragMove,this,"all"),ondragstart:p(this._showDataInfo,this,!0),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new l(o.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:m,fill:"rgba(0,0,0,0)"}})));var s=a.get("handleIcon");g([0,1],function(t){var r=o.makePath(s,{style:{strokeNoScale:!0},rectHover:!0,cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:p(this._onDragMove,this,t),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1)},{x:-.5,y:0,width:1,height:1},"center"),l=r.getBoundingRect();this._handleHeight=u.parsePercent(a.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,r.setStyle(a.getModel("handleStyle").getItemStyle());var h=a.get("handleColor");null!=h&&(r.style.fill=h),n.add(e[t]=r);var c=a.textStyleModel;this.group.add(i[t]=new o.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",fill:c.getTextColor(),textFont:c.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[h(t[0],[0,100],e,!0),h(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this._handleEnds,n=this._getViewExtent();d(e,i,n,"all"===t||this.dataZoomModel.get("zoomLock")?"rigid":"cross",t),this._range=f([h(i[0],n,[0,100],!0),h(i[1],n,[0,100],!0)])},_updateView:function(){var t=this._displayables,e=this._handleEnds,i=f(e.slice()),n=this._size;g([0,1],function(i){var r=t.handles[i],o=this._handleHeight;r.attr({scale:[o,o],position:[e[i],n[1]/2-o/2]})},this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:n[1]}),this._updateDataInfo()},_updateDataInfo:function(){function t(t){var e=o.getTransform(i.handles[t].parent,this.group),s=o.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+b,h=o.applyTransform([u[t]+(0===t?-l:l),this._size[1]/2],e);n[t].setStyle({x:h[0],y:h[1],textVerticalAlign:r===x?"middle":s,textAlign:r===x?s:"center",text:a[t]})}var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,a=["",""];if(e.get("showDetail")){var s,l;e.eachTargetAxis(function(t,i){s||(s=e.getAxisProxy(t.name,i).getDataValueWindow(),l=this.ecModel.getComponent(t.axis,i).axis)},this),s&&(a=[this._formatLabel(s[0],l),this._formatLabel(s[1],l)])}var u=f(this._handleEnds.slice());t.call(this,0),t.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter");if(r.isFunction(n))return n(t);var o=i.get("labelPrecision");return null!=o&&"auto"!==o||(o=e.getPixelPrecision()),t=null==t&&isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20)),r.isString(n)&&(t=n.replace("{value}",t)),t},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._applyBarTransform([e,i],!0);this._updateInterval(t,n[0]),this._updateView(),this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_applyBarTransform:function(t,e){var i=this._displayables.barGroup.getLocalTransform();return o.applyTransform(t,i,e)},_findCoordRect:function(){var t,e=this.getTargetInfo();if(e.cartesians.length)t=e.cartesians[0].model.coordinateSystem.getRect();else{var i=this.api.getWidth(),n=this.api.getHeight();t={x:.2*i,y:.2*n,width:.6*i,height:.6*n}}return t}});t.exports=S},function(t,e,i){function n(t){var e=t.getZr();return e[p]||(e[p]={})}function r(t,e,i){var n=new c(t.getZr());return n.enable(),n.on("pan",f(a,i)),n.on("zoom",f(s,i)),n}function o(t){h.each(t,function(e,i){e.count||(e.controller.off("pan").off("zoom"),delete t[i])})}function a(t,e,i){l(t,function(n){return n.panGetRange(t.controller,e,i)})}function s(t,e,i,n){l(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function l(t,e){var i=[];h.each(t.dataZoomInfos,function(t){var n=e(t);n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})}),t.dispatchAction(i)}function u(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var h=i(1),c=i(79),d=i(82),f=h.curry,p="\x00_ec_dataZoom_roams",g={register:function(t,e){var i=n(t),a=e.dataZoomId,s=e.coordId;h.each(i,function(t,i){var n=t.dataZoomInfos;n[a]&&h.indexOf(e.allCoordIds,s)<0&&(delete n[a],t.count--)}),o(i);var l=i[s];l||(l=i[s]={coordId:s,dataZoomInfos:{},count:0},l.controller=r(t,e,l),l.dispatchAction=h.curry(u,t));var c=e.coordinateSystem.getRect().clone();l.controller.rectProvider=function(){return c},d.createOrUpdate(l,"dispatchAction",e.throttleRate,"fixRate"),!l.dataZoomInfos[a]&&l.count++,l.dataZoomInfos[a]=e},unregister:function(t,e){var i=n(t);h.each(i,function(t){var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),o(i)},shouldRecordRange:function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].dataZoomId===e)return!1;return!0},generateCoordId:function(t){return t.type+"\x00_"+t.id}};t.exports=g},function(t,e,i){i(110),i(40),i(41),i(180),i(181),i(108),i(107)},function(t,e,i){i(187),i(189),i(188);var n=i(2);n.registerProcessor(i(190))},function(t,e,i){"use strict";var n=i(1),r=i(9),o=i(2).extendComponentModel({type:"legend",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){o.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:"top",align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0}});t.exports=o},function(t,e,i){function n(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function r(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function o(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var a=i(1),s=i(26),l=i(3),u=i(114),h=a.curry;t.exports=i(2).extendComponentView({type:"legend",init:function(){this._symbolTypeStore={}},render:function(t,e,i){var s=this.group;if(s.removeAll(),t.get("show")){var c=t.get("selectedMode"),d=t.get("align");"auto"===d&&(d="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left");var f={};a.each(t.getData(),function(a){var u=a.get("name");if(""===u||"\n"===u)return void s.add(new l.Group({newline:!0}));var p=e.getSeriesByName(u)[0];if(!f[u])if(p){var g=p.getData(),v=g.getVisual("color");"function"==typeof v&&(v=v(p.getDataParams(0)));var m=g.getVisual("legendSymbol")||"roundRect",y=g.getVisual("symbol"),x=this._createItem(u,a,t,m,y,d,v,c);x.on("click",h(n,u,i)).on("mouseover",h(r,p,"",i)).on("mouseout",h(o,p,"",i)),f[u]=!0}else e.eachRawSeries(function(e){if(!f[u]&&e.legendDataProvider){var s=e.legendDataProvider(),l=s.indexOfName(u);if(0>l)return;var p=s.getItemVisual(l,"color"),g="roundRect",v=this._createItem(u,a,t,g,null,d,p,c);v.on("click",h(n,u,i)).on("mouseover",h(r,e,u,i)).on("mouseout",h(o,e,u,i)),f[u]=!0}},this)},this),u.layout(s,t,i),u.addBackground(s,t)}},_createItem:function(t,e,i,n,r,o,a,u){var h=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.isSelected(t),p=new l.Group,g=e.getModel("textStyle"),v=e.get("icon");if(n=v||n,p.add(s.createSymbol(n,0,0,h,c,f?a:d)),!v&&r&&(r!==n||"none"==r)){var m=.8*c;"none"===r&&(r="circle"),p.add(s.createSymbol(r,(h-m)/2,(c-m)/2,m,m,f?a:d))}var y="left"===o?h+5:-5,x=o,_=i.get("formatter");"string"==typeof _&&_?t=_.replace("{name}",t):"function"==typeof _&&(t=_(t));var b=new l.Text({style:{text:t,x:y,y:c/2,fill:f?g.getTextColor():d,textFont:g.getFont(),textAlign:x,textVerticalAlign:"middle"}});return p.add(b),p.add(new l.Rect({shape:p.getBoundingRect(),invisible:!0})),p.eachChild(function(t){t.silent=!u}),this.group.add(p),l.setHoverStyle(p),p}})},function(t,e,i){function n(t,e,i){var n,r={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var s=i.getData();o.each(s,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);e in r?r[e]=r[e]&&n:r[e]=n}})}),{name:e.name,selected:r}}var r=i(2),o=i(1);r.registerAction("legendToggleSelect","legendselectchanged",o.curry(n,"toggleSelected")),r.registerAction("legendSelect","legendselected",o.curry(n,"select")),r.registerAction("legendUnSelect","legendunselected",o.curry(n,"unSelect"))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i=0&&(u=+u.toFixed(v)),p.coord[d]=g.coord[d]=u,n=[p,g,{type:o,valueIndex:n.valueIndex,value:u}]}return n=[c.dataTransform(t,n[0]),c.dataTransform(t,n[1]),l.extend({},n[2])],n[2].type=n[2].type||"",l.merge(n[2],n[0]),l.merge(n[2],n[1]),n};i(69).extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,o=e.__to;r.each(function(e){a(r,e,!0,t,i),a(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap[t.name].updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var o=e.getItemModel(i);a(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||x[r?0:1],symbol:o.get("symbol",!0)||y[r?0:1],color:o.get("itemStyle.normal.color")||h.getVisual("color")})}var o=t.coordinateSystem,u=t.name,h=t.getData(),c=this.markerGroupMap,f=c[u];f||(f=c[u]=new d),this.group.add(f.group);var p=s(o,t,e),g=p.from,v=p.to,m=p.line;e.__from=g,e.__to=v,e.setData(m);var y=e.get("symbol"),x=e.get("symbolSize");l.isArray(y)||(y=[y,y]),"number"==typeof x&&(x=[x,x]),p.from.each(function(t){r(g,t,!0),r(v,t,!1)}),m.each(function(t){var e=m.getItemModel(t).get("lineStyle.normal.color");m.setItemVisual(t,{color:e||g.getItemVisual(t,"color")}),m.setItemLayout(t,[g.getItemLayout(t),v.getItemLayout(t)]),m.setItemVisual(t,{fromSymbolSize:g.getItemVisual(t,"symbolSize"),fromSymbol:g.getItemVisual(t,"symbol"),toSymbolSize:v.getItemVisual(t,"symbolSize"),toSymbol:v.getItemVisual(t,"symbol")})}),f.updateData(m),p.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),f.__keep=!0,f.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){t.exports=i(68).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}})},function(t,e,i){function n(t,e,i){var n=e.coordinateSystem;t.each(function(r){var o,a=t.getItemModel(r),l=s.parsePercent(a.get("x"),i.getWidth()),u=s.parsePercent(a.get("y"),i.getHeight());if(isNaN(l)||isNaN(u)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var h=t.get(n.dimensions[0],r),c=t.get(n.dimensions[1],r);o=n.dataToPoint([h,c])}}else o=[l,u];isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u),t.setItemLayout(r,o)})}function r(t,e,i){var n;n=t?a.map(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new l(n,i),o=a.map(i.get("data"),a.curry(u.dataTransform,e));return t&&(o=a.filter(o,a.curry(u.dataFilter,t))),r.initData(o,null,t?u.dimValueGetter:function(t){return t.value}),r}var o=i(39),a=i(1),s=i(4),l=i(13),u=i(70);i(69).extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(n(e.getData(),t,i),this.markerGroupMap[t.name].updateLayout(e))},this)},renderSeries:function(t,e,i,a){var s=t.coordinateSystem,l=t.name,u=t.getData(),h=this.markerGroupMap,c=h[l];c||(c=h[l]=new o);var d=r(s,t,e);e.setData(d),n(e.getData(),t,a),d.each(function(t){var i=d.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),d.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||u.getVisual("color"),symbol:i.getShallow("symbol")})}),c.updateData(d),this.group.add(c.group),d.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),c.__keep=!0,c.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){"use strict";var n=i(2),r=i(3),o=i(14);n.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),n.extendComponentView({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=t.get("textBaseline"),h=new r.Text({style:{text:t.get("text"),textFont:a.getFont(),fill:a.getTextColor()},z2:10}),c=h.getBoundingRect(),d=t.get("subtext"),f=new r.Text({style:{text:d,textFont:s.getFont(),fill:s.getTextColor(),y:c.height+t.get("itemGap"),textBaseline:"top"},z2:10}),p=t.get("link"),g=t.get("sublink");h.silent=!p,f.silent=!g,p&&h.on("click",function(){window.open(p,"_"+t.get("target"))}),g&&f.on("click",function(){window.open(g,"_"+t.get("subtarget"))}),n.add(h),d&&n.add(f);var v=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=v.width,m.height=v.height;var y=o.getLayoutRect(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),"middle"===l&&(l="center"),"right"===l?y.x+=y.width:"center"===l&&(y.x+=y.width/2)),u||(u=t.get("top")||t.get("bottom"),"center"===u&&(u="middle"),"bottom"===u?y.y+=y.height:"middle"===u&&(y.y+=y.height/2),u=u||"top"),n.attr("position",[y.x,y.y]);var x={textAlign:l,textVerticalAlign:u};h.setStyle(x),f.setStyle(x),v=n.getBoundingRect();var _=y.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var w=new r.Rect({shape:{x:v.x-_[3],y:v.y-_[0],width:v.width+_[1]+_[3],height:v.height+_[0]+_[2]},style:b,silent:!0});r.subPixelOptimizeRect(w),n.add(w)}}})},function(t,e,i){i(202),i(203),i(208),i(206),i(204),i(205),i(207)},function(t,e,i){var n=i(25),r=i(1),o=i(2).extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){o.superApply(this,"mergeDefaultAndTheme",arguments),r.each(this.option.feature,function(t,e){var i=n.get(e);i&&r.merge(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}});t.exports=o},function(t,e,i){(function(e){function n(t){return 0===t.indexOf("my")}var r=i(25),o=i(1),a=i(3),s=i(9),l=i(45),u=i(114),h=i(18);t.exports=i(2).extendComponentView({type:"toolbox",render:function(t,e,i,c){function d(o,a){var l,u=y[o],h=y[a],d=v[u],p=new s(d,t,t.ecModel);if(u&&!h){if(n(u))l={model:p,onclick:p.option.onclick,featureName:u};else{var g=r.get(u);if(!g)return;l=new g(p,e,i)}m[u]=l}else{if(l=m[h],!l)return;l.model=p,l.ecModel=e,l.api=i}return!u&&h?void(l.dispose&&l.dispose(e,i)):!p.get("show")||l.unusable?void(l.remove&&l.remove(e,i)):(f(p,l,u),p.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(l.render&&l.render(p,e,i,c)))}function f(n,r,s){var l=n.getModel("iconStyle"),u=r.getIcons?r.getIcons():n.get("icon"),h=n.get("title")||{};if("string"==typeof u){var c=u,d=h;u={},h={},u[s]=c,h[s]=d}var f=n.iconPaths={};o.each(u,function(s,u){var c=l.getModel("normal").getItemStyle(),d=l.getModel("emphasis").getItemStyle(),v={x:-g/2,y:-g/2,width:g,height:g},m=0===s.indexOf("image://")?(v.image=s.slice(8),new a.Image({style:v})):a.makePath(s.replace("path://",""),{style:c,hoverStyle:d,rectHover:!0},v,"center");a.setHoverStyle(m),t.get("showTitle")&&(m.__title=h[u],m.on("mouseover",function(){m.setStyle({text:h[u],textPosition:d.textPosition||"bottom",textFill:d.fill||d.stroke||"#000",textAlign:d.textAlign||"center"})}).on("mouseout",function(){m.setStyle({textFill:null})})),m.trigger(n.get("iconStatus."+u)||"normal"),p.add(m),m.on("click",o.bind(r.onclick,r,e,i,u)),f[u]=m})}var p=this.group;if(p.removeAll(),t.get("show")){var g=+t.get("itemSize"),v=t.get("feature")||{},m=this._features||(this._features={}),y=[];o.each(v,function(t,e){y.push(e)}),new l(this._featureNames||[],y).add(d).update(d).remove(o.curry(d,null)).execute(),this._featureNames=y,u.layout(p,t,i),u.addBackground(p,t),p.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=h.getBoundingRect(e,n.font),o=t.position[0]+p.position[0],a=t.position[1]+p.position[1]+g,s=!1;a+r.height>i.getHeight()&&(n.textPosition="top",s=!0);var l=s?-5-r.height:g+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",l],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,l],n.textAlign="left")}})}},updateView:function(t,e,i,n){o.each(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},updateLayout:function(t,e,i,n){o.each(this._features,function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)})},remove:function(t,e){o.each(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){o.each(this._features,function(i){i.dispose&&i.dispose(t,e)})}})}).call(e,i(214))},function(t,e,i){function n(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function r(t){var e=[];return p.each(t,function(t,i){var n=t.categoryAxis,r=t.valueAxis,o=r.dim,a=[" "].concat(p.map(t.series,function(t){return t.name})),s=[n.model.getCategories()];p.each(t.series,function(t){s.push(t.getRawData().mapArray(o,function(t){return t}))});for(var l=[a.join(m)],u=0;ua;a++)n[a]=arguments[a];i.push((o?o+m:"")+n.join(m))}),i.join("\n")}).join("\n\n"+v+"\n\n")}function a(t){var e=n(t);return{value:p.filter([r(e.seriesGroupByCategoryAxis),o(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+v+"\n\n"),meta:e.meta}}function s(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function l(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(m)>=0?!0:void 0}function u(t){for(var e=t.split(/\n+/g),i=s(e.shift()).split(y),n=[],r=p.map(i,function(t){return{name:t,data:[]}}),o=0;o1?"emphasis":"normal")}function a(t,e,i,n){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=u.makeCoordInfoList(r(t.option),e),s=a.xAxisHas&&!a.yAxisHas?"lineX":!a.xAxisHas&&a.yAxisHas?"lineY":"rect";i._brushController.setPanels(u.makePanelOpts(a)).enableBrush(o?{brushType:s,brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}var s=i(1),l=i(111),u=i(112),h=i(109),c=s.each;i(185);var d="\x00_ec_\x00toolbox-dataZoom_";n.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:{zoom:"区域缩放",back:"区域缩放还原"}};var f=n.prototype;f.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,a(t,e,this,n),o(t,e)},f.onclick=function(t,e,i){p[i].call(this)},f.remove=function(t,e){this._brushController.unmount()},f.dispose=function(t,e){this._brushController.dispose()};var p={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(h.pop(this.ecModel))}};f._onBrush=function(t,e){function i(t,e,i){var r=n(t,i[t],a);r&&(o[r.id]={dataZoomId:r.id,startValue:e[0],endValue:e[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(r,o){var a=r.get(t+"Index");null!=a&&i.getComponent(t,a)===e&&(n=r)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]);var s=u.makeCoordInfoList(r(this.model.option),a),l=[];u.parseOutputRanges(t,s,a,l);var c=t[0],d=l[0],f=c.coordRange,p=c.brushType;if(d&&f)if("rect"===p)i("xAxis",f[0],d),i("yAxis",f[1],d);else{var g={lineX:"xAxis",lineY:"yAxis"};i(g[p],f,d)}h.push(a,o),this._dispatchZoomAction(o)}},f._dispatchZoomAction=function(t){var e=[];c(t,function(t,i){e.push(s.clone(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},i(25).register("dataZoom",n),i(2).registerPreprocessor(function(t){function e(t,e){if(e){var r=t+"Index",o=e[r];null==o||"all"==o||s.isArray(o)||(o=o===!1||"none"===o?[]:[o]),i(t,function(e,i){if(null==o||"all"==o||-1!==s.indexOf(o,i)){var a={type:"select",$fromToolbox:!0,id:d+t+i};a[r]=i,n.push(a)}})}}function i(e,i){var n=t[e];s.isArray(n)||(n=n?[n]:[]),c(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);s.isArray(n)||(t.dataZoom=n=[n]);var r=t.toolbox;if(r&&(s.isArray(r)&&(r=r[0]),r&&r.feature)){var o=r.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}}),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(1);n.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"},option:{},seriesIndex:{}};var o=n.prototype;o.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return r.each(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var a={line:function(t,e,i,n){return"bar"===t?r.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?r.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0):void 0},tiled:function(t,e,i,n){return"line"===t||"bar"===t?r.merge({id:e,stack:""},n.get("option.tiled")||{},!0):void 0}},s=[["line","bar"],["stack","tiled"]];o.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(a[i]){var l={series:[]},u=function(t){var e=t.subType,o=t.id,s=a[i](e,o,t,n);s&&(r.defaults(s,t.option),l.series.push(s));var u=t.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=t.get(c+"AxisIndex"),f=c+"Axis";l[f]=l[f]||[];for(var p=0;d>=p;p++)l[f][d]=l[f][d]||{};l[f][d].boundaryGap="bar"===i}}};r.each(s,function(t){r.indexOf(t,i)>=0&&r.each(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},u),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l})}};var l=i(2);l.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),i(25).register("magicType",n),t.exports=n},function(t,e,i){"use strict";function n(t){this.model=t}var r=i(109);n.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:"还原"};var o=n.prototype;o.onclick=function(t,e,i){r.clear(t),e.dispatchAction({type:"restore",from:this.uid})},i(25).register("restore",n),i(2).registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),t.exports=n},function(t,e,i){function n(t){this.model=t}var r=i(12);n.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:"保存为图片",type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:["右键另存为图片"]},n.prototype.unusable=!r.canvasSupported;var o=n.prototype;o.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=i.get("type",!0)||"png";r.download=n+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(r.href=a,"function"==typeof MouseEvent){var s=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(s)}else{var l=i.get("lang"),u='',h=window.open();h.document.write(u)}},i(25).register("saveAsImage",n),t.exports=n},function(t,e,i){i(211),i(212),i(2).registerAction({type:"showTip",event:"showTip",update:"none"},function(){}),i(2).registerAction({type:"hideTip",event:"hideTip",update:"none"},function(){})},function(t,e,i){function n(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return l.map(g,function(t){return t+"transition:"+i}).join(";")}function r(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),d(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function o(t){t=t;var e=[],i=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.getModel("textStyle"),s=t.get("padding");return i&&e.push(n(i)),o&&(p.canvasSupported?e.push("background-Color:"+o):(e.push("background-Color:#"+u.toHex(o)),e.push("filter:alpha(opacity=70)"))),d(["width","color","radius"],function(i){var n="border-"+i,r=f(n),o=t.get(r);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(r(a)),null!=s&&e.push("padding:"+c.normalizeCssArray(s).join("px ")+"px"),e.join(";")+";"}function a(t,e){var i=document.createElement("div"),n=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r.enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(!r.enterable){var i=n.handler;h.normalizeEvent(t,e),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r.enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1},s(i,t)}function s(t,e){function i(t){n(t.target)&&t.preventDefault()}function n(i){for(;i&&i!==e;){if(i===t)return!0;i=i.parentNode}}h.addEventListener(e,"touchstart",i),h.addEventListener(e,"touchmove",i),h.addEventListener(e,"touchend",i)}var l=i(1),u=i(17),h=i(24),c=i(11),d=l.each,f=c.toCamelCase,p=i(12),g=["","-webkit-","-moz-","-o-"],v="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";a.prototype={constructor:a,enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=v+o(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){var e=this.el;e.innerHTML=t,e.style.display=t?"block":"none"},moveTo:function(t,e){var i=this.el.style;i.left=t+"px",i.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this.enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(l.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}},t.exports=a},function(t,e,i){i(2).extendComponentModel({type:"tooltip",defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove",alwaysShowContent:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:!0,animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",lineStyle:{color:"#555",width:1,type:"solid"},crossStyle:{color:"#555",width:1,type:"dashed",textStyle:{}},shadowStyle:{color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff",fontSize:14}}})},function(t,e,i){function n(t,e){if(!t||!e)return!1;var i=g.round;return i(t[0])===i(e[0])&&i(t[1])===i(e[1])}function r(t,e,i,n){return{x1:t,y1:e,x2:i,y2:n}}function o(t,e,i,n){return{x:t,y:e,width:i,height:n}}function a(t,e,i,n,r,o){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:o,clockwise:!0}}function s(t,e,i,n,r){var o=i.clientWidth,a=i.clientHeight,s=20;return t+o+s>n?t-=o+s:t+=s,e+a+s>r?e-=a+s:e+=s,[t,e]}function l(t,e,i){var n=i.clientWidth,r=i.clientHeight,o=5,a=0,s=0,l=e.width,u=e.height;switch(t){case"inside":a=e.x+l/2-n/2,s=e.y+u/2-r/2;break;case"top":a=e.x+l/2-n/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-n/2,s=e.y+u+o;break;case"left":a=e.x-n-o,s=e.y+u/2-r/2;break;case"right":a=e.x+l+o,s=e.y+u/2-r/2}return[a,s]}function u(t,e,i,n,r,o,a){var u=a.getWidth(),h=a.getHeight(),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),"function"==typeof t&&(t=t([e,i],r,n.el,c)),f.isArray(t))e=v(t[0],u),i=v(t[1],h);else if("string"==typeof t&&o){var d=l(t,c,n.el);e=d[0],i=d[1]}else{var d=s(e,i,n.el,u,h);e=d[0],i=d[1]}n.moveTo(e,i)}function h(t){var e=t.coordinateSystem,i=t.get("tooltip.trigger",!0);return!(!e||"cartesian2d"!==e.type&&"polar"!==e.type&&"singleAxis"!==e.type||"item"===i)}var c=i(210),d=i(3),f=i(1),p=i(11),g=i(4),v=g.parsePercent,m=i(12);i(2).extendComponentView({type:"tooltip",_axisPointers:{},init:function(t,e){if(!m.node){var i=new c(e.getDom(),e);this._tooltipContent=i,e.on("showTip",this._manuallyShowTip,this),e.on("hideTip",this._manuallyHideTip,this)}},render:function(t,e,i){if(!m.node){this.group.removeAll(),this._axisPointers={},this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastHover={};var n=this._tooltipContent;n.update(),n.enterable=t.get("enterable"),this._alwaysShowContent=t.get("alwaysShowContent"),this._seriesGroupByAxis=this._prepareAxisTriggerData(t,e);var r=this._crossText;if(r&&this.group.add(r),null!=this._lastX&&null!=this._lastY){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){o._manuallyShowTip({x:o._lastX,y:o._lastY})})}var a=this._api.getZr();a.off("click",this._tryShow),a.off("mousemove",this._mousemove),a.off("mouseout",this._hide),a.off("globalout",this._hide),"click"===t.get("triggerOn")?a.on("click",this._tryShow,this):(a.on("mousemove",this._mousemove,this),a.on("mouseout",this._hide,this),a.on("globalout",this._hide,this))}},_mousemove:function(t){var e=this._tooltipModel.get("showDelay"),i=this;clearTimeout(this._showTimeout),e>0?this._showTimeout=setTimeout(function(){i._tryShow(t)},e):this._tryShow(t)},_manuallyShowTip:function(t){if(t.from!==this.uid){var e=this._ecModel,i=t.seriesIndex,n=t.dataIndex,r=e.getSeriesByIndex(i),o=this._api;if(null==t.x||null==t.y){if(r||e.eachSeries(function(t){h(t)&&!r&&(r=t)}),r){var a=r.getData();null==n&&(n=a.indexOfName(t.name));var s,l,u=a.getItemGraphicEl(n),c=r.coordinateSystem;if(c&&c.dataToPoint){var d=c.dataToPoint(a.getValues(f.map(c.dimensions,function(t){return r.coordDimToDataDim(t)[0]}),n,!0));s=d&&d[0],l=d&&d[1]}else if(u){var p=u.getBoundingRect().clone();p.applyTransform(u.transform),s=p.x+p.width/2,l=p.y+p.height/2}null!=s&&null!=l&&this._tryShow({offsetX:s,offsetY:l,target:u,event:{}})}}else{var u=o.getZr().handler.findHover(t.x,t.y);this._tryShow({offsetX:t.x,offsetY:t.y,target:u,event:{}})}}},_manuallyHideTip:function(t){t.from!==this.uid&&this._hide()},_prepareAxisTriggerData:function(t,e){var i={};return e.eachSeries(function(t){if(h(t)){var e,n,r=t.coordinateSystem;"cartesian2d"===r.type?(e=r.getBaseAxis(),n=e.dim+e.index):"singleAxis"===r.type?(e=r.getAxis(),n=e.dim+e.type):(e=r.getBaseAxis(),n=e.dim+r.name),i[n]=i[n]||{coordSys:[],series:[]},i[n].coordSys.push(r),i[n].series.push(t)}},this),i},_tryShow:function(t){var e=t.target,i=this._tooltipModel,n=i.get("trigger"),r=this._ecModel,o=this._api;if(i)if(this._lastX=t.offsetX,this._lastY=t.offsetY,e&&null!=e.dataIndex){var a=e.dataModel||r.getSeriesByIndex(e.seriesIndex),s=e.dataIndex,l=a.getData().getItemModel(s);"axis"===(l.get("tooltip.trigger")||n)?this._showAxisTooltip(i,r,t):(this._ticket="",this._hideAxisPointer(),this._resetLastHover(),this._showItemTooltipContent(a,s,e.dataType,t)),o.dispatchAction({type:"showTip",from:this.uid,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex})}else"item"===n?this._hide():this._showAxisTooltip(i,r,t),"cross"===i.get("axisPointer.type")&&o.dispatchAction({type:"showTip",from:this.uid,x:t.offsetX,y:t.offsetY})},_showAxisTooltip:function(t,e,i){var r=t.getModel("axisPointer"),o=r.get("type");if("cross"===o){var a=i.target;if(a&&null!=a.dataIndex){var s=e.getSeriesByIndex(a.seriesIndex),l=a.dataIndex;this._showItemTooltipContent(s,l,a.dataType,i)}}this._showAxisPointer();var u=!0;f.each(this._seriesGroupByAxis,function(t){var e=t.coordSys,a=e[0],s=[i.offsetX,i.offsetY];if(!a.containPoint(s))return void this._hideAxisPointer(a.name);u=!1;var l=a.dimensions,h=a.pointToData(s,!0);s=a.dataToPoint(h);var c=a.getBaseAxis(),d=r.get("axis");"auto"===d&&(d=c.dim);var p=!1,g=this._lastHover;if("cross"===o)n(g.data,h)&&(p=!0),g.data=h;else{var v=f.indexOf(l,d);g.data===h[v]&&(p=!0),g.data=h[v]}"cartesian2d"!==a.type||p?"polar"!==a.type||p?"singleAxis"!==a.type||p||this._showSinglePointer(r,a,d,s):this._showPolarPointer(r,a,d,s):this._showCartesianPointer(r,a,d,s),"cross"!==o&&this._dispatchAndShowSeriesTooltipContent(a,t.series,s,h,p)},this),this._tooltipModel.get("show")||this._hideAxisPointer(),u&&this._hide()},_showCartesianPointer:function(t,e,i,n){function a(i,n,o){var a="x"===i?r(n[0],o[0],n[0],o[1]):r(o[0],n[1],o[1],n[1]),s=l._getPointerElement(e,t,i,a);h?d.updateProps(s,{shape:a},t):s.attr({shape:a})}function s(i,n,r){var a=e.getAxis(i),s=a.getBandWidth(),u=r[1]-r[0],c="x"===i?o(n[0]-s/2,r[0],s,u):o(r[0],n[1]-s/2,u,s),f=l._getPointerElement(e,t,i,c);h?d.updateProps(f,{shape:c},t):f.attr({shape:c})}var l=this,u=t.get("type"),h="cross"!==u&&"category"===e.getBaseAxis().type;if("cross"===u)a("x",n,e.getAxis("y").getGlobalExtent()),a("y",n,e.getAxis("x").getGlobalExtent()),this._updateCrossText(e,n,t);else{var c=e.getAxis("x"===i?"y":"x"),f=c.getGlobalExtent();"cartesian2d"===e.type&&("line"===u?a:s)(i,n,f)}},_showSinglePointer:function(t,e,i,n){function o(i,n,o){var s=e.getAxis(),u=s.orient,h="horizontal"===u?r(n[0],o[0],n[0],o[1]):r(o[0],n[1],o[1],n[1]),c=a._getPointerElement(e,t,i,h);l?d.updateProps(c,{shape:h},t):c.attr({shape:h})}var a=this,s=t.get("type"),l="cross"!==s&&"category"===e.getBaseAxis().type,u=e.getRect(),h=[u.y,u.y+u.height];o(i,n,h)},_showPolarPointer:function(t,e,i,n){function o(i,n,o){var a,s=e.pointToCoord(n);if("angle"===i){var u=e.coordToPoint([o[0],s[1]]),h=e.coordToPoint([o[1],s[1]]);a=r(u[0],u[1],h[0],h[1])}else a={cx:e.cx,cy:e.cy,r:s[0]};var c=l._getPointerElement(e,t,i,a);f?d.updateProps(c,{shape:a},t):c.attr({shape:a})}function s(i,n,r){var o,s=e.getAxis(i),u=s.getBandWidth(),h=e.pointToCoord(n),c=Math.PI/180;o="angle"===i?a(e.cx,e.cy,r[0],r[1],(-h[1]-u/2)*c,(-h[1]+u/2)*c):a(e.cx,e.cy,h[0]-u/2,h[0]+u/2,0,2*Math.PI);var p=l._getPointerElement(e,t,i,o);f?d.updateProps(p,{shape:o},t):p.attr({shape:o})}var l=this,u=t.get("type"),h=e.getAngleAxis(),c=e.getRadiusAxis(),f="cross"!==u&&"category"===e.getBaseAxis().type;if("cross"===u)o("angle",n,c.getExtent()),o("radius",n,h.getExtent()),this._updateCrossText(e,n,t);else{var p=e.getAxis("radius"===i?"angle":"radius"),g=p.getExtent();("line"===u?o:s)(i,n,g)}},_updateCrossText:function(t,e,i){var n=i.getModel("crossStyle"),r=n.getModel("textStyle"),o=this._tooltipModel,a=this._crossText;a||(a=this._crossText=new d.Text({style:{textAlign:"left",textVerticalAlign:"bottom"}}),this.group.add(a));var s=t.pointToData(e),l=t.dimensions;s=f.map(s,function(e,i){var n=t.getAxis(l[i]);return e="category"===n.type||"time"===n.type?n.scale.getLabel(e):p.addCommas(e.toFixed(n.getPixelPrecision()))}),a.setStyle({fill:r.getTextColor()||n.get("color"),textFont:r.getFont(),text:s.join(", "),x:e[0]+5,y:e[1]-5}),a.z=o.get("z"),a.zlevel=o.get("zlevel")},_getPointerElement:function(t,e,i,n){var r=this._tooltipModel,o=r.get("z"),a=r.get("zlevel"),s=this._axisPointers,l=t.name;if(s[l]=s[l]||{},s[l][i])return s[l][i];var u=e.get("type"),h=e.getModel(u+"Style"),c="shadow"===u,f=h[c?"getAreaStyle":"getLineStyle"](),p="polar"===t.type?c?"Sector":"radius"===i?"Circle":"Line":c?"Rect":"Line";c?f.stroke=null:f.fill=null;var g=s[l][i]=new d[p]({style:f,z:o,zlevel:a,silent:!0,shape:n});return this.group.add(g),g},_dispatchAndShowSeriesTooltipContent:function(t,e,i,n,r){var o=this._tooltipModel,a=this._tooltipContent,s=t.getBaseAxis(),l=f.map(e,function(t){return{seriesIndex:t.seriesIndex,dataIndex:t.getAxisTooltipDataIndex?t.getAxisTooltipDataIndex(t.coordDimToDataDim(s.dim),n,s):t.getData().indexOfNearest(t.coordDimToDataDim(s.dim)[0],n["x"===s.dim||"radius"===s.dim?0:1])}}),h=this._lastHover,c=this._api;if(h.payloadBatch&&!r&&c.dispatchAction({type:"downplay",batch:h.payloadBatch}),r||(c.dispatchAction({type:"highlight",batch:l}),h.payloadBatch=l),c.dispatchAction({type:"showTip",dataIndex:l[0].dataIndex,seriesIndex:l[0].seriesIndex,from:this.uid}),s&&o.get("showContent")&&o.get("show")){var d,g=o.get("formatter"),v=o.get("position"),m=f.map(e,function(t,e){return t.getDataParams(l[e].dataIndex)});a.show(o);var y=l[0].dataIndex;if(!r){if(this._ticket="",g){if("string"==typeof g)d=p.formatTpl(g,m);else if("function"==typeof g){var x=this,_="axis_"+t.name+"_"+y,b=function(t,e){t===x._ticket&&(a.setContent(e),u(v,i[0],i[1],a,m,null,c))};x._ticket=_,d=g(m,_,b)}}else{var w=e[0].getData().getName(y);d=(w?w+"
":"")+f.map(e,function(t,e){return t.formatTooltip(l[e].dataIndex,!0)}).join("
")}a.setContent(d)}u(v,i[0],i[1],a,m,null,c)}},_showItemTooltipContent:function(t,e,i,n){var r=this._api,o=t.getData(i),a=o.getItemModel(e),s=this._tooltipModel,l=this._tooltipContent,h=a.getModel("tooltip");if(h.parentModel?h.parentModel.parentModel=s:h.parentModel=this._tooltipModel,h.get("showContent")&&h.get("show")){var c,d=h.get("formatter"),f=h.get("position"),g=t.getDataParams(e,i);if(d){if("string"==typeof d)c=p.formatTpl(d,g);else if("function"==typeof d){var v=this,m="item_"+t.name+"_"+e,y=function(t,e){t===v._ticket&&(l.setContent(e),u(f,n.offsetX,n.offsetY,l,g,n.target,r))};v._ticket=m,c=d(g,m,y)}}else c=t.formatTooltip(e,!1,i);l.show(h),l.setContent(c),u(f,n.offsetX,n.offsetY,l,g,n.target,r)}},_showAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.show()})}else this.group.eachChild(function(t){t.show()}),this.group.show()},_resetLastHover:function(){var t=this._lastHover;t.payloadBatch&&this._api.dispatchAction({type:"downplay",batch:t.payloadBatch}),this._lastHover={}},_hideAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&f.each(e,function(t){t.hide()})}else this.group.children().length&&this.group.hide()},_hide:function(){clearTimeout(this._showTimeout),this._hideAxisPointer(),this._resetLastHover(),this._alwaysShowContent||this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._api.dispatchAction({type:"hideTip",from:this.uid}),this._lastX=this._lastY=null},dispose:function(t,e){if(!m.node){var i=e.getZr();this._tooltipContent.hide(),i.off("click",this._tryShow),i.off("mousemove",this._mousemove),i.off("mouseout",this._hide),i.off("globalout",this._hide),e.off("showTip",this._manuallyShowTip),e.off("hideTip",this._manuallyHideTip)}}})},function(t,e,i){function n(t,e){var i=t.get("center"),n=t.get("radius"),r=e.getWidth(),o=e.getHeight(),a=s.parsePercent;this.cx=a(i[0],r),this.cy=a(i[1],o);var l=this.getRadiusAxis(),u=Math.min(r,o)/2;l.setExtent(0,a(n,u))}function r(t,e){var i=this,n=i.getAngleAxis(),r=i.getRadiusAxis();if(n.scale.setExtent(1/0,-(1/0)),r.scale.setExtent(1/0,-(1/0)),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();r.scale.unionExtent(e.getDataExtent("radius","category"!==r.type)),n.scale.unionExtent(e.getDataExtent("angle","category"!==n.type))}}),u(n,n.model),u(r,r.model),"category"===n.type&&!n.onBand){var o=n.getExtent(),a=360/n.scale.count();n.inverse?o[1]+=a:o[1]-=a,n.setExtent(o[0],o[1])}}function o(t,e){if(t.type=e.get("type"),t.scale=l.createScaleByModel(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,"angleAxis"===e.mainType){var i=e.get("startAngle");t.inverse=e.get("inverse")^e.get("clockwise"),t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}var a=i(366),s=i(4),l=i(21),u=l.niceScaleExtent;i(367);var h={dimensions:a.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,s){var l=new a(s);l.resize=n,l.update=r;var u=l.getRadiusAxis(),h=l.getAngleAxis(),c=t.findAxisModel("radiusAxis"),d=t.findAxisModel("angleAxis");o(u,c),o(h,d),l.resize(t,e),i.push(l),t.coordinateSystem=l}),t.eachSeries(function(t){"polar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("polarIndex")])}),i}};i(23).register("polar",h)},function(t,e){function i(){c&&u&&(c=!1,u.length?h=u.concat(h):d=-1,h.length&&n())}function n(){if(!c){var t=a(i);c=!0;for(var e=h.length;e;){for(u=h,h=[];++d1)for(var i=1;i=0?parseFloat(t)/100*e:parseFloat(t):t},E=function(t,e,i){var n=a.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=D(n[0],n[1],n[2]),t.opacity=i*n[3])},R=function(t){var e=a.parse(t);return[D(e[0],e[1],e[2]),e[3]]},V=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof f){var r,o=0,a=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){r="gradient";var d=i.transform,p=[n.x*h,n.y*c],g=[n.x2*h,n.y2*c];d&&(b(p,p,d),b(g,g,d));var v=g[0]-p[0],m=g[1]-p[1];o=180*Math.atan2(v,m)/Math.PI,0>o&&(o+=360),1e-6>o&&(o=0)}else{r="gradientradial";var p=[n.x*h,n.y*c],d=i.transform,y=i.scale,x=h,w=c;a=[(p[0]-u.x)/x,(p[1]-u.y)/w],d&&b(p,p,d),x/=y[0]*M,w/=y[1]*M;var S=_(x,w);s=0/S,l=2*n.r/S-s}var A=n.colorStops.slice();A.sort(function(t,e){return t.offset-e.offset});for(var I=A.length,T=[],L=[],C=0;I>C;C++){var D=A[C],P=R(D.color);L.push(D.offset*l+s+" "+P[0]),0!==C&&C!==I-1||T.push(P)}if(I>=2){var k=T[0][0],z=T[1][0],O=T[0][1]*e.opacity,V=T[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=k,t.color2=z,t.colors=L.join(","),t.opacity=V,t.opacity2=O}"radial"===r&&(t.focusposition=a.join(","))}else E(t,n,e.opacity)},N=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof f||E(t,e.stroke,e.opacity)},B=function(t,e,i,n){var r="fill"==e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof f&&k(t,o),o||(o=p.createNode(e)),r?V(o,i,n):N(o,i),P(t,o)):(t[r?"filled":"stroked"]="false",k(t,o))},G=[[],[],[]],F=function(t,e){var i,n,r,a,s,l,u=o.M,h=o.C,c=o.L,d=o.A,f=o.Q,p=[];for(a=0;a.01?F&&(H+=270/M):Math.abs(W-E)<1e-10?F&&O>H||!F&&H>O?I-=270/M:I+=270/M:F&&E>W||!F&&W>E?S+=270/M:S-=270/M),p.push(Z,g(((O-R)*P+C)*M-A),w,g(((E-V)*k+D)*M-A),w,g(((O+R)*P+C)*M-A),w,g(((E+V)*k+D)*M-A),w,g((H*P+C)*M-A),w,g((W*k+D)*M-A),w,g((S*P+C)*M-A),w,g((I*k+D)*M-A)),s=S,l=I;break;case o.R:var q=G[0],j=G[1];q[0]=t[a++],q[1]=t[a++],j[0]=q[0]+t[a++],j[1]=q[1]+t[a++],e&&(b(q,q,e),b(j,j,e)),q[0]=g(q[0]*M-A),j[0]=g(j[0]*M-A),q[1]=g(q[1]*M-A),j[1]=g(j[1]*M-A),p.push(" m ",q[0],w,q[1]," l ",j[0],w,q[1]," l ",j[0],w,j[1]," l ",q[0],w,j[1]);break;case o.Z:p.push(" x ")}if(i>0){p.push(n);for(var U=0;i>U;U++){var X=G[U];e&&b(X,X,e),p.push(g(X[0]*M-A),w,g(X[1]*M-A),i-1>U?w:"")}}}return p.join("")};d.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=p.createNode("shape"),L(i),this._vmlEl=i),B(i,"fill",e,this),B(i,"stroke",e,this);var n=this.transform,r=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(r&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];a*=v(m(s))}o.weight=a+"px"}var l=this.path;this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=F(l.data,this.transform),i.style.zIndex=z(this.zlevel,this.z,this.z2),P(t,i),e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},d.prototype.onRemove=function(t){k(t,this._vmlEl),this.removeRectText(t)},d.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)};var H=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};h.prototype.brushVML=function(t){var e,i,n=this.style,r=n.image;if(H(r)){var o=r.src;if(o===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var a=r.runtimeStyle,s=a.width,l=a.height;a.width="auto",a.height="auto",e=r.width,i=r.height,a.width=s,a.height=l,this._imageSrc=o,this._imageWidth=e,this._imageHeight=i}r=o}else r===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(r){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,m=n.sHeight,y=n.sx||0,x=n.sy||0,M=f&&m,A=this._vmlEl;A||(A=p.doc.createElement("div"),L(A),this._vmlEl=A);var I,T=A.style,C=!1,D=1,k=1;if(this.transform&&(I=this.transform,D=v(I[0]*I[0]+I[1]*I[1]),k=v(I[2]*I[2]+I[3]*I[3]),C=I[1]||I[2]),C){var O=[u,h],E=[u+c,h],R=[u,h+d],V=[u+c,h+d];b(O,O,I),b(E,E,I),b(R,R,I),b(V,V,I);var N=_(O[0],E[0],R[0],V[0]),B=_(O[1],E[1],R[1],V[1]),G=[];G.push("M11=",I[0]/D,w,"M12=",I[2]/k,w,"M21=",I[1]/D,w,"M22=",I[3]/k,w,"Dx=",g(u*D+I[4]),w,"Dy=",g(h*k+I[5])),T.padding="0 "+g(N)+"px "+g(B)+"px 0",T.filter=S+".Matrix("+G.join("")+", SizingMethod=clip)"}else I&&(u=u*D+I[4],h=h*k+I[5]),T.filter="",T.left=g(u)+"px",T.top=g(h)+"px";var F=this._imageEl,W=this._cropEl;F||(F=p.doc.createElement("div"),this._imageEl=F);var Z=F.style;if(M){if(e&&i)Z.width=g(D*e*c/f)+"px",Z.height=g(k*i*d/m)+"px";else{var q=new Image,j=this;q.onload=function(){q.onload=null,e=q.width,i=q.height,Z.width=g(D*e*c/f)+"px",Z.height=g(k*i*d/m)+"px",j._imageWidth=e,j._imageHeight=i,j._imageSrc=r},q.src=r}W||(W=p.doc.createElement("div"),W.style.overflow="hidden",this._cropEl=W);var U=W.style;U.width=g((c+y*c/f)*D),U.height=g((d+x*d/m)*k),U.filter=S+".Matrix(Dx="+-y*c/f*D+",Dy="+-x*d/m*k+")",W.parentNode||A.appendChild(W),F.parentNode!=W&&W.appendChild(F)}else Z.width=g(D*c)+"px",Z.height=g(k*d)+"px",A.appendChild(F),W&&W.parentNode&&(A.removeChild(W),this._cropEl=null);var X="",Y=n.opacity;1>Y&&(X+=".Alpha(opacity="+g(100*Y)+") "),X+=S+".AlphaImageLoader(src="+r+", SizingMethod=scale)",Z.filter=X,A.style.zIndex=z(this.zlevel,this.z,this.z2),P(t,A),n.text&&this.drawRectText(t,this.getBoundingRect())}},h.prototype.onRemove=function(t){k(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},h.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)};var W,Z="normal",q={},j=0,U=100,X=document.createElement("div"),Y=function(t){var e=q[t];if(!e){j>U&&(j=0,q={});var i,n=X.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(r){}e={style:n.fontStyle||Z,variant:n.fontVariant||Z,weight:n.fontWeight||Z,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},q[t]=e,j++}return e};s.measureText=function(t,e){var i=p.doc;W||(W=i.createElement("div"),W.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",p.doc.body.appendChild(W));try{W.style.font=e}catch(n){}return W.innerHTML="",W.appendChild(i.createTextNode(t)),{width:W.offsetWidth}};for(var $=new r,Q=function(t,e,i,n){var r=this.style,o=r.text;if(o){var a,l,u=r.textAlign,h=Y(r.textFont),c=h.style+" "+h.variant+" "+h.weight+" "+h.size+'px "'+h.family+'"',d=r.textBaseline,f=r.textVerticalAlign;i=i||s.getBoundingRect(o,c,u,d);var v=this.transform;if(v&&!n&&($.copy(e),$.applyTransform(v),e=$),n)a=e.x,l=e.y;else{var m=r.textPosition,y=r.textDistance;if(m instanceof Array)a=e.x+O(m[0],e.width),l=e.y+O(m[1],e.height),u=u||"left",d=d||"top";else{var x=s.adjustTextPositionOnRect(m,e,i,y);a=x.x,l=x.y,u=u||x.textAlign,d=d||x.textBaseline}}if(f){switch(f){case"middle":l-=i.height/2;break;case"bottom":l-=i.height}d="top"}var _=h.size;switch(d){case"hanging":case"top":l+=_/1.75;break;case"middle":break;default:l-=_/2.25}switch(u){case"left":break;case"center":a-=i.width/2;break;case"right":a-=i.width}var S,M,A,I=p.createNode,T=this._textVmlEl;T?(A=T.firstChild,S=A.nextSibling,M=S.nextSibling):(T=I("line"),S=I("path"),M=I("textpath"),A=I("skew"),M.style["v-text-align"]="left",L(T),S.textpathok=!0,M.on=!0,T.from="0 0",T.to="1000 0.05",P(T,A),P(T,S),P(T,M),this._textVmlEl=T);var D=[a,l],k=T.style;v&&n?(b(D,D,v),A.on=!0,A.matrix=v[0].toFixed(3)+w+v[2].toFixed(3)+w+v[1].toFixed(3)+w+v[3].toFixed(3)+",0,0",A.offset=(g(D[0])||0)+","+(g(D[1])||0),A.origin="0 0",k.left="0px",k.top="0px"):(A.on=!1,k.left=g(a)+"px",k.top=g(l)+"px"),M.string=C(o);try{M.style.font=c}catch(E){}B(T,"fill",{fill:n?r.fill:r.textFill,opacity:r.opacity},this),B(T,"stroke",{stroke:n?r.stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash},this),T.style.zIndex=z(this.zlevel,this.z,this.z2),P(t,T)}},K=function(t){k(t,this._textVmlEl),this._textVmlEl=null},J=function(t){P(t,this._textVmlEl)},tt=[l,u,h,d,c],et=0;et0&&(i*=3,e=[u*i+a*(1-i),h*i+s*(1-i)]),t.setLayout([r,o,e])})}}},function(t,e,i){var n=i(5);t.exports=function(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.normal.curveness")||0,i=n.clone(t.node1.getLayout()),r=n.clone(t.node2.getLayout()),o=[i,r];e>0&&o.push([(i[0]+r[0])/2-(i[1]-r[1])*e,(i[1]+r[1])/2-(r[0]-i[0])*e]),t.setLayout(o)})}},function(t,e,i){var n=i(221);t.exports=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),n(i)}}},function(t,e,i){function n(t,e,i){r.Group.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var r=i(3),o=i(93),a=i(1),s=i(26),l=i(5),u=i(16),h=n.prototype;h.createLine=function(t,e,i){return new o(t,e,i)},h._updateEffectSymbol=function(t,e){var i=t.getItemModel(e),n=i.getModel("effect"),r=n.get("symbolSize"),o=n.get("symbol");a.isArray(r)||(r=[r,r]);var l=n.get("color")||t.getItemVisual(e,"color"),u=this.childAt(1);this._symbolType!==o&&(this.remove(u),u=s.createSymbol(o,-.5,-.5,1,1,l),u.z2=100,u.culling=!0,this.add(u)),u&&(u.setStyle("shadowColor",l),u.setStyle(n.getItemStyle(["color"])),u.attr("scale",r),u.setColor(l),u.attr("scale",r),this._symbolType=o,this._updateEffectAnimation(t,n,e))},h._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var r=this,o=t.getItemLayout(i),a=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=e.get("delay")||function(e){return e/t.count()*a/3},h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,o),l>0&&(a=this.getLineLength(n)/l*1e3),a!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-a*n.__t),n.__t=0;var d=n.animate("",s).when(a,{__t:1}).delay(c).during(function(){r.updateSymbolPosition(n)});s||d.done(function(){r.remove(n)}),d.start()}this._period=a,this._loop=s}},h.getLineLength=function(t){return l.dist(t.__p1,t.__cp1)+l.dist(t.__cp1,t.__p2)},h.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},h.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},h.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,r=t.__t,o=t.position,a=u.quadraticAt,s=u.quadraticDerivativeAt;o[0]=a(e[0],n[0],i[0],r),o[1]=a(e[1],n[1],i[1],r);var l=s(e[0],n[0],i[0],r),h=s(e[1],n[1],i[1],r);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1},h.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},a.inherits(n,r.Group),t.exports=n},function(t,e,i){function n(t,e,i){r.Group.call(this),this._createPolyline(t,e,i)}var r=i(3),o=i(1),a=n.prototype;a._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new r.Polyline({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},a.updateData=function(t,e,i){var n=t.hostModel,o=this.childAt(0),a={shape:{points:t.getItemLayout(e)}};r.updateProps(o,a,n,e),this._updateCommonStl(t,e,i)},a._updateCommonStl=function(t,e,i){var n=this.childAt(0),a=t.getItemModel(e),s=t.getItemVisual(e,"color"),l=i&&i.lineStyle,u=i&&i.hoverLineStyle;i&&!t.hasItemOption||(l=a.getModel("lineStyle.normal").getLineStyle(),u=a.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(o.defaults({strokeNoScale:!0,fill:"none",stroke:s},l)),n.hoverStyle=u,r.setHoverStyle(this)},a.updateLayout=function(t,e){var i=this.childAt(0);i.setShape("points",t.getItemLayout(e))},o.inherits(n,r.Group),t.exports=n},function(t,e,i){var n=i(13),r=i(376),o=i(238),a=i(30),s=i(23),l=i(1),u=i(35);t.exports=function(t,e,i,h,c){for(var d=new r(h),f=0;f "+y)))}var x,_=i.get("coordinateSystem");if("cartesian2d"===_||"polar"===_)x=u(t,i,i.ecModel);else{var b=s.get(_),w=a((b&&"view"!==b.type?b.dimensions||[]:[]).concat(["value"]),t);x=new n(w,i),x.initData(t)}var S=new n(["value"],i);return S.initData(g,p),c&&c(x,S),o({mainData:x,struct:d,structAttr:"graph",datas:{node:x,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),d.update(),d}},function(t,e,i){function n(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return n&&(i.fill=n),i}function r(t,e,i,n){e.off("click"),t.get("selectedMode")&&e.on("click",function(r){for(var a=r.target;!a.__region;)a=a.parent;if(a){var s=a.__region,l={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",name:s.name,from:n.uid};l[t.mainType+"Id"]=t.id,i.dispatchAction(l),o(t,e)}})}function o(t,e){e.eachChild(function(e){e.__region&&e.trigger(t.isSelected(e.__region.name)?"emphasis":"normal")})}function a(t,e){var i=new l.Group;this._controller=new s(t.getZr(),e?i:null,null),this.group=i,this._updateGroup=e}var s=i(79),l=i(3),u=i(1);a.prototype={constructor:a,draw:function(t,e,i,a,s){var h=t.getData&&t.getData(),c=t.coordinateSystem,d=this.group,f=c.scale,p={position:c.position,scale:f};!d.childAt(0)||s?d.attr(p):l.updateProps(d,p,t),d.removeAll();var g=["itemStyle","normal"],v=["itemStyle","emphasis"],m=["label","normal"],y=["label","emphasis"];u.each(c.regions,function(e){var i=new l.Group,r=new l.CompoundPath({shape:{paths:[]}});i.add(r);var o,a=t.getRegionModel(e.name)||t,s=a.getModel(g),c=a.getModel(v),p=n(s,f),x=n(c,f),_=a.getModel(m),b=a.getModel(y);if(h){o=h.indexOfName(e.name);var w=h.getItemVisual(o,"color",!0);w&&(p.fill=w)}var S=_.getModel("textStyle"),M=b.getModel("textStyle");u.each(e.contours,function(t){var e=new l.Polygon({shape:{points:t}});r.shape.paths.push(e)}),r.setStyle(p),r.style.strokeNoScale=!0,r.culling=!0;var A=_.get("show"),I=b.get("show"),T=h&&isNaN(h.get("value",o)),L=h&&h.getItemLayout(o);if(!h||T&&(A||I)||L&&L.showLabel){var C=h?o:e.name,D=t.getFormattedLabel(C,"normal"),P=t.getFormattedLabel(C,"emphasis"),k=new l.Text({style:{text:A?D||e.name:"",fill:S.getTextColor(),textFont:S.getFont(),textAlign:"center",textVerticalAlign:"middle"},hoverStyle:{text:I?P||e.name:"",fill:M.getTextColor(),textFont:M.getFont()},position:e.center.slice(),scale:[1/f[0],1/f[1]],z2:10,silent:!0});i.add(k)}if(h)h.setItemGraphicEl(o,i);else{var a=t.getRegionModel(e.name);r.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:a&&a.option||{}}}i.__region=e,l.setHoverStyle(i,x),d.add(i)}),this._updateController(t,e,i),r(t,d,i,a),o(t,d)},remove:function(){this.group.removeAll(),this._controller.dispose()},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}var r=t.coordinateSystem,o=this._controller;o.zoomLimit=t.get("scaleLimit"),o.zoom=r.getZoom(),o.enable(t.get("roam")||!1);var a=t.mainType;o.off("pan").on("pan",function(t,e){i.dispatchAction(u.extend(n(),{dx:t,dy:e}))}),o.off("zoom").on("zoom",function(t,e,r){if(i.dispatchAction(u.extend(n(),{zoom:t,originX:e,originY:r})),this._updateGroup){var o=this.group,a=o.scale;o.traverse(function(t){"text"===t.type&&t.attr("scale",[1/a[0],1/a[1]])})}},this),o.rectProvider=function(){return r.getViewRectAfterRoam()}}},t.exports=a},function(t,e,i){i(237),i(362),i(330);var n=i(2),r=i(1),o=5;n.extendComponentView({type:"parallel",render:function(t,e,i){var n=i.getZr();if(!this.__onMouseDown){var a;n.on("mousedown",this.__onMouseDown=function(t){a=[t.offsetX,t.offsetY]}),n.on("mouseup",this.__onMouseUp=function(e){var n=[e.offsetX,e.offsetY],s=Math.pow(a[0]-n[0],2)+Math.pow(a[1]-n[1],2);if(t.get("axisExpandable")&&!(s>o)){var l=t.coordinateSystem,u=l.findClosestAxisDim(n);if(u){var h=r.indexOf(l.dimensions,u);i.dispatchAction({type:"parallelAxisExpand",axisExpandCenter:h})}}})}},dispose:function(t,e){e.getZr().off(this.__onMouseDown),e.getZr().off(this.__onMouseUp)}}),n.registerPreprocessor(i(363))},function(t,e,i){var n=i(2),r=i(1),o=i(12),a=i(380),s=i(72),l=i(170),u=s.mapVisual,h=i(8),c=s.eachVisual,d=i(4),f=r.isArray,p=r.each,g=d.asc,v=d.linearMap,m=r.noop,y=["#f6efa6","#d88273","#bf444c"],x=n.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-(1/0),1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:null,min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;o.canvasSupported||(i.realtime=!1),!e&&l.replaceVisualOption(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=r.bind(t,this),this.controllerVisuals=l.createVisualMappings(this.option.controller,e,t),this.targetVisuals=l.createVisualMappings(this.option.target,e,t)},resetTargetSeries:function(){var t=this.option,e=null==t.seriesIndex;t.seriesIndex=e?[]:h.normalizeToArray(t.seriesIndex),e&&this.ecModel.eachSeries(function(e,i){t.seriesIndex.push(i)})},eachTargetSeries:function(t,e){r.each(this.option.seriesIndex,function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===u[0]?"min":t===u[1]?"max":(+t).toFixed(l)}var o,a,s=this.option,l=s.precision,u=this.dataBound,h=s.formatter;return i=i||["<",">"],r.isArray(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),r.isString(h)?h.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):r.isFunction(h)?o?h(t[0],t[1]):h(t):o?t[0]===u[0]?i[0]+" "+a[1]:t[1]===u[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=g([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){f(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),t.inRange=t.inRange||{color:y},p(this.stateList,function(e){var i=t[e];if(r.isString(i)){var n=a.get(i,"active",d);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},p(n,function(t,e){if(s.isValidType(e)){var i=a.get(e,"inactive",d);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");p(this.stateList,function(o){var a=this.itemSize,s=t[o];s||(s=t[o]={color:d?n:[n]}),null==s.symbol&&(s.symbol=e&&r.clone(e)||(d?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&r.clone(i)||(d?a[0]:[a[0],a[0]])),s.symbol=u(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var h=-(1/0);c(l,function(t){t>h&&(h=t)}),s.symbolSize=u(l,function(t){return v(t,[0,h],[0,a[0]],!0)})}},this)}var n=this.option,o={inRange:n.inRange,outOfRange:n.outOfRange},l=n.target||(n.target={}),h=n.controller||(n.controller={});r.merge(l,o),r.merge(h,o);var d=this.isCategory();t.call(this,l),t.call(this,h),e.call(this,l,"inRange","outOfRange"),i.call(this,h)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:m,getValueState:m});t.exports=x},function(t,e,i){var n=i(1),r=i(3),o=i(11),a=i(14),s=i(2),l=i(72);t.exports=s.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){return this.visualMapModel=t,t.get("show")===!1?void this.group.removeAll():void this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,i=o.normalizeCssArray(e.get("padding")||0),n=t.getBoundingRect();t.add(new r.Rect({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){function r(t){return u[t]}function o(t,e){u[t]=e}i=i||{};var a=i.forceState,s=this.visualMapModel,u={};if("symbol"===e&&(u.symbol=s.get("itemSymbol")),"color"===e){var h=s.get("contentColor");u.color=h}var c=s.controllerVisuals[a||s.getValueState(t)],d=l.prepareVisualTypes(c);return n.each(d,function(n){var a=c[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",a=c.__alphaForOpacity),l.dependsOn(n,e)&&a&&a.applyVisual(t,r,o)}),u[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;a.positionGroup(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:n.noop})},function(t,e,i){var n=i(14),r={getItemAlign:function(t,e,i){var r=t.option,o=r.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},s="horizontal"===r.orient?1:0,l=[["left","right","width"],["top","bottom","height"]],u=l[s],h=[0,null,10],c={},d=0;3>d;d++)c[l[1-s][d]]=h[d],c[u[d]]=2===d?i[0]:r[u[d]];var f=[["x","width",3],["y","height",0]][s],p=n.getLayoutRect(c,a,r.padding);return u[(p.margin[f[2]]||0)+p[f[0]]+.5*p[f[1]]<.5*a[f[1]]?0:1]}};t.exports=r},function(t,e,i){function n(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var r=i(1),o=r.each;t.exports=function(t){var e=t&&t.visualMap;r.isArray(e)||(e=e?[e]:[]),o(e,function(t){if(t){n(t,"splitList")&&!n(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&r.isArray(e)&&o(e,function(t){r.isObject(t)&&(n(t,"start")&&!n(t,"min")&&(t.min=t.start),n(t,"end")&&!n(t,"max")&&(t.max=t.end))})}})}},function(t,e,i){i(10).registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})},function(t,e,i){function n(t,e){t.eachTargetSeries(function(e){var i=e.getData();s.applyVisual(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))})}function r(t){t.eachSeries(function(e){var i=e.getData(),n=[];t.eachComponent("visualMap",function(t){var r={};n.push(r);r.stops=t.getStops(e,o);r.dimension=t.getDataDimension(i)}),e.getData().setVisual("visualMeta",n)})}function o(t,e,i){function n(t){return s[t]}function r(t,e){s[t]=e}for(var o=t.targetVisuals[i],a=l.prepareVisualTypes(o),s={},u=0,h=a.length;h>u;u++){var c=a[u],d=o["colorAlpha"===c?"__alphaForOpacity":c];d&&d.applyVisual(e,n,r)}return s.color}var a=i(2),s=i(170),l=i(72);i(1);a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,function(t){t.eachComponent("visualMap",function(e){n(e,t)}),r(t)})},function(t,e,i){var n=i(2),r={type:"selectDataRange",event:"dataRangeSelected",update:"update"};n.registerAction(r,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})})},function(t,e,i){function n(){s.call(this)}function r(t){this.name=t,this.zoomLimit,s.call(this),this._roamTransform=new n,this._viewTransform=new n,this._center,this._zoom}var o=i(5),a=i(19),s=i(87),l=i(1),u=i(7),h=o.applyTransform;l.mixin(n,s),r.prototype={constructor:r,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new u(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){i=i,n=n,this.transformTo(t,e,i,n),this._viewRect=new u(t,e,i,n)},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),o=this._viewTransform;o.transform=r.calculateTransform(new u(t,e,i,n)),o.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransform},_updateCenterAndZoom:function(){var t=this._viewTransform.getLocalTransform(),e=this._roamTransform,i=this.getDefaultCenter(),n=this.getCenter(),r=this.getZoom();n=o.applyTransform([],n,t),i=o.applyTransform([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[r,r],this._updateTransform()},_updateTransform:function(){var t=this._roamTransform,e=this._viewTransform;e.parent=t,t.updateTransform(),e.updateTransform(),e.transform&&a.copy(this.transform||(this.transform=[]),e.transform),this.transform?(this.invTransform=this.invTransform||[],a.invert(this.invTransform,this.transform)):this.invTransform=null,this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t){var e=this.transform;return e?h([],t,e):[t[0],t[1]]},pointToData:function(t){var e=this.invTransform;return e?h([],t,e):[t[0],t[1]]}},l.mixin(r,s),t.exports=r},function(t,e,i){function n(t,e,i){if(this.name=t,this.contours=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}var r=i(239),o=i(7),a=i(74),s=i(5);n.prototype={constructor:n,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],l=[],u=this.contours,h=0;hn;n++)if(r.contain(i[n],t[0],t[1]))return!0;return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),a=r.width/r.height;i?n||(n=i/a):i=a*n;for(var l=new o(t,e,i,n),u=r.calculateTransform(l),h=this.contours,c=0;cr&&(r=i.length,i[r]=n,e[r]={axis:n,seriesModels:[]}),e[r].seriesModels.push(t)}),e}function r(t){var e,i,n=t.axis,r=t.seriesModels,o=r.length,s=t.boxWidthList=[],h=t.boxOffsetList=[],c=[];if("category"===n.type)i=n.getBandWidth();else{var d=0;u(r,function(t){d=Math.max(d,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])/d}u(r,function(t){var e=t.get("boxWidth");a.isArray(e)||(e=[e,e]),c.push([l(e[0],i)||0,l(e[1],i)||0])});var f=.8*i-2,p=f/o*.3,g=(f-p*(o-1))/o,v=g/2-f/2;u(r,function(t,e){h.push(v),v+=p+g,s.push(Math.min(Math.max(g,c[e][0]),c[e][1]))})}function o(t,e,i){var n=t.coordinateSystem,r=t.getData(),o=t.dimensions,a=t.get("layout"),s=i/2;r.each(o,function(){function t(t){var i=[];i[f]=c,i[p]=t;var r;return isNaN(c)||isNaN(t)?r=[NaN,NaN]:(r=n.dataToPoint(i),r[f]+=e),r}function i(t,e){var i=t.slice(),n=t.slice();i[f]+=s,n[f]-=s,e?x.push(i,n):x.push(n,i)}function l(t){var e=[t.slice(),t.slice()];e[0][f]-=s,e[1][f]+=s,y.push(e)}var u=arguments,h=o.length,c=u[0],d=u[h],f="horizontal"===a?0:1,p=1-f,g=t(u[3]),v=t(u[1]),m=t(u[5]),y=[[v,t(u[2])],[m,t(u[4])]];l(v),l(m),l(g);var x=[];i(y[0][1],0),i(y[1][1],1),r.setItemLayout(d,{chartLayout:a,initBaseline:g[p],median:g,bodyEnds:x,whiskerEnds:y})})}var a=i(1),s=i(4),l=s.parsePercent,u=a.each;t.exports=function(t){var e=n(t);u(e,function(t){var e=t.seriesModels;e.length&&(r(t),u(e,function(e,i){o(e,t.boxOffsetList[i],t.boxWidthList[i])}))})}},function(t,e){var i=["itemStyle","normal","borderColor"];t.exports=function(t,e){var n=t.get("color");t.eachRawSeriesByType("boxplot",function(e){var r=n[e.seriesIndex%n.length],o=e.getData();o.setVisual({legendSymbol:"roundRect",color:e.get(i)||r}),t.isSeriesFiltered(e)||o.each(function(t){var e=o.getItemModel(t);o.setItemVisual(t,{color:e.get(i,!0)})})})}},function(t,e,i){var n=i(2);i(246),i(247),n.registerPreprocessor(i(250)),n.registerVisual(i(249)),n.registerLayout(i(248))},function(t,e,i){"use strict";var n=i(1),r=i(15),o=i(167),a=i(11),s=a.encodeHTML,l=a.addCommas,u=r.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],valueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},formatTooltip:function(t,e){var i=n.map(this.valueDimensions,function(e){return e+": "+l(this._data.get(e,t))},this);return s(this.name)+"
"+i.join("
")},brushSelector:function(t,e){return e.rect(t.brushRect)}});n.mixin(u,o.seriesModelMixin,!0),t.exports=u},function(t,e,i){"use strict";function n(t,e,i){var n=e.getItemModel(i),r=n.getModel(u),o=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||o,l=r.getItemStyle(["color","color0","borderColor","borderColor0"]),c=t.childAt(t.whiskerIndex);c.useStyle(l),c.style.stroke=s;var d=t.childAt(t.bodyIndex);d.useStyle(l),d.style.fill=o,d.style.stroke=s;var f=n.getModel(h).getItemStyle();a.setHoverStyle(t,f)}var r=i(1),o=i(27),a=i(3),s=i(167),l=o.extend({type:"candlestick",getStyleUpdater:function(){return n}});r.mixin(l,s.viewMixin,!0);var u=["itemStyle","normal"],h=["itemStyle","emphasis"];t.exports=l},function(t,e){function i(t,e){var i,a=t.getBaseAxis(),s="category"===a.type?a.getBandWidth():(i=a.getExtent(),Math.abs(i[1]-i[0])/e.count());return s/2-2>r?s/2-2:s-r>o?r:Math.max(s-o,n)}var n=2,r=5,o=4;t.exports=function(t){t.eachSeriesByType("candlestick",function(t){var e=t.coordinateSystem,n=t.getData(),r=t.dimensions,o=t.get("layout"),a=i(t,n);n.each(r,function(){function t(t){var i=[];return i[d]=h,i[f]=t,isNaN(h)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function i(t,e){var i=t.slice(),n=t.slice();i[d]+=a/2,n[d]-=a/2,e?A.push(i,n):A.push(n,i)}function s(){var e=t(Math.min(p,g,v,m)),i=t(Math.max(p,g,v,m));return e[d]-=a/2,i[d]-=a/2,{x:e[0],y:e[1],width:f?a:i[0]-e[0],height:f?i[1]-e[1]:a}}var l=arguments,u=r.length,h=l[0],c=l[u],d="horizontal"===o?0:1,f=1-d,p=l[1],g=l[2],v=l[3],m=l[4],y=Math.min(p,g),x=Math.max(p,g),_=t(y),b=t(x),w=t(v),S=t(m),M=[[S,b],[w,_]],A=[];i(b,0),i(_,1),n.setItemLayout(c,{chartLayout:o,sign:p>g?-1:g>p?1:0,initBaseline:p>g?b[f]:_[f],bodyEnds:A,whiskerEnds:M,brushRect:s()})},!0)})}},function(t,e){var i=["itemStyle","normal","borderColor"],n=["itemStyle","normal","borderColor0"],r=["itemStyle","normal","color"],o=["itemStyle","normal","color0"];t.exports=function(t,e){t.eachRawSeriesByType("candlestick",function(e){var a=e.getData();a.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||a.each(function(t){var e=a.getItemModel(t),s=a.getItemLayout(t).sign;a.setItemVisual(t,{color:e.get(s>0?r:o),borderColor:e.get(s>0?i:n)})})})}},function(t,e,i){var n=i(1);t.exports=function(t){t&&n.isArray(t.series)&&n.each(t.series,function(t){n.isObject(t)&&"k"===t.type&&(t.type="candlestick")})}},function(t,e,i){var n=i(1),r=i(2);i(252),i(253),r.registerVisual(n.curry(i(46),"effectScatter","circle",null)),r.registerLayout(n.curry(i(55),"effectScatter"))},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){var i=n(t.data,this,e);return i},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,symbolSize:10}})},function(t,e,i){var n=i(39),r=i(280);i(2).extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new n(r)},render:function(t,e,i){var n=t.getData(),r=this._symbolDraw;r.updateData(n),this.group.add(r.group)},updateLayout:function(){this._symbolDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)}})},function(t,e,i){var n=i(1),r=i(2);i(255),i(256),r.registerVisual(n.curry(i(73),"funnel")),r.registerLayout(i(257)),r.registerProcessor(n.curry(i(71),"funnel"))},function(t,e,i){"use strict";var n=i(13),r=i(8),o=i(30),a=i(2).extendSeriesModel({type:"series.funnel",init:function(t){a.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this._defaultLabelLine(t)},getInitialData:function(t,e){var i=o(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},_defaultLabelLine:function(t){r.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelLine:{normal:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},emphasis:{}},itemStyle:{normal:{borderColor:"#fff",borderWidth:1},emphasis:{}}}});t.exports=a},function(t,e,i){function n(t,e){function i(){a.ignore=a.hoverIgnore,s.ignore=s.hoverIgnore}function n(){a.ignore=a.normalIgnore,s.ignore=s.normalIgnore}o.Group.call(this);var r=new o.Polygon,a=new o.Polyline,s=new o.Text;this.add(r),this.add(a),this.add(s),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function r(t,e,i,n){var r=n.getModel("textStyle"),o=n.get("position"),s="inside"===o||"inner"===o||"center"===o;return{fill:r.getTextColor()||(s?"#fff":t.getItemVisual(e,"color")),textFont:r.getFont(),text:a.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var o=i(3),a=i(1),s=n.prototype,l=["itemStyle","normal","opacity"];s.updateData=function(t,e,i){var n=this.childAt(0),r=t.hostModel,s=t.getItemModel(e),u=t.getItemLayout(e),h=t.getItemModel(e).get(l);h=null==h?1:h,n.useStyle({}),i?(n.setShape({points:u.points}),n.setStyle({opacity:0}),o.initProps(n,{style:{opacity:h}},r,e)):o.updateProps(n,{style:{opacity:h},shape:{points:u.points}},r,e);var c=s.getModel("itemStyle"),d=t.getItemVisual(e,"color");n.setStyle(a.defaults({fill:d},c.getModel("normal").getItemStyle(["opacity"]))),n.hoverStyle=c.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),o.setHoverStyle(this)},s._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=l.label,h=t.getItemVisual(e,"color");o.updateProps(i,{shape:{points:u.linePoints||u.linePoints}},a,e),o.updateProps(n,{style:{x:u.x,y:u.y}},a,e),n.attr({style:{textAlign:u.textAlign,textVerticalAlign:u.verticalAlign,textFont:u.font},rotation:u.rotation,origin:[u.x,u.y],z2:10});var c=s.getModel("label.normal"),d=s.getModel("label.emphasis"),f=s.getModel("labelLine.normal"),p=s.getModel("labelLine.emphasis");n.setStyle(r(t,e,"normal",c)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:h}),i.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=r(t,e,"emphasis",d),i.hoverStyle=p.getModel("lineStyle").getLineStyle()},a.inherits(n,o.Group);var u=i(27).extend({type:"funnel",render:function(t,e,i){var r=t.getData(),o=this._data,a=this.group;r.diff(o).add(function(t){var e=new n(r,t);r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(r,t),a.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=r},remove:function(){this.group.removeAll(),this._data=null}});t.exports=u},function(t,e,i){function n(t,e){return a.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function r(t,e){for(var i=t.mapArray("value",function(t){return t}),n=[],r="ascending"===e,o=0,a=t.count();a>o;o++)n[o]=o;return n.sort(function(t,e){return r?i[t]-i[e]:i[e]-i[t]}),n}function o(t){t.each(function(e){var i,n,r,o,a=t.getItemModel(e),s=a.getModel("label.normal"),l=s.get("position"),u=a.getModel("labelLine.normal"),h=t.getItemLayout(e),c=h.points,d="inner"===l||"inside"===l||"center"===l;if(d)n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,r=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center",o=[[n,r],[n,r]];else{var f,p,g,v=u.get("length");"left"===l?(f=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,g=f-v,n=g-5,i="right"):(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+v,n=g+5,i="left");var m=p;o=[[f,p],[g,m]],r=m}h.label={linePoints:o,x:n,y:r,verticalAlign:"middle",textAlign:i,inside:d}})}var a=i(14),s=i(4),l=s.parsePercent;t.exports=function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),a=t.get("sort"),u=n(t,e),h=r(i,a),c=[l(t.get("minSize"),u.width),l(t.get("maxSize"),u.width)],d=i.getDataExtent("value"),f=t.get("min"),p=t.get("max");null==f&&(f=Math.min(d[0],0)),null==p&&(p=d[1]);var g=t.get("funnelAlign"),v=t.get("gap"),m=(u.height-v*(i.count()-1))/i.count(),y=u.y,x=function(t,e){var n,r=i.get("value",t)||0,o=s.linearMap(r,[f,p],c,!0);switch(g){case"left":n=u.x;break;case"center":n=u.x+(u.width-o)/2;break;case"right":n=u.x+u.width-o}return[[n,e],[n+o,e]]};"ascending"===a&&(m=-m,v=-v,y+=u.height,h=h.reverse());for(var _=0;_=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=P;P++){var k=Math.cos(A),z=Math.sin(A);if(y.get("show")){var O=new a.Line({shape:{x1:k*g+f,y1:z*g+p,x2:k*(g-S)+f,y2:z*(g-S)+p},style:L,silent:!0});"auto"===L.stroke&&O.setStyle({stroke:n(P/b)}),d.add(O)}if(_.get("show")){var E=r(s.round(P/b*(m-v)+v),_.get("formatter")),R=_.get("distance"),V=new a.Text({style:{text:E,x:k*(g-S-R)+f,y:z*(g-S-R)+p,fill:D.getTextColor(),textFont:D.getFont(),textVerticalAlign:-.4>z?"top":z>.4?"bottom":"middle",textAlign:-.4>k?"left":k>.4?"right":"center"},silent:!0});"auto"===V.style.fill&&V.setStyle({fill:n(P/b)}),d.add(V)}if(x.get("show")&&P!==b){for(var N=0;w>=N;N++){var k=Math.cos(A),z=Math.sin(A),B=new a.Line({shape:{x1:k*g+f,y1:z*g+p,x2:k*(g-M)+f,y2:z*(g-M)+p},silent:!0,style:C});"auto"===C.stroke&&B.setStyle({stroke:n((P+N/w)/b)}),d.add(B),A+=T}A-=T}else A+=I}},_renderPointer:function(t,e,i,n,r,u,h,c){var d=[+t.get("min"),+t.get("max")],f=[u,h];c||(f=f.reverse());var p=t.getData(),g=this._data,v=this.group;p.diff(g).add(function(e){var i=new o({shape:{angle:u}});a.updateProps(i,{shape:{angle:s.linearMap(p.get("value",e),d,f,!0)}},t),v.add(i),p.setItemGraphicEl(e,i)}).update(function(e,i){var n=g.getItemGraphicEl(i);a.updateProps(n,{shape:{angle:s.linearMap(p.get("value",e),d,f,!0)}},t),v.add(n),p.setItemGraphicEl(e,n)}).remove(function(t){var e=g.getItemGraphicEl(t);v.remove(e)}).execute(),p.eachItemGraphicEl(function(t,e){var i=p.getItemModel(e),o=i.getModel("pointer");t.setShape({x:r.cx,y:r.cy,width:l(o.get("width"),r.r),r:l(o.get("length"),r.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n((p.get("value",e)-d[0])/(d[1]-d[0]))),a.setHoverStyle(t,i.getModel("itemStyle.emphasis").getItemStyle())}),this._data=p},_renderTitle:function(t,e,i,n,r){var o=t.getModel("title");if(o.get("show")){var s=o.getModel("textStyle"),u=o.get("offsetCenter"),h=r.cx+l(u[0],r.r),c=r.cy+l(u[1],r.r),d=new a.Text({style:{x:h,y:c,text:t.getData().getName(0),fill:s.getTextColor(),textFont:s.getFont(),textAlign:"center",textVerticalAlign:"middle"}});this.group.add(d)}},_renderDetail:function(t,e,i,n,o){var u=t.getModel("detail"),h=t.get("min"),c=t.get("max");if(u.get("show")){var d=u.getModel("textStyle"),f=u.get("offsetCenter"),p=o.cx+l(f[0],o.r),g=o.cy+l(f[1],o.r),v=l(u.get("width"),o.r),m=l(u.get("height"),o.r),y=t.getData().get("value",0),x=new a.Rect({shape:{x:p-v/2,y:g-m/2,width:v,height:m},style:{text:r(y,u.get("formatter")),fill:u.get("backgroundColor"),textFill:d.getTextColor(),textFont:d.getFont()}});"auto"===x.style.textFill&&x.setStyle("textFill",n(s.linearMap(y,[h,c],[0,1],!0))),x.setStyle(u.getItemStyle(["color"])),this.group.add(x)}}});t.exports=h},function(t,e,i){t.exports=i(6).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-i(a)*o*(o>=r/3?1:2),l=e.y-n(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(a)*o,e.y+n(a)*o),t.lineTo(e.x+i(e.angle)*r,e.y+n(e.angle)*r),t.lineTo(e.x-i(a)*o,e.y-n(a)*o),t.lineTo(s,l)}})},function(t,e,i){var n=i(2),r=i(1);i(263),i(264),i(273),n.registerProcessor(i(266)),n.registerVisual(r.curry(i(46),"graph","circle",null)),n.registerVisual(i(267)),n.registerVisual(i(270)),n.registerLayout(i(274)),n.registerLayout(i(268)),n.registerLayout(i(272)),n.registerCoordinateSystem("graphView",{create:i(269)})},function(t,e,i){"use strict";var n=i(13),r=i(1),o=i(8),a=i(9),s=i(225),l=i(2).extendSeriesModel({type:"series.graph",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){l.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){l.superApply(this,"mergeDefaultAndTheme",arguments),o.defaultEmphasis(t.edgeLabel,o.LABEL_OPTIONS)},getInitialData:function(t,e){function i(t,e){t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels,i=t.getShallow("category"),n=e[i];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t});var i=o.getModel("edgeLabel"),n=function(t,e){var r=(t||"").split(".");"label"===r[0]&&(e=e||i.getModel(r.slice(1)));var o=a.prototype.getModel.call(this,r,e);return o.getModel=n,o};e.wrapMethod("getItemModel",function(t){return t.getModel=n,t})}var n=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;return r&&n?s(r,n,this,!0,i).data:void 0},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),r=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),a=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),u=a+" > "+s;return r.value&&(u+=" : "+r.value),u}return l.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=r.map(this.option.categories||[],function(t){return null!=t.value?t:r.extend({value:0},t)}),e=new n(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",xAxisIndex:0,yAxisIndex:0,polarIndex:0,geoIndex:0,legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,force:{initLayout:null,repulsion:50,gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}});t.exports=l},function(t,e,i){function n(t,e){return t.getVisual("opacity")||t.getModel().get(e)}var r=i(39),o=i(94),a=i(79),s=i(3),l=i(265),u=i(1),h=["itemStyle","normal","opacity"],c=["lineStyle","normal","opacity"];i(2).extendChartView({type:"graph",init:function(t,e){var i=new r,n=new o,s=this.group,l=new a(e.getZr(),s);s.add(i.group),s.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._controller=l,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var r=this._symbolDraw,o=this._lineDraw,a=this.group;if("view"===n.type){var u={position:n.position,scale:n.scale};this._firstRender?a.attr(u):s.updateProps(a,u,t)}l(t.getGraph(),this._getNodeGlobalScale(t));var h=t.getData();r.updateData(h);var c=t.getEdgeData();o.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,f=t.get("force.layoutAnimation");d&&this._startForceLayoutIteration(d,f),h.eachItemGraphicEl(function(t,e){var i=h.getItemModel(e);t.off("drag").off("dragend");var n=h.getItemModel(e).get("draggable");n&&t.on("drag",function(){d&&(d.warmUp(),!this._layouting&&this._startForceLayoutIteration(d,f),d.setFixed(e),h.setItemLayout(e,t.position))},this).on("dragend",function(){d&&d.setUnfixed(e)},this),t.setDraggable(n&&d),t.off("mouseover",this._focusNodeAdjacency),t.off("mouseout",this._unfocusAll),i.get("focusNodeAdjacency")&&(t.on("mouseover",this._focusNodeAdjacency,this),t.on("mouseout",this._unfocusAll,this))},this),this._firstRender=!1},_focusNodeAdjacency:function(t){function e(t,e){var i=n(t,e),r=t.getGraphicEl();null==i&&(i=1),r.traverse(function(t){t.trigger("normal"),"group"!==t.type&&t.setStyle("opacity",.1*i)})}function i(t,e){var i=n(t,e),r=t.getGraphicEl();r.traverse(function(t){t.trigger("emphasis"),"group"!==t.type&&t.setStyle("opacity",i)})}var r=this._model.getData(),o=r.graph,a=t.target,s=a.dataIndex,l=a.dataType;if(null!==s&&"edge"!==l){o.eachNode(function(t){e(t,h)}),o.eachEdge(function(t){e(t,c)});var d=o.getNodeByIndex(s);i(d,h),u.each(d.edges,function(t){t.dataIndex<0||(i(t,c),i(t.node1,h),i(t.node2,h))})}},_unfocusAll:function(){var t=this._model.getData(),e=t.graph;e.eachNode(function(t){var e=n(t,h);t.getGraphicEl().traverse(function(t){t.trigger("normal"),"group"!==t.type&&t.setStyle("opacity",e)})}),e.eachEdge(function(t){var e=n(t,c);t.getGraphicEl().traverse(function(t){t.trigger("normal"),"group"!==t.type&&t.setStyle("opacity",e)})})},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())})}()},_updateController:function(t,e){var i=this._controller,n=this.group;return i.rectProvider=function(){var t=n.getBoundingRect();return t.applyTransform(n.transform),t},"view"!==t.coordinateSystem.type?void i.disable():(i.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),void i.off("pan").off("zoom").on("pan",function(i,n){e.dispatchAction({seriesId:t.id,type:"graphRoam",dx:i,dy:n})}).on("zoom",function(i,n,r){e.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:i,originX:n,originY:r}),this._updateNodeAndLinkScale(),l(t.getGraph(),this._getNodeGlobalScale(t)),this._lineDraw.updateLayout()},this))},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,r=n&&n[0]||1,o=e.getZoom(),a=(o-1)*i+1;return a/r},updateLayout:function(t){l(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}})},function(t,e,i){function n(t,e,i){for(var n,r=t[0],o=t[1],d=t[2],f=1/0,p=i*i,g=.1,v=.1;.9>=v;v+=.1){a[0]=u(r[0],o[0],d[0],v),a[1]=u(r[1],o[1],d[1],v);var m=c(h(a,e)-p);f>m&&(f=m,n=v)}for(var y=0;32>y;y++){var x=n+g;s[0]=u(r[0],o[0],d[0],n),s[1]=u(r[1],o[1],d[1],n),l[0]=u(r[0],o[0],d[0],x),l[1]=u(r[1],o[1],d[1],x);var m=h(s,e)-p;if(c(m)<.01)break;var _=h(l,e)-p;g/=2,0>m?_>=0?n+=g:n-=g:_>=0?n-=g:n+=g}return n}var r=i(16),o=i(5),a=[],s=[],l=[],u=r.quadraticAt,h=o.distSquare,c=Math.abs;t.exports=function(t,e){var i=[],a=r.quadraticSubdivide,s=[[],[],[]],l=[[],[]],u=[];e/=2,t.eachEdge(function(t,r){var h=t.getLayout(),c=t.getVisual("fromSymbol"),d=t.getVisual("toSymbol");h.__original||(h.__original=[o.clone(h[0]),o.clone(h[1])],h[2]&&h.__original.push(o.clone(h[2])));var f=h.__original;if(null!=h[2]){if(o.copy(s[0],f[0]),o.copy(s[1],f[2]),o.copy(s[2],f[1]),c&&"none"!=c){var p=t.node1.getVisual("symbolSize");p instanceof Array&&(p=(p[0]+p[1])/2);var g=n(s,f[0],p*e);a(s[0][0],s[1][0],s[2][0],g,i),s[0][0]=i[3],s[1][0]=i[4],a(s[0][1],s[1][1],s[2][1],g,i),s[0][1]=i[3],s[1][1]=i[4]}if(d&&"none"!=d){var p=t.node1.getVisual("symbolSize");p instanceof Array&&(p=(p[0]+p[1])/2);var g=n(s,f[1],p*e);a(s[0][0],s[1][0],s[2][0],g,i),s[1][0]=i[1],s[2][0]=i[2],a(s[0][1],s[1][1],s[2][1],g,i),s[1][1]=i[1],s[2][1]=i[2]}o.copy(h[0],s[0]),o.copy(h[1],s[2]),o.copy(h[2],s[1])}else o.copy(l[0],f[0]),o.copy(l[1],f[1]),o.sub(u,l[1],l[0]),o.normalize(u,u),c&&"none"!=c&&o.scaleAndAdd(l[0],l[0],u,t.node1.getVisual("symbolSize")*e),d&&"none"!=d&&o.scaleAndAdd(l[1],l[1],u,-t.node2.getVisual("symbolSize")*e),o.copy(h[0],l[0]),o.copy(h[1],l[1])})}},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getGraph(),r=n.data,o=i.mapArray(i.getName);r.filterSelf(function(t){var i=r.getItemModel(t),n=i.getShallow("category");if(null!=n){"number"==typeof n&&(n=o[n]);for(var a=0;as;s++){var v=t[s];v.fixed||(n.sub(o,l,v.p),n.scaleAndAdd(v.p,v.p,o,u*d))}for(var s=0;a>s;s++)for(var c=t[s],m=s+1;a>m;m++){var f=t[m];n.sub(o,f.p,c.p);var p=n.len(o);0===p&&(n.set(o,Math.random()-.5,Math.random()-.5),p=1);var y=(c.rep+f.rep)/p/p;!c.fixed&&r(c.pp,c.pp,o,y),!f.fixed&&r(f.pp,f.pp,o,-y)}for(var x=[],s=0;a>s;s++){var v=t[s];v.fixed||(n.sub(x,v.p,v.pp),n.scaleAndAdd(v.p,v.p,x,d),n.copy(v.pp,v.p))}d=.992*d,i&&i(t,e,.01>d)}}}},function(t,e,i){var n=i(271),r=i(4),o=i(222),a=i(220),s=i(5);t.exports=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},l=t.getGraph(),u=l.data,h=l.edgeData,c=t.getModel("force"),d=c.get("initLayout");t.preservedPoints?u.each(function(t){var e=u.getId(t);u.setItemLayout(t,i[e]||[NaN,NaN])}):d&&"none"!==d?"circular"===d&&a(t):o(t);var f=u.getDataExtent("value"),p=c.get("repulsion"),g=c.get("edgeLength"),v=u.mapArray("value",function(t,e){var i=u.getItemLayout(e),n=r.linearMap(t,f,[0,p])||p/2;return{w:n,rep:n,p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),m=h.mapArray("value",function(t,e){var i=l.getEdgeByIndex(e);return{n1:v[i.node1.dataIndex],n2:v[i.node2.dataIndex],d:g,curveness:i.getModel().get("lineStyle.normal.curveness")||0}}),e=t.coordinateSystem,y=e.getBoundingRect(),x=n(v,m,{rect:y,gravity:c.get("gravity")}),_=x.step;x.step=function(t){for(var e=0,n=v.length;n>e;e++)v[e].fixed&&s.copy(v[e].p,l.getNodeByIndex(e).getLayout());_(function(e,n,r){for(var o=0,a=e.length;a>o;o++)e[o].fixed||l.getNodeByIndex(o).setLayout(e[o].p),i[u.getId(o)]=e[o].p;for(var o=0,a=n.length;a>o;o++){var h=n[o],c=l.getEdgeByIndex(o),d=h.n1.p,f=h.n2.p,p=c.getLayout();p=p?p.slice():[],p[0]=p[0]||[],p[1]=p[1]||[],s.copy(p[0],d),s.copy(p[1],f),h.curveness>0&&(p[2]=[(d[0]+f[0])/2-(d[1]-f[1])*h.curveness,(d[1]+f[1])/2-(f[0]-d[0])*h.curveness]),c.setLayout(p)}t&&t(r)})},t.forceLayout=x,t.preservedPoints=i,x.step()}else t.forceLayout=null})}},function(t,e,i){var n=i(2),r=i(219),o={type:"graphRoam",event:"graphRoam",update:"none"};n.registerAction(o,function(t,e){e.eachComponent({mainType:"series",query:t},function(e){var i=e.coordinateSystem,n=r.updateCenterAndZoom(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})})},function(t,e,i){var n=i(222),r=i(221);t.exports=function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var o=t.getData();o.each(i.dimensions,function(t,e,n){isNaN(t)||isNaN(e)?o.setItemLayout(n,[NaN,NaN]):o.setItemLayout(n,i.dataToPoint([t,e])); +}),r(o.graph)}else e&&"none"!==e||n(t)})}},function(t,e,i){i(277),i(278)},function(t,e,i){function n(){var t=o.createCanvas();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}var r=256,o=i(1);n.prototype={update:function(t,e,i,n,o,a){var s=this._getBrush(),l=this._getGradient(t,o,"inRange"),u=this._getGradient(t,o,"outOfRange"),h=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),f=t.length;c.width=e,c.height=i;for(var p=0;f>p;++p){var g=t[p],v=g[0],m=g[1],y=g[2],x=n(y);d.globalAlpha=x,d.drawImage(s,v-h,m-h)}for(var _=d.getImageData(0,0,c.width,c.height),b=_.data,w=0,S=b.length,M=this.minOpacity,A=this.maxOpacity,I=A-M;S>w;){var x=b[w+3]/256,T=4*Math.floor(x*(r-1));if(x>0){var L=a(x)?l:u;x>0&&(x=x*I+M),b[w++]=L[T],b[w++]=L[T+1],b[w++]=L[T+2],b[w++]=L[T+3]*x*256}else w+=4}return d.putImageData(_,0,0),c},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=o.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,r=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[],a=0,s=0;256>s;s++)e[i](s/255,!0,o),r[a++]=o[0],r[a++]=o[1],r[a++]=o[2],r[a++]=o[3];return r}},t.exports=n},function(t,e,i){var n=i(15),r=i(35);t.exports=n.extend({type:"series.heatmap",getInitialData:function(t,e){return r(t.data,this,e)},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,xAxisIndex:0,yAxisIndex:0,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}})},function(t,e,i){function n(t,e,i){var n=t[1]-t[0];e=l.map(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}});var r=e.length,o=0;return function(t){for(var n=o;r>n;n++){var a=e[n].interval;if(a[0]<=t&&t<=a[1]){o=n;break}}if(n===r)for(var n=o-1;n>=0;n--){var a=e[n].interval;if(a[0]<=t&&t<=a[1]){o=n;break}}return n>=0&&r>n&&i[n]}}function r(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function o(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var a=i(3),s=i(276),l=i(1);t.exports=i(2).extendChartView({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type?this._renderOnCartesian(r,t,i):o(r)&&this._renderOnGeo(r,t,n,i)},_renderOnCartesian:function(t,e,i){var n=t.getAxis("x"),r=t.getAxis("y"),o=this.group,s=n.getBandWidth(),u=r.getBandWidth(),h=e.getData(),c="itemStyle.normal",d="itemStyle.emphasis",f="label.normal",p="label.emphasis",g=e.getModel(c).getItemStyle(["color"]),v=e.getModel(d).getItemStyle(),m=e.getModel("label.normal"),y=e.getModel("label.emphasis");h.each(["x","y","z"],function(i,n,r,x){var _=h.getItemModel(x),b=t.dataToPoint([i,n]);if(!isNaN(r)){var w=new a.Rect({shape:{x:b[0]-s/2,y:b[1]-u/2,width:s,height:u},style:{fill:h.getItemVisual(x,"color"),opacity:h.getItemVisual(x,"opacity")}});h.hasItemOption&&(g=_.getModel(c).getItemStyle(["color"]),v=_.getModel(d).getItemStyle(),m=_.getModel(f),y=_.getModel(p));var S=e.getRawValue(x),M="-";S&&null!=S[2]&&(M=S[2]),m.getShallow("show")&&(a.setText(g,m),g.text=e.getFormattedLabel(x,"normal")||M),y.getShallow("show")&&(a.setText(v,y),v.text=e.getFormattedLabel(x,"emphasis")||M),w.setStyle(g),a.setHoverStyle(w,h.hasItemOption?v:l.extend({},v)),o.add(w),h.setItemGraphicEl(x,w)}})},_renderOnGeo:function(t,e,i,o){var l=i.targetVisuals.inRange,u=i.targetVisuals.outOfRange,h=e.getData(),c=this._hmLayer||this._hmLayer||new s;c.blurSize=e.get("blurSize"),c.pointSize=e.get("pointSize"),c.minOpacity=e.get("minOpacity"),c.maxOpacity=e.get("maxOpacity");var d=t.getViewRect().clone(),f=t.getRoamTransform().transform;d.applyTransform(f);var p=Math.max(d.x,0),g=Math.max(d.y,0),v=Math.min(d.width+d.x,o.getWidth()),m=Math.min(d.height+d.y,o.getHeight()),y=v-p,x=m-g,_=h.mapArray(["lng","lat","value"],function(e,i,n){var r=t.dataToPoint([e,i]);return r[0]-=p,r[1]-=g,r.push(n),r}),b=i.getExtent(),w="visualMap.continuous"===i.type?r(b,i.option.range):n(b,i.getPieceList(),i.option.selected);c.update(_,y,x,l.color.getNormalizer(),{inRange:l.color.getColorMapper(),outOfRange:u.color.getColorMapper()},w);var S=new a.Image({style:{width:y,height:x,x:p,y:g,image:c.canvas},silent:!0});this.group.add(S)}})},function(t,e,i){function n(t,e,i){a.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var r=i(224),o=i(1),a=i(223),s=i(5),l=n.prototype;l.createLine=function(t,e,i){return new r(t,e,i)},l.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,r=1;r=0&&!(n[o]<=e);o--);o=Math.min(o,r-2)}else{for(var o=a;r>o&&!(n[o]>e);o++);o=Math.min(o-1,r-2)}s.lerp(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o])),this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},o.inherits(n,a),t.exports=n},function(t,e,i){function n(t){return a.isArray(t)||(t=[+t,+t]),t}function r(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function o(t,e){c.call(this);var i=new h(t,e),n=new c;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var a=i(1),s=i(26),l=i(3),u=i(4),h=i(49),c=l.Group,d=3,f=o.prototype;f.stopEffectAnimation=function(){this.childAt(1).removeAll()},f.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;d>o;o++){var a=s.createSymbol(e,-.5,-.5,1,1,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[1,1]});var l=-o/d*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale,t.rippleScale]}).delay(l).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(l).start(),n.add(a)}r(n,t)},f.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;n>o;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}r(i,t)},f.highlight=function(){this.trigger("emphasis")},f.downplay=function(){this.trigger("normal")},f.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var r=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=n(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"color");r.attr("scale",s),r.traverse(function(t){t.attr({fill:l})});var h=o.getShallow("symbolOffset");if(h){var c=r.position;c[0]=u.parsePercent(h[0],s[0]),c[1]=u.parsePercent(h[1],s[1])}r.rotation=(o.getShallow("symbolRotate")||0)*Math.PI/180||0;var d={};if(d.showEffectOn=i.get("showEffectOn"),d.rippleScale=o.get("rippleEffect.scale"),d.brushType=o.get("rippleEffect.brushType"),d.period=1e3*o.get("rippleEffect.period"),d.effectOffset=e/t.count(),d.z=o.getShallow("z")||0,d.zlevel=o.getShallow("zlevel")||0,d.symbolType=a,d.color=l,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===d.showEffectOn)this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d;else{this._effectCfg=null,this.stopEffectAnimation();var f=this.childAt(0),p=function(){f.trigger("emphasis"),"render"!==d.showEffectOn&&this.startEffectAnimation(d)},g=function(){f.trigger("normal"),"render"!==d.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",p,this).on("mouseout",g,this).on("emphasis",p,this).on("normal",g,this)}this._effectCfg=d},f.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},a.inherits(o,c),t.exports=o},function(t,e,i){function n(){this.group=new r.Group,this._lineEl=new s}var r=i(3),o=i(84),a=i(83),s=r.extendShape({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,r=0;r2?t.quadraticCurveTo(o[2][0],o[2][1],o[1][0],o[1][1]):t.lineTo(o[1][0],o[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,r=i.polyline,s=Math.max(this.style.lineWidth,1),l=0;l2){if(o.containStroke(u[0][0],u[0][1],u[2][0],u[2][1],u[1][0],u[1][1],s,t,e))return l}else if(a.containStroke(u[0][0],u[0][1],u[1][0],u[1][1],s,t,e))return l}return-1}}),l=n.prototype;l.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)}),this.group.add(e)},l.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},l.remove=function(){this.group.removeAll()},t.exports=n},function(t,e,i){function n(t,e,i,n){l.Group.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}function r(t,e,i){return s.map(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function o(t){var e={};return s.each(t,function(t,i){e["ends"+i]=t}),e}function a(t){this.group=new l.Group,this.styleUpdater=t}var s=i(1),l=i(3),u=i(6),h=u.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}}),c=n.prototype;c._createContent=function(t,e,i){var n=t.getItemLayout(e),a="horizontal"===n.chartLayout?1:0,u=0;this.add(new l.Polygon({shape:{points:i?r(n.bodyEnds,a,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=u++;var c=s.map(n.whiskerEnds,function(t){return i?r(t,a,n):t});this.add(new h({shape:o(c),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=u++},c.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,r=t.getItemLayout(e),a=l[i?"initProps":"updateProps"];a(this.childAt(this.bodyIndex),{shape:{points:r.bodyEnds}},n,e),a(this.childAt(this.whiskerIndex),{shape:o(r.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},s.inherits(n,l.Group);var d=a.prototype;d.updateData=function(t){var e=this.group,i=this._data,r=this.styleUpdater;t.diff(i).add(function(i){if(t.hasValue(i)){var o=new n(t,i,r,!0);t.setItemGraphicEl(i,o),e.add(o)}}).update(function(o,a){var s=i.getItemGraphicEl(a);return t.hasValue(o)?(s?s.updateData(t,o):s=new n(t,o,r),e.add(s),void t.setItemGraphicEl(o,s)):void e.remove(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)}).execute(),this._data=t},d.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.exports=a},function(t,e,i){i(284),i(285);var n=i(2);n.registerLayout(i(286))},function(t,e,i){"use strict";function n(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=a.map(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),a.mergeAll([i,t[0],t[1]])}))}var r=i(15),o=i(13),a=i(1),s=(i(23),r.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.normal.color",init:function(t){n(t),s.superApply(this,"init",arguments)},mergeOption:function(t){n(t),s.superApply(this,"mergeOption",arguments)},getInitialData:function(t,e){var i=new o(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(t,e,n,r){if(t instanceof Array)return NaN;i.hasItemOption=!0;var o=t.value;return o?o instanceof Array?o[r]:o:void 0}),i},formatTooltip:function(t){var e=this.getData(),i=e.getItemModel(t),n=i.get("name");if(n)return n;var r=i.get("fromName"),o=i.get("toName");return r+" > "+o},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}))},function(t,e,i){var n=i(94),r=i(223),o=i(93),a=i(224),s=i(279),l=i(281);i(2).extendChartView({type:"lines",init:function(){},render:function(t,e,i){var u=t.getData(),h=this._lineDraw,c=t.get("effect.show"),d=t.get("polyline"),f=t.get("large")&&u.count()>=t.get("largeThreshold");c===this._hasEffet&&d===this._isPolyline&&f===this._isLarge||(h&&h.remove(),h=this._lineDraw=f?new l:new n(d?c?s:a:c?r:o),this._hasEffet=c,this._isPolyline=d,this._isLarge=f);var p=t.get("zlevel"),g=t.get("effect.trailLength"),v=i.getZr();if(v.painter.getLayer(p).clear(!0),null!=this._lastZlevel&&v.configLayer(this._lastZlevel,{motionBlur:!1}),c&&g){v.configLayer(p,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(g/10+.9,1),0)})}this.group.add(h.group),h.updateData(u),this._lastZlevel=p},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr();n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0)}})},function(t,e,i){t.exports=function(t){t.eachSeriesByType("lines",function(t){var e=t.coordinateSystem,i=t.getData();i.each(function(n){var r=i.getItemModel(n),o=r.option instanceof Array?r.option:r.get("coords"),a=[];if(t.get("polyline"))for(var s=0;s0&&(a[2]=[(a[0][0]+a[1][0])/2-(a[0][1]-a[1][1])*l,(a[0][1]+a[1][1])/2-(a[1][0]-a[0][0])*l])}i.setItemLayout(n,a)})})}},function(t,e,i){var n=i(2),r=n.PRIORITY;i(288),i(289),i(218),i(169),n.registerLayout(i(292)),n.registerVisual(i(293)),n.registerProcessor(r.PROCESSOR.STATISTIC,i(291)),n.registerPreprocessor(i(290)),i(78)("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}])},function(t,e,i){var n=i(13),r=i(15),o=i(1),a=i(30),s=i(11),l=s.encodeHTML,u=s.addCommas,h=i(67),c=i(169),d=r.extend({type:"series.map",needsDrawMap:!1,seriesGroup:[],init:function(t){t=this._fillOption(t,t.map),this.option=t,d.superApply(this,"init",arguments),this.updateSelectedMap(t.data)},getInitialData:function(t){var e=a(["value"],t.data||[]),i=new n(e,this);return i.initData(t.data),i},mergeOption:function(t){t.data&&(t=this._fillOption(t,this.option.map)),d.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},_fillOption:function(t,e){return t=o.extend({},t),t.data=c.getFilledRegions(t.data,e),t},getRawValue:function(t){return this._data.get("value",t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=u(this.getRawValue(t)),n=e.getName(t),r=this.seriesGroup,o=[],a=0;a"+n+" : "+i},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"china",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,textStyle:{color:"#000"}},emphasis:{show:!0,textStyle:{color:"rgb(100,0,0)"}}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215,0,0.8)"}}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});o.mixin(d,h),t.exports=d},function(t,e,i){var n=i(3),r=i(226);i(2).extendChartView({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),n&&"geoRoam"===n.type&&"series"===n.component&&n.name===t.name){var a=this._mapDraw;a&&o.add(a.group)}else if(t.needsDrawMap){var a=this._mapDraw||new r(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},_renderSymbols:function(t,e,i){var r=t.originalData,o=this.group;r.each("value",function(e,i){if(!isNaN(e)){var a=r.getItemLayout(i);if(a&&a.point){var s=a.point,l=a.offset,u=new n.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:10});if(!l){var h=t.mainSeries.getData(),c=r.getName(i),d=c,f=h.indexOfName(c),p=r.getItemModel(i),g=p.getModel("label.normal"),v=p.getModel("label.emphasis"),m=g.getModel("textStyle"),y=v.getModel("textStyle"),x=h.getItemGraphicEl(f);u.setStyle({textPosition:"bottom"});var _=function(){u.setStyle({text:v.get("show")?d:"",textFill:y.getTextColor(),textFont:y.getFont()})},b=function(){u.setStyle({text:g.get("show")?d:"",textFill:m.getTextColor(),textFont:m.getFont()})};x.on("mouseover",_).on("mouseout",b).on("emphasis",_).on("normal",b),b()}o.add(u)}}})}})},function(t,e,i){var n=i(1);t.exports=function(t){var e=[];n.each(t.series,function(t){"map"===t.type&&e.push(t)}),n.each(e,function(t){t.map=t.map||t.mapType,n.defaults(t,t.mapLocation)})}},function(t,e,i){function n(t,e){for(var i={},n=["value"],r=0;rh;h++)s=Math.min(s,i[o][h]),l=Math.max(l,i[o][h]),a+=i[o][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?a/u:a,0===u?NaN:c})}var r=i(1);t.exports=function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.get("map");e[i]=e[i]||[],e[i].push(t)}),r.each(e,function(t,e){for(var i=n(r.map(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),o=0;o=0?e:NaN}})}function r(t){return+t.replace("dim","")}function o(t,e){var i=0;s.each(t,function(t){var e=r(t);e>i&&(i=e)});var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var o=[],a=0;i>=a;a++)o.push("dim"+a);return o}var a=i(13),s=i(1),l=i(15),u=i(30);t.exports=l.extend({type:"series.parallel",dependencies:["parallel"],getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),r=i.parallelAxisIndex,l=t.data,h=i.dimensions,c=o(h,l),d=s.map(c,function(t,i){var o=s.indexOf(h,t),a=o>=0&&e.getComponent("parallelAxis",r[o]);return a&&"category"===a.get("type")?(n(a,t,l),{name:t,type:"ordinal"}):0>o&&u.guessOrdinal(l,i)?{name:t,type:"ordinal"}:t}),f=new a(d,this);return f.initData(l),this.option.progressive&&(this.option.animation=!1),f},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,r){t===e&&n.push(i.getRawIndex(r))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:2,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}})},function(t,e,i){function n(t,e,i){var n=t.model,r=t.getRect(),o=new l.Rect({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),a="horizontal"===n.get("layout")?"width":"height";return o.setShape(a,0),l.initProps(o,{shape:{width:r.width,height:r.height}},e,i),o}function r(t,e,i,n){for(var r=[],o=0;o"+a.map(n,function(t,i){return t.name+" : "+e[i]}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}});t.exports=s},function(t,e,i){function n(t){return o.isArray(t)||(t=[+t,+t]),t}var r=i(3),o=i(1),a=i(26);t.exports=i(2).extendChartView({type:"radar",render:function(t,e,i){function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",r=t.getItemVisual(e,"color");if("none"!==i){var o=a.createSymbol(i,-.5,-.5,1,1,r);return o.attr({style:{strokeNoScale:!0},z2:100,scale:n(t.getItemVisual(e,"symbolSize"))}),o}}function l(e,i,n,o,a,l){n.removeAll();for(var u=0;uu;u++){var c=n[u];c.setLayout({x:o},!0),c.setLayout({dx:e},!0);for(var d=0,f=c.outEdges.length;f>d;d++)r.push(c.outEdges[d].node2)}n=r,++o}s(t,o),a=(i-e)/(o-1),l(t,a)}function s(t,e){I.each(t,function(t){t.outEdges.length||t.setLayout({x:e-1},!0)})}function l(t,e){I.each(t,function(t){var i=t.getLayout().x*e;t.setLayout({x:i},!0)})}function u(t,e,i,n,r){var o=A().key(function(t){return t.getLayout().x}).sortKeys(w).entries(t).map(function(t){return t.values});h(t,o,e,i,n),c(o,n,i);for(var a=1;r>0;r--)a*=.99,d(o,a),c(o,n,i),p(o,a),c(o,n,i)}function h(t,e,i,n,r){var o=[];I.each(e,function(t){var e=t.length,i=0;I.each(t,function(t){ +i+=t.getLayout().value});var a=(n-(e-1)*r)/i;o.push(a)}),o.sort(function(t,e){return t-e});var a=o[0];I.each(e,function(t){I.each(t,function(t,e){t.setLayout({y:e},!0);var i=t.getLayout().value*a;t.setLayout({dy:i},!0)})}),I.each(i,function(t){var e=+t.getValue()*a;t.setLayout({dy:e},!0)})}function c(t,e,i){I.each(t,function(t){var n,r,o,a=0,s=t.length;for(t.sort(b),o=0;s>o;o++){if(n=t[o],r=a-n.getLayout().y,r>0){var l=n.getLayout().y+r;n.setLayout({y:l},!0)}a=n.getLayout().y+n.getLayout().dy+e}if(r=a-e-i,r>0){var l=n.getLayout().y-r;for(n.setLayout({y:l},!0),a=n.getLayout().y,o=s-2;o>=0;--o)n=t[o],r=n.getLayout().y+n.getLayout().dy+e-a,r>0&&(l=n.getLayout().y-r,n.setLayout({y:l},!0)),a=n.getLayout().y}})}function d(t,e){I.each(t.slice().reverse(),function(t){I.each(t,function(t){if(t.outEdges.length){var i=x(t.outEdges,f)/x(t.outEdges,S),n=t.getLayout().y+(i-_(t))*e;t.setLayout({y:n},!0)}})})}function f(t){return _(t.node2)*t.getValue()}function p(t,e){I.each(t,function(t){I.each(t,function(t){if(t.inEdges.length){var i=x(t.inEdges,g)/x(t.inEdges,S),n=t.getLayout().y+(i-_(t))*e;t.setLayout({y:n},!0)}})})}function g(t){return _(t.node1)*t.getValue()}function v(t){I.each(t,function(t){t.outEdges.sort(m),t.inEdges.sort(y)}),I.each(t,function(t){var e=0,i=0;I.each(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),I.each(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function m(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function y(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function x(t,e){var i,n=0,r=t.length,o=-1;if(1===arguments.length)for(;++ot?-1:t>e?1:t==e?0:NaN}function S(t){return t.getValue()}var M=i(14),A=i(379),I=i(1);t.exports=function(t,e,i){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),a=t.get("nodeGap"),s=n(t,e);t.layoutInfo=s;var l=s.width,u=s.height,h=t.getGraph(),c=h.nodes,d=h.edges;o(c);var f=c.filter(function(t){return 0===t.getLayout().value}),p=0!==f.length?0:t.get("layoutIterations");r(c,d,i,a,l,u,p)})}},function(t,e,i){var n=i(72);t.exports=function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),i=e.nodes;i.sort(function(t,e){return t.getLayout().value-e.getLayout().value});var r=i[0].getLayout().value,o=i[i.length-1].getLayout().value;i.forEach(function(e){var i=new n({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:t.get("color")}),a=i.mapValueToVisual(e.getLayout().value);e.setVisual("color",a);var s=e.getModel(),l=s.get("itemStyle.normal.color");null!=l&&e.setVisual("color",l)})})}},function(t,e,i){var n=i(2);i(310),i(311),i(312),n.registerVisual(i(314)),n.registerLayout(i(313))},function(t,e,i){function n(t,e){this.group=new o.Group,t.add(this.group),this._onSelect=e||s.noop}function r(t,e,i,n,r,o){var a=[[r?t:t-h,e],[t+i,e],[t+i,e+n],[r?t:t-h,e+n]];return!o&&a.splice(2,0,[t+i+h,e+n/2]),!r&&a.push([t,e+n/2]),a}var o=i(3),a=i(14),s=i(1),l=8,u=8,h=5;n.prototype={constructor:n,render:function(t,e,i){var n=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),n.get("show")&&i){var o=n.getModel("itemStyle.normal"),s=o.getModel("textStyle"),l={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,i,l,s),this._renderContent(n,i,l,o,s),a.positionGroup(r,l.pos,l.box)}},_prepare:function(t,e,i,n){for(var r=e;r;r=r.parentNode){var o=r.getModel().get("name"),a=n.getTextRect(o),s=Math.max(a.width+2*l,i.emptyItemWidth);i.totalWidth+=s+u,i.renderList.push({node:r,text:o,width:s})}},_renderContent:function(t,e,i,n,l){for(var h=0,c=i.emptyItemWidth,d=t.get("height"),f=a.getAvailableSize(i.pos,i.box),p=i.totalWidth,g=i.renderList,v=g.length-1;v>=0;v--){var m=g[v],y=m.width,x=m.text;p>f.width&&(p-=y-c,y=c,x=""),this.group.add(new o.Polygon({shape:{points:r(h,0,y,d,v===g.length-1,0===v)},style:s.defaults(n.getItemStyle(),{lineJoin:"bevel",text:x,textFill:l.getTextColor(),textFont:l.getFont()}),z:10,onclick:s.bind(this._onSelect,this,m.node)})),h+=y+u}},remove:function(){this.group.removeAll()}},t.exports=n},function(t,e,i){function n(t,e){var i=0;s.each(t.children,function(t){n(t,e);var r=t.value;s.isArray(r)&&(r=r[0]),i+=r});var r=t.value;e>=0&&(s.isArray(r)?r=r[0]:t.value=new Array(e)),(null==r||isNaN(r))&&(r=i),0>r&&(r=0),e>=0?t.value[0]=r:t.value=r}function r(t,e){var i=e.get("color");if(i){t=t||[];var n;if(s.each(t,function(t){var e=new l(t),i=e.get("color");(e.get("itemStyle.normal.color")||i&&"none"!==i)&&(n=!0)}),!n){var r=t[0]||(t[0]={});r.color=i.slice()}return t}}var o=i(15),a=i(377),s=i(1),l=i(9),u=i(11),h=u.encodeHTML,c=u.addCommas;t.exports=o.extend({type:"series.treemap",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",visualDimension:0,zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{normal:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}}},label:{normal:{show:!0,position:"inside",textStyle:{color:"#fff",ellipsis:!0}}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},color:"none",colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i=t.data||[],o=t.name;null==o&&(o=t.name);var l={name:o,children:t.data},u=(i[0]||{}).value;n(l,s.isArray(u)?u.length:-1);var h=t.levels||[];return h=t.levels=r(h,e),a.createTree(l,this,h).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=c(s.isArray(i)?i[0]:i),r=e.getName(t);return h(r)+": "+n},getDataParams:function(t){for(var e=o.prototype.getDataParams.apply(this,arguments),i=this.getData(),n=i.tree.getNodeByDataIndex(t),r=e.treePathInfo=[];n;){var a=n.dataIndex;r.push({name:n.name,dataIndex:a,value:this.getRawValue(a)}),n=n.parentNode}return r.reverse(),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},s.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap={},this._idIndexMapCount=0);var i=e[t];return null==i&&(e[t]=i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}})},function(t,e,i){function n(){return{nodeGroup:[],background:[],content:[]}}function r(t,e,i,n,r,l,u,h,c,d){function f(e){E.dataIndex=u.dataIndex,E.seriesIndex=t.seriesIndex;var i=I.borderWidth,n=Math.max(T-2*i,0),r=Math.max(L-2*i,0);E.culling=!0,E.setShape({x:i,y:i,width:n,height:r});var o=u.getVisual("color",!0);p(E,function(){var t={fill:o},e=u.getModel("itemStyle.emphasis").getItemStyle();g(t,e,o,n,r),E.setStyle(t),s.setHoverStyle(E,e)}),e.add(E)}function p(t,e){C?!t.invisible&&l.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function g(e,i,n,r,o){var a=u.getModel(),s=a.get("name");if(I.isLeafRoot){var l=t.get("drillDownIcon",!0);s=l?l+" "+s:test}y(s,e,a,_,n,r,o),y(s,i,a,b,n,r,o)}function y(t,e,i,n,r,o,a){var l=i.getModel(n),u=l.getModel("textStyle");s.setText(e,l,r),e.textAlign=u.get("align"),e.textVerticalAlign=u.get("baseline");var h=u.getTextRect(t);!l.getShallow("show")||h.height>a?e.text="":h.width>o?e.text=u.get("ellipsis")?u.ellipsis(t,o):"":e.text=t}function x(t,n,a,s){var l=null!=P&&i[t][P],u=r[t];return l?(i[t][P]=null,w(u,l,t)):C||(l=new n({z:o(a,s)}),l.__tmDepth=a,l.__tmStorageName=t,A(u,l,t)),e[t][D]=l}function w(t,e,i){var n=t[D]={};n.old="nodeGroup"===i?e.position.slice():a.extend({},e.shape)}function A(t,e,i){var o=t[D]={},a=u.parentNode;if(a&&(!n||"drillDown"===n.direction)){var s=0,l=0,h=r.background[a.getRawIndex()];!n&&h&&h.old&&(s=h.old.width,l=h.old.height),o.old="nodeGroup"===i?[0,l]:{x:s,y:l,width:0,height:0}}o.fadein="nodeGroup"!==i}if(u){var I=u.getLayout();if(I&&I.isInView){var T=I.width,L=I.height,C=I.invisible,D=u.getRawIndex(),P=h&&h.getRawIndex(),k=x("nodeGroup",v);if(k){if(c.add(k),k.attr("position",[I.x||0,I.y||0]),k.__tmNodeWidth=T,k.__tmNodeHeight=L,I.isAboveViewRoot)return k;var z=x("background",m,d,S);z&&(z.setShape({x:0,y:0,width:T,height:L}),p(z,function(){z.setStyle("fill",u.getVisual("borderColor",!0))}),k.add(z));var O=u.viewChildren;if(!O||!O.length){var E=x("content",m,d,M);E&&f(k)}return k}}}}function o(t,e){var i=t*w+e;return(i-1)/i}var a=i(1),s=i(3),l=i(45),u=i(168),h=i(309),c=i(79),d=i(7),f=i(19),p=i(378),g=a.bind,v=s.Group,m=s.Rect,y=a.each,x=3,_=["label","normal"],b=["label","emphasis"],w=10,S=1,M=2;t.exports=i(2).extendChartView({type:"treemap",init:function(t,e){this._containerGroup,this._storage=n(),this._oldTree,this._breadcrumb,this._controller,this._state="ready",this._mayClick},render:function(t,e,i,n){var r=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(a.indexOf(r,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=u.retrieveTargetInfo(n,t),s=n&&n.type,l=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===s&&o&&c?{rootNodeGroup:c.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);h||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new v,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function o(t,e,i,n,r){function s(t){return t.getId()}function u(a,s){var l=null!=a?t[a]:null,u=null!=s?e[s]:null,h=v(l,u,i,r);h&&o(l&&l.viewChildren||[],u&&u.viewChildren||[],h,n,r+1)}n?(e=t,y(t,function(t,e){!t.isRemoved()&&u(e,e)})):new l(e,t,s,s).add(u).update(u).remove(a.curry(u,null)).execute()}function s(t){var e=n();return t&&y(t,function(t,i){var n=e[i];y(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function u(){y(m,function(t){y(t,function(t){t.parent&&t.parent.remove(t)})}),y(g,function(t){t.invisible=!0,t.dirty()})}var h=e.getData().tree,c=this._oldTree,d=n(),f=n(),p=this._storage,g=[],v=a.curry(r,e,f,p,i,d,g);o(h.root?[h.root]:[],c&&c.root?[c.root]:[],t,h===c||!c,0);var m=s(p);return this._oldTree=h,this._storage=f,{lastsForAnimation:d,willDeleteEls:m,renderFinally:u}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var r=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=p.createWrap();y(e.willDeleteEls,function(t,e){y(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,r,o)}})}),y(this._storage,function(t,i){y(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a.extend({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,r,o))})},this),this._state="animating",s.done(g(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new c(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",g(this._onPan,this)),e.on("zoom",g(this._onZoom,this)));var i=new d(0,0,t.getWidth(),t.getHeight());e.rectProvider=function(){return i}},_clearController:function(){var t=this._controller;t&&(t.off("pan").off("zoom"),t=null)},_onPan:function(t,e){if(this._mayClick=!1,"animating"!==this._state&&(Math.abs(t)>x||Math.abs(e)>x)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onZoom:function(t,e,i){if(this._mayClick=!1,"animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var r=n.getLayout();if(!r)return;var o=new d(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,i-=a.y;var s=f.create();f.translate(s,s,[-e,-i]),f.scale(s,s,[t,t]),f.translate(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){function e(t){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var r=n.hostTree.data.getItemModel(n.dataIndex),o=r.get("link",!0),a=r.get("target",!0)||"blank";o&&window.open(o,a)}}}}t.on("mousedown",function(t){"ready"===this._state&&(this._mayClick=!0)},this),t.on("mouseup",function(t){this._mayClick&&(this._mayClick=!1,"ready"===this._state&&e.call(this,t))},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(u.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new h(this.group,g(n,this)))).render(t,e,i.node)},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=n(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var r=this._storage.background[n.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}},this),i}})},function(t,e,i){for(var n=i(2),r=i(168),o=function(){},a=["treemapZoomToNode","treemapRender","treemapMove"],s=0;sM;){var I=m[M];S.push(I),S.area+=I.getLayout().area;var T=u(S,b,e.squareRatio);w>=T?(M++,w=T):(S.area-=S.pop().getLayout().area,h(S,b,y,f,!1),b=_(y.width,y.height),S.length=S.area=0,w=1/0)}if(S.length&&h(S,b,y,f,!0),!i){var L=g.get("childrenVisibleMin");null!=L&&L>v&&(i=!0)}for(var M=0,A=m.length;A>M;M++)r(m[M],e,i,n+1)}}}function o(t,e,i,n,r,o){var u=t.children||[],h=n.sort;"asc"!==h&&"desc"!==h&&(h=null);var c=null!=n.leafDepth&&n.leafDepth<=o;if(r&&!c)return t.viewChildren=[];u=p.filter(u,function(t){return!t.isRemoved()}),s(u,h);var d=l(e,u,h);if(0===d.sum)return t.viewChildren=[];if(d.sum=a(e,i,d.sum,h,u),0===d.sum)return t.viewChildren=[];for(var f=0,g=u.length;g>f;f++){var v=u[f].getValue()/d.sum*i;u[f].setLayout({area:v})}return c&&(u.length&&t.setLayout({isLeafRoot:!0},!0),u.length=0),t.viewChildren=u,t.setLayout({dataExtent:d.dataExtent},!0),u}function a(t,e,i,n,r){if(!n)return i;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===n?a-l-1:l].getValue();o>u/i*e&&(s=l,i-=u)}return"asc"===n?r.splice(0,a-s):r.splice(s,a-s),i}function s(t,e){return e&&t.sort(function(t,i){return"asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue()}),t}function l(t,e,i){for(var n=0,r=0,o=e.length;o>r;r++)n+=e[r].getValue();var a,s=t.get("visualDimension");if(e&&e.length)if("value"===s&&i)a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&a.reverse();else{var a=[1/0,-(1/0)];S(e,function(t){var e=t.getValue(s);ea[1]&&(a[1]=e)})}else a=[NaN,NaN];return{sum:n,dataExtent:a}}function u(t,e,i){for(var n,r=0,o=1/0,a=0,s=t.length;s>a;a++)n=t[a].getLayout().area,n&&(o>n&&(o=n),n>r&&(r=n));var l=t.area*t.area,u=e*e*i;return l?x(u*r/l,l/(u*o)):1/0}function h(t,e,i,n,r){var o=e===i.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=i[s[o]],h=e?t.area/e:0;(r||h>i[l[a]])&&(h=i[l[a]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,v=p[l[a]]=x(h-2*n,0),m=i[s[o]]+i[l[o]]-u,y=c===d-1||g>m?m:g,b=p[l[o]]=x(y-2*n,0);p[s[a]]=i[s[a]]+_(n,v/2),p[s[o]]=u+_(n,b/2),u+=y,f.setLayout(p,!0)}i[s[a]]+=h,i[l[a]]-=h}function c(t,e,i,n,r){var o=(e||{}).node,a=[n,r];if(!o||o===i)return a;for(var s,l=n*r,u=l*t.option.zoomToNodeRatio;s=o.parentNode;){for(var h=0,c=s.children,d=0,f=c.length;f>d;d++)h+=c[d].getValue();var p=o.getValue();if(0===p)return a;u*=h/p;var v=s.getModel("itemStyle.normal").get("borderWidth");isFinite(v)&&(u+=4*v*v+4*v*Math.pow(u,.5)),u>g.MAX_SAFE_INTEGER&&(u=g.MAX_SAFE_INTEGER),o=s}l>u&&(u=l);var m=Math.pow(u/l,.5);return[n*m,r*m]}function d(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var r=i.node,o=r.getLayout();if(!o)return n;for(var a=[o.width/2,o.height/2],s=r;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}function f(t,e,i,n,r){var o=t.getLayout(),a=i[r],s=a&&a===t;if(!(a&&!s||r===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new y(e.x-o.x,e.y-o.y,e.width,e.height);S(t.viewChildren||[],function(t){f(t,l,i,n,r+1)})}}var p=i(1),g=i(4),v=i(14),m=i(168),y=i(7),m=i(168),x=Math.max,_=Math.min,b=g.parsePercent,w=p.retrieve,S=p.each;t.exports=n},function(t,e,i){function n(t,e,i,s,u,c){var d=t.getModel(),p=t.getLayout();if(p&&!p.invisible&&p.isInView){var v,m=t.getModel(g),y=i[t.depth],x=r(m,e,y,s),_=m.get("borderColor"),b=m.get("borderColorSaturation");null!=b&&(v=o(x,t),_=a(b,v)),t.setVisual("borderColor",_);var w=t.viewChildren;if(w&&w.length){var S=l(t,d,p,m,x,w);f.each(w,function(t,e){if(t.depth>=u.length||t===u[t.depth]){var r=h(d,x,t,e,S,c);n(t,r,i,s,u,c)}})}else v=o(x,t),t.setVisual("color",v)}}function r(t,e,i,n){var r=f.extend({},e);return f.each(["color","colorAlpha","colorSaturation"],function(o){var a=t.get(o,!0);null==a&&i&&(a=i[o]),null==a&&(a=e[o]),null==a&&(a=n.get(o)),null!=a&&(r[o]=a)}),r}function o(t){var e=s(t,"color");if(e){var i=s(t,"colorAlpha"),n=s(t,"colorSaturation");return n&&(e=d.modifyHSL(e,null,null,n)),i&&(e=d.modifyAlpha(e,i)),e}}function a(t,e){return null!=e?d.modifyHSL(e,null,null,t):null}function s(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function l(t,e,i,n,r,o){if(o&&o.length){var a=u(e,"color")||null!=r.color&&"none"!==r.color&&(u(e,"colorAlpha")||u(e,"colorSaturation"));if(a){var s=e.get("colorMappingBy"),l={type:a.name,dataExtent:i.dataExtent,visual:a.range};"color"!==l.type||"index"!==s&&"id"!==s?l.mappingMethod="linear":(l.mappingMethod="category",l.loop=!0);var h=new c(l);return h.__drColorMappingBy=s,h}}}function u(t,e){var i=t.get(e);return p(i)&&i.length?{name:e,range:i}:null}function h(t,e,i,n,r,o){var a=f.extend({},e);if(r){var s=r.type,l="color"===s&&r.__drColorMappingBy,u="index"===l?n:"id"===l?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}var c=i(72),d=i(17),f=i(1),p=f.isArray,g="itemStyle.normal";t.exports=function(t,e,i){var r={mainType:"series",subType:"treemap",query:i};t.eachComponent(r,function(t){var e=t.getData().tree,i=e.root,r=t.getModel(g);if(!i.isRemoved()){var o=f.map(e.levelModels,function(t){return t?t.get(g):null});n(i,{},o,r,t.getViewRoot().getAncestors(),t)}})}},function(t,e,i){"use strict";i(213),i(316)},function(t,e,i){"use strict";function n(t,e,i,n){var r=t.coordToPoint([e,n]),o=t.coordToPoint([i,n]);return{x1:r[0],y1:r[1],x2:o[0],y2:o[1]}}var r=i(1),o=i(3),a=i(9),s=["axisLine","axisLabel","axisTick","splitLine","splitArea"];i(2).extendComponentView({type:"angleAxis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("polar",t.get("polarIndex")),n=t.axis,o=i.coordinateSystem,a=o.getRadiusAxis().getExtent(),l=n.getTicksCoords();"category"!==n.type&&l.pop(),r.each(s,function(e){t.get(e+".show")&&this["_"+e](t,o,l,a)},this)}},_axisLine:function(t,e,i,n){var r=t.getModel("axisLine.lineStyle"),a=new o.Circle({shape:{cx:e.cx,cy:e.cy,r:n[1]},style:r.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,a){var s=t.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),u=r.map(i,function(t){return new o.Line({shape:n(e,a[1],a[1]+l,t)})});this.group.add(o.mergePath(u,{style:r.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var r=t.axis,s=t.get("data"),l=t.getModel("axisLabel"),u=l.getModel("textStyle"),h=t.getFormattedLabels(),c=l.get("margin"),d=r.getLabelsCoords(),f=0;fv?"left":"right",x=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom",_=u;s&&s[f]&&s[f].textStyle&&(_=new a(s[f].textStyle,u)),this.group.add(new o.Text({style:{x:g[0],y:g[1],fill:_.getTextColor()||t.get("axisLine.lineStyle.color"),text:h[f],textAlign:y,textVerticalAlign:x,textFont:_.getFont()},silent:!0}))}},_splitLine:function(t,e,i,a){var s=t.getModel("splitLine"),l=s.getModel("lineStyle"),u=l.get("color"),h=0;u=u instanceof Array?u:[u];for(var c=[],d=0;d=x[1])&&(h=t.get("nameTruncateLengthOutExpand"),c="",d=!1);var _=r.extend({axisLabelShow:d,axisNameTruncateLength:h,axisNameTruncateEllipsis:c,strokeContainThreshold:g,axisLineSilent:!(g>0)},m),b=new o(t,_);r.each(l,b.add,b),this._axisGroup.add(b.getGroup()),this._refreshBrushController(_,p,t,g),s.groupTransition(u,this._axisGroup,t)}}},_refreshBrushController:function(t,e,i,n){var o=i.axis,a=r.map(i.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[o.dataToCoord(t[0],!0),o.dataToCoord(t[1],!0)]}}),s=o.getExtent(),l=30,u={x:s[0]-l,y:-n/2,width:s[1]-s[0]+2*l,height:n};this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",rect:u}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(a)},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=r.map(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});t.exports=u},function(t,e,i){"use strict";function n(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotation:e.getModel("axisLabel").get("rotate"),z2:1}}var r=i(1),o=i(3),a=i(50),s=["axisLine","axisLabel","axisTick","axisName"],l=["splitLine","splitArea"];i(2).extendComponentView({type:"radiusAxis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("polar",t.get("polarIndex")),o=i.coordinateSystem.getAngleAxis(),u=t.axis,h=i.coordinateSystem,c=u.getTicksCoords(),d=o.getExtent()[0],f=u.getExtent(),p=n(h,t,d),g=new a(t,p);r.each(s,g.add,g),this.group.add(g.getGroup()),r.each(l,function(e){t.get(e+".show")&&this["_"+e](t,h,d,f,c)},this)}},_splitLine:function(t,e,i,n,a){var s=t.getModel("splitLine"),l=s.getModel("lineStyle"),u=l.get("color"),h=0;u=u instanceof Array?u:[u];for(var c=[],d=0;dc||c>1)return!1;var d=l(i-t,r-t,n-e,o-e)/h;return!(0>d||d>1)}function s(t){return 1e-6>=t&&t>=-1e-6}function l(t,e,i,n){return t*n-e*i}function u(t){var e=t.x,i=t.y,n=t.width,r=t.height;return 0>n&&(e+=n,n=-n),0>r&&(i+=r,r=-r),new c(e,i,n,r)}var h=i(239).contain,c=i(7),d={lineX:n(0),lineY:n(1),rect:{point:function(t,e,i){return i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return i.boundingRect.intersect(u(t))}},polygon:{point:function(t,e,i){return i.boundingRect.contain(t[0],t[1])&&h(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(n.length<=1)return!1;var r=t.x,a=t.y,s=t.width,l=t.height,c=n[0];return h(n,r,a)||h(n,r+s,a)||h(n,r,a+l)||h(n,r+s,a+l)||u(t).contain(c[0],c[1])||o(r,a,r+s,a,n)||o(r,a,r,a+l,n)||o(r+s,a,r+s,a+l,n)||o(r,a+l,r+s,a+l,n)?!0:void 0}}};t.exports=d},function(t,e,i){function n(t,e,i,n,o){if(o){var a=t.getZr();if(!a[x]){a[y]||(a[y]=r);var s=g.createOrUpdate(a,y,i,e);s(t,n)}}}function r(t,e){if(!t.isDisposed()){var i=t.getZr();i[x]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[x]=!1}}function o(t,e,i,n){for(var r=i.getItemLayout(n),o=0,a=e.length;a>o;o++){var s=e[o];if(t[s.brushType](r,s.selectors,s))return!0}}function a(t){var e=t.brushSelector;if(d.isString(e)){var i=[];return d.each(p,function(t,n){i[n]=t[e]}),i}if(d.isFunction(e)){var n={};return d.each(p,function(t,i){n[i]=e}),n}return e}function s(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(d.isArray(i)?d.indexOf(i,e)<0:e!==i)}function l(t){var e=t.selectors={};return d.each(p[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function u(t){return new f(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var h=i(2),c=i(170),d=i(1),f=i(7),p=i(326),g=i(82),v=i(112),m=["inBrush","outOfBrush"],y="__ecBrushSelect",x="__ecInBrushSelectEvent",_=h.PRIORITY.VISUAL.BRUSH;h.registerLayout(_,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),e.coordInfoList=v.makeCoordInfoList(e.option,t),v.parseInputRanges(e,t)})}),h.registerVisual(_,function(t,e,i){var r,u,h=[];t.eachComponent({mainType:"brush"},function(e,i){function n(t){return"all"===_||w[t]}function f(t){return!!t.length}function p(t,e){var i=t.coordinateSystem;A|=i.hasAxisbrushed(),n(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(S[e]=1)})}function g(t,i,r){var l=a(t);if(l&&!s(e,i)&&(d.each(I,function(i){l[i.brushType]&&v.controlSeries(i,e,t)&&r.push(i),A|=f(r)}),n(i)&&f(r))){var u=t.getData();u.each(function(t){o(l,r,u,t)&&(S[t]=1)})}}var y={brushId:e.id,brushIndex:i,brushName:e.name,areas:d.clone(e.areas),selected:[]};h.push(y);var x=e.option,_=x.brushLink,w=[],S=[],M=[],A=0;i||(r=x.throttleType,u=x.throttleDelay);var I=d.map(e.areas,function(t){return l(d.defaults({boundingRect:b[t.brushType](t)},t))}),T=c.createVisualMappings(e.option,m,function(t){t.mappingMethod="fixed"});d.isArray(_)&&d.each(_,function(t){w[t]=1}),t.eachSeries(function(t,e){var i=M[e]=[];"parallel"===t.subType?p(t,e,i):g(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};y.selected.push(i);var r=a(t),s=M[e],l=t.getData(),u=n(e)?function(t){return S[t]?(i.dataIndex.push(l.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return o(r,s,l,t)?(i.dataIndex.push(l.getRawIndex(t)),"inBrush"):"outOfBrush"};(n(e)?A:f(s))&&c.applyVisual(m,T,l,u)})}),n(e,r,u,h,i)});var b={lineX:d.noop,lineY:d.noop,rect:function(t){return u(t.range)},polygon:function(t){for(var e,i=t.range,n=0,r=i.length;r>n;n++){e=e||[[1/0,-(1/0)],[1/0,-(1/0)]];var o=i[n];o[0]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&u(e)}}},function(t,e,i){function n(t,e){e.update="updateView",r.registerAction(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var r=i.coordinateSystem;o.each(r.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}i(354),i(169),i(329),i(218);var r=i(2),o=i(1);n("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),n("select",{type:"geoSelect",event:"geoselected"}),n("unSelect",{type:"geoUnSelect",event:"geounselected"})},function(t,e,i){"use strict";var n=i(226);t.exports=i(2).extendComponentView({type:"geo",init:function(t,e){var i=new n(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var r=this._mapDraw;t.get("show")?r.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}}})},function(t,e,i){i(237),i(320),i(317)},function(t,e,i){"use strict";i(213),i(315),i(334),i(2).extendComponentView({type:"polar"})},function(t,e,i){i(370),i(371),i(333)},function(t,e,i){var n=i(50),r=i(1),o=i(3),a=["axisLine","axisLabel","axisTick","axisName"];t.exports=i(2).extendComponentView({type:"radar",render:function(t,e,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),o=r.map(i,function(t){var i=new n(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i});r.each(o,function(t){r.each(a,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=t.get("splitNumber"),a=i.getIndicatorAxes();if(a.length){var s=t.get("shape"),l=t.getModel("splitLine"),u=t.getModel("splitArea"),h=l.getModel("lineStyle"),c=u.getModel("areaStyle"),d=l.get("show"),f=u.get("show"),p=h.get("color"),g=c.get("color");p=r.isArray(p)?p:[p],g=r.isArray(g)?g:[g];var v=[],m=[];if("circle"===s)for(var y=a[0].getTicksCoords(),x=i.cx,_=i.cy,b=0;b=b;b++){for(var A=[],I=0;I=0||"+"===i?"left":"right"},s={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},l={horizontal:0,vertical:b/2},u="vertical"===r?o.height:o.width,h=t.getModel("controlStyle"),c=h.get("show"),d=c?h.get("itemSize"):0,f=c?h.get("itemGap"):0,p=d+f,g=t.get("label.normal.rotate")||0;g=g*b/180;var v,m,y,x,_=h.get("position",!0),c=h.get("show",!0),w=c&&h.get("showPlayBtn",!0),S=c&&h.get("showPrevBtn",!0),M=c&&h.get("showNextBtn",!0),A=0,I=u;return"left"===_||"bottom"===_?(w&&(v=[0,0],A+=p),S&&(m=[A,0],A+=p),M&&(y=[I-d,0],I-=p)):(w&&(v=[I-d,0],I-=p),S&&(m=[0,0],A+=p),M&&(y=[I-d,0],I-=p)),x=[A,I],t.get("inverse")&&x.reverse(),{viewRect:o,mainLength:u,orient:r,rotation:l[r],labelRotation:g,labelPosOpt:i,labelAlign:a[r],labelBaseline:s[r],playPosition:v,prevBtnPosition:m,nextBtnPosition:y,axisExtent:x,controlSize:d,controlGap:f}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function r(t,e,i,n,r){t[n]+=i[n][r]-e[n][r]}var o=this._mainGroup,a=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=g.create(),u=s.x,h=s.y+s.height;g.translate(l,l,[-u,-h]),g.rotate(l,l,-b/2),g.translate(l,l,[u,h]),s=s.clone(),s.applyTransform(l)}var c=n(s),d=n(o.getBoundingRect()),f=n(a.getBoundingRect()),p=o.position,v=a.position;v[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m)){var y="+"===m?0:1;r(p,d,c,1,y),r(v,f,c,1,1-y)}else{var y=m>=0?0:1;r(p,d,c,1,y),v[1]=p[1]+m}o.attr("position",p),a.attr("position",v),o.rotation=a.rotation=t.rotation,i(o),i(a)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),r=f.createScaleByModel(e,n),o=i.getDataExtent("value");r.setExtent(o[0],o[1]),this._customizeScale(r,i),r.niceTicks();var a=new c("value",r,t.axisExtent,n);return a.model=e,a},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],function(t){return t})},t.getTicksLabels=function(){return s.map(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new l.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var r=i.getExtent();n.get("lineStyle.show")&&e.add(new l.Line({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:s.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var r=n.getData(),a=i.scale.getTicks();_(a,function(t,a){var s=i.dataToCoord(t),u=r.getItemModel(a),h=u.getModel("itemStyle.normal"),c=u.getModel("itemStyle.emphasis"),d={position:[s,0],onclick:x(this._changeTimeline,this,a)},f=o(u,h,e,d);l.setHoverStyle(f,c.getItemStyle()),u.get("tooltip")?(f.dataIndex=a,f.dataModel=n):f.dataIndex=f.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var r=n.getModel("label.normal");if(r.get("show")){var o=n.getData(),a=i.scale.getTicks(),s=f.getFormattedLabels(i,r.get("formatter")),u=i.getLabelInterval();_(a,function(n,r){if(!i.isLabelIgnored(r,u)){var a=o.getItemModel(r),h=a.getModel("label.normal.textStyle"),c=a.getModel("label.emphasis.textStyle"),d=i.dataToCoord(n),f=new l.Text({style:{text:s[r],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline,textFont:h.getFont(),fill:h.getTextColor()},position:[d,0],rotation:t.labelRotation-t.rotation,onclick:x(this._changeTimeline,this,r),silent:!1});e.add(f),l.setHoverStyle(f,c.getItemStyle())}},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,d){if(t){var f={position:t,origin:[a/2,0],rotation:d?-s:0,rectHover:!0,style:u,onclick:o},p=r(n,i,c,f);e.add(p),l.setHoverStyle(p,h)}}var a=t.controlSize,s=t.rotation,u=n.getModel("controlStyle.normal").getItemStyle(),h=n.getModel("controlStyle.emphasis").getItemStyle(),c=[0,-a/2,a,a],d=n.getPlayState(),f=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",x(this._changeTimeline,this,f?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",x(this._changeTimeline,this,f?"+":"-")),o(t.playPosition,"controlStyle."+(d?"stopIcon":"playIcon"),x(this._handlePlayClick,this,!d),!0)},_renderCurrentPointer:function(t,e,i,n){var r=n.getData(),s=n.getCurrentIndex(),l=r.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(t){t.draggable=!0,t.drift=x(u._handlePointerDrag,u),t.ondragend=x(u._handlePointerDragend,u),a(t,s,i,n,!0)},onUpdate:function(t){a(t,s,i,n)}};this._currentPointer=o(l,l,this._mainGroup,{},this._currentPointer,h)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,r=v.asc(n.getExtent().slice());i>r[1]&&(i=r[1]),is&&(n=s,e=o)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}})},function(t,e,i){var n=i(1),r=i(42),o=i(21),a=function(t,e,i,n){r.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};a.prototype={constructor:a,getLabelInterval:function(){var t=this.model,e=t.getModel("label.normal"),i=e.get("interval");if(null!=i&&"auto"!=i)return i;var i=this._autoLabelInterval;return i||(i=this._autoLabelInterval=o.getAxisLabelInterval(n.map(this.scale.getTicks(),this.dataToCoord,this),o.getFormattedLabels(this,e.get("formatter")),e.getModel("textStyle").getFont(),"horizontal"===t.get("orient"))),i},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},n.inherits(a,r),t.exports=a},function(t,e,i){var n=i(10),r=i(13),o=i(1),a=i(8),s=n.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{normal:{},emphasis:{}},label:{normal:{textStyle:{color:"#000"}},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){s.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,n=this._names=[];if("category"===i){var s=[];o.each(e,function(t,e){var i,r=a.getDataItemValue(t);o.isObject(t)?(i=o.clone(t),i.value=e):i=e,s.push(i),o.isString(r)||null!=r&&!isNaN(r)||(r=""),n.push(r+"")}),e=s}var l={category:"ordinal",time:"time"}[i]||"number",u=this._data=new r([{name:"value",type:l}],this);u.initData(e,n)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}});t.exports=s},function(t,e,i){var n=i(57);t.exports=n.extend({type:"timeline"})},function(t,e,i){function n(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),r(t),o(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});o(n,"position")||(n.position=t.controlPosition),"none"!==n.position||o(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}a.each(t.data||[],function(t){a.isObject(t)&&!a.isArray(t)&&(!o(t,"value")&&o(t,"name")&&(t.value=t.name),r(t))})}function r(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},r=n.normal||(n.normal={}),s={normal:1,emphasis:1};a.each(n,function(t,e){s[e]||o(r,e)||(r[e]=t)}),i.label&&!o(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function o(t,e){return t.hasOwnProperty(e)}var a=i(1);t.exports=function(t){var e=t&&t.timeline;a.isArray(e)||(e=e?[e]:[]),a.each(e,function(t){t&&n(t)})}},function(t,e,i){var n=i(2);n.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline")}),n.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)})},function(t,e,i){i(10).registerSubTypeDefaulter("timeline",function(){return"slider"})},function(t,e,i){"use strict";function n(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}var r=i(25),o=i(1);n.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}};var a=n.prototype;a.render=a.updateView=a.updateLayout=function(t,e,i){var n,r,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,r=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=r,o.each(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?a:e===n)?"emphasis":"normal")})},a.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return o.each(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},a.onclick=function(t,e,i){var e=this.api,n=this._brushType,r=this._brushMode;"clear"===i?e.dispatchAction({type:"brush",areas:[]}):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===r?"single":"multiple":r}})},r.register("brush",n),t.exports=n},function(t,e,i){i(351),i(352)},function(t,e,i){function n(t,e,i){var n=t.targetVisuals[e].color;if(!n)return i.slice();var r=n.option.visual.length;if(1>=r||i[0]===i[1])return i.slice();for(var o=(i[1]-i[0])/(r-1),a=i[0],s=[],l=0;r>l&&ae[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){o.prototype.completeVisualOption.apply(this,arguments),a.each(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=s.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getStops:function(t,e){if(this.isTargetSeries(t)){var i=[];return r(this,"outOfRange",this.getExtent(),i),r(this,"inRange",this.option.range.slice(),i),a.each(i,function(t){t.color=e(this,t.value,t.valueState)},this),i}}});t.exports=u},function(t,e,i){function n(t,e,i,n){return new u.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,ondragend:n})}function r(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function o(t,e,i,n){return t?[[0,-y(e,x(i,0))],[b,0],[0,y(e,x(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function a(t,e,i){var n=_/2,r=t.get("hoverLinkDataSize");return r&&(n=v(r,e,i,!0)/2),n}function s(t){return!t.get("realtime")&&t.get("hoverLinkOnHandle")}var l=i(229),u=i(3),h=i(1),c=i(4),d=i(80),f=i(86),p=i(230),g=i(8),v=c.linearMap,m=h.each,y=Math.min,x=Math.max,_=12,b=6,w=l.extend({type:"visualMap.continuous",init:function(){w.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var r=this.visualMapModel,o=r.get("textGap"),a=r.itemSize,s=this._shapes.barGroup,l=this._applyTransform([a[0]/2,0===i?-o:a[1]+o],s),h=this._applyTransform(0===i?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new u.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":h,textAlign:"horizontal"===c?h:"center",text:n,textFont:d.getFont(),fill:d.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,r=e.itemSize,o=this._orient,a=this._useHandle,s=p.getItemAlign(e,this.api,r),l=i.barGroup=this._createBarGroup(s);l.add(i.outOfRange=n()),l.add(i.inRange=n(null,a?"move":null,h.bind(this._dragHandle,this,"all",!1),h.bind(this._dragHandle,this,"all",!0)));var u=e.textStyleModel.getTextRect("国"),c=x(u.width,u.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(l,0,r,c,o,s),this._createHandle(l,1,r,c,o,s)),this._createIndicator(l,r,c,o),t.add(l)},_createHandle:function(t,e,i,o,a){var s=h.bind(this._dragHandle,this,e,!1),l=h.bind(this._dragHandle,this,e,!0),c=n(r(e,o),"move",s,l);c.position[0]=i[0],t.add(c);var d=this.visualMapModel.textStyleModel,f=new u.Text({draggable:!0,drift:s,ondragend:l,style:{x:0,y:0,text:"",textFont:d.getFont(),fill:d.getTextColor()}});this.group.add(f);var p=["horizontal"===a?o/2:1.5*o,"horizontal"===a?0===e?-(1.5*o):1.5*o:0===e?-o/2:o/2],g=this._shapes;g.handleThumbs[e]=c,g.handleLabelPoints[e]=p,g.handleLabels[e]=f},_createIndicator:function(t,e,i,r){var o=n([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,s=new u.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),fill:a.getTextColor()}});this.group.add(s);var l=["horizontal"===r?i/2:b+3,0],h=this._shapes;h.indicator=o,h.indicatorLabel=s,h.indicatorLabelPoint=l},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,r[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():s(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[v(e[0],i,n,!0),v(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds;d(e,n,[0,i.itemSize[1]],"all"===t?"rigid":"push",t);var r=i.getExtent(),o=[0,i.itemSize[1]];this._dataInterval=[v(n[0],o,r,!0),v(n[1],o,r,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,r=[0,e.itemSize[1]],o=t?r:this._handleEnds,a=this._createBarVisual(this._dataInterval,i,o,"inRange"),s=this._createBarVisual(i,i,r,"outOfRange"); +n.inRange.setStyle({fill:a.barColor,opacity:a.opacity}).setShape("points",a.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(o,a)},_createBarVisual:function(t,e,i,n){var r={forceState:n,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,r),a=[this.getControllerVisual(t[0],"symbolSize",r),this.getControllerVisual(t[1],"symbolSize",r)],s=this._createBarPoints(i,a);return{barColor:new f(0,0,1,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var i=100,n=[],r=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;i>o;o++){var a=t[0]+r*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new u.Group("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,o=i.handleLabels;m([0,1],function(a){var s=r[a];s.setStyle("fill",e.handlesColor[a]),s.position[1]=t[a];var l=u.applyTransform(i.handleLabelPoints[a],u.getTransform(s,this.group));o[a].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[a]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===a?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,a=r.getExtent(),s=r.itemSize,l=[0,s[1]],h=v(t,a,l,!0),c=this._shapes,d=c.indicator;if(d){d.position[1]=h,d.attr("invisible",!1),d.setShape("points",o(!!i,n,h,s[1]));var f={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",f);d.setStyle("fill",p);var g=u.applyTransform(c.indicatorLabelPoint,u.getTransform(d,this.group)),m=c.indicatorLabel;m.attr("invisible",!1);var y=this._applyTransform("left",c.barGroup),x=this._orient;m.setStyle({text:(i?i:"")+r.formatValueText(e),textVerticalAlign:"horizontal"===x?y:"middle",textAlign:"horizontal"===x?"center":y,x:g[0],y:g[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=y(x(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],o=i.getExtent();t=y(x(r[0],t),r[1]);var l=a(i,o,r),u=[t-l,t+l],h=v(t,r,o,!0),c=[v(u[0],r,o,!0),v(u[1],r,o,!0)];u[0]r[1]&&(c[1]=1/0),e&&(c[0]===-(1/0)?this._showIndicator(h,c[1],"< ",l):c[1]===1/0?this._showIndicator(h,c[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var d=this._hoverLinkDataIndices,f=[];(e||s(i))&&(f=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var p=g.compressBatches(d,f);this._dispatchHighDown("downplay",p[0]),this._dispatchHighDown("highlight",p[1])}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target;if(e&&null!=e.dataIndex){var i=e.dataModel||this.ecModel.getSeriesByIndex(e.seriesIndex),n=i.getData(e.dataType),r=n.getDimension(this.visualMapModel.getDataDimension(n)),o=n.get(r,e.dataIndex,!0);this._showIndicator(o,o)}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",t),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var r=u.getTransform(e,n?null:this.group);return u[h.isArray(t)?"applyTransform":"transformDirection"](t,r,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});t.exports=w},function(t,e,i){function n(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function r(t){function e(t,i,n){return n=n||0,t.interval[n]i.close[n]||e(t,i,1))}t.sort(function(t,i){return e(t,i)?-1:1});for(var i=-(1/0),n=0;na;a++)r[a]0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=a.clone(t)},getValueState:function(t){var e=s.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){var r=s.findPieceIndex(e,this._pieceList);r===t&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=(i[0]+i[1])/2}return e},getStops:function(t,e){function i(t){n.push(t),t.color=e(r,r.getRepresentValue(t),t.valueState)}var n=[],r=this;if(this.isTargetSeries(t)){var o=-(1/0);a.each(this._pieceList,function(t){var e=t.interval;e&&(e[0]>o&&i({interval:[o,e[0]],valueState:"outOfRange"}),i({interval:e.slice(),valueState:this.getValueState((e[0]+e[1])/2)}),o=e[1])},this)}return n}}),u={splitNumber:function(){var t=this.option,e=this._pieceList,i=t.precision,n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var s=(n[1]-n[0])/o;+s.toFixed(i)!==s&&5>i;)i++;t.precision=i,s=+s.toFixed(i);for(var l=0,u=n[0];o>l;l++,u+=s){var h=l===o-1?n[1]:u+s;e.push({index:l,interval:[u,h],close:[1,1]})}r(e),a.each(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;a.each(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),n(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;a.each(t.pieces,function(t,i){a.isObject(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var r=n.value=t.value;n.interval=[r,r],n.close=[1,1]}else{for(var o=n.interval=[],l=n.close=[0,0],u=[1,0,1],h=[-(1/0),1/0],c=[],d=0;2>d;d++){for(var f=[["gte","gt","min"],["lte","lt","max"]][d],p=0;3>p&&null==o[d];p++)o[d]=t[f[p]],l[d]=u[p],c[d]=2===p;null==o[d]&&(o[d]=h[d])}c[0]&&o[1]===1/0&&(l[0]=0),c[1]&&o[0]===-(1/0)&&(l[1]=0),o[0]===o[1]&&l[0]&&l[1]&&(n.value=o[0])}n.visual=s.retrieveVisuals(t),e.push(n)},this),n(t,e),r(e),a.each(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};t.exports=l},function(t,e,i){var n=i(229),r=i(1),o=i(3),a=i(26),s=i(14),l=i(230),u=n.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var a=t.piece,s=new o.Group;s.onclick=r.bind(this._onItemClick,this,a),this._enableHoverLink(s,t.indexInModelPieceList);var d=i.getRepresentValue(a);if(this._createItemSymbol(s,d,[0,0,c[0],c[1]]),f){var p=this.visualMapModel.getValueState(d);s.add(new o.Text({style:{x:"right"===h?-n:c[0]+n,y:c[1]/2,text:a.text,textVerticalAlign:"middle",textAlign:h,textFont:l,fill:u,opacity:"outOfRange"===p?.5:1}}))}e.add(s)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,l=a.getFont(),u=a.getTextColor(),h=this._getItemAlign(),c=i.itemSize,d=this._getViewData(),f=!d.endsText,p=!f;p&&this._renderEndsText(e,d.endsText[0],c),r.each(d.viewPieceList,t,this),p&&this._renderEndsText(e,d.endsText[1],c),s.box(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:i.findTargetDataIndices(e)})}t.on("mouseover",r.bind(i,this,"highlight")).on("mouseout",r.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return l.getItemAlign(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i){if(e){var n=new o.Group,r=this.visualMapModel.textStyleModel;n.add(new o.Text({style:{x:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:"center",text:e,textFont:r.getFont(),fill:r.getTextColor()}})),t.add(n)}},_getViewData:function(){var t=this.visualMapModel,e=r.map(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(a.createSymbol(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=r.clone(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,r.each(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});t.exports=u},function(t,e,i){i(2).registerPreprocessor(i(231)),i(232),i(233),i(347),i(348),i(234)},function(t,e,i){i(2).registerPreprocessor(i(231)),i(232),i(233),i(349),i(350),i(234)},function(t,e,i){function n(t,e,i,n,r){s.call(this,t),this.map=e,this._nameCoordMap={},this.loadGeoJson(i,n,r)}var r=i(358),o=i(1),a=i(7),s=i(235),l=[i(356),i(357),i(355)];n.prototype={constructor:n,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i>1^-(1&a),s=s>>1^-(1&s),a+=n,s+=r,n=a,r=s,i.push([a/1024,s/1024])}return i}function o(t){for(var e=[],i=0;i=0;i--)l.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;n>i;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}}),h={type:"value",dim:null,parallelIndex:null,nameTruncateLengthOutExpand:1,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};o.merge(u.prototype,i(51)),s("parallel",u,n,h),t.exports=u},function(t,e,i){function n(t,e,i){this._axesMap={},this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}var r=i(14),o=i(21),a=i(1),s=i(361),l=i(3),u=i(19),h=a.each,c=Math.PI;n.prototype={type:"parallel",constructor:n,_init:function(t,e,i){var n=t.dimensions,r=t.parallelAxisIndex;h(n,function(t,i){var n=r[i],a=e.getComponent("parallelAxis",n),l=this._axesMap[t]=new s(t,o.createScaleByModel(a),[0,0],a.get("type"),n),u="category"===l.type;l.onBand=u&&a.get("boundaryGap"),l.inverse=a.get("inverse"),a.axis=l,l.model=a},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();h(this.dimensions,function(t){var e=this._axesMap[t];e.scale.unionExtent(n.getDataExtent(t)),o.niceScaleExtent(e,e.model)},this)}},this)},resize:function(t,e){this._rect=r.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes(t)},getRect:function(){return this._rect},_layoutAxes:function(t){function e(t){return tp[1]?1:0}var i=this._rect,n=t.get("layout"),r=this._axesMap,o=this.dimensions,a=[i.width,i.height],s="horizontal"===n?0:1,l=a[s],d=a[1-s],f=[0,d];h(r,function(t){var e=t.inverse?1:0;t.setExtent(f[e],f[1-e])});var p,g=t.get("axisExpandable"),v=t.get("axisExpandWidth"),m=t.get("axisExpandCenter"),y=t.get("axisExpandCount")||0;if(null!=m){var x=Math.max(0,Math.floor(m-(y-1)/2)),_=x+y-1;_>=o.length&&(_=o.length-1,x=Math.max(0,Math.floor(_-y+1))),p=[x,_]}var b=g&&p&&v?function(t,i,n){var r=p[1]-p[0],o=(i-v*r)/(n-1-r),a=e(t);return 0>a?(t-1)*o:0===a?p[0]*o+(t-p[0])*v:t===n-1?i:p[0]*o+r*v+(t-p[1])*o}:function(t,e,i){return e*t/(i-1)};h(o,function(t,e){var r=b(e,l,o.length),a={horizontal:{x:r,y:d},vertical:{x:0,y:r}},s={horizontal:c/2,vertical:0},h=[a[n].x+i.x,a[n].y+i.y],f=s[n],g=u.create();u.rotate(g,g,f),u.translate(g,g,h),this._axesLayout[t]={position:h,rotation:f,transform:g,tickDirection:1,labelDirection:1,axisExpandWindow:p}},this)},getAxis:function(t){return this._axesMap[t]},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap[e].dataToCoord(t),e)},eachActiveState:function(t,e,i){for(var n=this.dimensions,r=this._axesMap,o=this.hasAxisbrushed(),a=0,s=t.count();s>a;a++){var l,u=t.getValues(n,a);if(o){l="active";for(var h=0,c=n.length;c>h;h++){var d=n[h],f=r[d].model.getActiveState(u[h],h);if("inactive"===f){l="inactive";break}}}else l="normal";e.call(i,l,a)}},hasAxisbrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,r=t.length;r>n;n++)"normal"!==e[t[n]].model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return l.applyTransform([t,0],i.transform)},getAxisLayout:function(t){return a.clone(this._axesLayout[t])},findClosestAxisDim:function(t){var e,i=1/0;return a.each(this._axesLayout,function(n,r){var o=l.applyTransform(t,n.transform,!0),a=this._axesMap[r].getExtent();if(!(o[0]a[1])){var s=Math.abs(o[1]);i>s&&(i=s,e=r)}},this),e}},t.exports=n},function(t,e,i){var n=i(1),r=i(42),o=function(t,e,i,n,o){r.call(this,t,e,i),this.type=n||"value",this.axisIndex=o};o.prototype={constructor:o,model:null},n.inherits(o,r),t.exports=o},function(t,e,i){var n=i(1),r=i(10);i(359),r.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,parallelAxisDefault:null},init:function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&n.merge(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){n.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=n.filter(this.dependentModels.parallelAxis,function(t){return t.get("parallelIndex")===this.componentIndex});n.each(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}})},function(t,e,i){function n(t){if(!t.parallel){var e=!1;o.each(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}}function r(t){var e=a.normalizeToArray(t.parallelAxis);o.each(e,function(e){if(o.isObject(e)){var i=e.parallelIndex||0,n=a.normalizeToArray(t.parallel)[i];n&&n.parallelAxisDefault&&o.merge(e,n.parallelAxisDefault,!1)}})}var o=i(1),a=i(8);t.exports=function(t){n(t),r(t)}},function(t,e,i){"use strict";function n(t,e){e=e||[0,360],o.call(this,"angle",t,e),this.type="category"}var r=i(1),o=i(42);n.prototype={constructor:n,dataToAngle:o.prototype.dataToCoord,angleToData:o.prototype.coordToData},r.inherits(n,o),t.exports=n},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(1),o=i(10),a=i(52),s=o.extend({type:"polarAxis",axis:null});r.merge(s.prototype,i(51));var l={angle:{polarIndex:0,startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{polarIndex:0,splitNumber:5}};a("angle",s,n,l.angle),a("radius",s,n,l.radius)},function(t,e,i){"use strict";var n=i(368),r=i(364),o=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new n,this._angleAxis=new r};o.prototype={constructor:o,type:"polar",dimensions:["radius","angle"],containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},dataToPoints:function(t){return t.mapArray(this.dimensions,function(t,e){return this.dataToPoint([t,e])},this)},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),r=n.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);n.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=o>l?1:-1;o>l||l>a;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,r=-Math.sin(i)*e+this.cy;return[n,r]}},t.exports=o},function(t,e,i){"use strict";i(365),i(2).extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){i.getComponent("polar",t.getShallow("polarIndex"))===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}})},function(t,e,i){"use strict";function n(t,e){o.call(this,"radius",t,e),this.type="category"}var r=i(1),o=i(42);n.prototype={constructor:n,dataToRadius:o.prototype.dataToCoord,radiusToData:o.prototype.coordToData},r.inherits(n,o),t.exports=n},function(t,e,i){function n(t,e,i){o.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}var r=i(1),o=i(42);r.inherits(n,o),t.exports=n},function(t,e,i){function n(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=r.map(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new o(i,new a);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.startAngle}var r=i(1),o=i(369),a=i(38),s=i(4),l=i(21);n.prototype.getIndicatorAxes=function(){return this._indicatorAxes},n.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},n.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e],n=i.angle,r=this.cx+t*Math.cos(n),o=this.cy-t*Math.sin(n);return[r,o]},n.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var r,o=Math.atan2(-i,e),a=1/0,s=-1,l=0;lh&&(r=u,s=l,a=h)}return[s,+(r&&r.coodToData(n))]},n.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=s.parsePercent(i[0],n),this.cy=s.parsePercent(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=s.parsePercent(t.get("radius"),a),r.each(this._indicatorAxes,function(t,e){t.setExtent(0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},n.prototype.update=function(t,e){function i(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var n=this._indicatorAxes,o=this._model;r.each(n,function(t){t.scale.setExtent(1/0,-(1/0))}),t.eachSeriesByType("radar",function(e,i){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===o){var a=e.getData();r.each(n,function(t){t.scale.unionExtent(a.getDataExtent(t.dim))})}},this);var a=o.get("splitNumber");r.each(n,function(t,e){var n=l.getScaleExtent(t,t.model);l.niceScaleExtent(t,t.model);var r=t.model,o=t.scale,u=r.get("min"),h=r.get("max"),c=o.getInterval();if(null!=u&&null!=h)o.setInterval((h-u)/a);else if(null!=u){var d;do d=u+c*a,o.setExtent(+u,d),o.setInterval(c),c=i(c);while(dn[0]&&isFinite(f)&&isFinite(n[0]))}else{var p=o.getTicks().length-1;p>a&&(c=i(c));var g=Math.round((n[0]+n[1])/2/c)*c,v=Math.round(a/2);o.setExtent(s.round(g-v*c),s.round(g+(a-v)*c)),o.setInterval(c)}})},n.dimensions=[],n.create=function(t,e){var i=[];return t.eachComponent("radar",function(r){var o=new n(r,t,e);i.push(o),r.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},i(23).register("radar",n),t.exports=n},function(t,e,i){function n(t,e){return s.defaults({show:e},t)}var r=i(81),o=r.valueAxis,a=i(9),s=i(1),l=i(51),u=i(2).extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),r=this.get("axisTick"),o=this.get("axisLabel"),u=this.get("name.textStyle"),h=this.get("name.show"),c=this.get("name.formatter"),d=this.get("nameGap"),f=s.map(this.get("indicator")||[],function(f){return null!=f.max&&f.max>0?f.min=0:null!=f.min&&f.min<0&&(f.max=0),f=s.merge(s.clone(f),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:r,axisLabel:o,name:f.text,nameLocation:"end",nameGap:d,nameTextStyle:u},!1),h||(f.name=""),"string"==typeof c?f.name=c.replace("{value}",f.name):"function"==typeof c&&(f.name=c(f.name,f)),s.extend(new a(f,null,this.ecModel),l)},this);this.getIndicatorModels=function(){return f}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:s.merge({lineStyle:{color:"#bbb"}},o.axisLine),axisLabel:n(o.axisLabel,!1),axisTick:n(o.axisTick,!1),splitLine:n(o.splitLine,!0),splitArea:n(o.splitArea,!0),indicator:[]}});t.exports=u},function(t,e,i){function n(t,e){return e.type||(e.data?"category":"value")}var r=i(10),o=i(52),a=i(1),s=r.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null}),l={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};a.merge(s.prototype,i(51)),o("single",s,n,l),t.exports=s},function(t,e,i){function n(t,e,i){this.dimension="x",this.dimensions=["x"],this._axis=null,this._rect,this._init(t,e,i),this._model=t}var r=i(374),o=i(21),a=i(14);n.prototype={type:"singleAxis",constructor:n,_init:function(t,e,i){var n=this.dimension,a=new r(n,o.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),s="category"===a.type;a.onBand=s&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,this._axis=a},update:function(t,e){this._updateAxisFromSeries(t)},_updateAxisFromSeries:function(t){t.eachSeries(function(t){var e=t.getData(),i=this.dimension;this._axis.scale.unionExtent(e.getDataExtent(t.coordDimToDataDim(i))),o.niceScaleExtent(this._axis,this._axis.model)},this)},resize:function(t,e){this._rect=a.getLayoutRect({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setExtent(n[r],n[1-r]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},containPoint:function(t){var e=this.getRect(),i=this.getAxis(),n=i.orient;return"horizontal"===n?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],r="horizontal"===e.orient?0:1;return n[r]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-r]=0===r?i.y+i.height/2:i.x+i.width/2, +n}},t.exports=n},function(t,e,i){var n=i(1),r=i(42),o=i(21),a=function(t,e,i,n,o){r.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null,this._labelInterval=null};a.prototype={constructor:a,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,i=e.getModel("axisLabel"),r=i.get("interval");if("category"!==this.type||"auto"!==r)return t=this._labelInterval="auto"===r?0:r;t=this._labelInterval=o.getAxisLabelInterval(n.map(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),i.getModel("textStyle").getFont(),this.isHorizontal())}return t},toGlobalCoord:null,toLocalCoord:null},n.inherits(a,r),t.exports=a},function(t,e,i){function n(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new r(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=e.get("singleAxisIndex")||0,n=t.getComponent("singleAxis",i);e.coordinateSystem=n.coordinateSystem}}),i}var r=i(373);i(23).register("single",{create:n,dimensions:r.prototype.dimensions})},function(t,e,i){"use strict";function n(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function r(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}var o=i(1),a=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=a.prototype;s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[t]){var r=new n(t,e);return r.hostGraph=this,this.nodes.push(r),i[t]=r,r}},s.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},s.getNodeById=function(t){return this._nodesMap[t]},s.addEdge=function(t,e,i){var o=this._nodesMap,a=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),t instanceof n||(t=o[t]),e instanceof n||(e=o[e]),t&&e){var s=t.id+"-"+e.id;if(!a[s]){var l=new r(t,e,i);return l.hostGraph=this,this._directed&&(t.outEdges.push(l),e.inEdges.push(l)),t.edges.push(l),t!==e&&e.edges.push(l),this.edges.push(l),a[s]=l,l}}},s.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},s.getEdge=function(t,e){t instanceof n&&(t=t.id),e instanceof n&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},s.eachNode=function(t,e){for(var i=this.nodes,n=i.length,r=0;n>r;r++)i[r].dataIndex>=0&&t.call(e,i[r],r)},s.eachEdge=function(t,e){for(var i=this.edges,n=i.length,r=0;n>r;r++)i[r].dataIndex>=0&&i[r].node1.dataIndex>=0&&i[r].node2.dataIndex>=0&&t.call(e,i[r],r)},s.breadthFirstTraverse=function(t,e,i,r){if(e instanceof n||(e=this._nodesMap[e]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;ar;r++)i[r].dataIndex=-1;for(var r=0,o=t.count();o>r;r++)i[t.getRawIndex(r)].dataIndex=r;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var r=0,o=n.length;o>r;r++)n[r].dataIndex=-1;for(var r=0,o=e.count();o>r;r++)n[e.getRawIndex(r)].dataIndex=r},s.clone=function(){for(var t=new a(this._directed),e=this.nodes,i=this.edges,n=0;n=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};o.mixin(n,l("hostGraph","data")),o.mixin(r,l("hostGraph","edgeData")),a.Node=n,a.Edge=r,t.exports=a},function(t,e,i){function n(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=o.map(e||[],function(e){return new a(e,t,t.ecModel)})}function r(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}var o=i(1),a=i(9),s=i(13),l=i(238),u=i(30),h=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};h.prototype={constructor:h,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},o.isString(t)&&(t={order:t});var n,r=t.order||"preorder",a=this[t.attr||"children"];"preorder"===r&&(n=e.call(i,this));for(var s=0;!n&&se&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].getNodeById(t);if(r)return r}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].contains(t);if(r)return r}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,i=e.data.getItemModel(this.dataIndex),n=this.getLevelModel();return i.getModel(t,(n||e.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)}},n.prototype={constructor:n,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},n.createTree=function(t,e,i){function o(t,e){c.push(t);var i=new h(t.name,a);e?r(i,e):a.root=i,a._nodes.push(i);var n=t.children;if(n)for(var s=0;so;o++){var s=e[o];s.el.animateTo(s.target,s.time,s.delay,s.easing,n)}return this}}}var r=i(1);t.exports={createWrap:n}},function(t,e,i){function n(){function t(e,n){if(n>=i.length)return e;for(var o=-1,a=e.length,s=i[n++],l={},u={};++o=i.length)return t;var a=[],s=n[o++];return r.each(t,function(t,i){a.push({key:i,values:e(t,o)})}),s?a.sort(function(t,e){return s(t.key,e.key)}):a}var i=[],n=[];return{key:function(t){return i.push(t),this},sortKeys:function(t){return n[i.length-1]=t,this},entries:function(i){return e(t(i,0),0)}}}var r=i(1);t.exports=n},function(t,e,i){var n=i(1),r={get:function(t,e,i){var r=n.clone((o[t]||{})[e]);return i&&n.isArray(r)?r[r.length-1]:r}},o={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};t.exports=r}])}); \ No newline at end of file diff --git a/dist/echarts.simple.js b/dist/echarts.simple.js index 0bce8eab87..c1c2bbd248 100644 --- a/dist/echarts.simple.js +++ b/dist/echarts.simple.js @@ -135,10 +135,7 @@ return /******/ (function(modules) { // webpackBootstrap // This flag is used to carry out this rule. // All events will be triggered out side main process (i.e. when !this[IN_MAIN_PROCESS]). var IN_MAIN_PROCESS = '__flag_in_main_process'; - // Only final events can be "program triggered", that is, trigger by `setOption`, - // `dispatchAciton` or `resize`. This flag is used to avoid dead lock when calling - // those method in final events listener. - var IN_FINAL_EVENTS = '__flag_in_final_event'; + var HAS_GRADIENT_OR_PATTERN_BG = '_hasGradientOrPatternBg'; function createRegisterEventWithLowercaseName(method) { return function (eventName, handler, context) { @@ -233,11 +230,6 @@ return /******/ (function(modules) { // webpackBootstrap */ this._coordSysMgr = new CoordinateSystemManager(); - /** - * @type {Array.} - */ - this._finalEvents = []; - Eventful.call(this); /** @@ -252,7 +244,8 @@ return /******/ (function(modules) { // webpackBootstrap // In case some people write `window.onresize = chart.resize` this.resize = zrUtil.bind(this.resize, this); - + // Can't dispatch action during rendering procedure + this._pendingActions = []; // Sort on demand function prioritySortFunc(a, b) { return a.prio - b.prio; @@ -287,9 +280,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.assert(!this[IN_MAIN_PROCESS], '`setOption` should not be called during main process.'); } - this[IN_MAIN_PROCESS] = 1; - - this._finalEvents = []; + this[IN_MAIN_PROCESS] = true; if (!this._model || notMerge) { this._model = new GlobalModel( @@ -301,11 +292,11 @@ return /******/ (function(modules) { // webpackBootstrap updateMethods.prepareAndUpdate.call(this); - !notRefreshImmediately && this._zr.refreshImmediately(); + this[IN_MAIN_PROCESS] = false; - this[IN_MAIN_PROCESS] = 0; + this._flushPendingActions(); - triggerFinalEvents.call(this); + !notRefreshImmediately && this._zr.refreshImmediately(); }; /** @@ -474,6 +465,7 @@ return /******/ (function(modules) { // webpackBootstrap var updateMethods = { + /** * @param {Object} payload * @private @@ -484,6 +476,7 @@ return /******/ (function(modules) { // webpackBootstrap var ecModel = this._model; var api = this._api; var coordSysMgr = this._coordSysMgr; + var zr = this._zr; // update before setOption if (!ecModel) { return; @@ -513,10 +506,10 @@ return /******/ (function(modules) { // webpackBootstrap // Set background var backgroundColor = ecModel.get('backgroundColor') || 'transparent'; - var painter = this._zr.painter; + var painter = zr.painter; // TODO all use clearColor ? if (painter.isSingleCanvas && painter.isSingleCanvas()) { - this._zr.configLayer(0, { + zr.configLayer(0, { clearColor: backgroundColor }); } @@ -529,8 +522,26 @@ return /******/ (function(modules) { // webpackBootstrap backgroundColor = 'transparent'; } } - backgroundColor = backgroundColor; - this._dom.style.backgroundColor = backgroundColor; + if (backgroundColor.colorStops || backgroundColor.image) { + // Gradient background + // FIXME Fixed layer? + zr.configLayer(0, { + clearColor: backgroundColor + }); + this[HAS_GRADIENT_OR_PATTERN_BG] = true; + + this._dom.style.background = 'transparent'; + } + else { + if (this[HAS_GRADIENT_OR_PATTERN_BG]) { + zr.configLayer(0, { + clearColor: null + }); + } + this[HAS_GRADIENT_OR_PATTERN_BG] = false; + + this._dom.style.background = backgroundColor; + } } // console.time && console.timeEnd('update'); @@ -661,9 +672,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.assert(!this[IN_MAIN_PROCESS], '`resize` should not be called during main process.'); } - this[IN_MAIN_PROCESS] = 1; - - this._finalEvents = []; + this[IN_MAIN_PROCESS] = true; this._zr.resize(); @@ -673,9 +682,9 @@ return /******/ (function(modules) { // webpackBootstrap // Resize loading effect this._loadingFX && this._loadingFX.resize(); - this[IN_MAIN_PROCESS] = 0; + this[IN_MAIN_PROCESS] = false; - triggerFinalEvents.call(this); + this._flushPendingActions(); }; var defaultLoadingEffect = __webpack_require__(92); @@ -715,16 +724,6 @@ return /******/ (function(modules) { // webpackBootstrap return payload; }; - function triggerFinalEvents() { - if (!this[IN_FINAL_EVENTS]) { // Avoid dead lock. - this[IN_FINAL_EVENTS] = 1; - each(this._finalEvents, function (eventObj) { - this.trigger(eventObj.type, eventObj); - }, this); - this[IN_FINAL_EVENTS] = 0; - } - } - /** * @pubilc * @param {Object} payload @@ -740,20 +739,22 @@ return /******/ (function(modules) { // webpackBootstrap var actionInfo = actionWrap.actionInfo; var updateMethod = actionInfo.update || 'update'; - if (true) { - zrUtil.assert( - updateMethod === 'none' || !this[IN_MAIN_PROCESS], - '`dispatchAction` should not be called during main process.' - + 'unless updateMathod is "none".' - ); - } + // if (__DEV__) { + // zrUtil.assert( + // !this[IN_MAIN_PROCESS], + // '`dispatchAction` should not be called during main process.' + // + 'unless updateMathod is "none".' + // ); + // } - var isFinalEvent = updateMethod === 'none' && this[IN_MAIN_PROCESS]; - if (!isFinalEvent) { - this[IN_MAIN_PROCESS] = 1; - this._finalEvents = []; + // May dispatchAction in rendering procedure + if (this[IN_MAIN_PROCESS]) { + this._pendingActions.push(payload); + return; } + this[IN_MAIN_PROCESS] = true; + var payloads = [payload]; var batched = false; // Batch action @@ -797,15 +798,19 @@ return /******/ (function(modules) { // webpackBootstrap eventObj = eventObjBatch[0]; } - if (!isFinalEvent) { - this[IN_MAIN_PROCESS] = 0; - if (!silent) { - this._messageCenter.trigger(eventObj.type, eventObj); - triggerFinalEvents.call(this); - } - } - else { - this._finalEvents.push(eventObj); + this[IN_MAIN_PROCESS] = false; + + !silent && this._messageCenter.trigger(eventObj.type, eventObj); + + this._flushPendingActions(); + + }; + + echartsProto._flushPendingActions = function () { + var pendingActions = this._pendingActions; + while (pendingActions.length) { + var payload = pendingActions.shift(); + this.dispatchAction(payload); } }; @@ -838,8 +843,12 @@ return /******/ (function(modules) { // webpackBootstrap chart[methodName](seriesModel, ecModel, api, payload); updateZ(seriesModel, chart); + + updateProgressiveAndBlend(seriesModel, chart); }, this); + // If use hover layer + updateHoverLayerStatus(this._zr, ecModel); } /** @@ -988,7 +997,6 @@ return /******/ (function(modules) { // webpackBootstrap chart.__alive = false; }, this); - var elCountAll = 0; // Render all charts ecModel.eachSeries(function (seriesModel, idx) { var chartView = this._chartsMap[seriesModel.__viewId]; @@ -999,39 +1007,13 @@ return /******/ (function(modules) { // webpackBootstrap updateZ(seriesModel, chartView); - // Progressive configuration - var elCount = 0; - chartView.group.traverse(function (el) { - if (el.type !== 'group' && !el.ignore) { - elCount++; - } - }); - elCountAll += elCount; - - var frameDrawNum = +seriesModel.get('progressive'); - var needProgressive = elCount > seriesModel.get('progressiveThreshold') && frameDrawNum && !env.node; - if (needProgressive) { - chartView.group.traverse(function (el) { - // FIXME marker and other components - if (el.type !== 'group') { - el.progressive = needProgressive ? - Math.floor(elCount++ / frameDrawNum) : -1; - if (needProgressive) { - el.stopAnimation(true); - } - } - }); - } + updateProgressiveAndBlend(seriesModel, chartView); + }, this); // If use hover layer - if (elCountAll > ecModel.get('hoverLayerThreshold') && !env.node) { - this._zr.storage.traverse(function (el) { - if (el.type !== 'group') { - el.useHoverLayer = true; - } - }); - } + updateHoverLayerStatus(this._zr, ecModel); + // Remove groups of unrendered charts each(this._chartsViews, function (chart) { if (!chart.__alive) { @@ -1115,10 +1097,67 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.mixin(ECharts, Eventful); + function updateHoverLayerStatus(zr, ecModel) { + var storage = zr.storage; + var elCount = 0; + storage.traverse(function (el) { + if (!el.isGroup) { + elCount++; + } + }); + if (elCount > ecModel.get('hoverLayerThreshold') && !env.node) { + storage.traverse(function (el) { + if (!el.isGroup) { + el.useHoverLayer = true; + } + }); + } + } + /** + * Update chart progressive and blend. + * @param {module:echarts/model/Series|module:echarts/model/Component} model + * @param {module:echarts/view/Component|module:echarts/view/Chart} view + */ + function updateProgressiveAndBlend(seriesModel, chartView) { + // Progressive configuration + var elCount = 0; + chartView.group.traverse(function (el) { + if (el.type !== 'group' && !el.ignore) { + elCount++; + } + }); + var frameDrawNum = +seriesModel.get('progressive'); + var needProgressive = elCount > seriesModel.get('progressiveThreshold') && frameDrawNum && !env.node; + if (needProgressive) { + chartView.group.traverse(function (el) { + // FIXME marker and other components + if (!el.isGroup) { + el.progressive = needProgressive ? + Math.floor(elCount++ / frameDrawNum) : -1; + if (needProgressive) { + el.stopAnimation(true); + } + } + }); + } + + // Blend configration + var blendMode = seriesModel.get('blendMode') || null; + if (true) { + if (!env.canvasSupported && blendMode && blendMode !== 'source-over') { + console.warn('Only canvas support blendMode'); + } + } + chartView.group.traverse(function (el) { + // FIXME marker and other components + if (!el.isGroup) { + el.setStyle('blend', blendMode); + } + }); + } /** * @param {module:echarts/model/Series|module:echarts/model/Component} model * @param {module:echarts/view/Component|module:echarts/view/Chart} view - * @return {string} */ function updateZ(model, view) { var z = model.get('z'); @@ -1182,9 +1221,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * @type {number} */ - version: '3.1.10', + version: '3.2.0', dependencies: { - zrender: '3.1.0' + zrender: '3.1.1' } }; @@ -1494,9 +1533,7 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.createCanvas = creator; }; - echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, zrUtil.curry( - __webpack_require__(93), '', 'itemStyle' - )); + echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, __webpack_require__(93)); echarts.registerPreprocessor(__webpack_require__(94)); // Default action @@ -2946,6 +2983,7 @@ return /******/ (function(modules) { // webpackBootstrap var formatUtil = __webpack_require__(6); var nubmerUtil = __webpack_require__(7); + var Model = __webpack_require__(8); var zrUtil = __webpack_require__(4); var AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle']; @@ -3137,7 +3175,10 @@ return /******/ (function(modules) { // webpackBootstrap * @param {string|number|Date|Array|Object} dataItem */ modelUtil.isDataItemOption = function (dataItem) { - return zrUtil.isObject(dataItem) && !(dataItem instanceof Array); + return zrUtil.isObject(dataItem) + && !(dataItem instanceof Array); + // // markLine data can be array + // && !(dataItem[0] && zrUtil.isObject(dataItem[0]) && !(dataItem[0] instanceof Array)); }; /** @@ -3163,6 +3204,30 @@ return /******/ (function(modules) { // webpackBootstrap ? NaN : +value; // If string (like '-'), using '+' parse to NaN }; + /** + * Create a model proxy to be used in tooltip for edge data, markLine data, markPoint data. + * @param {module:echarts/data/List} data + * @param {Object} opt + * @param {string} [opt.seriesIndex] + * @param {Object} [opt.name] + * @param {Object} [opt.mainType] + * @param {Object} [opt.subType] + */ + modelUtil.createDataFormatModel = function (data, opt) { + var model = new Model(); + zrUtil.mixin(model, modelUtil.dataFormatMixin); + model.seriesIndex = opt.seriesIndex; + model.name = opt.name || ''; + model.mainType = opt.mainType; + model.subType = opt.subType; + + model.getData = function () { + return data; + }; + return model; + }; + + // PENDING A little ugly modelUtil.dataFormatMixin = { /** * Get params for formatter @@ -3343,6 +3408,33 @@ return /******/ (function(modules) { // webpackBootstrap && (cptOption.id + '').indexOf('\0_ec_\0') === 0; }; + /** + * Truncate text, if overflow. + * If not ASCII, count as tow ASCII length. + * Notice case: truncate('是', 1) => '是', not ''. + * + * @public + * @param {string} str + * @param {number} length Over the length, truncate. + * @param {string} [ellipsis='...'] + * @return {string} Result string. + */ + modelUtil.truncate = function (str, length, ellipsis) { + if (!str) { + return str; + } + + var count = 0; + for(var i = 0, l = str.length; i < l && count < length; i++) { + count += str.charCodeAt(i) > 255 ? 2 : 1; + } + if (i < l) { + str = str.slice(0, i) + (ellipsis || ''); + } + + return str; + }; + /** * A helper for removing duplicate items between batchA and batchB, * and in themselves, and categorize by series. @@ -3390,7 +3482,7 @@ return /******/ (function(modules) { // webpackBootstrap var dataIndices = mapToArray(map[i], true); dataIndices.length && result.push({seriesId: i, dataIndex: dataIndices}); } - }; + } } return result; } @@ -4763,8 +4855,14 @@ return /******/ (function(modules) { // webpackBootstrap */ create: function (x, y) { var out = new ArrayCtor(2); - out[0] = x || 0; - out[1] = y || 0; + if (x == null) { + x = 0; + } + if (y == null) { + y = 0; + } + out[0] = x; + out[1] = y; return out; }, @@ -6041,6 +6139,12 @@ return /******/ (function(modules) { // webpackBootstrap fontStyle: 'normal', fontWeight: 'normal' }, + + // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/ + // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + // Default is source-over + blendMode: null, + animation: true, animationDuration: 1000, animationDurationUpdate: 300, @@ -6048,7 +6152,7 @@ return /******/ (function(modules) { // webpackBootstrap animationEasingUpdate: 'cubicOut', animationThreshold: 2000, - // Progressive configuration + // Configuration for progressive/incremental rendering progressiveThreshold: 3000, progressive: 400, @@ -6101,7 +6205,7 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); var echartsAPIList = [ - 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction', + 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption' ]; @@ -6121,7 +6225,6 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - // var zrUtil = require('zrender/lib/core/util'); var coordinateSystemCreators = {}; function CoordinateSystemManager() { @@ -6315,7 +6418,7 @@ return /******/ (function(modules) { // webpackBootstrap var oldOptionBackup = this._optionBackup; var newParsedOption = parseRawOption.call( - this, rawOption, optionPreprocessorFuncs + this, rawOption, optionPreprocessorFuncs, !oldOptionBackup ); this._newBaseOption = newParsedOption.baseOption; @@ -6435,7 +6538,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - function parseRawOption(rawOption, optionPreprocessorFuncs) { + function parseRawOption(rawOption, optionPreprocessorFuncs, isNew) { var timelineOptions = []; var mediaList = []; var mediaDefault; @@ -6489,7 +6592,7 @@ return /******/ (function(modules) { // webpackBootstrap })), function (option) { each(optionPreprocessorFuncs, function (preProcess) { - preProcess(option); + preProcess(option, isNew); }); } ); @@ -6645,6 +6748,11 @@ return /******/ (function(modules) { // webpackBootstrap // PENDING legendDataProvider: null, + /** + * Access path of color for visual + */ + visualColorAccessPath: 'itemStyle.normal.color', + init: function (option, parentModel, ecModel, extraOpt) { /** @@ -7496,17 +7604,17 @@ return /******/ (function(modules) { // webpackBootstrap */ - var idStart = 0x0907; + var idStart = 0x0907; + + module.exports = function () { + return idStart++; + }; - module.exports = function () { - return 'zr_' + (idStart++); - }; - /***/ }, /* 33 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { /** * 事件扩展 @@ -7517,8 +7625,6 @@ return /******/ (function(modules) { // webpackBootstrap var arrySlice = Array.prototype.slice; - var zrUtil = __webpack_require__(4); - var indexOf = zrUtil.indexOf; /** * 事件分发器 @@ -7551,8 +7657,10 @@ return /******/ (function(modules) { // webpackBootstrap _h[event] = []; } - if (indexOf(_h[event], event) >= 0) { - return this; + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return this; + } } _h[event].push({ @@ -7581,6 +7689,12 @@ return /******/ (function(modules) { // webpackBootstrap _h[event] = []; } + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return this; + } + } + _h[event].push({ h: handler, one: false, @@ -8646,12 +8760,14 @@ return /******/ (function(modules) { // webpackBootstrap var frame; if (percent < lastFramePercent) { // Start from next key + // PENDING start from lastFrame ? start = Math.min(lastFrame + 1, trackLen - 1); for (frame = start; frame >= 0; frame--) { if (kfPercents[frame] <= percent) { break; } } + // PENDING really need to do this ? frame = Math.min(frame, trackLen - 2); } else { @@ -10619,6 +10735,52 @@ return /******/ (function(modules) { // webpackBootstrap : (vertex[1] > 0 ? 'bottom' : 'top'); }; + /** + * Apply group transition animation from g1 to g2 + */ + graphic.groupTransition = function (g1, g2, animatableModel, cb) { + if (!g1 || !g2) { + return; + } + + function getElMap(g) { + var elMap = {}; + g.traverse(function (el) { + if (!el.isGroup && el.anid) { + elMap[el.anid] = el; + } + }); + return elMap; + } + function getAnimatableProps(el) { + var obj = { + position: vector.clone(el.position), + rotation: el.rotation + }; + if (el.shape) { + obj.shape = zrUtil.extend({}, el.shape); + } + return obj; + } + var elMap1 = getElMap(g1); + + g2.traverse(function (el) { + if (!el.isGroup && el.anid) { + var oldEl = elMap1[el.anid]; + if (oldEl) { + var newProp = getAnimatableProps(el); + el.attr(getAnimatableProps(oldEl)); + graphic.updateProps(el, newProp, animatableModel, el.dataIndex); + } + // else { + // if (el.previousProps) { + // graphic.updateProps + // } + // } + } + }); + }; + module.exports = graphic; @@ -11687,6 +11849,45 @@ return /******/ (function(modules) { // webpackBootstrap this.extendFrom(opts); }; + function createLinearGradient(ctx, obj, rect) { + // var size = + var x = obj.x; + var x2 = obj.x2; + var y = obj.y; + var y2 = obj.y2; + + if (!obj.global) { + x = x * rect.width + rect.x; + x2 = x2 * rect.width + rect.x; + y = y * rect.height + rect.y; + y2 = y2 * rect.height + rect.y; + } + + var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); + + return canvasGradient; + } + + function createRadialGradient(ctx, obj, rect) { + var width = rect.width; + var height = rect.height; + var min = Math.min(width, height); + + var x = obj.x; + var y = obj.y; + var r = obj.r; + if (!obj.global) { + x = x * width + rect.x; + y = y * height + rect.y; + r = r * min; + } + + var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); + + return canvasGradient; + } + + Style.prototype = { constructor: Style, @@ -11802,6 +12003,12 @@ return /******/ (function(modules) { // webpackBootstrap */ textShadowOffsetY: 0, + /** + * @type {string} + * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + */ + blend: null, + /** * @param {CanvasRenderingContext2D} ctx */ @@ -11829,6 +12036,10 @@ return /******/ (function(modules) { // webpackBootstrap if ((firstDraw || style.opacity !== prevStyle.opacity)) { ctx.globalAlpha = style.opacity == null ? 1 : style.opacity; } + + if ((firstDraw || style.blend !== prevStyle.blend)) { + ctx.globalCompositeOperation = style.blend || 'source-over'; + } if (this.hasStroke()) { var lineWidth = style.lineWidth; ctx.lineWidth = lineWidth / ( @@ -11889,35 +12100,9 @@ return /******/ (function(modules) { // webpackBootstrap return newStyle; }, - createLinearGradient: function (ctx, obj, rect) { - // var size = - var x = obj.x * rect.width + rect.x; - var x2 = obj.x2 * rect.width + rect.x; - var y = obj.y * rect.height + rect.y; - var y2 = obj.y2 * rect.height + rect.y; - - var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); - - return canvasGradient; - }, - - createRadialGradient: function (ctx, obj, rect) { - var width = rect.width; - var height = rect.height; - var min = Math.min(width, height); - - var x = obj.x * width + rect.x; - var y = obj.y * height + rect.y; - var r = obj.r * min; - - var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); - - return canvasGradient; - }, - getGradient: function (ctx, obj, rect) { - var method = obj.type === 'radial' ? 'createRadialGradient' : 'createLinearGradient'; - var canvasGradient = this[method](ctx, obj, rect); + var method = obj.type === 'radial' ? createRadialGradient : createLinearGradient; + var canvasGradient = method(ctx, obj, rect); var colorStops = obj.colorStops; for (var i = 0; i < colorStops.length; i++) { canvasGradient.addColorStop( @@ -11936,6 +12121,9 @@ return /******/ (function(modules) { // webpackBootstrap } } + // Provide for others + Style.getGradient = styleProto.getGradient; + module.exports = Style; @@ -12507,14 +12695,15 @@ return /******/ (function(modules) { // webpackBootstrap x -= offset * dx; y -= offset * dy; - while ((dx >= 0 && x <= x1) || (dx < 0 && x > x1)) { + while ((dx > 0 && x <= x1) || (dx < 0 && x >= x1) + || (dx == 0 && ((dy > 0 && y <= y1) || (dy < 0 && y >= y1)))) { idx = this._dashIdx; dash = lineDash[idx]; x += dx * dash; y += dy * dash; this._dashIdx = (idx + 1) % nDash; // Skip positive offset - if ((dx > 0 && x < x0) || (dx < 0 && x > x0)) { + if ((dx > 0 && x < x0) || (dx < 0 && x > x0) || (dy > 0 && y < y0) || (dy < 0 && y > y0)) { continue; } ctx[idx % 2 ? 'moveTo' : 'lineTo']( @@ -14483,7 +14672,7 @@ return /******/ (function(modules) { // webpackBootstrap var image; // Must bind each time - style.bind(ctx, prevEl); + style.bind(ctx, this, prevEl); // style.image is a url string if (typeof src === 'string') { @@ -14929,7 +15118,7 @@ return /******/ (function(modules) { // webpackBootstrap text != null && (text += ''); // Always bind style - style.bind(ctx, prevEl); + style.bind(ctx, this, prevEl); if (text) { @@ -15830,8 +16019,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [x2=1] * @param {number} [y2=0] * @param {Array.} colorStops + * @param {boolean} [globalCoord=false] */ - var LinearGradient = function (x, y, x2, y2, colorStops) { + var LinearGradient = function (x, y, x2, y2, colorStops, globalCoord) { this.x = x == null ? 0 : x; this.y = y == null ? 0 : y; @@ -15843,6 +16033,9 @@ return /******/ (function(modules) { // webpackBootstrap // Can be cloned this.type = 'linear'; + // If use global coord + this.global = globalCoord || false; + Gradient.call(this, colorStops); }; @@ -15873,8 +16066,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [y=0.5] * @param {number} [r=0.5] * @param {Array.} [colorStops] + * @param {boolean} [globalCoord=false] */ - var RadialGradient = function (x, y, r, colorStops) { + var RadialGradient = function (x, y, r, colorStops, globalCoord) { this.x = x == null ? 0.5 : x; this.y = y == null ? 0.5 : y; @@ -15884,6 +16078,9 @@ return /******/ (function(modules) { // webpackBootstrap // Can be cloned this.type = 'radial'; + // If use global coord + this.global = globalCoord || false; + Gradient.call(this, colorStops); }; @@ -15931,7 +16128,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * @type {string} */ - zrender.version = '3.1.0'; + zrender.version = '3.1.1'; /** * Initializing a zrender instance @@ -16240,10 +16437,10 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set default cursor - * @param {string} cursorStyle 例如 crosshair + * @param {string} [cursorStyle='default'] 例如 crosshair */ - setDefaultCursorStyle: function (cursorStyle) { - this.handler && this.handler.setDefaultCursorStyle(cursorStyle); + setCursorStyle: function (cursorStyle) { + this.handler && this.handler.setCursorStyle(cursorStyle); }, /** @@ -16385,7 +16582,7 @@ return /******/ (function(modules) { // webpackBootstrap this._hovered = hovered; - this.root.style.cursor = hovered ? hovered.cursor : this._defaultCursorStyle; + this.root.style.cursor = hovered ? hovered.cursor : 'default'; // Mouse out on previous hovered element if (lastHovered && hovered !== lastHovered && lastHovered.__zr) { this._dispatchProxy(lastHovered, 'mouseout', event); @@ -16617,12 +16814,6 @@ return /******/ (function(modules) { // webpackBootstrap */ this._lastY; - /** - * @private - * @type {string} - */ - this._defaultCursorStyle = 'default'; - /** * @private * @type {module:zrender/core/GestureMgr} @@ -16714,10 +16905,10 @@ return /******/ (function(modules) { // webpackBootstrap /** * 设置默认的cursor style - * @param {string} cursorStyle 例如 crosshair + * @param {string} [cursorStyle='default'] 例如 crosshair */ - setDefaultCursorStyle: function (cursorStyle) { - this._defaultCursorStyle = cursorStyle; + setCursorStyle: function (cursorStyle) { + this.root.style.cursor = cursorStyle || 'default'; }, /** @@ -17194,6 +17385,7 @@ return /******/ (function(modules) { // webpackBootstrap // if (a.z2 === b.z2) { // // FIXME Slow has renderidx compare // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement + // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012 // return a.__renderidx - b.__renderidx; // } return a.z2 - b.z2; @@ -18804,6 +18996,15 @@ return /******/ (function(modules) { // webpackBootstrap var el = list[i]; var elZLevel = this._singleCanvas ? 0 : el.zlevel; + var elFrame = el.__frame; + + // Flush at current context + // PENDING + if (elFrame < 0 && currentProgressiveLayer) { + flushProgressiveLayer(currentProgressiveLayer); + currentProgressiveLayer = null; + } + // Change draw layer if (currentZLevel !== elZLevel) { if (ctx) { @@ -18835,8 +19036,6 @@ return /******/ (function(modules) { // webpackBootstrap } } - var elFrame = el.__frame; - if (!(currentLayer.__dirty || paintAll)) { continue; } @@ -18876,10 +19075,6 @@ return /******/ (function(modules) { // webpackBootstrap } } else { - if (currentProgressiveLayer) { - flushProgressiveLayer(currentProgressiveLayer); - currentProgressiveLayer = null; - } this._doPaintEl(el, currentLayer, paintAll, scope); } @@ -19431,6 +19626,8 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(4); var config = __webpack_require__(41); + var Style = __webpack_require__(47); + var Pattern = __webpack_require__(59); function returnFalse() { return false; @@ -19599,7 +19796,7 @@ return /******/ (function(modules) { // webpackBootstrap var width = dom.width; var height = dom.height; - var haveClearColor = this.clearColor; + var clearColor = this.clearColor; var haveMotionBLur = this.motionBlur && !clearAll; var lastFrameAlpha = this.lastFrameAlpha; @@ -19619,9 +19816,26 @@ return /******/ (function(modules) { // webpackBootstrap } ctx.clearRect(0, 0, width / dpr, height / dpr); - if (haveClearColor) { + if (clearColor) { + var clearColorGradientOrPattern; + // Gradient + if (clearColor.colorStops) { + // Cache canvas gradient + clearColorGradientOrPattern = clearColor.__canvasGradient || Style.getGradient(ctx, clearColor, { + x: 0, + y: 0, + width: width / dpr, + height: height / dpr + }); + + clearColor.__canvasGradient = clearColorGradientOrPattern; + } + // Pattern + else if (clearColor.image) { + clearColorGradientOrPattern = Pattern.prototype.getCanvasPattern.call(clearColor, ctx); + } ctx.save(); - ctx.fillStyle = this.clearColor; + ctx.fillStyle = clearColorGradientOrPattern || clearColor; ctx.fillRect(0, 0, width / dpr, height / dpr); ctx.restore(); } @@ -19748,9 +19962,9 @@ return /******/ (function(modules) { // webpackBootstrap var Gradient = __webpack_require__(61); - module.exports = function (seriesType, styleType, ecModel) { + module.exports = function (ecModel) { function encodeColor(seriesModel) { - var colorAccessPath = [styleType, 'normal', 'color']; + var colorAccessPath = (seriesModel.visualColorAccessPath || 'itemStyle.normal.color').split('.'); var data = seriesModel.getData(); var color = seriesModel.get(colorAccessPath) // Set in itemStyle || seriesModel.getColorFromPalette(seriesModel.get('name')); // Default color @@ -19778,8 +19992,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } } - seriesType ? ecModel.eachRawSeriesByType(seriesType, encodeColor) - : ecModel.eachRawSeries(encodeColor); + ecModel.eachRawSeries(encodeColor); }; @@ -20272,13 +20485,15 @@ return /******/ (function(modules) { // webpackBootstrap // Use the name in option and create id for (var i = 0; i < data.length; i++) { - var id = ''; if (!nameList[i]) { - nameList[i] = data[i].name; - // Try using the id in option - id = data[i].id; + if (data[i] && data[i].name != null) { + nameList[i] = data[i].name; + } } var name = nameList[i] || ''; + // Try using the id in option + var id = data[i] && data[i].id; + if (!id && name) { // Use name as id and add counter to avoid same name nameRepeatCount[name] = nameRepeatCount[name] || 0; @@ -20390,6 +20605,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {boolean} stack */ listProto.getDataExtent = function (dim, stack) { + dim = this.getDimension(dim); var dimData = this._storage[dim]; var dimInfo = this.getDimensionInfo(dim); stack = (dimInfo && dimInfo.stackable) && stack; @@ -20481,6 +20697,32 @@ return /******/ (function(modules) { // webpackBootstrap return -1; }; + /** + * Retreive the index with given raw data index + * @param {number} idx + * @param {number} name + * @return {number} + */ + listProto.indexOfRawIndex = function (rawIndex) { + // Indices are ascending + var indices = this.indices; + var left = 0; + var right = indices.length - 1; + while (left <= right) { + var mid = (left + right) / 2 | 0; + if (indices[mid] < rawIndex) { + left = mid + 1; + } + else if (indices[mid] > rawIndex) { + right = mid - 1; + } + else { + return mid; + } + } + return -1; + }; + /** * Retreive the index of nearest value * @param {string} dim @@ -21359,24 +21601,21 @@ return /******/ (function(modules) { // webpackBootstrap var creator = creators[coordSysName]; var registeredCoordSys = CoordinateSystem.get(coordSysName); // FIXME - var result = creator && creator(data, seriesModel, ecModel); - var dimensions = result && result.dimensions; + var axesInfo = creator && creator(data, seriesModel, ecModel); + var dimensions = axesInfo && axesInfo.dimensions; if (!dimensions) { // Get dimensions from registered coordinate system dimensions = (registeredCoordSys && registeredCoordSys.dimensions) || ['x', 'y']; dimensions = completeDimensions(dimensions, data, dimensions.concat(['value'])); } - var categoryAxisModel = result && result.categoryAxisModel; - var categories; - - var categoryDimIndex = dimensions[0].type === 'ordinal' - ? 0 : (dimensions[1].type === 'ordinal' ? 1 : -1); + var categoryIndex = axesInfo ? axesInfo.categoryIndex : -1; var list = new List(dimensions, seriesModel); - var nameList = createNameList(result, data); + var nameList = createNameList(axesInfo, data); - var dimValueGetter = (categoryAxisModel && ifNeedCompleteOrdinalData(data)) + var categories = {}; + var dimValueGetter = (categoryIndex >= 0 && ifNeedCompleteOrdinalData(data)) ? function (itemOpt, dimName, dataIndex, dimIndex) { // If any dataItem is like { value: 10 } if (modelUtil.isDataItemOption(itemOpt)) { @@ -21384,7 +21623,7 @@ return /******/ (function(modules) { // webpackBootstrap } // Use dataIndex as ordinal value in categoryAxis - return dimIndex === categoryDimIndex + return dimIndex === categoryIndex ? dataIndex : converDataValue(getDataItemValue(itemOpt), dimensions[dimIndex]); } @@ -21396,12 +21635,14 @@ return /******/ (function(modules) { // webpackBootstrap list.hasItemOption = true; } - if (categoryDimIndex === dimIndex) { + var categoryAxesModels = axesInfo && axesInfo.categoryAxesModels; + if (categoryAxesModels && categoryAxesModels[dimName]) { // If given value is a category string if (typeof val === 'string') { // Lazy get categories - categories = categories || categoryAxisModel.getCategories(); - val = zrUtil.indexOf(categories, val); + categories[dimName] = categories[dimName] + || categoryAxesModels[dimName].getCategories(); + val = zrUtil.indexOf(categories[dimName], val); if (val < 0 && !isNaN(val)) { // In case some one write '1', '2' istead of 1, 2 val = +val; @@ -21431,7 +21672,6 @@ return /******/ (function(modules) { // webpackBootstrap /** * Creaters for each coord system. - * @return {Object} {dimensions, categoryAxisModel}; */ var creators = { @@ -21466,15 +21706,21 @@ return /******/ (function(modules) { // webpackBootstrap ]; var isXAxisCateogry = xAxisType === 'category'; + var isYAxisCategory = yAxisType === 'category'; completeDimensions(dimensions, data, ['x', 'y', 'z']); + var categoryAxesModels = {}; + if (isXAxisCateogry) { + categoryAxesModels.x = xAxisModel; + } + if (isYAxisCategory) { + categoryAxesModels.y = yAxisModel; + } return { dimensions: dimensions, - categoryIndex: isXAxisCateogry ? 0 : 1, - categoryAxisModel: isXAxisCateogry - ? xAxisModel - : (yAxisType === 'category' ? yAxisModel : null) + categoryIndex: isXAxisCateogry ? 0 : (isYAxisCategory ? 1 : -1), + categoryAxesModels: categoryAxesModels }; }, @@ -21517,15 +21763,21 @@ return /******/ (function(modules) { // webpackBootstrap } ]; var isAngleAxisCateogry = angleAxisType === 'category'; + var isRadiusAxisCateogry = radiusAxisType === 'category'; completeDimensions(dimensions, data, ['radius', 'angle', 'value']); + var categoryAxesModels = {}; + if (isRadiusAxisCateogry) { + categoryAxesModels.radius = radiusAxisModel; + } + if (isAngleAxisCateogry) { + categoryAxesModels.angle = angleAxisModel; + } return { dimensions: dimensions, - categoryIndex: isAngleAxisCateogry ? 1 : 0, - categoryAxisModel: isAngleAxisCateogry - ? angleAxisModel - : (radiusAxisType === 'category' ? radiusAxisModel : null) + categoryIndex: isAngleAxisCateogry ? 1 : (isRadiusAxisCateogry ? 0 : -1), + categoryAxesModels: categoryAxesModels }; }, @@ -21544,9 +21796,15 @@ return /******/ (function(modules) { // webpackBootstrap function createNameList(result, data) { var nameList = []; - if (result && result.categoryAxisModel) { + var categoryDim = result && result.dimensions[result.categoryIndex]; + var categoryAxisModel; + if (categoryDim) { + categoryAxisModel = result.categoryAxesModels[categoryDim.name]; + } + + if (categoryAxisModel) { // FIXME Two category axis - var categories = result.categoryAxisModel.getCategories(); + var categories = categoryAxisModel.getCategories(); if (categories) { var dataLen = data.length; // Ordered data is given explicitly like @@ -21859,6 +22117,93 @@ return /******/ (function(modules) { // webpackBootstrap return stepPoints; } + function clamp(number, extent) { + return Math.max(Math.min(number, extent[1]), extent[0]); + } + + function getVisualGradient(data, coordSys) { + var visualMetaList = data.getVisual('visualMeta'); + if (!visualMetaList || !visualMetaList.length) { + return; + } + + var visualMeta; + for (var i = visualMetaList.length - 1; i >= 0; i--) { + // Can only be x or y + if (visualMetaList[i].dimension < 2) { + visualMeta = visualMetaList[i]; + break; + } + } + if (!visualMeta || coordSys.type !== 'cartesian2d') { + if (true) { + console.warn('Visual map on line style only support x or y dimension.'); + } + return; + } + var dimension = visualMeta.dimension; + var dimName = data.dimensions[dimension]; + var dataExtent = data.getDataExtent(dimName); + + var stops = visualMeta.stops; + + var colorStops = []; + if (stops[0].interval) { + stops.sort(function (a, b) { + return a.interval[0] - b.interval[0]; + }); + } + + var firstStop = stops[0]; + var lastStop = stops[stops.length - 1]; + // Interval can be infinity in piecewise case + var min = firstStop.interval ? clamp(firstStop.interval[0], dataExtent) : firstStop.value; + var max = lastStop.interval ? clamp(lastStop.interval[1], dataExtent) : lastStop.value; + var stopsSpan = max - min; + for (var i = 0; i < stops.length; i++) { + // Piecewise + if (stops[i].interval) { + if (stops[i].interval[1] === stops[i].interval[0]) { + continue; + } + colorStops.push({ + // Make sure offset is between 0 and 1 + offset: (clamp(stops[i].interval[0], dataExtent) - min) / stopsSpan, + color: stops[i].color + }, { + offset: (clamp(stops[i].interval[1], dataExtent) - min) / stopsSpan, + color: stops[i].color + }); + } + // Continous + else { + // if (i > 0 && stops[i].value === stops[i - 1].value) { + // continue; + // } + colorStops.push({ + offset: (stops[i].value - min) / stopsSpan, + color: stops[i].color + }); + } + } + var gradient = new graphic.LinearGradient( + 0, 0, 0, 0, colorStops, true + ); + var axis = coordSys.getAxis(dimName); + + var start = Math.round(axis.toGlobalCoord(axis.dataToCoord(min))); + var end = Math.round(axis.toGlobalCoord(axis.dataToCoord(max))); + zrUtil.each(colorStops, function (colorStop) { + // Make sure each offset has rounded px to avoid not sharp edge + colorStop.offset = (Math.round(colorStop.offset * (end - start) + start) - start) / (end - start); + }); + + gradient[dimName] = start; + gradient[dimName + '2'] = end; + + return gradient; + } + module.exports = ChartView.extend({ type: 'line', @@ -21989,12 +22334,13 @@ return /******/ (function(modules) { // webpackBootstrap } } + var visualColor = getVisualGradient(data, coordSys) || data.getVisual('color'); polyline.useStyle(zrUtil.defaults( // Use color in lineStyle first lineStyleModel.getLineStyle(), { fill: 'none', - stroke: data.getVisual('color'), + stroke: visualColor, lineJoin: 'bevel' } )); @@ -22014,7 +22360,7 @@ return /******/ (function(modules) { // webpackBootstrap polygon.useStyle(zrUtil.defaults( areaStyleModel.getAreaStyle(), { - fill: data.getVisual('color'), + fill: visualColor, opacity: 0.7, lineJoin: 'bevel' } @@ -22045,7 +22391,7 @@ return /******/ (function(modules) { // webpackBootstrap var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload); - if (dataIndex != null && dataIndex >= 0) { + if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) { var symbol = data.getItemGraphicEl(dataIndex); if (!symbol) { // Create a temporary symbol if it is not exists @@ -23907,8 +24253,20 @@ return /******/ (function(modules) { // webpackBootstrap }; gridProto.getCartesian = function (xAxisIndex, yAxisIndex) { - var key = 'x' + xAxisIndex + 'y' + yAxisIndex; - return this._coordsMap[key]; + if (xAxisIndex != null && yAxisIndex != null) { + var key = 'x' + xAxisIndex + 'y' + yAxisIndex; + return this._coordsMap[key]; + } + else { + // When only xAxisIndex or yAxisIndex given, find its first cartesian. + for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) { + if (coordList[i].getAxis('x').index === xAxisIndex + || coordList[i].getAxis('y').index === yAxisIndex + ) { + return coordList[i]; + } + } + } }; /** @@ -24009,6 +24367,9 @@ return /******/ (function(modules) { // webpackBootstrap // Inject axisModel into axis axis.model = axisModel; + // Inject grid info axis + axis.grid = this; + // Index of axis, can be used as key axis.index = idx; @@ -24298,6 +24659,7 @@ return /******/ (function(modules) { // webpackBootstrap // Simple optimization for large amount of labels step = Math.floor(labels.length / 40); } + for (var i = 0; i < tickCoords.length; i += step) { var tickCoord = tickCoords[i]; var rect = textContain.getBoundingRect( @@ -24305,7 +24667,7 @@ return /******/ (function(modules) { // webpackBootstrap ); rect[isAxisHorizontal ? 'x' : 'y'] += tickCoord; // FIXME Magic number 1.5 - rect[isAxisHorizontal ? 'width' : 'height'] *= 1.5; + rect[isAxisHorizontal ? 'width' : 'height'] *= 1.3; if (!textSpaceTakenRect) { textSpaceTakenRect = rect.clone(); } @@ -24323,7 +24685,7 @@ return /******/ (function(modules) { // webpackBootstrap if (autoLabelInterval === 0 && step > 1) { return step; } - return autoLabelInterval * step; + return (autoLabelInterval + 1) * step - 1; }; /** @@ -25949,16 +26311,23 @@ return /******/ (function(modules) { // webpackBootstrap z: 0, // 二级层叠 // 反向坐标轴 inverse: false, + // 坐标轴名字,默认为空 name: '', // 坐标轴名字位置,支持'start' | 'middle' | 'end' nameLocation: 'end', + // 坐标轴名字旋转,degree。 + nameRotate: null, // Adapt to axis rotate, when nameLocation is 'middle'. + nameTruncateLength: null, // truncate text when characters more than the given number. + nameTruncateEllipsis: '...', // 坐标轴文字样式,默认取全局样式 nameTextStyle: {}, // 文字与轴线距离 nameGap: 15, + // 是否能触发鼠标事件 silent: true, + // 坐标轴线 axisLine: { // 默认显示,属性show控制显示与否 @@ -25981,7 +26350,6 @@ return /******/ (function(modules) { // webpackBootstrap length: 5, // 属性lineStyle控制线条样式 lineStyle: { - color: '#333', width: 1 } }, @@ -25995,7 +26363,6 @@ return /******/ (function(modules) { // webpackBootstrap // formatter: null, // 其余属性默认使用全局文本样式,详见TEXTSTYLE textStyle: { - color: '#333', fontSize: 12 } }, @@ -26158,6 +26525,11 @@ return /******/ (function(modules) { // webpackBootstrap this.group.removeAll(); + var oldAxisGroup = this._axisGroup; + this._axisGroup = new graphic.Group(); + + this.group.add(this._axisGroup); + if (!axisModel.get('show')) { return; } @@ -26170,13 +26542,15 @@ return /******/ (function(modules) { // webpackBootstrap zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder); - this.group.add(axisBuilder.getGroup()); + this._axisGroup.add(axisBuilder.getGroup()); zrUtil.each(selfBuilderAttrs, function (name) { - if (axisModel.get(name +'.show')) { + if (axisModel.get(name + '.show')) { this['_' + name](axisModel, gridModel, layout.labelInterval); } }, this); + + graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel); }, /** @@ -26190,7 +26564,6 @@ return /******/ (function(modules) { // webpackBootstrap var splitLineModel = axisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); - var lineWidth = lineStyleModel.get('width'); var lineColors = lineStyleModel.get('color'); var lineInterval = getInterval(splitLineModel, labelInterval); @@ -26200,13 +26573,16 @@ return /******/ (function(modules) { // webpackBootstrap var gridRect = gridModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); - var splitLines = []; var lineCount = 0; var ticksCoords = axis.getTicksCoords(); + var ticks = axis.scale.getTicks(); var p1 = []; var p2 = []; + // Simple optimization + // Batching the lines if color are the same + var lineStyle = lineStyleModel.getLineStyle(); for (var i = 0; i < ticksCoords.length; i++) { if (ifIgnoreOnTick(axis, i, lineInterval)) { continue; @@ -26228,31 +26604,20 @@ return /******/ (function(modules) { // webpackBootstrap } var colorIndex = (lineCount++) % lineColors.length; - splitLines[colorIndex] = splitLines[colorIndex] || []; - splitLines[colorIndex].push(new graphic.Line(graphic.subPixelOptimizeLine({ + this._axisGroup.add(new graphic.Line(graphic.subPixelOptimizeLine({ + anid: 'line_' + ticks[i], + shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, - style: { - lineWidth: lineWidth - }, - silent: true - }))); - } - - // Simple optimization - // Batching the lines if color are the same - var lineStyle = lineStyleModel.getLineStyle(); - for (var i = 0; i < splitLines.length; i++) { - this.group.add(graphic.mergePath(splitLines[i], { style: zrUtil.defaults({ - stroke: lineColors[i % lineColors.length] + stroke: lineColors[colorIndex] }, lineStyle), silent: true - })); + }))); } }, @@ -26271,15 +26636,16 @@ return /******/ (function(modules) { // webpackBootstrap var gridRect = gridModel.coordinateSystem.getRect(); var ticksCoords = axis.getTicksCoords(); + var ticks = axis.scale.getTicks(); var prevX = axis.toGlobalCoord(ticksCoords[0]); var prevY = axis.toGlobalCoord(ticksCoords[0]); - var splitAreaRects = []; var count = 0; var areaInterval = getInterval(splitAreaModel, labelInterval); + var areaStyle = areaStyleModel.getAreaStyle(); areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors]; for (var i = 1; i < ticksCoords.length; i++) { @@ -26307,32 +26673,24 @@ return /******/ (function(modules) { // webpackBootstrap } var colorIndex = (count++) % areaColors.length; - splitAreaRects[colorIndex] = splitAreaRects[colorIndex] || []; - splitAreaRects[colorIndex].push(new graphic.Rect({ + this._axisGroup.add(new graphic.Rect({ + anid: 'area_' + ticks[i], + shape: { x: x, y: y, width: width, height: height }, + style: zrUtil.defaults({ + fill: areaColors[colorIndex] + }, areaStyle), silent: true })); prevX = x + width; prevY = y + height; } - - // Simple optimization - // Batching the rects if color are the same - var areaStyle = areaStyleModel.getAreaStyle(); - for (var i = 0; i < splitAreaRects.length; i++) { - this.group.add(graphic.mergePath(splitAreaRects[i], { - style: zrUtil.defaults({ - fill: areaColors[i % areaColors.length] - }, areaStyle), - silent: true - })); - } } }); @@ -26378,8 +26736,7 @@ return /******/ (function(modules) { // webpackBootstrap ]; // Axis rotation - var r = {x: 0, y: 1}; - layout.rotation = Math.PI / 2 * r[axisDim]; + layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim var dirMap = {top: -1, bottom: 1, left: -1, right: 1}; @@ -26417,11 +26774,16 @@ return /******/ (function(modules) { // webpackBootstrap var zrUtil = __webpack_require__(4); + var modelUtil = __webpack_require__(5); var graphic = __webpack_require__(43); var Model = __webpack_require__(8); + var List = __webpack_require__(96); var numberUtil = __webpack_require__(7); var remRadian = numberUtil.remRadian; var isRadianAroundZero = numberUtil.isRadianAroundZero; + var vec2 = __webpack_require__(16); + var v2ApplyTransform = vec2.applyTransform; + var retrieve = zrUtil.retrieve; var PI = Math.PI; @@ -26464,7 +26826,10 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} [opt.tickDirection=1] 1 or -1 * @param {number} [opt.labelDirection=1] 1 or -1 * @param {number} [opt.labelOffset=0] Usefull when onZero. + * @param {string} [opt.axisLabelShow] default get from axisModel. * @param {string} [opt.axisName] default get from axisModel. + * @param {string} [opt.axisNameTruncateLength] default get from axisModel. + * @param {string} [opt.axisNameTruncateEllipsis] default get from axisModel. * @param {number} [opt.labelRotation] by degree, default get from axisModel. * @param {number} [opt.labelInterval] Default label interval when label * interval from model is null or 'auto'. @@ -26498,10 +26863,21 @@ return /******/ (function(modules) { // webpackBootstrap /** * @readOnly */ - this.group = new graphic.Group({ + this.group = new graphic.Group(); + + // FIXME Not use a seperate text group? + var dumbGroup = new graphic.Group({ position: opt.position.slice(), rotation: opt.rotation }); + + // this.group.add(dumbGroup); + // this._dumbGroup = dumbGroup; + + dumbGroup.updateTransform(); + this._transform = dumbGroup.transform; + + this._dumbGroup = dumbGroup; }; AxisBuilder.prototype = { @@ -26537,12 +26913,24 @@ return /******/ (function(modules) { // webpackBootstrap var extent = this.axisModel.axis.getExtent(); - this.group.add(new graphic.Line({ + var matrix = this._transform; + var pt1 = [extent[0], 0]; + var pt2 = [extent[1], 0]; + if (matrix) { + v2ApplyTransform(pt1, pt1, matrix); + v2ApplyTransform(pt2, pt2, matrix); + } + + this.group.add(new graphic.Line(graphic.subPixelOptimizeLine({ + + // Id for animation + anid: 'line', + shape: { - x1: extent[0], - y1: 0, - x2: extent[1], - y2: 0 + x1: pt1[0], + y1: pt1[1], + x2: pt2[0], + y2: pt2[1] }, style: zrUtil.extend( {lineCap: 'round'}, @@ -26551,7 +26939,7 @@ return /******/ (function(modules) { // webpackBootstrap strokeContainThreshold: opt.strokeContainThreshold, silent: !!opt.axisLineSilent, z2: 1 - })); + }))); }, /** @@ -26572,8 +26960,11 @@ return /******/ (function(modules) { // webpackBootstrap var tickLen = tickModel.get('length'); var tickInterval = getInterval(tickModel, opt.labelInterval); var ticksCoords = axis.getTicksCoords(); - var tickLines = []; + var ticks = axis.scale.getTicks(); + var pt1 = []; + var pt2 = []; + var matrix = this._transform; for (var i = 0; i < ticksCoords.length; i++) { // Only ordinal scale support tick interval if (ifIgnoreOnTick(axis, i, tickInterval)) { @@ -26582,26 +26973,37 @@ return /******/ (function(modules) { // webpackBootstrap var tickCoord = ticksCoords[i]; - // Tick line - tickLines.push(new graphic.Line(graphic.subPixelOptimizeLine({ + pt1[0] = tickCoord; + pt1[1] = 0; + pt2[0] = tickCoord; + pt2[1] = opt.tickDirection * tickLen; + + if (matrix) { + v2ApplyTransform(pt1, pt1, matrix); + v2ApplyTransform(pt2, pt2, matrix); + } + // Tick line, Not use group transform to have better line draw + this.group.add(new graphic.Line(graphic.subPixelOptimizeLine({ + + // Id for animation + anid: 'tick_' + ticks[i], + shape: { - x1: tickCoord, - y1: 0, - x2: tickCoord, - y2: opt.tickDirection * tickLen - }, - style: { - lineWidth: lineStyleModel.get('width') + x1: pt1[0], + y1: pt1[1], + x2: pt2[0], + y2: pt2[1] }, + style: zrUtil.defaults( + lineStyleModel.getLineStyle(), + { + stroke: axisModel.get('axisLine.lineStyle.color') + } + ), + z2: 2, silent: true }))); } - - this.group.add(graphic.mergePath(tickLines, { - style: lineStyleModel.getLineStyle(), - z2: 2, - silent: true - })); }, /** @@ -26610,13 +27012,14 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ axisLabel: function () { + var opt = this.opt; var axisModel = this.axisModel; + var show = retrieve(opt.axisLabelShow, axisModel.get('axisLabel.show')); - if (!axisModel.get('axisLabel.show')) { + if (!show) { return; } - var opt = this.opt; var axis = axisModel.axis; var labelModel = axisModel.getModel('axisLabel'); var textStyleModel = labelModel.getModel('textStyle'); @@ -26625,10 +27028,7 @@ return /******/ (function(modules) { // webpackBootstrap var labels = axisModel.getFormattedLabels(); // Special label rotate. - var labelRotation = opt.labelRotation; - if (labelRotation == null) { - labelRotation = labelModel.get('rotate') || 0; - } + var labelRotation = retrieve(opt.labelRotation, labelModel.get('rotate')) || 0; // To radian. labelRotation = labelRotation * PI / 180; @@ -26648,7 +27048,8 @@ return /******/ (function(modules) { // webpackBootstrap categoryData[i].textStyle, textStyleModel, axisModel.ecModel ); } - var textColor = itemTextStyleModel.getTextColor(); + var textColor = itemTextStyleModel.getTextColor() + || axisModel.get('axisLine.lineStyle.color'); var tickCoord = axis.dataToCoord(ticks[i]); var pos = [ @@ -26658,6 +27059,10 @@ return /******/ (function(modules) { // webpackBootstrap var labelBeforeFormat = axis.scale.getLabel(ticks[i]); var textEl = new graphic.Text({ + + // Id for animation + anid: 'label_' + ticks[i], + style: { text: labels[i], textAlign: itemTextStyleModel.get('align', true) || labelLayout.textAlign, @@ -26675,8 +27080,15 @@ return /******/ (function(modules) { // webpackBootstrap textEl.eventData.targetType = 'axisLabel'; textEl.eventData.value = labelBeforeFormat; + + // FIXME + this._dumbGroup.add(textEl); + textEl.updateTransform(); + textEls.push(textEl); this.group.add(textEl); + + textEl.decomposeTransform(); } function isTwoLabelOverlapped(current, next) { @@ -26715,12 +27127,7 @@ return /******/ (function(modules) { // webpackBootstrap axisName: function () { var opt = this.opt; var axisModel = this.axisModel; - - var name = this.opt.axisName; - // If name is '', do not get name from axisMode. - if (name == null) { - name = axisModel.get('name'); - } + var name = retrieve(opt.axisName, axisModel.get('name')); if (!name) { return; @@ -26745,16 +27152,46 @@ return /******/ (function(modules) { // webpackBootstrap var labelLayout; + var nameRotation = axisModel.get('nameRotate'); + if (nameRotation != null) { + nameRotation = nameRotation * PI / 180; // To radian. + } + if (nameLocation === 'middle') { - labelLayout = innerTextLayout(opt, opt.rotation, nameDirection); + labelLayout = innerTextLayout( + opt, + nameRotation != null ? nameRotation : opt.rotation, // Adapt to axis. + nameDirection + ); } else { - labelLayout = endTextLayout(opt, nameLocation, extent); + labelLayout = endTextLayout( + opt, nameLocation, nameRotation || 0, extent + ); + } + + var truncatedText = name; + var truncateLength = retrieve( + opt.axisNameTruncateLength, axisModel.get('nameTruncateLength') + ); + var truncateEllipsis = retrieve( + opt.axisNameTruncateEllipsis, axisModel.get('nameTruncateEllipsis') + ); + + if (truncateLength != null) { + truncatedText = modelUtil.truncate(name, truncateLength, truncateEllipsis); } var textEl = new graphic.Text({ + + // Id for animation + anid: 'name', + + __fullText: name, + __truncatedText: truncatedText, + style: { - text: name, + text: truncatedText, textFont: textStyleModel.getFont(), fill: textStyleModel.getTextColor() || axisModel.get('axisLine.lineStyle.color'), @@ -26767,15 +27204,33 @@ return /******/ (function(modules) { // webpackBootstrap z2: 1 }); + // Make truncate tooltip show. + if (truncateLength != null) { + textEl.dataIndex = 0; + var data = new List(['value'], axisModel); + data.initData([{value: name, tooltip: {formatter: tooltipFormatter}}]); + textEl.dataModel = modelUtil.createDataFormatModel(data, {mainType: 'axis'}); + } + textEl.eventData = makeAxisEventDataBase(axisModel); textEl.eventData.targetType = 'axisName'; textEl.eventData.name = name; + // FIXME + this._dumbGroup.add(textEl); + textEl.updateTransform(); + this.group.add(textEl); + + textEl.decomposeTransform(); } }; + function tooltipFormatter(params) { + return params.value; + } + /** * @inner */ @@ -26813,8 +27268,8 @@ return /******/ (function(modules) { // webpackBootstrap /** * @inner */ - function endTextLayout(opt, textPosition, extent) { - var rotationDiff = remRadian(-opt.rotation); + function endTextLayout(opt, textPosition, textRotate, extent) { + var rotationDiff = remRadian(textRotate - opt.rotation); var textAlign; var verticalAlign; var inverse = extent[0] > extent[1]; @@ -26980,17 +27435,11 @@ return /******/ (function(modules) { // webpackBootstrap normal: { // color: '各异', // 柱条边线 - barBorderColor: '#fff', + borderColor: '#fff', // 柱条边线线宽,单位px,默认为1 - barBorderWidth: 0 + borderWidth: 0 }, - emphasis: { - // color: '各异', - // 柱条边线 - barBorderColor: '#fff', - // 柱条边线线宽,单位px,默认为1 - barBorderWidth: 0 - } + emphasis: {} } } }); @@ -27220,22 +27669,32 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { + + + var getBarItemStyle = __webpack_require__(11)( + [ + ['fill', 'color'], + ['stroke', 'borderColor'], + ['lineWidth', 'borderWidth'], + // Compatitable with 2 + ['stroke', 'barBorderColor'], + ['lineWidth', 'barBorderWidth'], + ['opacity'], + ['shadowBlur'], + ['shadowOffsetX'], + ['shadowOffsetY'], + ['shadowColor'] + ] + ); module.exports = { - getBarItemStyle: __webpack_require__(11)( - [ - ['fill', 'color'], - ['stroke', 'borderColor'], - ['lineWidth', 'borderWidth'], - // Compatitable with 2 - ['stroke', 'barBorderColor'], - ['lineWidth', 'barBorderWidth'], - ['opacity'], - ['shadowBlur'], - ['shadowOffsetX'], - ['shadowOffsetY'], - ['shadowColor'] - ] - ) + getBarItemStyle: function (excludes) { + var style = getBarItemStyle.call(this, excludes); + if (this.getBorderLineDash) { + var lineDash = this.getBorderLineDash(); + lineDash && (style.lineDash = lineDash); + } + return style; + } }; diff --git a/dist/echarts.simple.min.js b/dist/echarts.simple.min.js index d2f737b2b0..2a68e5e836 100644 --- a/dist/echarts.simple.min.js +++ b/dist/echarts.simple.min.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.echarts=e():t.echarts=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(2),i(91),i(85),i(96),i(36)},function(t,e){function i(t){if("object"==typeof t&&null!==t){var e=t;if(t instanceof Array){e=[];for(var n=0,r=t.length;r>n;n++)e[n]=i(t[n])}else if(!S(t)&&!T(t)){e={};for(var a in t)t.hasOwnProperty(a)&&(e[a]=i(t[a]))}return e}return t}function n(t,e,r){if(!M(e)||!M(t))return r?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!M(s)||!M(o)||x(s)||x(o)||T(s)||T(o)||S(s)||S(o)?!r&&a in t||(t[a]=i(e[a],!0)):n(o,s,r)}return t}function r(t,e){for(var i=t[0],r=1,a=t.length;a>r;r++)i=n(i,t[r],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function o(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return document.createElement("canvas")}function l(){return L||(L=N.createCanvas().getContext("2d")),L}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,o(t,e,i)}function f(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function d(t,e,i){if(t&&e)if(t.forEach&&t.forEach===O)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===R)return t.map(e,i);for(var n=[],r=0,a=t.length;a>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===B)return t.reduce(e,i,n);for(var r=0,a=t.length;a>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===E)return t.filter(e,i);for(var n=[],r=0,a=t.length;a>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=z.call(arguments,2);return function(){return t.apply(e,i.concat(z.call(arguments)))}}function _(t){var e=z.call(arguments,1);return function(){return t.apply(this,e.concat(z.call(arguments)))}}function x(t){return"[object Array]"===P.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===P.call(t)}function M(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function S(t){return!!k[P.call(t)]}function T(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function A(t){for(var e=0,i=arguments.length;i>e;e++)if(null!=arguments[e])return arguments[e]}function C(){return Function.call.apply(z,arguments)}function I(t,e){if(!t)throw new Error(e)}var L,k={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},P=Object.prototype.toString,D=Array.prototype,O=D.forEach,E=D.filter,z=D.slice,R=D.map,B=D.reduce,N={inherits:u,mixin:c,clone:i,merge:n,mergeAll:r,extend:a,defaults:o,getContext:l,createCanvas:s,indexOf:h,slice:C,find:m,isArrayLike:f,each:d,map:p,reduce:g,filter:v,bind:y,curry:_,isArray:x,isString:w,isObject:M,isFunction:b,isBuildInObject:S,isDom:T,retrieve:A,assert:I,noop:function(){}};t.exports=N},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),k.prototype[t].call(this,e,i,n)}}function r(){k.call(this)}function a(t,e,i){function n(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=$[e]),this.id,this.group,this._dom=t,this._zr=C.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio}),this._theme=I.clone(e),this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._api=new _(this),this._coordSysMgr=new x,this._finalEvents=[],k.call(this),this._messageCenter=new r,this._initEvents(),this.resize=I.bind(this.resize,this),P(Q,n),P(X,n)}function o(t,e){var i=this._model;i&&i.eachComponent({mainType:"series",query:e},function(n,r){var a=this._chartsMap[n.__viewId];a&&a.__alive&&a[t](n,i,this._api,e)},this)}function s(){this[G]||(this[G]=1,D(this._finalEvents,function(t){this.trigger(t.type,t)},this),this[G]=0)}function l(t,e,i){var n=this._api;D(this._componentsViews,function(r){var a=r.__model;r[t](a,e,n,i),g(a,r)},this),e.eachSeries(function(r,a){var o=this._chartsMap[r.__viewId];o[t](r,e,n,i),g(r,o)},this)}function h(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,r=i?this._componentsMap:this._chartsMap,a=this._zr,o=0;or.get("progressiveThreshold")&&l&&!m.node;h&&o.group.traverse(function(t){"group"!==t.type&&(t.progressive=h?Math.floor(s++/l):-1,h&&t.stopAnimation(!0))})},this),n>t.get("hoverLayerThreshold")&&!m.node&&this._zr.storage.traverse(function(t){"group"!==t.type&&(t.useHoverLayer=!0)}),D(this._chartsViews,function(e){e.__alive||e.remove(t,i)},this)}function g(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function v(t){function e(t,e){for(var i=0;in;n++)e[n]=i(t[n])}else if(!S(t)&&!T(t)){e={};for(var a in t)t.hasOwnProperty(a)&&(e[a]=i(t[a]))}return e}return t}function n(t,e,r){if(!M(e)||!M(t))return r?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!M(s)||!M(o)||x(s)||x(o)||T(s)||T(o)||S(s)||S(o)?!r&&a in t||(t[a]=i(e[a],!0)):n(o,s,r)}return t}function r(t,e){for(var i=t[0],r=1,a=t.length;a>r;r++)i=n(i,t[r],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function o(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return document.createElement("canvas")}function l(){return I||(I=N.createCanvas().getContext("2d")),I}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,o(t,e,i)}function f(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function d(t,e,i){if(t&&e)if(t.forEach&&t.forEach===O)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===R)return t.map(e,i);for(var n=[],r=0,a=t.length;a>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===B)return t.reduce(e,i,n);for(var r=0,a=t.length;a>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===E)return t.filter(e,i);for(var n=[],r=0,a=t.length;a>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=z.call(arguments,2);return function(){return t.apply(e,i.concat(z.call(arguments)))}}function _(t){var e=z.call(arguments,1);return function(){return t.apply(this,e.concat(z.call(arguments)))}}function x(t){return"[object Array]"===P.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===P.call(t)}function M(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function S(t){return!!k[P.call(t)]}function T(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function A(t){for(var e=0,i=arguments.length;i>e;e++)if(null!=arguments[e])return arguments[e]}function C(){return Function.call.apply(z,arguments)}function L(t,e){if(!t)throw new Error(e)}var I,k={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},P=Object.prototype.toString,D=Array.prototype,O=D.forEach,E=D.filter,z=D.slice,R=D.map,B=D.reduce,N={inherits:u,mixin:c,clone:i,merge:n,mergeAll:r,extend:a,defaults:o,getContext:l,createCanvas:s,indexOf:h,slice:C,find:m,isArrayLike:f,each:d,map:p,reduce:g,filter:v,bind:y,curry:_,isArray:x,isString:w,isObject:M,isFunction:b,isBuildInObject:S,isDom:T,retrieve:A,assert:L,noop:function(){}};t.exports=N},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),P.prototype[t].call(this,e,i,n)}}function r(){P.call(this)}function a(t,e,i){function n(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=K[e]),this.id,this.group,this._dom=t,this._zr=L.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio}),this._theme=I.clone(e),this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._api=new x(this),this._coordSysMgr=new b,P.call(this),this._messageCenter=new r,this._initEvents(),this.resize=I.bind(this.resize,this),this._pendingActions=[],D($,n),D(Y,n)}function o(t,e){var i=this._model;i&&i.eachComponent({mainType:"series",query:e},function(n,r){var a=this._chartsMap[n.__viewId];a&&a.__alive&&a[t](n,i,this._api,e)},this)}function s(t,e,i){var n=this._api;O(this._componentsViews,function(r){var a=r.__model;r[t](a,e,n,i),v(a,r)},this),e.eachSeries(function(r,a){var o=this._chartsMap[r.__viewId];o[t](r,e,n,i),v(r,o),g(r,o)},this),p(this._zr,e)}function l(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,r=i?this._componentsMap:this._chartsMap,a=this._zr,o=0;oe.get("hoverLayerThreshold")&&!y.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function g(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),r=i>t.get("progressiveThreshold")&&n&&!y.node;r&&e.group.traverse(function(t){t.isGroup||(t.progressive=r?Math.floor(i++/n):-1,r&&t.stopAnimation(!0))});var a=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.setStyle("blend",a)})}function v(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function m(t){function e(t,e){for(var i=0;i0?e.animateTo(i,l,u||0,h,a):(e.attr(i),a&&a())}else e.attr(i),a&&a()}var v=i(1),m=i(162),y=Math.round,_=i(6),x=i(17),b=i(19),w=i(5),M=(i(30),{});M.Group=i(28),M.Image=i(48),M.Text=i(72),M.Circle=i(153),M.Sector=i(159),M.Ring=i(158),M.Polygon=i(155),M.Polyline=i(156),M.Rect=i(157),M.Line=i(154),M.BezierCurve=i(152),M.Arc=i(151),M.CompoundPath=i(145),M.LinearGradient=i(82),M.RadialGradient=i(147),M.BoundingRect=i(7),M.extendShape=function(t){return _.extend(t)},M.extendPath=function(t,e){return m.extendFromString(t,e)},M.makePath=function(t,e,i,n){var r=m.createFromString(t,e),a=r.getBoundingRect();if(i){var o=a.width/a.height;if("center"===n){var s,l=i.height*o;l<=i.width?s=i.height:(l=i.width,s=l/o);var h=i.x+i.width/2,u=i.y+i.height/2;i.x=h-l/2,i.y=u-s/2,i.width=l,i.height=s}this.resizePath(r,i)}return r},M.mergePath=m.mergePath,M.resizePath=function(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}},M.subPixelOptimizeLine=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth;return y(2*i.x1)===y(2*i.x2)&&(i.x1=i.x2=e(i.x1,n,!0)),y(2*i.y1)===y(2*i.y2)&&(i.y1=i.y2=e(i.y1,n,!0)),t},M.subPixelOptimizeRect=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth,r=i.x,a=i.y,o=i.width,s=i.height;return i.x=e(i.x,n,!0),i.y=e(i.y,n,!0),i.width=Math.max(e(r+o,n,!1)-i.x,0===o?0:1),i.height=Math.max(e(a+s,n,!1)-i.y,0===s?0:1),t},M.subPixelOptimize=function(t,e,i){var n=y(2*t);return(n+y(e))%2===0?n/2:(n+(i?1:-1))/2},M.setHoverStyle=function(t,e){"group"===t.type?t.traverse(function(t){"group"!==t.type&&u(t,e)}):u(t,e),t.on("mouseover",c).on("mouseout",f),t.on("emphasis",d).on("normal",p)},M.setText=function(t,e,i){var n=e.getShallow("position")||"inside",r=n.indexOf("inside")>=0?"white":i,a=e.getModel("textStyle");v.extend(t,{textDistance:e.getShallow("distance")||5,textFont:a.getFont(),textPosition:n,textFill:a.getTextColor()||r})},M.updateProps=function(t,e,i,n,r){g(!0,t,e,i,n,r)},M.initProps=function(t,e,i,n,r){g(!1,t,e,i,n,r)},M.getTransform=function(t,e){for(var i=b.identity([]);t&&t!==e;)b.mul(i,t.getLocalTransform(),i),t=t.parent;return i},M.applyTransform=function(t,e,i){return i&&(e=b.invert([],e)),w.applyTransform([],t,e)},M.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return a=M.applyTransform(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},t.exports=M},function(t,e){function i(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}var n={},r=1e-4;n.linearMap=function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},n.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?i(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},n.round=function(t){return+(+t).toFixed(10)},n.asc=function(t){return t.sort(function(t,e){return t-e}),t},n.getPrecision=function(t){if(isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},n.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n);return Math.max(-r+a,0)},n.MAX_SAFE_INTEGER=9007199254740991,n.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},n.isRadianAroundZero=function(t){return t>-r&&r>t},n.parseDate=function(t){return t instanceof Date?t:new Date("string"==typeof t?new Date(t.replace(/-/g,"/"))-new Date("1970/01/01"):Math.round(t))},n.quantity=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},n.nice=function(t,e){var i,r=n.quantity(t),a=t/r;return i=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,i*r},t.exports=n},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(t,e){var n=new i(2);return n[0]=t||0,n[1]=e||0,n},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},normalize:function(t,e){var i=n.len(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}};n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t.exports=n},function(t,e,i){function n(t){r.call(this,t),this.path=new o}var r=i(37),a=i(1),o=i(29),s=i(141),l=i(146),h=l.prototype.getCanvasPattern,u=Math.abs;n.prototype={constructor:n,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path,r=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,l=a&&!!o.colorStops,u=r&&!!s.colorStops,c=a&&!!o.image,f=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d=this.getBoundingRect();l&&(this._fillGradient=i.getGradient(t,o,d)),u&&(this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=h.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=h.call(s,t));var p=i.lineDash,g=i.lineDashOffset,v=!!t.setLineDash,m=this.getGlobalScale();n.setScale(m[0],m[1]),this.__dirtyPath||p&&!v&&r?(n=this.path.beginPath(t),p&&!v&&(n.setLineDash(p),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),a&&n.fill(t),p&&v&&(t.setLineDash(p),t.lineDashOffset=g),r&&n.stroke(t),p&&v&&t.setLineDash([]),this.restoreTransform(t),(i.text||0===i.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),s.containStroke(a,o/l,t,e)))return!0}if(r.hasFill())return s.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(a.isObject(t))for(var n in t)i[n]=t[n];else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&u(t[0]-1)>1e-10&&u(t[3]-1)>1e-10?Math.sqrt(u(t[0]*t[3]-t[2]*t[1])):1}},n.extend=function(t){var e=function(e){n.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var a in i)!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(r[a]=i[a])}t.init&&t.init.call(this,e)};a.inherits(e,n);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},a.inherits(n,r),t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){this.x=t,this.y=e,this.width=i,this.height=n}var r=i(5),a=i(19),o=r.applyTransform,s=Math.min,l=Math.abs,h=Math.max;n.prototype={constructor:n,union:function(t){var e=s(t.x,this.x),i=s(t.y,this.y);this.width=h(t.x+t.width,this.x+this.width)-e,this.height=h(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[];return function(i){i&&(t[0]=this.x,t[1]=this.y,e[0]=this.x+this.width,e[1]=this.y+this.height,o(t,t,i),o(e,e,i),this.x=s(t[0],e[0]),this.y=s(t[1],e[1]),this.width=l(e[0]-t[0]),this.height=l(e[1]-t[1]))}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=a.create();return a.translate(r,r,[-e.x,-e.y]),a.scale(r,r,[i,n]),a.translate(r,r,[t.x,t.y]),r},intersect:function(t){var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(o>n||i>s||l>a||r>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new n(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},t.exports=n},function(t,e,i){var n=i(9),r=i(4),a=i(1),o=["x","y","z","radius","angle"],s={};s.createNameEach=function(t,e){t=t.slice();var i=a.map(t,s.capitalFirst);e=(e||[]).slice();var n=a.map(e,s.capitalFirst);return function(r,o){a.each(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){a.each(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function o(t,n){n.nodes.push(t),e(function(e){a.each(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function a(t){!n(t,s)&&r(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(a);while(l);return s}},s.defaultEmphasis=function(t,e){if(t){var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{};a.each(e,function(t){var e=a.retrieve(i[t],n[t]);null!=e&&(i[t]=e)})}},s.LABEL_OPTIONS=["position","show","textStyle","distance","formatter"],s.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},s.isDataItemOption=function(t){return a.isObject(t)&&!(t instanceof Array)},s.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isFinite(t)||null==t||"-"===t||(t=+r.parseDate(t)),null==t||""===t?NaN:+t)},s.dataFormatMixin={getDataParams:function(t,e){var i=this.getData(e),n=this.seriesIndex,r=this.name,a=this.getRawValue(t,e),o=i.getRawIndex(t),s=i.getName(t,!0),l=i.getRawDataItem(t);return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:n,seriesName:r,name:s,dataIndex:o,data:l,dataType:e,value:a,color:i.getItemVisual(t,"color"),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,r){e=e||"normal";var a=this.getData(i),o=a.getItemModel(t),s=this.getDataParams(t,i);null!=r&&s.value instanceof Array&&(s.value=s.value[r]);var l=o.get(["label",e,"formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?n.formatTpl(l,s):void 0},getRawValue:function(t,e){var i=this.getData(e),n=i.getRawDataItem(t);return null!=n?!a.isObject(n)||n instanceof Array?n:n.value:void 0},formatTooltip:a.noop},s.mappingToExists=function(t,e){e=(e||[]).slice();var i=a.map(t||[],function(t,e){return{exist:t}});return a.each(e,function(t,n){if(a.isObject(t))for(var r=0;r=i.length&&i.push({option:t})}}),i},s.isIdInner=function(t){return a.isObject(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")},s.compressBatches=function(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var a=t[n].seriesId,o=s.normalizeToArray(t[n].dataIndex),l=i&&i[a],h=0,u=o.length;u>h;h++){var c=o[h];l&&l[c]?l[c]=null:(e[a]||(e[a]={}))[c]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var a=n(t[r],!0);a.length&&i.push({seriesId:r,dataIndex:a})}return i}var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)]},t.exports=s},function(t,e,i){function n(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function r(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function a(t){var e=t.length;return"number"==typeof t?[t,t,t,t]:2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function o(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function s(t,e){return"{"+t+(null==e?"":e)+"}"}function l(t,e){c.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars,r=0;ro;o++)for(var l=0;lt?"0"+t:t}var c=i(1),f=i(4),d=["a","b","c","d","e","f","g"];t.exports={normalizeCssArray:a,addCommas:n,toCamelCase:r,encodeHTML:o,formatTpl:l,formatTime:h}},function(t,e,i){function n(t){var e=[];return a.each(u.getClassesByMainType(t),function(t){o.apply(e,t.prototype.dependencies||[])}),a.map(e,function(t){return l.parseClassType(t).main})}var r=i(12),a=i(1),o=Array.prototype.push,s=i(42),l=i(20),h=i(14),u=r.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,init:function(t,e,i,n){this.mergeDefaultAndTheme(this.option,this.ecModel)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?h.getLayoutParams(t):{},r=e.getTheme();a.merge(t,r.get(this.mainType)),a.merge(t,this.getDefaultOption()),i&&h.mergeLayoutParam(t,n,i)},mergeOption:function(t){a.merge(this.option,t,!0);var e=this.layoutMode;e&&h.mergeLayoutParam(this.option,t,e)},optionUpdated:function(t,e){},getDefaultOption:function(){if(!this.hasOwnProperty("__defaultOption")){for(var t=[],e=this.constructor;e;){var i=e.prototype.defaultOption;i&&t.push(i),e=e.superClass}for(var n={},r=t.length-1;r>=0;r--)n=a.merge(n,t[r],!0);this.__defaultOption=n}return this.__defaultOption}});l.enableClassExtend(u,function(t,e,i,n){a.extend(this,n),this.uid=s.getUID("componentModel")}),l.enableClassManagement(u,{registerWhenExtend:!0}),s.enableSubTypeDefaulter(u),s.enableTopologicalTravel(u,n),a.mixin(u,i(120)),t.exports=u},function(t,e){function i(t){var e={},i={},n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/);return n&&(i.ie=!0,i.version=n[1]),n&&(i.ie=!0,i.version=n[1]),r&&(i.edge=!0,i.version=r[1]),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=10)}}var n={};n="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:i(navigator.userAgent),t.exports=n},function(t,e,i){function n(t,e,i,n){this.parentModel=e,this.ecModel=i,this.option=t,this.init&&(arguments.length<=4?this.init(t,e,i,n):this.init.apply(this,arguments))}var r=i(1),a=i(20);n.prototype={constructor:n,init:null,mergeOption:function(t){r.merge(this.option,t,!0)},get:function(t,e){if(!t)return this.option;"string"==typeof t&&(t=t.split("."));for(var i=this.option,n=this.parentModel,r=0;r=0?r[s]=new l.constructor(a[s].length):r[s]=a[s]}return n}var a="undefined",o="undefined"==typeof window?e:window,s=typeof o.Float64Array===a?Array:o.Float64Array,l=typeof o.Int32Array===a?Array:o.Int32Array,h={"float":s,"int":l,ordinal:Array,number:Array,time:Array},u=i(12),c=i(45),f=i(1),d=i(8),p=f.isObject,g=["stackedOn","hasItemOption","_nameList","_idList","_rawData"],v=function(t,e){f.each(g.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods},m=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;r0&&(b+="__ec__"+u[w]),u[w]++),b&&(l[c]=b)}this._nameList=e,this._idList=l},y.count=function(){return this.indices.length},y.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r)return NaN;var a=n[t]&&n[t][r];if(i){var o=this._dimensionInfos[t];if(o&&o.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(a>=0&&l>0||0>=a&&0>l)&&(a+=l),s=s.stackedOn}}return a},y.getValues=function(t,e,i){var n=[];f.isArray(t)||(i=e,e=t,t=this.dimensions);for(var r=0,a=t.length;a>r;r++)n.push(this.get(t[r],e,i));return n},y.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},y.getDataExtent=function(t,e){var i=this._storage[t],n=this.getDimensionInfo(t);e=n&&n.stackable&&e;var r,a=(this._extent||(this._extent={}))[t+!!e];if(a)return a;if(i){for(var o=1/0,s=-(1/0),l=0,h=this.count();h>l;l++)r=this.get(t,l,e),o>r&&(o=r),r>s&&(s=r);return this._extent[t+!!e]=[o,s]}return[1/0,-(1/0)]},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,a=this.count();a>r;r++){var o=this.get(t,r,e);isNaN(o)||(n+=o)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var a=0,o=r.length;o>a;a++){var s=r[a];if(n[s]===e)return a}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var a=e[n];if(i[a]===t)return n}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,r=n[t];if(r){for(var a=Number.MAX_VALUE,o=-1,s=0,l=this.count();l>s;s++){var h=e-this.get(t,s,i),u=Math.abs(h);(a>u||u===a&&h>0)&&(a=u,o=s)}return o}return-1},y.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},y.getRawDataItem=function(t){return this._rawData[this.getRawIndex(t)]},y.getName=function(t){return this._nameList[this.indices[t]]||""},y.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},y.each=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=f.map(n(t),this.getDimension,this);var a=[],o=t.length,s=this.indices;r=r||this;for(var l=0;lh;h++)a[h]=this.get(t[h],l,i);a[h]=l,e.apply(r,a)}},y.filterSelf=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=f.map(n(t),this.getDimension,this);var a=[],o=[],s=t.length,l=this.indices;r=r||this;for(var h=0;hc;c++)o[c]=this.get(t[c],h,i);o[c]=h,u=e.apply(r,o)}u&&a.push(l[h])}return this.indices=a,this._extent={},this},y.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},y.map=function(t,e,i,a){t=f.map(n(t),this.getDimension,this);var o=r(this,t),s=o.indices=this.indices,l=o._storage,h=[]; -return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(h[0]=n,n=h);for(var r=0;rg;g+=f){f>p-g&&(f=p-g,u.length=f);for(var v=0;f>v;v++){var m=l[g+v];u[v]=d[m],c[v]=m}var y=i(u),m=c[n(u,y)||0];d[m]=y,h.push(m)}return a},y.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new u(this._rawData[t],e,e&&e.ecModel)},y.diff=function(t){var e=this._idList,i=t&&t._idList;return new c(t?t.indices:[],this.indices,function(t){return i[t]||t+""},function(t){return e[t]||t+""})},y.getVisual=function(t){var e=this._visual;return e&&e[t]},y.setVisual=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},y.setLayout=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},y.getLayout=function(t){return this._layout[t]},y.getItemLayout=function(t){return this._itemLayouts[t]},y.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?f.extend(this._itemLayouts[t]||{},e):e},y.clearItemLayouts=function(){this._itemLayouts.length=0},y.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=i},y.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var _=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};y.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(_,e)),this._graphicEls[t]=e},y.getItemGraphicEl=function(t){return this._graphicEls[t]},y.eachItemGraphicEl=function(t,e){f.each(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},y.cloneShallow=function(){var t=f.map(this.dimensions,this.getDimensionInfo,this),e=new m(t,this.hostModel);return e._storage=this._storage,v(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=f.extend({},this._extent)),e},y.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(f.slice(arguments)))})},y.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],y.CHANGABLE_METHODS=["filterSelf"],t.exports=m}).call(e,function(){return this}())},function(t,e,i){"use strict";function n(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,f=l.position,d=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=d.width+(g?-g.x+d.x:0);u=a+v,u>n||l.newline?(a=0,u=v,o+=s+i,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(g?-g.y+d.y:0);c=o+m,c>r||l.newline?(a+=s+i,o=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(f[0]=a,f[1]=o,"horizontal"===t?a=u+i:o=c+i)})}var r=i(1),a=i(7),o=i(4),s=i(9),l=o.parsePercent,h=r.each,u={},c=["left","right","top","bottom","width","height"];u.box=n,u.vbox=r.curry(n,"vertical"),u.hbox=r.curry(n,"horizontal"),u.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,a=l(t.x,n),o=l(t.y,r),h=l(t.x2,n),u=l(t.y2,r);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=r),i=s.normalizeCssArray(i||0),{width:Math.max(h-a-i[1]-i[3],0),height:Math.max(u-o-i[0]-i[2],0)}},u.getLayoutRect=function(t,e,i){i=s.normalizeCssArray(i||0);var n=e.width,r=e.height,o=l(t.left,n),h=l(t.top,r),u=l(t.right,n),c=l(t.bottom,r),f=l(t.width,n),d=l(t.height,r),p=i[2]+i[0],g=i[1]+i[3],v=t.aspect;switch(isNaN(f)&&(f=n-u-g-o),isNaN(d)&&(d=r-c-p-h),isNaN(f)&&isNaN(d)&&(v>n/r?f=.8*n:d=.8*r),null!=v&&(isNaN(f)&&(f=v*d),isNaN(d)&&(d=f/v)),isNaN(o)&&(o=n-u-f-g),isNaN(h)&&(h=r-c-d-p),t.left||t.right){case"center":o=n/2-f/2-i[3];break;case"right":o=n-f-g}switch(t.top||t.bottom){case"middle":case"center":h=r/2-d/2-i[0];break;case"bottom":h=r-d-p}o=o||0,h=h||0,isNaN(f)&&(f=n-o-(u||0)),isNaN(d)&&(d=r-h-(c||0));var m=new a(o+i[3],h+i[0],f,d);return m.margin=i,m},u.positionGroup=function(t,e,i,n){var a=t.getBoundingRect();e=r.extend(r.clone(e),{width:a.width,height:a.height}),e=u.getLayoutRect(e,i,n),t.attr("position",[e.x-a.x,e.y-a.y])},u.mergeLayoutParam=function(t,e,i){function n(n){var r={},s=0,l={},u=0,c=i.ignoreSize?1:2;if(h(n,function(e){l[e]=t[e]}),h(n,function(t){a(e,t)&&(r[t]=l[t]=e[t]),o(r,t)&&s++,o(l,t)&&u++}),u!==c&&s){if(s>=c)return r;for(var f=0;f',f=this.name;return"\x00-"===f&&(f=""),e?c+h(this.name)+" : "+o:(f&&h(f)+"
")+c+(s?h(s)+" : "+o:o)},ifEnableAnimation:function(){if(l.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()},getColorFromPalette:function(t,e){var i=this.ecModel,n=s.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipDataIndex:null});n.mixin(c,a.dataFormatMixin),n.mixin(c,s),t.exports=c},function(t,e,i){"use strict";function n(t){return t>-w&&w>t}function r(t){return t>w||-w>t}function a(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function o(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)}function s(t,e,i,r,a,o){var s=r+3*(e-i)-t,l=3*(i-2*e+t),h=3*(e-t),u=t-a,c=l*l-3*s*h,f=l*h-9*s*u,d=h*h-3*l*u,p=0;if(n(c)&&n(f))if(n(l))o[0]=0;else{var g=-h/l;g>=0&&1>=g&&(o[p++]=g)}else{var v=f*f-4*c*d;if(n(v)){var m=f/c,g=-l/s+m,y=-m/2;g>=0&&1>=g&&(o[p++]=g),y>=0&&1>=y&&(o[p++]=y)}else if(v>0){var _=b(v),w=c*l+1.5*s*(-f+_),M=c*l+1.5*s*(-f-_);w=0>w?-x(-w,T):x(w,T),M=0>M?-x(-M,T):x(M,T);var g=(-l-(w+M))/(3*s);g>=0&&1>=g&&(o[p++]=g)}else{var A=(2*c*l-3*s*f)/(2*b(c*c*c)),C=Math.acos(A)/3,I=b(c),L=Math.cos(C),g=(-l-2*I*L)/(3*s),y=(-l+I*(L+S*Math.sin(C)))/(3*s),k=(-l+I*(L-S*Math.sin(C)))/(3*s);g>=0&&1>=g&&(o[p++]=g),y>=0&&1>=y&&(o[p++]=y),k>=0&&1>=k&&(o[p++]=k)}}return p}function l(t,e,i,a,o){var s=6*i-12*e+6*t,l=9*e+3*a-3*t-9*i,h=3*e-3*t,u=0;if(n(l)){if(r(s)){var c=-h/s;c>=0&&1>=c&&(o[u++]=c)}}else{var f=s*s-4*l*h;if(n(f))o[0]=-s/(2*l);else if(f>0){var d=b(f),c=(-s+d)/(2*l),p=(-s-d)/(2*l);c>=0&&1>=c&&(o[u++]=c),p>=0&&1>=p&&(o[u++]=p)}}return u}function h(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-o)*r+o,u=(l-s)*r+s,c=(u-h)*r+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function u(t,e,i,n,r,o,s,l,h,u,c){var f,d,p,g,v,m=.005,y=1/0;A[0]=h,A[1]=u;for(var x=0;1>x;x+=.05)C[0]=a(t,i,r,s,x),C[1]=a(e,n,o,l,x),g=_(A,C),y>g&&(f=x,y=g);y=1/0;for(var w=0;32>w&&!(M>m);w++)d=f-m,p=f+m,C[0]=a(t,i,r,s,d),C[1]=a(e,n,o,l,d),g=_(C,A),d>=0&&y>g?(f=d,y=g):(I[0]=a(t,i,r,s,p),I[1]=a(e,n,o,l,p),v=_(I,A),1>=p&&y>v?(f=p,y=v):m*=.5);return c&&(c[0]=a(t,i,r,s,f),c[1]=a(e,n,o,l,f)),b(y)}function c(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function f(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function d(t,e,i,a,o){var s=t-2*e+i,l=2*(e-t),h=t-a,u=0;if(n(s)){if(r(l)){var c=-h/l;c>=0&&1>=c&&(o[u++]=c)}}else{var f=l*l-4*s*h;if(n(f)){var c=-l/(2*s);c>=0&&1>=c&&(o[u++]=c)}else if(f>0){var d=b(f),c=(-l+d)/(2*s),p=(-l-d)/(2*s);c>=0&&1>=c&&(o[u++]=c),p>=0&&1>=p&&(o[u++]=p)}}return u}function p(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function g(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}function v(t,e,i,n,r,a,o,s,l){var h,u=.005,f=1/0;A[0]=o,A[1]=s;for(var d=0;1>d;d+=.05){C[0]=c(t,i,r,d),C[1]=c(e,n,a,d);var p=_(A,C);f>p&&(h=d,f=p)}f=1/0;for(var g=0;32>g&&!(M>u);g++){var v=h-u,m=h+u;C[0]=c(t,i,r,v),C[1]=c(e,n,a,v);var p=_(C,A);if(v>=0&&f>p)h=v,f=p;else{I[0]=c(t,i,r,m),I[1]=c(e,n,a,m);var y=_(I,A);1>=m&&f>y?(h=m,f=y):u*=.5}}return l&&(l[0]=c(t,i,r,h),l[1]=c(e,n,a,h)),b(f)}var m=i(5),y=m.create,_=m.distSquare,x=Math.pow,b=Math.sqrt,w=1e-8,M=1e-4,S=b(3),T=1/3,A=y(),C=y(),I=y();t.exports={cubicAt:a,cubicDerivativeAt:o,cubicRootAt:s,cubicExtrema:l,cubicSubdivide:h,cubicProjectPoint:u,quadraticAt:c,quadraticDerivativeAt:f,quadraticRootAt:d,quadraticExtremum:p,quadraticSubdivide:g,quadraticProjectPoint:v}},function(t,e){function i(t){return t=Math.round(t),0>t?0:t>255?255:t}function n(t){return t=Math.round(t),0>t?0:t>360?360:t}function r(t){return 0>t?0:t>1?1:t}function a(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function o(t){return r(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function s(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function l(t,e,i){return t+(e-t)*i}function h(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in _)return _[e].slice();if("#"!==e.charAt(0)){var i=e.indexOf("("),n=e.indexOf(")");if(-1!==i&&n+1===e.length){var r=e.substr(0,i),s=e.substr(i+1,n-(i+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return;l=o(s.pop());case"rgb":if(3!==s.length)return;return[a(s[0]),a(s[1]),a(s[2]),l];case"hsla":if(4!==s.length)return;return s[3]=o(s[3]),u(s);case"hsl":if(3!==s.length)return;return u(s);default:return}}}else{if(4===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&4095>=h))return;return[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]}if(7===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&16777215>=h))return;return[(16711680&h)>>16,(65280&h)>>8,255&h,1]}}}}function u(t){var e=(parseFloat(t[0])%360+360)%360/360,n=o(t[1]),r=o(t[2]),a=.5>=r?r*(n+1):r+n-r*n,l=2*r-a,h=[i(255*s(l,a,e+1/3)),i(255*s(l,a,e)),i(255*s(l,a,e-1/3))];return 4===t.length&&(h[3]=t[3]),h}function c(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,h=(s+o)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,f=((s-a)/6+l/2)/l;n===s?e=f-c:r===s?e=1/3+u-f:a===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var d=[360*e,i,h];return null!=t[3]&&d.push(t[3]),d}}function f(t,e){var i=h(t);if(i){for(var n=0;3>n;n++)0>e?i[n]=i[n]*(1-e)|0:i[n]=(255-i[n])*e+i[n]|0;return y(i,4===i.length?"rgba":"rgb")}}function d(t,e){var i=h(t);return i?((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1):void 0}function p(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[0,0,0,0];var r=t*(e.length-1),a=Math.floor(r),o=Math.ceil(r),s=e[a],h=e[o],u=r-a;return n[0]=i(l(s[0],h[0],u)),n[1]=i(l(s[1],h[1],u)),n[2]=i(l(s[2],h[2],u)),n[3]=i(l(s[3],h[3],u)),n}}function g(t,e,n){if(e&&e.length&&t>=0&&1>=t){var a=t*(e.length-1),o=Math.floor(a),s=Math.ceil(a),u=h(e[o]),c=h(e[s]),f=a-o,d=y([i(l(u[0],c[0],f)),i(l(u[1],c[1],f)),i(l(u[2],c[2],f)),r(l(u[3],c[3],f))],"rgba");return n?{color:d,leftIndex:o,rightIndex:s,value:a}:d}}function v(t,e,i,r){return t=h(t),t?(t=c(t),null!=e&&(t[0]=n(e)),null!=i&&(t[1]=o(i)),null!=r&&(t[2]=o(r)),y(u(t),"rgba")):void 0}function m(t,e){return t=h(t),t&&null!=e?(t[3]=r(e),y(t,"rgba")):void 0}function y(t,e){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}var _={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};t.exports={parse:h,lift:f,toHex:d,fastMapToColor:p,mapToColor:g,modifyHSL:v,modifyAlpha:m,stringify:y}},function(t,e,i){function n(t,e){var i=t+":"+e;if(h[i])return h[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;o>a;a++)r=Math.max(p.measureText(n[a],e).width,r);return u>c&&(u=0,h={}),u++,h[i]=r,r}function r(t,e,i,r){var a=((t||"")+"").split("\n").length,o=n(t,e),s=n("国",e),l=a*s,h=new d(0,0,o,l);switch(h.lineHeight=s,r){case"bottom":case"alphabetic":h.y-=s;break;case"middle":h.y-=s/2}switch(i){case"end":case"right":h.x-=h.width;break;case"center":h.x-=h.width/2}return h}function a(t,e,i,n){var r=e.x,a=e.y,o=e.height,s=e.width,l=i.height,h=o/2-l/2,u="left";switch(t){case"left":r-=n,a+=h,u="right";break;case"right":r+=n+s,a+=h,u="left";break;case"top":r+=s/2,a-=n+l,u="center";break;case"bottom":r+=s/2,a+=o+n,u="center";break;case"inside":r+=s/2,a+=h,u="center";break;case"insideLeft":r+=n,a+=h,u="left";break;case"insideRight":r+=s-n,a+=h,u="right";break;case"insideTop":r+=s/2,a+=n,u="center";break;case"insideBottom":r+=s/2,a+=o-l-n,u="center";break;case"insideTopLeft":r+=n,a+=n,u="left";break;case"insideTopRight":r+=s-n,a+=n,u="right";break;case"insideBottomLeft":r+=n,a+=o-l-n;break;case"insideBottomRight":r+=s-n,a+=o-l-n,u="right"}return{x:r,y:a,textAlign:u,textBaseline:"top"}}function o(t,e,i,r){if(!i)return"";r=f.defaults({ellipsis:"...",minCharacters:3,maxIterations:3,cnCharWidth:n("国",e),ascCharWidth:n("a",e)},r,!0),i-=n(r.ellipsis);for(var a=(t+"").split("\n"),o=0,l=a.length;l>o;o++)a[o]=s(a[o],e,i,r);return a.join("\n")}function s(t,e,i,r){for(var a=0;;a++){var o=n(t,e);if(i>o||a>=r.maxIterations){t+=r.ellipsis;break}var s=0===a?l(t,i,r):Math.floor(t.length*i/o);if(sr&&e>n;r++){var o=t.charCodeAt(r);n+=o>=0&&127>=o?i.ascCharWidth:i.cnCharWidth}return r}var h={},u=0,c=5e3,f=i(1),d=i(7),p={getWidth:n,getBoundingRect:r,adjustTextPositionOnRect:a,ellipsis:o,measureText:function(t,e){var i=f.getContext();return i.font=e,i.measureText(t)}};t.exports=p},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(){var t=new i(6);return n.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},rotate:function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t},scale:function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},invert:function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null}};t.exports=n},function(t,e,i){function n(t,e){var i=a.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function r(t,e,i){return this.superClass.prototype[e].apply(t,i)}var a=i(1),o={},s=".",l="___EC__COMPONENT__CONTAINER___",h=o.parseClassType=function(t){var e={main:"",sub:""};return t&&(t=t.split(s),e.main=t[0]||"",e.sub=t[1]||""),e};o.enableClassExtend=function(t,e){t.extend=function(i){var o=function(){e&&e.apply(this,arguments),t.apply(this,arguments)};return a.extend(o.prototype,i),o.extend=this.extend,o.superCall=n,o.superApply=r,a.inherits(o,this),o.superClass=this,o}},o.enableClassManagement=function(t,e){function i(t){var e=n[t.main];return e&&e[l]||(e=n[t.main]={},e[l]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(e=h(e),e.sub){if(e.sub!==l){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[l]&&(r=e?r[e]:null),i&&!r)throw new Error("Component "+t+"."+(e||"")+" not exists. Load it first.");return r},t.getClassesByMainType=function(t){t=h(t);var e=[],i=n[t.main];return i&&i[l]?a.each(i,function(t,i){i!==l&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=h(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return a.each(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=h(t);var e=n[t.main];return e&&e[l]},t.parseClassType=h,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t},o.setReadOnly=function(t,e){},t.exports=o},function(t,e,i){var n=Array.prototype.slice,r=i(1),a=r.indexOf,o=function(){this._$handlers={}};o.prototype={constructor:o,one:function(t,e,i){var n=this._$handlers;return e&&t?(n[t]||(n[t]=[]),a(n[t],t)>=0?this:(n[t].push({h:e,one:!0,ctx:i||this}),this)):this},on:function(t,e,i){var n=this._$handlers;return e&&t?(n[t]||(n[t]=[]),n[t].push({h:e,one:!1,ctx:i||this}),this):this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,a=i[t].length;a>r;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=n.call(e,1));for(var r=this._$handlers[t],a=r.length,o=0;a>o;){switch(i){case 1:r[o].h.call(r[o].ctx);break;case 2:r[o].h.call(r[o].ctx,e[1]);break;case 3:r[o].h.call(r[o].ctx,e[1],e[2]);break;default:r[o].h.apply(r[o].ctx,e)}r[o].one?(r.splice(o,1),a--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=n.call(e,1,e.length-1));for(var r=e[e.length-1],a=this._$handlers[t],o=a.length,s=0;o>s;){switch(i){case 1:a[s].h.call(r);break;case 2:a[s].h.call(r,e[1]);break;case 3:a[s].h.call(r,e[1],e[2]);break;default:a[s].h.apply(r,e)}a[s].one?(a.splice(s,1),o--):s++}}return this}},t.exports=o},,function(t,e,i){"use strict";function n(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function r(t,e,i){var r=n(t);return i=i||{},i.zrX=e.clientX-r.left,i.zrY=e.clientY-r.top,i}function a(t,e){if(e=e||window.event,null!=e.zrX)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var a="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];a&&r(t,a,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function o(t,e,i){h?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function s(t,e,i){h?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}var l=i(21),h="undefined"!=typeof window&&!!window.addEventListener,u=h?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};t.exports={clientToLocal:r,normalizeEvent:a,addEventListener:o,removeEventListener:s,stop:u,Dispatcher:l}},function(t,e){"use strict";function i(){this._coordinateSystems=[]}var n={};i.prototype={constructor:i,create:function(t,e){var i=[];for(var r in n){var a=n[r].create(t,e);a&&(i=i.concat(a))}this._coordinateSystems=i},update:function(t,e){for(var i=this._coordinateSystems,n=0;n0&&l>0&&!c&&(a=0),0>a&&0>l&&!f&&(l=0)),[a,l]},h.niceScaleExtent=function(t,e){var i=t.scale,n=h.getScaleExtent(t,e),r=null!=(e.getMin?e.getMin():e.get("min")),a=null!=(e.getMax?e.getMax():e.get("max")),o=e.get("splitNumber");i.setExtent(n[0],n[1]),i.niceExtent(o,r,a);var s=e.get("minInterval");if(isFinite(s)&&!r&&!a&&"interval"===i.type){var l=i.getInterval(),u=Math.max(Math.abs(l),s)/l;n=i.getExtent(),i.setExtent(u*n[0],n[1]*u),i.niceExtent(o)}var l=e.get("interval");null!=l&&i.setInterval&&i.setInterval(l)},h.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new n(t.getCategories(),[1/0,-(1/0)]);case"value":return new r;default:return(a.getClass(e)||r).create(t)}},h.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)},h.getAxisLabelInterval=function(t,e,i,n){var r,a=0,o=0,s=1;e.length>40&&(s=Math.floor(e.length/40));for(var h=0;h1?s:a*s},h.getFormattedLabels=function(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",e)}}(e),s.map(n,e)):"function"==typeof e?s.map(r,function(n,r){return e("category"===t.type?i.getLabel(n):n,r)},this):n},t.exports=h},function(t,e,i){"use strict";var n=i(3),r=i(7),a=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),o=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),s=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),f=Math.cos(h);t.arc(i,l,o,Math.PI-h,2*Math.PI+h);var d=.6*o,p=.7*o;t.bezierCurveTo(i+u-c*d,l+s+f*d,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*d,l+s+f*d,i-u,l+s),t.closePath()}}),l=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),h={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:o,pin:s,arrow:l,triangle:a},u={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},c={};for(var f in h)c[f]=new h[f];var d=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e){var i=e.symbolType,n=c[i];"none"!==e.symbolType&&(n||(i="rect",n=c[i]),u[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(t,n.shape))}}),p=function(t){if("image"!==this.type){var e=this.style,i=this.shape;i&&"line"===i.symbolType?e.stroke=t:this.__isEmptyBrush?(e.stroke=t,e.fill="#fff"):(e.fill&&(e.fill=t),e.stroke&&(e.stroke=t)),this.dirty(!1)}},g={createSymbol:function(t,e,i,a,o,s){var l=0===t.indexOf("empty");l&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var h;return h=0===t.indexOf("image://")?new n.Image({style:{image:t.slice(8),x:e,y:i,width:a,height:o}}):0===t.indexOf("path://")?n.makePath(t.slice(7),{},new r(e,i,a,o)):new d({shape:{symbolType:t,x:e,y:i,width:a,height:o}}),h.__isEmptyBrush=l,h.setColor=p,h.setColor(s),h}};t.exports=g},function(t,e,i){function n(){this.group=new o,this.uid=s.getUID("viewChart")}function r(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;is;s++)r(t.getItemGraphicEl(o[s]),i);else if(a)for(var h=a instanceof Array?a:[a],s=0,l=h.length;l>s;s++){var n=t.indexOfName(h[s]);r(t.getItemGraphicEl(n),i)}else t.eachItemGraphicEl(function(t){r(t,i)})}var o=i(28),s=i(42),l=i(20);n.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){a(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){a(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var h=n.prototype;h.updateView=h.updateLayout=h.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},l.enableClassExtend(n),l.enableClassManagement(n,{registerWhenExtend:!0}),t.exports=n},function(t,e,i){var n=i(1),r=i(57),a=i(7),o=function(t){t=t||{},r.call(this,t);for(var e in t)this[e]=t[e];this._children=[],this.__storage=null,this.__dirty=!0};o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof o&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,a=n.indexOf(r,t);return 0>a?this:(r.splice(a,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof o&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;ethis._ux||y(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(l.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(l.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(l.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=g(r)*i+t,this._xi=v(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(l.R,t,e,i,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();_&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;oe.length&&(this._expandData(),e=this.data);for(var i=0;ia&&(a=r+a),a%=r,g-=a*u,v-=a*c;u>=0&&t>=g||0>u&&g>t;)n=this._dashIdx,i=o[n],g+=u*i,v+=c*i,this._dashIdx=(n+1)%y,u>0&&l>g||0>u&&g>l||s[n%2?"moveTo":"lineTo"](u>=0?d(g,t):p(g,t),c>=0?d(v,e):p(v,e));u=g-t,c=v-e,this._dashOffset=-m(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,a,o){var s,l,h,u,c,f=this._dashSum,d=this._dashOffset,p=this._lineDash,g=this._ctx,v=this._xi,y=this._yi,_=n.cubicAt,x=0,b=this._dashIdx,w=p.length,M=0;for(0>d&&(d=f+d),d%=f,s=0;1>s;s+=.1)l=_(v,t,i,a,s+.1)-_(v,t,i,a,s),h=_(y,e,r,o,s+.1)-_(y,e,r,o,s),x+=m(l*l+h*h);for(;w>b&&(M+=p[b],!(M>d));b++);for(s=(M-d)/x;1>=s;)u=_(v,t,i,a,s),c=_(y,e,r,o,s),b%2?g.moveTo(u,c):g.lineTo(u,c),s+=p[b]/x,b=(b+1)%w;b%2!==0&&g.lineTo(a,o),l=a-u,h=o-c,this._dashOffset=-m(l*l+h*h)},_dashedQuadraticTo:function(t,e,i,n){var r=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,_&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=f[0]=f[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,s=0,d=0;df;){var d=s[f++];switch(1==f&&(n=s[f],r=s[f+1],e=n,i=r),d){case l.M:e=n=s[f++],i=r=s[f++],t.moveTo(n,r);break;case l.L:a=s[f++],o=s[f++],(y(a-n)>h||y(o-r)>u||f===c-1)&&(t.lineTo(a,o),n=a,r=o);break;case l.C:t.bezierCurveTo(s[f++],s[f++],s[f++],s[f++],s[f++],s[f++]),n=s[f-2],r=s[f-1];break;case l.Q:t.quadraticCurveTo(s[f++],s[f++],s[f++],s[f++]),n=s[f-2],r=s[f-1];break;case l.A:var p=s[f++],m=s[f++],_=s[f++],x=s[f++],b=s[f++],w=s[f++],M=s[f++],S=s[f++],T=_>x?_:x,A=_>x?1:_/x,C=_>x?x/_:1,I=Math.abs(_-x)>.001,L=b+w;I?(t.translate(p,m),t.rotate(M),t.scale(A,C),t.arc(0,0,T,b,L,1-S),t.scale(1/A,1/C),t.rotate(-M),t.translate(-p,-m)):t.arc(p,m,T,b,L,1-S),1==f&&(e=g(b)*_+p,i=v(b)*x+m),n=g(L)*_+p,r=v(L)*x+m;break;case l.R:e=n=s[f],i=r=s[f+1],t.rect(s[f++],s[f++],s[f++],s[f++]);break;case l.Z:t.closePath(),n=e,r=i}}}},x.CMD=l,t.exports=x},function(t,e){var i=function(t){this.colorStops=t||[]};i.prototype={constructor:i,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},t.exports=i},function(t,e,i){function n(t,e,i,n){if(!e)return t;var s=r(e[0]),l=a.isArray(s)&&s.length||1;i=i||[],n=n||"extra";for(var h=0;l>h;h++)if(!t[h]){var u=i[h]||n+(h-i.length);t[h]=o(e,h)?{type:"ordinal",name:u}:u}return t}function r(t){return a.isArray(t)?t:a.isObject(t)?t.value:t}var a=i(1),o=n.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var o=r(t[i]);if(!a.isArray(o))return!1;var o=o[e];if(null!=o&&isFinite(o))return!1;if(a.isString(o)&&"-"!==o)return!0}return!1};t.exports=n},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=0;e=0)){var o=this.getShallow(a);null!=o&&(i[t[r][0]]=o)}}return i}}},function(t,e,i){function n(){this._extent=[1/0,-(1/0)],this._interval=0,this.init&&this.init.apply(this,arguments)}var r=i(20),a=n.prototype;a.parse=function(t){return t},a.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},a.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},a.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},a.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},a.getExtent=function(){return this._extent.slice()},a.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},a.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;ia&&!isNaN(a)&&(a=+a)),a};return b.hasItemOption=!1,b.initData(t,w,M),b}function o(t){return"category"!==t&&"time"!==t}function s(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function l(t,e){var i=[];if(t&&t.categoryAxisModel){var n=t.categoryAxisModel.getCategories();if(n){var r=e.length;if(c.isArray(e[0])&&e[0].length>1){i=[];for(var a=0;r>a;a++)i[a]=n[e[a][t.categoryIndex||0]]}else i=n.slice(0)}}return i}var h=i(13),u=i(31),c=i(1),f=i(8),d=i(24),p=f.getDataItemValue,g=f.converDataValue,v={cartesian2d:function(t,e,i){var n=i.getComponent("xAxis",e.get("xAxisIndex")),r=i.getComponent("yAxis",e.get("yAxisIndex")),a=n.get("type"),l=r.get("type"),h=[{name:"x",type:s(a),stackable:o(a)},{name:"y",type:s(l),stackable:o(l)}],c="category"===a;return u(h,t,["x","y","z"]),{dimensions:h,categoryIndex:c?0:1,categoryAxisModel:c?n:"category"===l?r:null}},polar:function(t,e,i){var n=e.get("polarIndex")||0,r=function(t){return t.get("polarIndex")===n},a=i.findComponents({mainType:"angleAxis",filter:r})[0],l=i.findComponents({mainType:"radiusAxis",filter:r})[0],h=l.get("type"),c=a.get("type"),f=[{name:"radius",type:s(h),stackable:o(h)},{name:"angle",type:s(c),stackable:o(c)}],d="category"===c;return u(f,t,["radius","angle","value"]),{dimensions:f,categoryIndex:d?1:0,categoryAxisModel:d?a:"category"===h?l:null}},geo:function(t,e,i){return{dimensions:u([{name:"lng"},{name:"lat"}],t,["lng","lat","value"])}}};t.exports=a},function(t,e,i){"use strict";var n=i(3),r=i(1);i(53),i(101),i(2).extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new n.Rect({shape:t.coordinateSystem.getRect(),style:r.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0}))}})},function(t,e,i){function n(t){t=t||{},o.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new a(t.style),this._rect=null,this.__clipPaths=[]}var r=i(1),a=i(148),o=i(57),s=i(73);n.prototype={constructor:n,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?o.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new a(t),this.dirty(!1),this}},r.inherits(n,o),r.mixin(n,s),t.exports=n},function(t,e,i){var n=i(4),r=i(9),a=i(33),o=Math.floor,s=Math.ceil,l=a.extend({type:"interval",_interval:0,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval||this.niceTicks(),this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice()},getTicks:function(){this._interval||this.niceTicks();var t=this._interval,e=this._extent,i=[],r=1e4;if(t){var a=this._niceExtent;e[0]r)return[];e[1]>a[1]&&i.push(e[1])}return i},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(i=-i,e.reverse());var r=n.nice(i/t,!0),a=[n.round(s(e[0]/r)*r),n.round(o(e[1]/r)*r)];this._interval=r,this._niceExtent=a}},niceExtent:function(t,e,i){var r=this._extent;if(r[0]===r[1])if(0!==r[0]){var a=r[0]/2;r[0]-=a,r[1]+=a}else r[1]=1;var l=r[1]-r[0];isFinite(l)||(r[0]=0,r[1]=1),this.niceTicks(t);var h=this._interval;e||(r[0]=n.round(o(r[0]/h)*h)),i||(r[1]=n.round(s(r[1]/h)*h))}});l.create=function(){return new l},t.exports=l},function(t,e,i){function n(t){this.group=new a.Group,this._symbolCtor=t||o}function r(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}var a=i(3),o=i(49),s=n.prototype;s.updateData=function(t,e){var i=this.group,n=t.hostModel,o=this._data,s=this._symbolCtor,l={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis")};t.diff(o).add(function(n){var a=t.getItemLayout(n);if(r(t,n,e)){var o=new s(t,n,l);o.attr("position",a),t.setItemGraphicEl(n,o),i.add(o)}}).update(function(h,u){var c=o.getItemGraphicEl(u),f=t.getItemLayout(h);return r(t,h,e)?(c?(c.updateData(t,h,l),a.updateProps(c,{position:f},n)):(c=new s(t,h),c.attr("position",f)),i.add(c),void t.setItemGraphicEl(h,c)):void i.remove(c)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},s.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},s.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll())},t.exports=n},,,function(t,e,i){var n=i(1),r=i(20),a=r.parseClassType,o=0,s={},l="_";s.getUID=function(t){return[t||"",o++,Math.random()].join(l)},s.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=a(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var o=a(i).main;t.hasSubTypes(i)&&e[o]&&(r=e[o](n))}return r},t},s.enableTopologicalTravel=function(t,e){function i(t){var i={},o=[];return n.each(t,function(s){var l=r(i,s),h=l.originalDeps=e(s),u=a(h,t);l.entryCount=u.length,0===l.entryCount&&o.push(s),n.each(u,function(t){n.indexOf(l.predecessor,t)<0&&l.predecessor.push(t);var e=r(i,t);n.indexOf(e.successor,t)<0&&e.successor.push(s)})}),{graph:i,noEntryList:o}}function r(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function a(t,e){var i=[];return n.each(t,function(t){n.indexOf(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,r,a){function o(t){h[t].entryCount--,0===h[t].entryCount&&u.push(t)}function s(t){c[t]=!0,o(t)}if(t.length){var l=i(e),h=l.graph,u=l.noEntryList,c={};for(n.each(t,function(t){c[t]=!0});u.length;){var f=u.pop(),d=h[f],p=!!c[f];p&&(r.call(a,f,d.originalDeps.slice()),delete c[f]),n.each(d.successor,p?s:o)}n.each(c,function(){throw new Error("Circle dependency may exists")})}}},t.exports=s},function(t,e){function i(t){for(var e=0;t>=u;)e|=1&t,t>>=1;return t+e}function n(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;r(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function r(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function a(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var a,o=t[n],s=e,l=n;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function o(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;s>l&&a(t,e[i+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[i+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[i+u])>0?o=u+1:l=u}return l}function s(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;s>l&&a(t,e[i+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}else{for(s=n-r;s>l&&a(t,e[i+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[i+u])<0?l=u:o=u+1}return l}function l(t,e){function i(t,e){u[y]=t,d[y]=e,y+=1}function n(){for(;y>1;){var t=y-2;if(t>=1&&d[t-1]<=d[t]+d[t+1]||t>=2&&d[t-2]<=d[t]+d[t-1])d[t-1]d[t+1])break;a(t)}}function r(){for(;y>1;){var t=y-2;t>0&&d[t-1]=r?l(n,r,a,c):h(n,r,a,c)))}function l(i,n,r,a){var l=0;for(l=0;n>l;l++)_[l]=t[i+l];var h=0,u=r,f=i;if(t[f++]=t[u++],0!==--a){if(1===n){for(l=0;a>l;l++)t[f+l]=t[u+l];return void(t[f+a]=_[h])}for(var d,g,v,m=p;;){d=0,g=0,v=!1;do if(e(t[u],_[h])<0){if(t[f++]=t[u++],g++,d=0,0===--a){v=!0;break}}else if(t[f++]=_[h++],d++,g=0,1===--n){v=!0;break}while(m>(d|g));if(v)break;do{if(d=s(t[u],_,h,n,0,e),0!==d){for(l=0;d>l;l++)t[f+l]=_[h+l];if(f+=d,h+=d,n-=d,1>=n){v=!0;break}}if(t[f++]=t[u++],0===--a){v=!0;break}if(g=o(_[h],t,u,a,0,e),0!==g){for(l=0;g>l;l++)t[f+l]=t[u+l];if(f+=g,u+=g,a-=g,0===a){v=!0;break}}if(t[f++]=_[h++],1===--n){v=!0;break}m--}while(d>=c||g>=c);if(v)break;0>m&&(m=0),m+=2}if(p=m,1>p&&(p=1),1===n){for(l=0;a>l;l++)t[f+l]=t[u+l];t[f+a]=_[h]}else{if(0===n)throw new Error;for(l=0;n>l;l++)t[f+l]=_[h+l]}}else for(l=0;n>l;l++)t[f+l]=_[h+l]}function h(i,n,r,a){var l=0;for(l=0;a>l;l++)_[l]=t[r+l];var h=i+n-1,u=a-1,f=r+a-1,d=0,g=0;if(t[f--]=t[h--],0!==--n){if(1===a){for(f-=n,h-=n,g=f+1,d=h+1,l=n-1;l>=0;l--)t[g+l]=t[d+l];return void(t[f]=_[u])}for(var v=p;;){var m=0,y=0,x=!1;do if(e(_[u],t[h])<0){if(t[f--]=t[h--],m++,y=0,0===--n){x=!0;break}}else if(t[f--]=_[u--],y++,m=0,1===--a){x=!0;break}while(v>(m|y));if(x)break;do{if(m=n-s(_[u],t,i,n,n-1,e),0!==m){for(f-=m,h-=m,n-=m,g=f+1,d=h+1,l=m-1;l>=0;l--)t[g+l]=t[d+l];if(0===n){x=!0;break}}if(t[f--]=_[u--],1===--a){x=!0;break}if(y=a-o(t[h],_,0,a,a-1,e),0!==y){for(f-=y,u-=y,a-=y,g=f+1,d=u+1,l=0;y>l;l++)t[g+l]=_[d+l];if(1>=a){x=!0;break}}if(t[f--]=t[h--],0===--n){x=!0;break}v--}while(m>=c||y>=c);if(x)break;0>v&&(v=0),v+=2}if(p=v,1>p&&(p=1),1===a){for(f-=n,h-=n,g=f+1,d=h+1,l=n-1;l>=0;l--)t[g+l]=t[d+l];t[f]=_[u]}else{if(0===a)throw new Error;for(d=f-(a-1),l=0;a>l;l++)t[d+l]=_[l]}}else for(d=f-(a-1),l=0;a>l;l++)t[d+l]=_[l]}var u,d,p=c,g=0,v=f,m=0,y=0;g=t.length,2*f>g&&(v=g>>>1);var _=[];m=120>g?5:1542>g?10:119151>g?19:40,u=[],d=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function h(t,e,r,o){r||(r=0),o||(o=t.length);var s=o-r;if(!(2>s)){var h=0;if(u>s)return h=n(t,r,o,e),void a(t,r,o,r+h,e);var c=new l(t,e),f=i(s);do{if(h=n(t,r,o,e),f>h){var d=s;d>f&&(d=f),a(t,r,r+d,r+h,e),h=d}c.pushRun(r,h),c.mergeRuns(),s-=h,r+=h}while(0!==s);c.forceMergeRuns()}}var u=32,c=7,f=256;t.exports=h},function(t,e,i){function n(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}var r=i(4),a=r.linearMap,o=i(1),s=[0,1],l=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};l.prototype={constructor:l,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){var t=this._extent.slice();return t},getPixelPrecision:function(t){return r.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count())),a(t,s,i,e)},coordToData:function(t,e){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count()));var o=a(t,i,s,e);return this.scale.scale(o)},getTicksCoords:function(){if(this.onBand){for(var t=this.getBands(),e=[],i=0;io;o++)e.push([a*o/i+n,a*(o+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i}},t.exports=l},function(t,e){"use strict";function i(t){return t}function n(t,e,n,r){this._old=t,this._new=e,this._oldKeyGetter=n||i,this._newKeyGetter=r||i}function r(t,e,i){for(var n=0;nt;t++)this._add&&this._add(h[t]);else this._add&&this._add(h)}}},t.exports=n},function(t,e){t.exports=function(t,e,i,n,r){n.eachRawSeriesByType(t,function(t){var r=t.getData(),a=t.get("symbol")||e,o=t.get("symbolSize");r.setVisual({legendSymbol:i||a,symbol:a,symbolSize:o}),n.isSeriesFiltered(t)||("function"==typeof o&&r.each(function(e){var i=t.getRawValue(e),n=t.getDataParams(e);r.setItemVisual(e,"symbolSize",o(i,n))}),r.each(function(t){var e=r.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&r.setItemVisual(t,"symbol",i),null!=n&&r.setItemVisual(t,"symbolSize",n)}))})}},function(t,e,i){var n=i(34);t.exports=function(){if(0!==n.debugMode)if(1==n.debugMode)for(var t in arguments)throw new Error(arguments[t]);else if(n.debugMode>1)for(var t in arguments)console.log(arguments[t])}},function(t,e,i){function n(t){r.call(this,t)}var r=i(37),a=i(7),o=i(1),s=i(63),l=i(144),h=new l(50);n.prototype={constructor:n,type:"image",brush:function(t,e){var i,n=this.style,r=n.image;if(n.bind(t,e),i="string"==typeof r?this._image:r,!i&&r){var a=h.get(r);if(!a)return i=new Image,i.onload=function(){i.onload=null;for(var t=0;t0?"top":"bottom",n="center"):c(a-f)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&f>a?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,verticalAlign:r}}function a(t,e,i){var n,r,a=u(-t.rotation),o=i[0]>i[1],s="start"===e&&!o||"start"!==e&&o;return c(a-f/2)?(r=s?"bottom":"top",n="center"):c(a-1.5*f)?(r=s?"top":"bottom",n="center"):(r="middle",n=1.5*f>a&&a>f/2?s?"left":"right":s?"right":"left"),{rotation:a,textAlign:n,verticalAlign:r}}var o=i(1),s=i(3),l=i(12),h=i(4),u=h.remRadian,c=h.isRadianAroundZero,f=Math.PI,d=function(t,e){this.opt=e,this.axisModel=t,o.defaults(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new s.Group({position:e.position.slice(),rotation:e.rotation})};d.prototype={constructor:d,hasBuilder:function(t){return!!p[t]},add:function(t){p[t].call(this)},getGroup:function(){return this.group}};var p={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent();this.group.add(new s.Line({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:o.extend({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle()),strokeContainThreshold:t.strokeContainThreshold,silent:!!t.axisLineSilent,z2:1}))}},axisTick:function(){var t=this.axisModel;if(t.get("axisTick.show")){for(var e=t.axis,i=t.getModel("axisTick"),n=this.opt,r=i.getModel("lineStyle"),a=i.get("length"),o=v(i,n.labelInterval),l=e.getTicksCoords(),h=[],u=0;uf[1]?-1:1,p=["start"===l?f[0]-d*c:"end"===l?f[1]+d*c:(f[0]+f[1])/2,"middle"===l?t.labelOffset+h*c:0];o="middle"===l?r(t,t.rotation,h):a(t,l,f);var g=new s.Text({style:{text:i,textFont:u.getFont(),fill:u.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:o.textAlign,textVerticalAlign:o.verticalAlign},position:p,rotation:o.rotation,silent:e.get("silent"),z2:1});g.eventData=n(e),g.eventData.targetType="axisName",g.eventData.name=i,this.group.add(g)}}},g=d.ifIgnoreOnTick=function(t,e,i){var n,r=t.scale;return"ordinal"===r.type&&("function"==typeof i?(n=r.getTicks()[e],!i(n,r.getLabel(n))):e%(i+1))},v=d.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};t.exports=d},function(t,e,i){function n(t){return o.isObject(t)&&null!=t.value?t.value:t; -}function r(){return"category"===this.get("type")&&o.map(this.get("data"),n)}function a(){return s.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))}var o=i(1),s=i(25);t.exports={getFormattedLabels:a,getCategories:r}},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(10),a=i(1),o=i(68),s=r.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this._resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this._resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this._resetRange()},setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},getMin:function(){var t=this.option;return null!=t.rangeStart?t.rangeStart:t.min},getMax:function(){var t=this.option;return null!=t.rangeEnd?t.rangeEnd:t.max},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},_resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}});a.merge(s.prototype,i(51));var l={gridIndex:0};o("x",s,n,l),o("y",s,n,l),t.exports=s},function(t,e,i){function n(t,e,i){return i.getComponent("grid",t.get("gridIndex"))===e}function r(t){var e,i=t.model,n=i.getFormattedLabels(),r=1,a=n.length;a>40&&(r=Math.ceil(a/40));for(var o=0;a>o;o+=r)if(!t.isLabelIgnored(o)){var s=i.getTextRect(n[o]);e?e.union(s):e=s}return e}function a(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this._model=t}function o(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}var s=i(14),l=i(25),h=i(1),u=i(111),c=i(109),f=h.each,d=l.ifAxisCrossZero,p=l.niceScaleExtent;i(112);var g=a.prototype;g.type="grid",g.getRect=function(){return this._rect},g.update=function(t,e){function i(t){var e=n[t];for(var i in e){var r=e[i];if(r&&("category"===r.type||!d(r)))return!0}return!1}var n=this._axesMap;this._updateScale(t,this._model),f(n.x,function(t){p(t,t.model)}),f(n.y,function(t){p(t,t.model)}),f(n.x,function(t){i("y")&&(t.onZero=!1)}),f(n.y,function(t){i("x")&&(t.onZero=!1)}),this.resize(this._model,e)},g.resize=function(t,e){function i(){f(a,function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),o(t,e?n.x:n.y)})}var n=s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var a=this._axesList;i(),t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=r(t);if(e){var i=t.isHorizontal()?"height":"width",a=t.model.get("axisLabel.margin");n[i]-=e[i]+a,"top"===t.position?n.y+=e.height+a:"left"===t.position&&(n.x+=e.width+a)}}}),i())},g.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)return i[n];return i[e]}},g.getCartesian=function(t,e){var i="x"+t+"y"+e;return this._coordsMap[i]},g._initCartesian=function(t,e,i){function r(i){return function(r,h){if(n(r,t,e)){var u=r.get("position");"x"===i?("top"!==u&&"bottom"!==u&&(u="bottom"),a[u]&&(u="top"===u?"bottom":"top")):("left"!==u&&"right"!==u&&(u="left"),a[u]&&(u="left"===u?"right":"left")),a[u]=!0;var f=new c(i,l.createScaleByModel(r),[0,0],r.get("type"),u),d="category"===f.type;f.onBand=d&&r.get("boundaryGap"),f.inverse=r.get("inverse"),f.onZero=r.get("axisLine.onZero"),r.axis=f,f.model=r,f.index=h,this._axesList.push(f),o[i][h]=f,s[i]++}}}var a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};return e.eachComponent("xAxis",r("x"),this),e.eachComponent("yAxis",r("y"),this),s.x&&s.y?(this._axesMap=o,void f(o.x,function(t,e){f(o.y,function(i,n){var r="x"+e+"y"+n,a=new u(r);a.grid=this,this._coordsMap[r]=a,this._coordsList.push(a),a.addAxis(t),a.addAxis(i)},this)},this)):(this._axesMap={},void(this._axesList=[]))},g._updateScale=function(t,e){function i(t,e,i){f(i.coordDimToDataDim(e.dim),function(i){e.scale.unionExtent(t.getDataExtent(i,"ordinal"!==e.scale.type))})}h.each(this._axesList,function(t){t.scale.setExtent(1/0,-(1/0))}),t.eachSeries(function(r){if("cartesian2d"===r.get("coordinateSystem")){var a=r.get("xAxisIndex"),o=r.get("yAxisIndex"),s=t.getComponent("xAxis",a),l=t.getComponent("yAxis",o);if(!n(s,e,t)||!n(l,e,t))return;var h=this.getCartesian(a,o),u=r.getData(),c=h.getAxis("x"),f=h.getAxis("y");"list"===u.type&&(i(u,c,r),i(u,f,r))}},this)},a.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,r){var o=new a(n,t,e);o.name="grid_"+r,o.resize(n,e),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(e){if("cartesian2d"===e.get("coordinateSystem")){var n=e.get("xAxisIndex"),r=e.get("yAxisIndex"),a=t.getComponent("xAxis",n),o=i[a.get("gridIndex")];e.coordinateSystem=o.getCartesian(n,r)}}),i},a.dimensions=u.prototype.dimensions,i(24).register("cartesian2d",a),t.exports=a},function(t,e){t.exports=function(t,e){e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem;if(i){var n=i.dimensions;"singleAxis"===i.type?e.each(n[0],function(t,n){e.setItemLayout(n,isNaN(t)?[NaN,NaN]:i.dataToPoint(t))}):e.each(n,function(t,n,r){e.setItemLayout(r,isNaN(t)||isNaN(n)?[NaN,NaN]:i.dataToPoint([t,n]))},!0)}})}},function(t,e){t.exports={clearColorPalette:function(){this._colorIdx=0,this._colorNameMap={}},getColorFromPalette:function(t,e){e=e||this;var i=e._colorIdx||0,n=e._colorNameMap||(e._colorNameMap={});if(n[t])return n[t];var r=this.get("color",!0)||[];if(r.length){var a=r[i];return t&&(n[t]=a),e._colorIdx=(i+1)%r.length,a}}}},function(t,e,i){var n=i(28),r=i(42),a=i(20),o=function(){this.group=new n,this.uid=r.getUID("viewComponent")};o.prototype={constructor:o,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var s=o.prototype;s.updateView=s.updateLayout=s.updateVisual=function(t,e,i,n){},a.enableClassExtend(o),a.enableClassManagement(o,{registerWhenExtend:!0}),t.exports=o},function(t,e,i){"use strict";var n=i(61),r=i(21),a=i(83),o=i(160),s=i(1),l=function(t){a.call(this,t),r.call(this,t),o.call(this,t),this.id=t.id||n()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(s.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i.5?e:t}function s(t,e,i,n,r){var o=t.length;if(1==r)for(var s=0;o>s;s++)n[s]=a(t[s],e[s],i);else for(var l=t[0].length,s=0;o>s;s++)for(var h=0;l>h;h++)n[s][h]=a(t[s][h],e[s][h],i)}function l(t,e,i){var n=t.length,r=e.length;if(n!==r){var a=n>r;if(a)t.length=r;else for(var o=n;r>o;o++)t.push(1===i?e[o]:_.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;ol;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function h(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;n>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function u(t,e,i,n,r,a,o,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=c(t[u],e[u],i[u],n[u],r,a,o);else for(var f=t[0].length,u=0;h>u;u++)for(var d=0;f>d;d++)s[u][d]=c(t[u][d],e[u][d],i[u][d],n[u][d],r,a,o)}function c(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function f(t){if(y(t)){var e=t.length;if(y(t[0])){for(var i=[],n=0;e>n;n++)i.push(_.call(t[n]));return i}return _.call(t)}return t}function d(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function p(t,e,i,n,r){var f=t._getter,p=t._setter,m="spline"===e,_=n.length;if(_){var x,b=n[0].value,w=y(b),M=!1,S=!1,T=w&&y(b[0])?2:1;n.sort(function(t,e){return t.time-e.time}),x=n[_-1].time;for(var A=[],C=[],I=n[0].value,L=!0,k=0;_>k;k++){A.push(n[k].time/x);var P=n[k].value;if(w&&h(P,I,T)||!w&&P===I||(L=!1),I=P,"string"==typeof P){var D=v.parse(P);D?(P=D,M=!0):S=!0}C.push(P)}if(!L){for(var O=C[_-1],k=0;_-1>k;k++)w?l(C[k],O,T):!isNaN(C[k])||isNaN(O)||S||M||(C[k]=O);w&&l(f(t._target,r),O,T);var E,z,R,B,N,F,V=0,G=0;if(M)var H=[0,0,0,0];var q=function(t,e){var i;if(G>e){for(E=Math.min(V+1,_-1),i=E;i>=0&&!(A[i]<=e);i--);i=Math.min(i,_-2)}else{for(i=V;_>i&&!(A[i]>e);i++);i=Math.min(i-1,_-2)}V=i,G=e;var n=A[i+1]-A[i];if(0!==n)if(z=(e-A[i])/n,m)if(B=C[i],R=C[0===i?i:i-1],N=C[i>_-2?_-1:i+1],F=C[i>_-3?_-1:i+2],w)u(R,B,N,F,z,z*z,z*z*z,f(t,r),T);else{var l;if(M)l=u(R,B,N,F,z,z*z,z*z*z,H,1),l=d(H);else{if(S)return o(B,N,z);l=c(R,B,N,F,z,z*z,z*z*z)}p(t,r,l)}else if(w)s(C[i],C[i+1],z,f(t,r),T);else{var l;if(M)s(C[i],C[i+1],z,H,1),l=d(H);else{if(S)return o(C[i],C[i+1],z);l=a(C[i],C[i+1],z)}p(t,r,l)}},W=new g({target:t._target,life:x,loop:t._loop,delay:t._delay,onframe:q,ondestroy:i});return e&&"spline"!==e&&(W.easing=e),W}}}var g=i(136),v=i(17),m=i(1),y=m.isArrayLike,_=Array.prototype.slice,x=function(t,e,i,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||n,this._setter=a||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};x.prototype={when:function(t,e){var i=this._tracks;for(var n in e){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:f(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;i++)t[i].call(this)},start:function(t){var e,i=this,n=0,r=function(){n--,n||i._doneCallback()};for(var a in this._tracks){var o=p(this,t,r,this._tracks[a],a);o&&(this._clipList.push(o),n++,this.animation&&this.animation.addClip(o),e=o)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var n=0;nt&&(t+=i),t}}},function(t,e){var i=2311;t.exports=function(){return"zr_"+i++}},function(t,e,i){var n=i(150),r=i(149);t.exports={buildPath:function(t,e,i){var a=e.points,o=e.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=r(a,o,i,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,h=0;(i?l:l-1)>h;h++){var u=s[2*h],c=s[2*h+1],f=a[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],f[0],f[1])}}else{"spline"===o&&(a=n(a,i)),t.moveTo(a[0][0],a[0][1]);for(var h=1,d=a.length;d>h;h++)t.lineTo(a[h][0],a[h][1])}i&&t.closePath()}}}},function(t,e){t.exports={buildPath:function(t,e){var i,n,r,a,o=e.x,s=e.y,l=e.width,h=e.height,u=e.r;0>l&&(o+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=r=a=u:u instanceof Array?1===u.length?i=n=r=a=u[0]:2===u.length?(i=r=u[0],n=a=u[1]):3===u.length?(i=u[0],n=a=u[1],r=u[2]):(i=u[0],n=u[1],r=u[2],a=u[3]):i=n=r=a=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),n+r>h&&(c=n+r,n*=h/c,r*=h/c),i+a>h&&(c=i+a,i*=h/c,a*=h/c),t.moveTo(o+i,s),t.lineTo(o+l-n,s),0!==n&&t.quadraticCurveTo(o+l,s,o+l,s+n),t.lineTo(o+l,s+h-r),0!==r&&t.quadraticCurveTo(o+l,s+h,o+l-r,s+h),t.lineTo(o+a,s+h),0!==a&&t.quadraticCurveTo(o,s+h,o,s+h-a),t.lineTo(o,s+i),0!==i&&t.quadraticCurveTo(o,s,o+i,s)}}},function(t,e,i){var n=i(1);t.exports={updateSelectedMap:function(t){this._selectTargetMap=n.reduce(t||[],function(t,e){return t[e.name]=e,t},{})},select:function(t){var e=this._selectTargetMap,i=e[t],r=this.get("selectedMode");"single"===r&&n.each(e,function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t){var e=this._selectTargetMap[t];e&&(e.selected=!1)},toggleSelected:function(t){var e=this._selectTargetMap[t];return null!=e?(this[e.selected?"unSelect":"select"](t),e.selected):void 0},isSelected:function(t){var e=this._selectTargetMap[t];return e&&e.selected}}},,,,function(t,e,i){var n=i(78),r=i(1),a=i(10),o=i(14),s=["value","category","time","log"];t.exports=function(t,e,i,l){r.each(s,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var s=this.layoutMode,l=s?o.getLayoutParams(e):{},h=n.getTheme();r.merge(e,h.get(a+"Axis")),r.merge(e,this.getDefaultOption()),e.type=i(t,e),s&&o.mergeLayoutParam(e,l,s)},defaultOption:r.mergeAll([{},n[a+"Axis"],l],!0)})}),a.registerSubTypeDefaulter(t+"Axis",r.curry(i,t))}},function(t,e){t.exports=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;rd;d++){var _=m(t,i,a,h,p[d]);c[0]=o(_,c[0]),f[0]=s(_,f[0])}for(y=v(e,n,l,u,g),d=0;y>d;d++){var x=m(e,n,l,u,g[d]);c[1]=o(x,c[1]),f[1]=s(x,f[1])}c[0]=o(t,c[0]),f[0]=s(t,f[0]),c[0]=o(h,c[0]),f[0]=s(h,f[0]),c[1]=o(e,c[1]),f[1]=s(e,f[1]),c[1]=o(u,c[1]),f[1]=s(u,f[1])},a.fromQuadratic=function(t,e,i,n,a,l,h,u){var c=r.quadraticExtremum,f=r.quadraticAt,d=s(o(c(t,i,a),1),0),p=s(o(c(e,n,l),1),0),g=f(t,i,a,d),v=f(e,n,l,p);h[0]=o(t,a,g),h[1]=o(e,l,v),u[0]=s(t,a,g),u[1]=s(e,l,v)},a.fromArc=function(t,e,i,r,a,o,s,p,g){var v=n.min,m=n.max,y=Math.abs(a-o);if(1e-4>y%d&&y>1e-4)return p[0]=t-i,p[1]=e-r,g[0]=t+i,void(g[1]=e+r);if(u[0]=h(a)*i+t,u[1]=l(a)*r+e,c[0]=h(o)*i+t,c[1]=l(o)*r+e,v(p,u,c),m(g,u,c),a%=d,0>a&&(a+=d),o%=d,0>o&&(o+=d),a>o&&!s?o+=d:o>a&&s&&(a+=d),s){var _=o;o=a,a=_}for(var x=0;o>x;x+=Math.PI/2)x>a&&(f[0]=h(x)*i+t,f[1]=l(x)*r+e,v(p,f,p),m(g,f,g))},t.exports=a},function(t,e,i){var n=i(37),r=i(1),a=i(18),o=function(t){n.call(this,t)};o.prototype={constructor:o,type:"text",brush:function(t,e){var i=this.style,n=i.x||0,r=i.y||0,o=i.text;if(null!=o&&(o+=""),i.bind(t,e),o){this.setTransform(t);var s,l=i.textAlign;if(i.textVerticalAlign){var h=a.getBoundingRect(o,t.font,i.textAlign,"top");switch(s="middle",i.textVerticalAlign){case"middle":r-=h.height/2-h.lineHeight/2;break;case"bottom":r-=h.height-h.lineHeight/2;break;default:r+=h.lineHeight/2}}else s=i.textBaseline;t.font=i.textFont||i.font,t.textAlign=l||"left",t.textAlign!==l&&(t.textAlign="left"),t.textBaseline=s||"alphabetic",t.textBaseline!==s&&(t.textBaseline="alphabetic");for(var u=a.measureText("国",t.font).width,c=o.split("\n"),f=0;f=0?parseFloat(t)/100*e:parseFloat(t):t}var r=i(18),a=i(7),o=new a,s=function(){};s.prototype={constructor:s,drawRectText:function(t,e,i){var a=this.style,s=a.text;if(null!=s&&(s+=""),s){t.save();var l,h,u=a.textPosition,c=a.textDistance,f=a.textAlign,d=a.textFont||a.font,p=a.textBaseline,g=a.textVerticalAlign;i=i||r.getBoundingRect(s,d,f,p);var v=this.transform;if(v&&(o.copy(e),o.applyTransform(v),e=o),u instanceof Array){if(l=e.x+n(u[0],e.width),h=e.y+n(u[1],e.height),f=f||"left",p=p||"top",g){switch(g){case"middle":h-=i.height/2-i.lineHeight/2;break;case"bottom":h-=i.height-i.lineHeight/2;break;default:h+=i.lineHeight/2}p="middle"}}else{var m=r.adjustTextPositionOnRect(u,e,i,c);l=m.x,h=m.y,f=f||m.textAlign,p=p||m.textBaseline}t.textAlign=f||"left",t.textBaseline=p||"alphabetic";var y=a.textFill,_=a.textStroke;y&&(t.fillStyle=y),_&&(t.strokeStyle=_),t.font=d,t.shadowBlur=a.textShadowBlur,t.shadowColor=a.textShadowColor||"transparent",t.shadowOffsetX=a.textShadowOffsetX,t.shadowOffsetY=a.textShadowOffsetY;for(var x=s.split("\n"),b=0;b0?e.animateTo(i,l,u||0,h,a):(e.attr(i),a&&a())}else e.attr(i),a&&a()}var v=i(1),m=i(164),y=Math.round,_=i(6),x=i(17),b=i(19),w=i(5),M=(i(29),{});M.Group=i(34),M.Image=i(48),M.Text=i(75),M.Circle=i(155),M.Sector=i(161),M.Ring=i(160),M.Polygon=i(157),M.Polyline=i(158),M.Rect=i(159),M.Line=i(156),M.BezierCurve=i(154),M.Arc=i(153),M.CompoundPath=i(149),M.LinearGradient=i(86),M.RadialGradient=i(150),M.BoundingRect=i(7),M.extendShape=function(t){return _.extend(t)},M.extendPath=function(t,e){return m.extendFromString(t,e)},M.makePath=function(t,e,i,n){var r=m.createFromString(t,e),a=r.getBoundingRect();if(i){var o=a.width/a.height;if("center"===n){var s,l=i.height*o;l<=i.width?s=i.height:(l=i.width,s=l/o);var h=i.x+i.width/2,u=i.y+i.height/2;i.x=h-l/2,i.y=u-s/2,i.width=l,i.height=s}this.resizePath(r,i)}return r},M.mergePath=m.mergePath,M.resizePath=function(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}},M.subPixelOptimizeLine=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth;return y(2*i.x1)===y(2*i.x2)&&(i.x1=i.x2=e(i.x1,n,!0)),y(2*i.y1)===y(2*i.y2)&&(i.y1=i.y2=e(i.y1,n,!0)),t},M.subPixelOptimizeRect=function(t){var e=M.subPixelOptimize,i=t.shape,n=t.style.lineWidth,r=i.x,a=i.y,o=i.width,s=i.height;return i.x=e(i.x,n,!0),i.y=e(i.y,n,!0),i.width=Math.max(e(r+o,n,!1)-i.x,0===o?0:1),i.height=Math.max(e(a+s,n,!1)-i.y,0===s?0:1),t},M.subPixelOptimize=function(t,e,i){var n=y(2*t);return(n+y(e))%2===0?n/2:(n+(i?1:-1))/2},M.setHoverStyle=function(t,e){"group"===t.type?t.traverse(function(t){"group"!==t.type&&u(t,e)}):u(t,e),t.on("mouseover",c).on("mouseout",f),t.on("emphasis",d).on("normal",p)},M.setText=function(t,e,i){var n=e.getShallow("position")||"inside",r=n.indexOf("inside")>=0?"white":i,a=e.getModel("textStyle");v.extend(t,{textDistance:e.getShallow("distance")||5,textFont:a.getFont(),textPosition:n,textFill:a.getTextColor()||r})},M.updateProps=function(t,e,i,n,r){g(!0,t,e,i,n,r)},M.initProps=function(t,e,i,n,r){g(!1,t,e,i,n,r)},M.getTransform=function(t,e){for(var i=b.identity([]);t&&t!==e;)b.mul(i,t.getLocalTransform(),i),t=t.parent;return i},M.applyTransform=function(t,e,i){return i&&(e=b.invert([],e)),w.applyTransform([],t,e)},M.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return a=M.applyTransform(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},M.groupTransition=function(t,e,i,n){function r(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function a(t){var e={position:w.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=v.extend({},t.shape)),e}if(t&&e){var o=r(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=a(t);t.attr(a(e)),M.updateProps(t,n,i,t.dataIndex)}}})}},t.exports=M},function(t,e){function i(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}var n={},r=1e-4;n.linearMap=function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},n.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?i(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},n.round=function(t){return+(+t).toFixed(10)},n.asc=function(t){return t.sort(function(t,e){return t-e}),t},n.getPrecision=function(t){if(isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},n.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n);return Math.max(-r+a,0)},n.MAX_SAFE_INTEGER=9007199254740991,n.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},n.isRadianAroundZero=function(t){return t>-r&&r>t},n.parseDate=function(t){return t instanceof Date?t:new Date("string"==typeof t?new Date(t.replace(/-/g,"/"))-new Date("1970/01/01"):Math.round(t))},n.quantity=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},n.nice=function(t,e){var i,r=n.quantity(t),a=t/r;return i=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,i*r},t.exports=n},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(t,e){var n=new i(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},normalize:function(t,e){var i=n.len(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}};n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t.exports=n},function(t,e,i){function n(t){r.call(this,t),this.path=new o}var r=i(37),a=i(1),o=i(28),s=i(146),l=i(63),h=l.prototype.getCanvasPattern,u=Math.abs;n.prototype={constructor:n,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path,r=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,l=a&&!!o.colorStops,u=r&&!!s.colorStops,c=a&&!!o.image,f=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d=this.getBoundingRect();l&&(this._fillGradient=i.getGradient(t,o,d)),u&&(this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=h.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=h.call(s,t));var p=i.lineDash,g=i.lineDashOffset,v=!!t.setLineDash,m=this.getGlobalScale();n.setScale(m[0],m[1]),this.__dirtyPath||p&&!v&&r?(n=this.path.beginPath(t),p&&!v&&(n.setLineDash(p),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),a&&n.fill(t),p&&v&&(t.setLineDash(p),t.lineDashOffset=g),r&&n.stroke(t),p&&v&&t.setLineDash([]),this.restoreTransform(t),(i.text||0===i.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),s.containStroke(a,o/l,t,e)))return!0}if(r.hasFill())return s.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(a.isObject(t))for(var n in t)i[n]=t[n];else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&u(t[0]-1)>1e-10&&u(t[3]-1)>1e-10?Math.sqrt(u(t[0]*t[3]-t[2]*t[1])):1}},n.extend=function(t){var e=function(e){n.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var a in i)!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(r[a]=i[a])}t.init&&t.init.call(this,e)};a.inherits(e,n);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},a.inherits(n,r),t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){this.x=t,this.y=e,this.width=i,this.height=n}var r=i(5),a=i(19),o=r.applyTransform,s=Math.min,l=Math.abs,h=Math.max;n.prototype={constructor:n,union:function(t){var e=s(t.x,this.x),i=s(t.y,this.y);this.width=h(t.x+t.width,this.x+this.width)-e,this.height=h(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[];return function(i){i&&(t[0]=this.x,t[1]=this.y,e[0]=this.x+this.width,e[1]=this.y+this.height,o(t,t,i),o(e,e,i),this.x=s(t[0],e[0]),this.y=s(t[1],e[1]),this.width=l(e[0]-t[0]),this.height=l(e[1]-t[1]))}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=a.create();return a.translate(r,r,[-e.x,-e.y]),a.scale(r,r,[i,n]),a.translate(r,r,[t.x,t.y]),r},intersect:function(t){var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(o>n||i>s||l>a||r>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new n(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},t.exports=n},function(t,e,i){var n=i(11),r=i(4),a=i(9),o=i(1),s=["x","y","z","radius","angle"],l={};l.createNameEach=function(t,e){t=t.slice();var i=o.map(t,l.capitalFirst);e=(e||[]).slice();var n=o.map(e,l.capitalFirst);return function(r,a){o.each(t,function(t,o){for(var s={name:t,capital:i[o]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function a(t,n){n.nodes.push(t),e(function(e){o.each(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function o(t){!n(t,s)&&r(t,s)&&(a(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;a(i,s);var l;do l=!1,t(o);while(l);return s}},l.defaultEmphasis=function(t,e){if(t){var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{};o.each(e,function(t){var e=o.retrieve(i[t],n[t]);null!=e&&(i[t]=e)})}},l.LABEL_OPTIONS=["position","show","textStyle","distance","formatter"],l.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},l.isDataItemOption=function(t){return o.isObject(t)&&!(t instanceof Array)},l.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isFinite(t)||null==t||"-"===t||(t=+r.parseDate(t)),null==t||""===t?NaN:+t)},l.createDataFormatModel=function(t,e){var i=new a;return o.mixin(i,l.dataFormatMixin),i.seriesIndex=e.seriesIndex,i.name=e.name||"",i.mainType=e.mainType,i.subType=e.subType,i.getData=function(){return t},i},l.dataFormatMixin={getDataParams:function(t,e){var i=this.getData(e),n=this.seriesIndex,r=this.name,a=this.getRawValue(t,e),o=i.getRawIndex(t),s=i.getName(t,!0),l=i.getRawDataItem(t);return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:n,seriesName:r,name:s,dataIndex:o,data:l,dataType:e,value:a,color:i.getItemVisual(t,"color"),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,r){e=e||"normal";var a=this.getData(i),o=a.getItemModel(t),s=this.getDataParams(t,i);null!=r&&s.value instanceof Array&&(s.value=s.value[r]);var l=o.get(["label",e,"formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?n.formatTpl(l,s):void 0},getRawValue:function(t,e){var i=this.getData(e),n=i.getRawDataItem(t);return null!=n?!o.isObject(n)||n instanceof Array?n:n.value:void 0},formatTooltip:o.noop},l.mappingToExists=function(t,e){e=(e||[]).slice();var i=o.map(t||[],function(t,e){return{exist:t}});return o.each(e,function(t,n){if(o.isObject(t))for(var r=0;r=i.length&&i.push({option:t})}}),i},l.isIdInner=function(t){return o.isObject(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")},l.truncate=function(t,e,i){if(!t)return t;for(var n=0,r=0,a=t.length;a>r&&e>n;r++)n+=t.charCodeAt(r)>255?2:1;return a>r&&(t=t.slice(0,r)+(i||"")),t},l.compressBatches=function(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var a=t[n].seriesId,o=l.normalizeToArray(t[n].dataIndex),s=i&&i[a],h=0,u=o.length;u>h;h++){var c=o[h];s&&s[c]?s[c]=null:(e[a]||(e[a]={}))[c]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var a=n(t[r],!0);a.length&&i.push({seriesId:r,dataIndex:a})}return i}var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)]},t.exports=l},function(t,e,i){function n(t,e,i,n){this.parentModel=e,this.ecModel=i,this.option=t,this.init&&(arguments.length<=4?this.init(t,e,i,n):this.init.apply(this,arguments))}var r=i(1),a=i(20);n.prototype={constructor:n,init:null,mergeOption:function(t){r.merge(this.option,t,!0)},get:function(t,e){if(!t)return this.option;"string"==typeof t&&(t=t.split("."));for(var i=this.option,n=this.parentModel,r=0;r=0;r--)n=a.merge(n,t[r],!0);this.__defaultOption=n}return this.__defaultOption}});l.enableClassExtend(u,function(t,e,i,n){a.extend(this,n),this.uid=s.getUID("componentModel")}),l.enableClassManagement(u,{registerWhenExtend:!0}),s.enableSubTypeDefaulter(u),s.enableTopologicalTravel(u,n),a.mixin(u,i(126)),t.exports=u},function(t,e,i){function n(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function r(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function a(t){var e=t.length;return"number"==typeof t?[t,t,t,t]:2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function o(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function s(t,e){return"{"+t+(null==e?"":e)+"}"}function l(t,e){c.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars,r=0;ro;o++)for(var l=0;lt?"0"+t:t}var c=i(1),f=i(4),d=["a","b","c","d","e","f","g"];t.exports={normalizeCssArray:a,addCommas:n,toCamelCase:r,encodeHTML:o,formatTpl:l,formatTime:h}},function(t,e){function i(t){var e={},i={},n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/);return n&&(i.ie=!0,i.version=n[1]),n&&(i.ie=!0,i.version=n[1]),r&&(i.edge=!0,i.version=r[1]),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=10)}}var n={};n="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:i(navigator.userAgent),t.exports=n},function(t,e,i){(function(e){function n(t){return f.isArray(t)||(t=[t]),t}function r(t,e){var i=t.dimensions,n=new m(f.map(i,t.getDimensionInfo,t),t.hostModel);v(n,t);for(var r=n._storage={},a=t._storage,o=0;o=0?r[s]=new l.constructor(a[s].length):r[s]=a[s]}return n}var a="undefined",o="undefined"==typeof window?e:window,s=typeof o.Float64Array===a?Array:o.Float64Array,l=typeof o.Int32Array===a?Array:o.Int32Array,h={"float":s,"int":l,ordinal:Array,number:Array,time:Array},u=i(9),c=i(45),f=i(1),d=i(8),p=f.isObject,g=["stackedOn","hasItemOption","_nameList","_idList","_rawData"],v=function(t,e){f.each(g.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods},m=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;r0&&(w+="__ec__"+u[b]),u[b]++),w&&(l[c]=w)}this._nameList=e,this._idList=l},y.count=function(){return this.indices.length},y.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r)return NaN;var a=n[t]&&n[t][r];if(i){var o=this._dimensionInfos[t];if(o&&o.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(a>=0&&l>0||0>=a&&0>l)&&(a+=l),s=s.stackedOn}}return a},y.getValues=function(t,e,i){var n=[];f.isArray(t)||(i=e,e=t,t=this.dimensions);for(var r=0,a=t.length;a>r;r++)n.push(this.get(t[r],e,i));return n},y.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},y.getDataExtent=function(t,e){t=this.getDimension(t);var i=this._storage[t],n=this.getDimensionInfo(t);e=n&&n.stackable&&e;var r,a=(this._extent||(this._extent={}))[t+!!e];if(a)return a;if(i){for(var o=1/0,s=-(1/0),l=0,h=this.count();h>l;l++)r=this.get(t,l,e),o>r&&(o=r),r>s&&(s=r);return this._extent[t+!!e]=[o,s]}return[1/0,-(1/0)]},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,a=this.count();a>r;r++){var o=this.get(t,r,e);isNaN(o)||(n+=o)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var a=0,o=r.length;o>a;a++){var s=r[a];if(n[s]===e)return a}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var a=e[n];if(i[a]===t)return n}return-1},y.indexOfRawIndex=function(t){for(var e=this.indices,i=0,n=e.length-1;n>=i;){var r=(i+n)/2|0;if(e[r]t))return r;n=r-1}}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,r=n[t];if(r){for(var a=Number.MAX_VALUE,o=-1,s=0,l=this.count();l>s;s++){var h=e-this.get(t,s,i),u=Math.abs(h);(a>u||u===a&&h>0)&&(a=u,o=s)}return o}return-1},y.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},y.getRawDataItem=function(t){ +return this._rawData[this.getRawIndex(t)]},y.getName=function(t){return this._nameList[this.indices[t]]||""},y.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},y.each=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=f.map(n(t),this.getDimension,this);var a=[],o=t.length,s=this.indices;r=r||this;for(var l=0;lh;h++)a[h]=this.get(t[h],l,i);a[h]=l,e.apply(r,a)}},y.filterSelf=function(t,e,i,r){"function"==typeof t&&(r=i,i=e,e=t,t=[]),t=f.map(n(t),this.getDimension,this);var a=[],o=[],s=t.length,l=this.indices;r=r||this;for(var h=0;hc;c++)o[c]=this.get(t[c],h,i);o[c]=h,u=e.apply(r,o)}u&&a.push(l[h])}return this.indices=a,this._extent={},this},y.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},y.map=function(t,e,i,a){t=f.map(n(t),this.getDimension,this);var o=r(this,t),s=o.indices=this.indices,l=o._storage,h=[];return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(h[0]=n,n=h);for(var r=0;rg;g+=f){f>p-g&&(f=p-g,u.length=f);for(var v=0;f>v;v++){var m=l[g+v];u[v]=d[m],c[v]=m}var y=i(u),m=c[n(u,y)||0];d[m]=y,h.push(m)}return a},y.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new u(this._rawData[t],e,e&&e.ecModel)},y.diff=function(t){var e=this._idList,i=t&&t._idList;return new c(t?t.indices:[],this.indices,function(t){return i[t]||t+""},function(t){return e[t]||t+""})},y.getVisual=function(t){var e=this._visual;return e&&e[t]},y.setVisual=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},y.setLayout=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},y.getLayout=function(t){return this._layout[t]},y.getItemLayout=function(t){return this._itemLayouts[t]},y.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?f.extend(this._itemLayouts[t]||{},e):e},y.clearItemLayouts=function(){this._itemLayouts.length=0},y.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=i},y.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var _=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};y.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(_,e)),this._graphicEls[t]=e},y.getItemGraphicEl=function(t){return this._graphicEls[t]},y.eachItemGraphicEl=function(t,e){f.each(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},y.cloneShallow=function(){var t=f.map(this.dimensions,this.getDimensionInfo,this),e=new m(t,this.hostModel);return e._storage=this._storage,v(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=f.extend({},this._extent)),e},y.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(f.slice(arguments)))})},y.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],y.CHANGABLE_METHODS=["filterSelf"],t.exports=m}).call(e,function(){return this}())},function(t,e,i){"use strict";function n(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,f=l.position,d=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=d.width+(g?-g.x+d.x:0);u=a+v,u>n||l.newline?(a=0,u=v,o+=s+i,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(g?-g.y+d.y:0);c=o+m,c>r||l.newline?(a+=s+i,o=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(f[0]=a,f[1]=o,"horizontal"===t?a=u+i:o=c+i)})}var r=i(1),a=i(7),o=i(4),s=i(11),l=o.parsePercent,h=r.each,u={},c=["left","right","top","bottom","width","height"];u.box=n,u.vbox=r.curry(n,"vertical"),u.hbox=r.curry(n,"horizontal"),u.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,a=l(t.x,n),o=l(t.y,r),h=l(t.x2,n),u=l(t.y2,r);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=r),i=s.normalizeCssArray(i||0),{width:Math.max(h-a-i[1]-i[3],0),height:Math.max(u-o-i[0]-i[2],0)}},u.getLayoutRect=function(t,e,i){i=s.normalizeCssArray(i||0);var n=e.width,r=e.height,o=l(t.left,n),h=l(t.top,r),u=l(t.right,n),c=l(t.bottom,r),f=l(t.width,n),d=l(t.height,r),p=i[2]+i[0],g=i[1]+i[3],v=t.aspect;switch(isNaN(f)&&(f=n-u-g-o),isNaN(d)&&(d=r-c-p-h),isNaN(f)&&isNaN(d)&&(v>n/r?f=.8*n:d=.8*r),null!=v&&(isNaN(f)&&(f=v*d),isNaN(d)&&(d=f/v)),isNaN(o)&&(o=n-u-f-g),isNaN(h)&&(h=r-c-d-p),t.left||t.right){case"center":o=n/2-f/2-i[3];break;case"right":o=n-f-g}switch(t.top||t.bottom){case"middle":case"center":h=r/2-d/2-i[0];break;case"bottom":h=r-d-p}o=o||0,h=h||0,isNaN(f)&&(f=n-o-(u||0)),isNaN(d)&&(d=r-h-(c||0));var m=new a(o+i[3],h+i[0],f,d);return m.margin=i,m},u.positionGroup=function(t,e,i,n){var a=t.getBoundingRect();e=r.extend(r.clone(e),{width:a.width,height:a.height}),e=u.getLayoutRect(e,i,n),t.attr("position",[e.x-a.x,e.y-a.y])},u.mergeLayoutParam=function(t,e,i){function n(n){var r={},s=0,l={},u=0,c=i.ignoreSize?1:2;if(h(n,function(e){l[e]=t[e]}),h(n,function(t){a(e,t)&&(r[t]=l[t]=e[t]),o(r,t)&&s++,o(l,t)&&u++}),u!==c&&s){if(s>=c)return r;for(var f=0;f',f=this.name;return"\x00-"===f&&(f=""),e?c+h(this.name)+" : "+o:(f&&h(f)+"
")+c+(s?h(s)+" : "+o:o)},ifEnableAnimation:function(){if(l.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()},getColorFromPalette:function(t,e){var i=this.ecModel,n=s.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipDataIndex:null});n.mixin(c,a.dataFormatMixin),n.mixin(c,s),t.exports=c},function(t,e,i){"use strict";function n(t){return t>-w&&w>t}function r(t){return t>w||-w>t}function a(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function o(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)}function s(t,e,i,r,a,o){var s=r+3*(e-i)-t,l=3*(i-2*e+t),h=3*(e-t),u=t-a,c=l*l-3*s*h,f=l*h-9*s*u,d=h*h-3*l*u,p=0;if(n(c)&&n(f))if(n(l))o[0]=0;else{var g=-h/l;g>=0&&1>=g&&(o[p++]=g)}else{var v=f*f-4*c*d;if(n(v)){var m=f/c,g=-l/s+m,y=-m/2;g>=0&&1>=g&&(o[p++]=g),y>=0&&1>=y&&(o[p++]=y)}else if(v>0){var _=b(v),w=c*l+1.5*s*(-f+_),M=c*l+1.5*s*(-f-_);w=0>w?-x(-w,T):x(w,T),M=0>M?-x(-M,T):x(M,T);var g=(-l-(w+M))/(3*s);g>=0&&1>=g&&(o[p++]=g)}else{var A=(2*c*l-3*s*f)/(2*b(c*c*c)),C=Math.acos(A)/3,L=b(c),I=Math.cos(C),g=(-l-2*L*I)/(3*s),y=(-l+L*(I+S*Math.sin(C)))/(3*s),k=(-l+L*(I-S*Math.sin(C)))/(3*s);g>=0&&1>=g&&(o[p++]=g),y>=0&&1>=y&&(o[p++]=y),k>=0&&1>=k&&(o[p++]=k)}}return p}function l(t,e,i,a,o){var s=6*i-12*e+6*t,l=9*e+3*a-3*t-9*i,h=3*e-3*t,u=0;if(n(l)){if(r(s)){var c=-h/s;c>=0&&1>=c&&(o[u++]=c)}}else{var f=s*s-4*l*h;if(n(f))o[0]=-s/(2*l);else if(f>0){var d=b(f),c=(-s+d)/(2*l),p=(-s-d)/(2*l);c>=0&&1>=c&&(o[u++]=c),p>=0&&1>=p&&(o[u++]=p)}}return u}function h(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-o)*r+o,u=(l-s)*r+s,c=(u-h)*r+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function u(t,e,i,n,r,o,s,l,h,u,c){var f,d,p,g,v,m=.005,y=1/0;A[0]=h,A[1]=u;for(var x=0;1>x;x+=.05)C[0]=a(t,i,r,s,x),C[1]=a(e,n,o,l,x),g=_(A,C),y>g&&(f=x,y=g);y=1/0;for(var w=0;32>w&&!(M>m);w++)d=f-m,p=f+m,C[0]=a(t,i,r,s,d),C[1]=a(e,n,o,l,d),g=_(C,A),d>=0&&y>g?(f=d,y=g):(L[0]=a(t,i,r,s,p),L[1]=a(e,n,o,l,p),v=_(L,A),1>=p&&y>v?(f=p,y=v):m*=.5);return c&&(c[0]=a(t,i,r,s,f),c[1]=a(e,n,o,l,f)),b(y)}function c(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function f(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function d(t,e,i,a,o){var s=t-2*e+i,l=2*(e-t),h=t-a,u=0;if(n(s)){if(r(l)){var c=-h/l;c>=0&&1>=c&&(o[u++]=c)}}else{var f=l*l-4*s*h;if(n(f)){var c=-l/(2*s);c>=0&&1>=c&&(o[u++]=c)}else if(f>0){var d=b(f),c=(-l+d)/(2*s),p=(-l-d)/(2*s);c>=0&&1>=c&&(o[u++]=c),p>=0&&1>=p&&(o[u++]=p)}}return u}function p(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function g(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}function v(t,e,i,n,r,a,o,s,l){var h,u=.005,f=1/0;A[0]=o,A[1]=s;for(var d=0;1>d;d+=.05){C[0]=c(t,i,r,d),C[1]=c(e,n,a,d);var p=_(A,C);f>p&&(h=d,f=p)}f=1/0;for(var g=0;32>g&&!(M>u);g++){var v=h-u,m=h+u;C[0]=c(t,i,r,v),C[1]=c(e,n,a,v);var p=_(C,A);if(v>=0&&f>p)h=v,f=p;else{L[0]=c(t,i,r,m),L[1]=c(e,n,a,m);var y=_(L,A);1>=m&&f>y?(h=m,f=y):u*=.5}}return l&&(l[0]=c(t,i,r,h),l[1]=c(e,n,a,h)),b(f)}var m=i(5),y=m.create,_=m.distSquare,x=Math.pow,b=Math.sqrt,w=1e-8,M=1e-4,S=b(3),T=1/3,A=y(),C=y(),L=y();t.exports={cubicAt:a,cubicDerivativeAt:o,cubicRootAt:s,cubicExtrema:l,cubicSubdivide:h,cubicProjectPoint:u,quadraticAt:c,quadraticDerivativeAt:f,quadraticRootAt:d,quadraticExtremum:p,quadraticSubdivide:g,quadraticProjectPoint:v}},function(t,e){function i(t){return t=Math.round(t),0>t?0:t>255?255:t}function n(t){return t=Math.round(t),0>t?0:t>360?360:t}function r(t){return 0>t?0:t>1?1:t}function a(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function o(t){return r(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function s(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function l(t,e,i){return t+(e-t)*i}function h(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in _)return _[e].slice();if("#"!==e.charAt(0)){var i=e.indexOf("("),n=e.indexOf(")");if(-1!==i&&n+1===e.length){var r=e.substr(0,i),s=e.substr(i+1,n-(i+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return;l=o(s.pop());case"rgb":if(3!==s.length)return;return[a(s[0]),a(s[1]),a(s[2]),l];case"hsla":if(4!==s.length)return;return s[3]=o(s[3]),u(s);case"hsl":if(3!==s.length)return;return u(s);default:return}}}else{if(4===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&4095>=h))return;return[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]}if(7===e.length){var h=parseInt(e.substr(1),16);if(!(h>=0&&16777215>=h))return;return[(16711680&h)>>16,(65280&h)>>8,255&h,1]}}}}function u(t){var e=(parseFloat(t[0])%360+360)%360/360,n=o(t[1]),r=o(t[2]),a=.5>=r?r*(n+1):r+n-r*n,l=2*r-a,h=[i(255*s(l,a,e+1/3)),i(255*s(l,a,e)),i(255*s(l,a,e-1/3))];return 4===t.length&&(h[3]=t[3]),h}function c(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,h=(s+o)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,f=((s-a)/6+l/2)/l;n===s?e=f-c:r===s?e=1/3+u-f:a===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var d=[360*e,i,h];return null!=t[3]&&d.push(t[3]),d}}function f(t,e){var i=h(t);if(i){for(var n=0;3>n;n++)0>e?i[n]=i[n]*(1-e)|0:i[n]=(255-i[n])*e+i[n]|0;return y(i,4===i.length?"rgba":"rgb")}}function d(t,e){var i=h(t);return i?((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1):void 0}function p(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[0,0,0,0];var r=t*(e.length-1),a=Math.floor(r),o=Math.ceil(r),s=e[a],h=e[o],u=r-a;return n[0]=i(l(s[0],h[0],u)),n[1]=i(l(s[1],h[1],u)),n[2]=i(l(s[2],h[2],u)),n[3]=i(l(s[3],h[3],u)),n}}function g(t,e,n){if(e&&e.length&&t>=0&&1>=t){var a=t*(e.length-1),o=Math.floor(a),s=Math.ceil(a),u=h(e[o]),c=h(e[s]),f=a-o,d=y([i(l(u[0],c[0],f)),i(l(u[1],c[1],f)),i(l(u[2],c[2],f)),r(l(u[3],c[3],f))],"rgba");return n?{color:d,leftIndex:o,rightIndex:s,value:a}:d}}function v(t,e,i,r){return t=h(t),t?(t=c(t),null!=e&&(t[0]=n(e)),null!=i&&(t[1]=o(i)),null!=r&&(t[2]=o(r)),y(u(t),"rgba")):void 0}function m(t,e){return t=h(t),t&&null!=e?(t[3]=r(e),y(t,"rgba")):void 0}function y(t,e){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}var _={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};t.exports={parse:h,lift:f,toHex:d,fastMapToColor:p,mapToColor:g,modifyHSL:v,modifyAlpha:m,stringify:y}},function(t,e,i){function n(t,e){var i=t+":"+e;if(h[i])return h[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;o>a;a++)r=Math.max(p.measureText(n[a],e).width,r);return u>c&&(u=0,h={}),u++,h[i]=r,r}function r(t,e,i,r){var a=((t||"")+"").split("\n").length,o=n(t,e),s=n("国",e),l=a*s,h=new d(0,0,o,l);switch(h.lineHeight=s,r){case"bottom":case"alphabetic":h.y-=s;break;case"middle":h.y-=s/2}switch(i){case"end":case"right":h.x-=h.width;break;case"center":h.x-=h.width/2}return h}function a(t,e,i,n){var r=e.x,a=e.y,o=e.height,s=e.width,l=i.height,h=o/2-l/2,u="left";switch(t){case"left":r-=n,a+=h,u="right";break;case"right":r+=n+s,a+=h,u="left";break;case"top":r+=s/2,a-=n+l,u="center";break;case"bottom":r+=s/2,a+=o+n,u="center";break;case"inside":r+=s/2,a+=h,u="center";break;case"insideLeft":r+=n,a+=h,u="left";break;case"insideRight":r+=s-n,a+=h,u="right";break;case"insideTop":r+=s/2,a+=n,u="center";break;case"insideBottom":r+=s/2,a+=o-l-n,u="center";break;case"insideTopLeft":r+=n,a+=n,u="left";break;case"insideTopRight":r+=s-n,a+=n,u="right";break;case"insideBottomLeft":r+=n,a+=o-l-n;break;case"insideBottomRight":r+=s-n,a+=o-l-n,u="right"}return{x:r,y:a,textAlign:u,textBaseline:"top"}}function o(t,e,i,r){if(!i)return"";r=f.defaults({ellipsis:"...",minCharacters:3,maxIterations:3,cnCharWidth:n("国",e),ascCharWidth:n("a",e)},r,!0),i-=n(r.ellipsis);for(var a=(t+"").split("\n"),o=0,l=a.length;l>o;o++)a[o]=s(a[o],e,i,r);return a.join("\n")}function s(t,e,i,r){for(var a=0;;a++){var o=n(t,e);if(i>o||a>=r.maxIterations){t+=r.ellipsis;break}var s=0===a?l(t,i,r):Math.floor(t.length*i/o);if(sr&&e>n;r++){var o=t.charCodeAt(r);n+=o>=0&&127>=o?i.ascCharWidth:i.cnCharWidth}return r}var h={},u=0,c=5e3,f=i(1),d=i(7),p={getWidth:n,getBoundingRect:r,adjustTextPositionOnRect:a,ellipsis:o,measureText:function(t,e){var i=f.getContext();return i.font=e,i.measureText(t)}};t.exports=p},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(){var t=new i(6);return n.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},rotate:function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t},scale:function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},invert:function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null}};t.exports=n},function(t,e,i){function n(t,e){var i=a.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function r(t,e,i){return this.superClass.prototype[e].apply(t,i)}var a=i(1),o={},s=".",l="___EC__COMPONENT__CONTAINER___",h=o.parseClassType=function(t){var e={main:"",sub:""};return t&&(t=t.split(s),e.main=t[0]||"",e.sub=t[1]||""),e};o.enableClassExtend=function(t,e){t.extend=function(i){var o=function(){e&&e.apply(this,arguments),t.apply(this,arguments)};return a.extend(o.prototype,i),o.extend=this.extend,o.superCall=n,o.superApply=r,a.inherits(o,this),o.superClass=this,o}},o.enableClassManagement=function(t,e){function i(t){var e=n[t.main];return e&&e[l]||(e=n[t.main]={},e[l]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(e=h(e),e.sub){if(e.sub!==l){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[l]&&(r=e?r[e]:null),i&&!r)throw new Error("Component "+t+"."+(e||"")+" not exists. Load it first.");return r},t.getClassesByMainType=function(t){t=h(t);var e=[],i=n[t.main];return i&&i[l]?a.each(i,function(t,i){i!==l&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=h(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return a.each(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=h(t);var e=n[t.main];return e&&e[l]},t.parseClassType=h,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t},o.setReadOnly=function(t,e){},t.exports=o},function(t,e,i){var n=i(134),r=i(38);i(135),i(133);var a=i(32),o=i(4),s=i(1),l=i(18),h={};h.getScaleExtent=function(t,e){var i=t.scale,n=i.getExtent(),r=n[1]-n[0];if("ordinal"===i.type)return isFinite(r)?n:[0,0];var a=e.getMin?e.getMin():e.get("min"),l=e.getMax?e.getMax():e.get("max"),h=e.getNeedCrossZero?e.getNeedCrossZero():!e.get("scale"),u=e.get("boundaryGap");s.isArray(u)||(u=[u||0,u||0]),u[0]=o.parsePercent(u[0],1),u[1]=o.parsePercent(u[1],1);var c=!0,f=!0;return null==a&&(a=n[0]-u[0]*r,c=!1),null==l&&(l=n[1]+u[1]*r,f=!1),"dataMin"===a&&(a=n[0]),"dataMax"===l&&(l=n[1]),h&&(a>0&&l>0&&!c&&(a=0),0>a&&0>l&&!f&&(l=0)),[a,l]},h.niceScaleExtent=function(t,e){var i=t.scale,n=h.getScaleExtent(t,e),r=null!=(e.getMin?e.getMin():e.get("min")),a=null!=(e.getMax?e.getMax():e.get("max")),o=e.get("splitNumber");i.setExtent(n[0],n[1]),i.niceExtent(o,r,a);var s=e.get("minInterval");if(isFinite(s)&&!r&&!a&&"interval"===i.type){var l=i.getInterval(),u=Math.max(Math.abs(l),s)/l;n=i.getExtent(),i.setExtent(u*n[0],n[1]*u),i.niceExtent(o)}var l=e.get("interval");null!=l&&i.setInterval&&i.setInterval(l)},h.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new n(t.getCategories(),[1/0,-(1/0)]);case"value":return new r;default:return(a.getClass(e)||r).create(t)}},h.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)},h.getAxisLabelInterval=function(t,e,i,n){var r,a=0,o=0,s=1;e.length>40&&(s=Math.floor(e.length/40));for(var h=0;h1?s:(a+1)*s-1},h.getFormattedLabels=function(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",e)}}(e),s.map(n,e)):"function"==typeof e?s.map(r,function(n,r){return e("category"===t.type?i.getLabel(n):n,r)},this):n},t.exports=h},function(t,e){var i=Array.prototype.slice,n=function(){this._$handlers={}};n.prototype={constructor:n,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var r=0;rr;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>3&&(e=i.call(e,1));for(var r=this._$handlers[t],a=r.length,o=0;a>o;){switch(n){case 1:r[o].h.call(r[o].ctx);break;case 2:r[o].h.call(r[o].ctx,e[1]);break;case 3:r[o].h.call(r[o].ctx,e[1],e[2]);break;default:r[o].h.apply(r[o].ctx,e)}r[o].one?(r.splice(o,1),a--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>4&&(e=i.call(e,1,e.length-1));for(var r=e[e.length-1],a=this._$handlers[t],o=a.length,s=0;o>s;){switch(n){case 1:a[s].h.call(r);break;case 2:a[s].h.call(r,e[1]);break;case 3:a[s].h.call(r,e[1],e[2]);break;default:a[s].h.apply(r,e)}a[s].one?(a.splice(s,1),o--):s++}}return this}},t.exports=n},function(t,e){"use strict";function i(){this._coordinateSystems=[]}var n={};i.prototype={constructor:i,create:function(t,e){var i=[];for(var r in n){var a=n[r].create(t,e);a&&(i=i.concat(a))}this._coordinateSystems=i},update:function(t,e){for(var i=this._coordinateSystems,n=0;n=0;if(n){var a="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];a&&r(t,a,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function o(t,e,i){h?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function s(t,e,i){h?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}var l=i(22),h="undefined"!=typeof window&&!!window.addEventListener,u=h?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};t.exports={clientToLocal:r,normalizeEvent:a,addEventListener:o,removeEventListener:s,stop:u,Dispatcher:l}},,function(t,e,i){"use strict";var n=i(3),r=i(7),a=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),o=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),s=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),f=Math.cos(h);t.arc(i,l,o,Math.PI-h,2*Math.PI+h);var d=.6*o,p=.7*o;t.bezierCurveTo(i+u-c*d,l+s+f*d,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*d,l+s+f*d,i-u,l+s),t.closePath()}}),l=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),h={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:o,pin:s,arrow:l,triangle:a},u={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},c={};for(var f in h)c[f]=new h[f];var d=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e){var i=e.symbolType,n=c[i];"none"!==e.symbolType&&(n||(i="rect",n=c[i]),u[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(t,n.shape))}}),p=function(t){if("image"!==this.type){var e=this.style,i=this.shape;i&&"line"===i.symbolType?e.stroke=t:this.__isEmptyBrush?(e.stroke=t,e.fill="#fff"):(e.fill&&(e.fill=t),e.stroke&&(e.stroke=t)),this.dirty(!1)}},g={createSymbol:function(t,e,i,a,o,s){var l=0===t.indexOf("empty");l&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var h;return h=0===t.indexOf("image://")?new n.Image({style:{image:t.slice(8),x:e,y:i,width:a,height:o}}):0===t.indexOf("path://")?n.makePath(t.slice(7),{},new r(e,i,a,o)):new d({shape:{symbolType:t,x:e,y:i,width:a,height:o}}),h.__isEmptyBrush=l,h.setColor=p,h.setColor(s),h}};t.exports=g},function(t,e,i){function n(){this.group=new o,this.uid=s.getUID("viewChart")}function r(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;is;s++)r(t.getItemGraphicEl(o[s]),i);else if(a)for(var h=a instanceof Array?a:[a],s=0,l=h.length;l>s;s++){var n=t.indexOfName(h[s]);r(t.getItemGraphicEl(n),i)}else t.eachItemGraphicEl(function(t){r(t,i)})}var o=i(34),s=i(43),l=i(20);n.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){a(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){a(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var h=n.prototype;h.updateView=h.updateLayout=h.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},l.enableClassExtend(n),l.enableClassManagement(n,{registerWhenExtend:!0}),t.exports=n},function(t,e,i){"use strict";var n=i(16),r=i(5),a=i(74),o=i(7),s=i(33).devicePixelRatio,l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},h=[],u=[],c=[],f=[],d=Math.min,p=Math.max,g=Math.cos,v=Math.sin,m=Math.sqrt,y=Math.abs,_="undefined"!=typeof Float32Array,x=function(){ +this.data=[],this._len=0,this._ctx=null,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._ux=0,this._uy=0};x.prototype={constructor:x,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=y(1/s/t)||0,this._uy=y(1/s/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),this._len=0,this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=y(t-this._xi)>this._ux||y(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(l.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(l.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(l.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=g(r)*i+t,this._xi=v(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(l.R,t,e,i,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();_&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;oe.length&&(this._expandData(),e=this.data);for(var i=0;ia&&(a=r+a),a%=r,g-=a*u,v-=a*c;u>0&&t>=g||0>u&&g>=t||0==u&&(c>0&&e>=v||0>c&&v>=e);)n=this._dashIdx,i=o[n],g+=u*i,v+=c*i,this._dashIdx=(n+1)%y,u>0&&l>g||0>u&&g>l||c>0&&h>v||0>c&&v>h||s[n%2?"moveTo":"lineTo"](u>=0?d(g,t):p(g,t),c>=0?d(v,e):p(v,e));u=g-t,c=v-e,this._dashOffset=-m(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,a,o){var s,l,h,u,c,f=this._dashSum,d=this._dashOffset,p=this._lineDash,g=this._ctx,v=this._xi,y=this._yi,_=n.cubicAt,x=0,b=this._dashIdx,w=p.length,M=0;for(0>d&&(d=f+d),d%=f,s=0;1>s;s+=.1)l=_(v,t,i,a,s+.1)-_(v,t,i,a,s),h=_(y,e,r,o,s+.1)-_(y,e,r,o,s),x+=m(l*l+h*h);for(;w>b&&(M+=p[b],!(M>d));b++);for(s=(M-d)/x;1>=s;)u=_(v,t,i,a,s),c=_(y,e,r,o,s),b%2?g.moveTo(u,c):g.lineTo(u,c),s+=p[b]/x,b=(b+1)%w;b%2!==0&&g.lineTo(a,o),l=a-u,h=o-c,this._dashOffset=-m(l*l+h*h)},_dashedQuadraticTo:function(t,e,i,n){var r=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,_&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=f[0]=f[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,s=0,d=0;df;){var d=s[f++];switch(1==f&&(n=s[f],r=s[f+1],e=n,i=r),d){case l.M:e=n=s[f++],i=r=s[f++],t.moveTo(n,r);break;case l.L:a=s[f++],o=s[f++],(y(a-n)>h||y(o-r)>u||f===c-1)&&(t.lineTo(a,o),n=a,r=o);break;case l.C:t.bezierCurveTo(s[f++],s[f++],s[f++],s[f++],s[f++],s[f++]),n=s[f-2],r=s[f-1];break;case l.Q:t.quadraticCurveTo(s[f++],s[f++],s[f++],s[f++]),n=s[f-2],r=s[f-1];break;case l.A:var p=s[f++],m=s[f++],_=s[f++],x=s[f++],b=s[f++],w=s[f++],M=s[f++],S=s[f++],T=_>x?_:x,A=_>x?1:_/x,C=_>x?x/_:1,L=Math.abs(_-x)>.001,I=b+w;L?(t.translate(p,m),t.rotate(M),t.scale(A,C),t.arc(0,0,T,b,I,1-S),t.scale(1/A,1/C),t.rotate(-M),t.translate(-p,-m)):t.arc(p,m,T,b,I,1-S),1==f&&(e=g(b)*_+p,i=v(b)*x+m),n=g(I)*_+p,r=v(I)*x+m;break;case l.R:e=n=s[f],i=r=s[f+1],t.rect(s[f++],s[f++],s[f++],s[f++]);break;case l.Z:t.closePath(),n=e,r=i}}}},x.CMD=l,t.exports=x},function(t,e){var i=function(t){this.colorStops=t||[]};i.prototype={constructor:i,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},t.exports=i},function(t,e,i){function n(t,e,i,n){if(!e)return t;var s=r(e[0]),l=a.isArray(s)&&s.length||1;i=i||[],n=n||"extra";for(var h=0;l>h;h++)if(!t[h]){var u=i[h]||n+(h-i.length);t[h]=o(e,h)?{type:"ordinal",name:u}:u}return t}function r(t){return a.isArray(t)?t:a.isObject(t)?t.value:t}var a=i(1),o=n.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var o=r(t[i]);if(!a.isArray(o))return!1;var o=o[e];if(null!=o&&isFinite(o))return!1;if(a.isString(o)&&"-"!==o)return!0}return!1};t.exports=n},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=0;e=0)){var o=this.getShallow(a);null!=o&&(i[t[r][0]]=o)}}return i}}},function(t,e,i){function n(){this._extent=[1/0,-(1/0)],this._interval=0,this.init&&this.init.apply(this,arguments)}var r=i(20),a=n.prototype;a.parse=function(t){return t},a.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},a.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},a.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},a.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},a.getExtent=function(){return this._extent.slice()},a.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},a.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof o&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,a=n.indexOf(r,t);return 0>a?this:(r.splice(a,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof o&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&r(t)?function(t,e,i,n){return f.isDataItemOption(t)&&(_.hasItemOption=!0),n===y?i:g(p(t),m[n])}:function(t,e,i,n){var r=p(t),a=g(r&&r[n],m[n]);f.isDataItemOption(t)&&(_.hasItemOption=!0);var o=s&&s.categoryAxesModels;return o&&o[e]&&"string"==typeof a&&(b[e]=b[e]||o[e].getCategories(),a=c.indexOf(b[e],a),0>a&&!isNaN(a)&&(a=+a)),a};return _.hasItemOption=!1,_.initData(t,x,w),_}function o(t){return"category"!==t&&"time"!==t}function s(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function l(t,e){var i,n=[],r=t&&t.dimensions[t.categoryIndex];if(r&&(i=t.categoryAxesModels[r.name]),i){var a=i.getCategories();if(a){var o=e.length;if(c.isArray(e[0])&&e[0].length>1){n=[];for(var s=0;o>s;s++)n[s]=a[e[s][t.categoryIndex||0]]}else n=a.slice(0)}}return n}var h=i(13),u=i(30),c=i(1),f=i(8),d=i(23),p=f.getDataItemValue,g=f.converDataValue,v={cartesian2d:function(t,e,i){var n=i.getComponent("xAxis",e.get("xAxisIndex")),r=i.getComponent("yAxis",e.get("yAxisIndex")),a=n.get("type"),l=r.get("type"),h=[{name:"x",type:s(a),stackable:o(a)},{name:"y",type:s(l),stackable:o(l)}],c="category"===a,f="category"===l;u(h,t,["x","y","z"]);var d={};return c&&(d.x=n),f&&(d.y=r),{dimensions:h,categoryIndex:c?0:f?1:-1,categoryAxesModels:d}},polar:function(t,e,i){var n=e.get("polarIndex")||0,r=function(t){return t.get("polarIndex")===n},a=i.findComponents({mainType:"angleAxis",filter:r})[0],l=i.findComponents({mainType:"radiusAxis",filter:r})[0],h=l.get("type"),c=a.get("type"),f=[{name:"radius",type:s(h),stackable:o(h)},{name:"angle",type:s(c),stackable:o(c)}],d="category"===c,p="category"===h;u(f,t,["radius","angle","value"]);var g={};return p&&(g.radius=l),d&&(g.angle=a),{dimensions:f,categoryIndex:d?1:p?0:-1,categoryAxesModels:g}},geo:function(t,e,i){return{dimensions:u([{name:"lng"},{name:"lat"}],t,["lng","lat","value"])}}};t.exports=a},function(t,e,i){"use strict";var n=i(3),r=i(1);i(54),i(105),i(2).extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new n.Rect({shape:t.coordinateSystem.getRect(),style:r.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0}))}})},function(t,e,i){function n(t){t=t||{},o.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new a(t.style),this._rect=null,this.__clipPaths=[]}var r=i(1),a=i(64),o=i(58),s=i(76);n.prototype={constructor:n,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?o.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new a(t),this.dirty(!1),this}},r.inherits(n,o),r.mixin(n,s),t.exports=n},function(t,e,i){var n=i(4),r=i(11),a=i(32),o=Math.floor,s=Math.ceil,l=a.extend({type:"interval",_interval:0,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval||this.niceTicks(),this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice()},getTicks:function(){this._interval||this.niceTicks();var t=this._interval,e=this._extent,i=[],r=1e4;if(t){var a=this._niceExtent;e[0]r)return[];e[1]>a[1]&&i.push(e[1])}return i},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(i=-i,e.reverse());var r=n.nice(i/t,!0),a=[n.round(s(e[0]/r)*r),n.round(o(e[1]/r)*r)];this._interval=r,this._niceExtent=a}},niceExtent:function(t,e,i){var r=this._extent;if(r[0]===r[1])if(0!==r[0]){var a=r[0]/2;r[0]-=a,r[1]+=a}else r[1]=1;var l=r[1]-r[0];isFinite(l)||(r[0]=0,r[1]=1),this.niceTicks(t);var h=this._interval;e||(r[0]=n.round(o(r[0]/h)*h)),i||(r[1]=n.round(s(r[1]/h)*h))}});l.create=function(){return new l},t.exports=l},function(t,e,i){function n(t){this.group=new a.Group,this._symbolCtor=t||o}function r(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}var a=i(3),o=i(49),s=n.prototype;s.updateData=function(t,e){var i=this.group,n=t.hostModel,o=this._data,s=this._symbolCtor,l={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis")};t.diff(o).add(function(n){var a=t.getItemLayout(n);if(r(t,n,e)){var o=new s(t,n,l);o.attr("position",a),t.setItemGraphicEl(n,o),i.add(o)}}).update(function(h,u){var c=o.getItemGraphicEl(u),f=t.getItemLayout(h);return r(t,h,e)?(c?(c.updateData(t,h,l),a.updateProps(c,{position:f},n)):(c=new s(t,h),c.attr("position",f)),i.add(c),void t.setItemGraphicEl(h,c)):void i.remove(c)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},s.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},s.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll())},t.exports=n},,,function(t,e,i){function n(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}var r=i(4),a=r.linearMap,o=i(1),s=[0,1],l=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};l.prototype={constructor:l,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){var t=this._extent.slice();return t},getPixelPrecision:function(t){return r.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count())),a(t,s,i,e)},coordToData:function(t,e){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(i=i.slice(),n(i,r.count()));var o=a(t,i,s,e);return this.scale.scale(o)},getTicksCoords:function(){if(this.onBand){for(var t=this.getBands(),e=[],i=0;io;o++)e.push([a*o/i+n,a*(o+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i}},t.exports=l},function(t,e,i){var n=i(1),r=i(20),a=r.parseClassType,o=0,s={},l="_";s.getUID=function(t){return[t||"",o++,Math.random()].join(l)},s.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=a(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var o=a(i).main;t.hasSubTypes(i)&&e[o]&&(r=e[o](n))}return r},t},s.enableTopologicalTravel=function(t,e){function i(t){var i={},o=[];return n.each(t,function(s){var l=r(i,s),h=l.originalDeps=e(s),u=a(h,t);l.entryCount=u.length,0===l.entryCount&&o.push(s),n.each(u,function(t){n.indexOf(l.predecessor,t)<0&&l.predecessor.push(t);var e=r(i,t);n.indexOf(e.successor,t)<0&&e.successor.push(s)})}),{graph:i,noEntryList:o}}function r(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function a(t,e){var i=[];return n.each(t,function(t){n.indexOf(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,r,a){function o(t){h[t].entryCount--,0===h[t].entryCount&&u.push(t)}function s(t){c[t]=!0,o(t)}if(t.length){var l=i(e),h=l.graph,u=l.noEntryList,c={};for(n.each(t,function(t){c[t]=!0});u.length;){var f=u.pop(),d=h[f],p=!!c[f];p&&(r.call(a,f,d.originalDeps.slice()),delete c[f]),n.each(d.successor,p?s:o)}n.each(c,function(){throw new Error("Circle dependency may exists")})}}},t.exports=s},function(t,e){function i(t){for(var e=0;t>=u;)e|=1&t,t>>=1;return t+e}function n(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;r(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function r(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function a(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var a,o=t[n],s=e,l=n;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function o(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;s>l&&a(t,e[i+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[i+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[i+u])>0?o=u+1:l=u}return l}function s(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;s>l&&a(t,e[i+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}else{for(s=n-r;s>l&&a(t,e[i+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[i+u])<0?l=u:o=u+1}return l}function l(t,e){function i(t,e){u[y]=t,d[y]=e,y+=1}function n(){for(;y>1;){var t=y-2;if(t>=1&&d[t-1]<=d[t]+d[t+1]||t>=2&&d[t-2]<=d[t]+d[t-1])d[t-1]d[t+1])break;a(t)}}function r(){for(;y>1;){var t=y-2;t>0&&d[t-1]=r?l(n,r,a,c):h(n,r,a,c)))}function l(i,n,r,a){var l=0;for(l=0;n>l;l++)_[l]=t[i+l];var h=0,u=r,f=i;if(t[f++]=t[u++],0!==--a){if(1===n){for(l=0;a>l;l++)t[f+l]=t[u+l];return void(t[f+a]=_[h])}for(var d,g,v,m=p;;){d=0,g=0,v=!1;do if(e(t[u],_[h])<0){if(t[f++]=t[u++],g++,d=0,0===--a){v=!0;break}}else if(t[f++]=_[h++],d++,g=0,1===--n){v=!0;break}while(m>(d|g));if(v)break;do{if(d=s(t[u],_,h,n,0,e),0!==d){for(l=0;d>l;l++)t[f+l]=_[h+l];if(f+=d,h+=d,n-=d,1>=n){v=!0;break}}if(t[f++]=t[u++],0===--a){v=!0;break}if(g=o(_[h],t,u,a,0,e),0!==g){for(l=0;g>l;l++)t[f+l]=t[u+l];if(f+=g,u+=g,a-=g,0===a){v=!0;break}}if(t[f++]=_[h++],1===--n){v=!0;break}m--}while(d>=c||g>=c);if(v)break;0>m&&(m=0),m+=2}if(p=m,1>p&&(p=1),1===n){for(l=0;a>l;l++)t[f+l]=t[u+l];t[f+a]=_[h]}else{if(0===n)throw new Error;for(l=0;n>l;l++)t[f+l]=_[h+l]}}else for(l=0;n>l;l++)t[f+l]=_[h+l]}function h(i,n,r,a){var l=0;for(l=0;a>l;l++)_[l]=t[r+l];var h=i+n-1,u=a-1,f=r+a-1,d=0,g=0;if(t[f--]=t[h--],0!==--n){if(1===a){for(f-=n,h-=n,g=f+1,d=h+1,l=n-1;l>=0;l--)t[g+l]=t[d+l];return void(t[f]=_[u])}for(var v=p;;){var m=0,y=0,x=!1;do if(e(_[u],t[h])<0){if(t[f--]=t[h--],m++,y=0,0===--n){x=!0;break}}else if(t[f--]=_[u--],y++,m=0,1===--a){x=!0;break}while(v>(m|y));if(x)break;do{if(m=n-s(_[u],t,i,n,n-1,e),0!==m){for(f-=m,h-=m,n-=m,g=f+1,d=h+1,l=m-1;l>=0;l--)t[g+l]=t[d+l];if(0===n){x=!0;break}}if(t[f--]=_[u--],1===--a){x=!0;break}if(y=a-o(t[h],_,0,a,a-1,e),0!==y){for(f-=y,u-=y,a-=y,g=f+1,d=u+1,l=0;y>l;l++)t[g+l]=_[d+l];if(1>=a){x=!0;break}}if(t[f--]=t[h--],0===--n){x=!0;break}v--}while(m>=c||y>=c);if(x)break;0>v&&(v=0),v+=2}if(p=v,1>p&&(p=1),1===a){for(f-=n,h-=n,g=f+1,d=h+1,l=n-1;l>=0;l--)t[g+l]=t[d+l];t[f]=_[u]}else{if(0===a)throw new Error;for(d=f-(a-1),l=0;a>l;l++)t[d+l]=_[l]}}else for(d=f-(a-1),l=0;a>l;l++)t[d+l]=_[l]}var u,d,p=c,g=0,v=f,m=0,y=0;g=t.length,2*f>g&&(v=g>>>1);var _=[];m=120>g?5:1542>g?10:119151>g?19:40,u=[],d=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function h(t,e,r,o){r||(r=0),o||(o=t.length);var s=o-r;if(!(2>s)){var h=0;if(u>s)return h=n(t,r,o,e),void a(t,r,o,r+h,e);var c=new l(t,e),f=i(s);do{if(h=n(t,r,o,e),f>h){var d=s;d>f&&(d=f),a(t,r,r+d,r+h,e),h=d}c.pushRun(r,h),c.mergeRuns(),s-=h,r+=h}while(0!==s);c.forceMergeRuns()}}var u=32,c=7,f=256;t.exports=h},function(t,e){"use strict";function i(t){return t}function n(t,e,n,r){this._old=t,this._new=e,this._oldKeyGetter=n||i,this._newKeyGetter=r||i}function r(t,e,i){for(var n=0;nt;t++)this._add&&this._add(h[t]);else this._add&&this._add(h)}}},t.exports=n},function(t,e){t.exports=function(t,e,i,n,r){n.eachRawSeriesByType(t,function(t){var r=t.getData(),a=t.get("symbol")||e,o=t.get("symbolSize");r.setVisual({legendSymbol:i||a,symbol:a,symbolSize:o}),n.isSeriesFiltered(t)||("function"==typeof o&&r.each(function(e){var i=t.getRawValue(e),n=t.getDataParams(e);r.setItemVisual(e,"symbolSize",o(i,n))}),r.each(function(t){var e=r.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&r.setItemVisual(t,"symbol",i),null!=n&&r.setItemVisual(t,"symbolSize",n)}))})}},function(t,e,i){var n=i(33);t.exports=function(){if(0!==n.debugMode)if(1==n.debugMode)for(var t in arguments)throw new Error(arguments[t]);else if(n.debugMode>1)for(var t in arguments)console.log(arguments[t])}},function(t,e,i){function n(t){r.call(this,t)}var r=i(37),a=i(7),o=i(1),s=i(66),l=i(148),h=new l(50);n.prototype={constructor:n,type:"image",brush:function(t,e){var i,n=this.style,r=n.image;if(n.bind(t,this,e),i="string"==typeof r?this._image:r,!i&&r){var a=h.get(r);if(!a)return i=new Image,i.onload=function(){i.onload=null;for(var t=0;t0?"top":"bottom",n="center"):p(a-y)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&y>a?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,verticalAlign:r}}function o(t,e,i,n){var r,a,o=d(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return p(o-y/2)?(a=l?"bottom":"top",r="center"):p(o-1.5*y)?(a=l?"top":"bottom",r="center"):(a="middle",r=1.5*y>o&&o>y/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,verticalAlign:a}}var s=i(1),l=i(8),h=i(3),u=i(9),c=i(13),f=i(4),d=f.remRadian,p=f.isRadianAroundZero,g=i(5),v=g.applyTransform,m=s.retrieve,y=Math.PI,_=function(t,e){this.opt=e,this.axisModel=t,s.defaults(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new h.Group;var i=new h.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};_.prototype={constructor:_,hasBuilder:function(t){return!!x[t]},add:function(t){x[t].call(this)},getGroup:function(){return this.group}};var x={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(v(r,r,n),v(a,a,n)),this.group.add(new h.Line(h.subPixelOptimizeLine({anid:"line",shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:s.extend({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle()),strokeContainThreshold:t.strokeContainThreshold,silent:!!t.axisLineSilent,z2:1})))}},axisTick:function(){var t=this.axisModel;if(t.get("axisTick.show"))for(var e=t.axis,i=t.getModel("axisTick"),n=this.opt,r=i.getModel("lineStyle"),a=i.get("length"),o=w(i,n.labelInterval),l=e.getTicksCoords(),u=e.scale.getTicks(),c=[],f=[],d=this._transform,p=0;pg[1]?-1:1,_=["start"===u?g[0]-v*p:"end"===u?g[1]+v*p:(g[0]+g[1])/2,"middle"===u?t.labelOffset+f*p:0],x=e.get("nameRotate");null!=x&&(x=x*y/180),s="middle"===u?a(t,null!=x?x:t.rotation,f):o(t,u,x||0,g);var b=i,w=m(t.axisNameTruncateLength,e.get("nameTruncateLength")),M=m(t.axisNameTruncateEllipsis,e.get("nameTruncateEllipsis"));null!=w&&(b=l.truncate(i,w,M));var S=new h.Text({anid:"name",__fullText:i,__truncatedText:b,style:{text:b,textFont:d.getFont(),fill:d.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.textAlign,textVerticalAlign:s.verticalAlign},position:_,rotation:s.rotation,silent:e.get("silent"),z2:1});if(null!=w){S.dataIndex=0;var T=new c(["value"],e);T.initData([{value:i,tooltip:{formatter:r}}]),S.dataModel=l.createDataFormatModel(T,{mainType:"axis"})}S.eventData=n(e),S.eventData.targetType="axisName",S.eventData.name=i,this._dumbGroup.add(S),S.updateTransform(),this.group.add(S),S.decomposeTransform()}}},b=_.ifIgnoreOnTick=function(t,e,i){var n,r=t.scale;return"ordinal"===r.type&&("function"==typeof i?(n=r.getTicks()[e],!i(n,r.getLabel(n))):e%(i+1))},w=_.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};t.exports=_},function(t,e,i){function n(t){return o.isObject(t)&&null!=t.value?t.value:t}function r(){return"category"===this.get("type")&&o.map(this.get("data"),n)}function a(){return s.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))}var o=i(1),s=i(21);t.exports={getFormattedLabels:a,getCategories:r}},function(t,e,i){var n=i(81),r=i(1),a=i(10),o=i(14),s=["value","category","time","log"];t.exports=function(t,e,i,l){r.each(s,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var s=this.layoutMode,l=s?o.getLayoutParams(e):{},h=n.getTheme();r.merge(e,h.get(a+"Axis")),r.merge(e,this.getDefaultOption()),e.type=i(t,e),s&&o.mergeLayoutParam(e,l,s)},defaultOption:r.mergeAll([{},n[a+"Axis"],l],!0)})}),a.registerSubTypeDefaulter(t+"Axis",r.curry(i,t))}},function(t,e,i){"use strict";function n(t,e){return e.type||(e.data?"category":"value")}var r=i(10),a=i(1),o=i(52),s=r.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this._resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this._resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this._resetRange()},setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},getMin:function(){var t=this.option;return null!=t.rangeStart?t.rangeStart:t.min},getMax:function(){var t=this.option;return null!=t.rangeEnd?t.rangeEnd:t.max},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},_resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}});a.merge(s.prototype,i(51));var l={gridIndex:0};o("x",s,n,l),o("y",s,n,l),t.exports=s},function(t,e,i){function n(t,e,i){return i.getComponent("grid",t.get("gridIndex"))===e}function r(t){var e,i=t.model,n=i.getFormattedLabels(),r=1,a=n.length;a>40&&(r=Math.ceil(a/40));for(var o=0;a>o;o+=r)if(!t.isLabelIgnored(o)){var s=i.getTextRect(n[o]);e?e.union(s):e=s}return e}function a(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this._model=t}function o(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}var s=i(14),l=i(21),h=i(1),u=i(117),c=i(115),f=h.each,d=l.ifAxisCrossZero,p=l.niceScaleExtent;i(118);var g=a.prototype;g.type="grid",g.getRect=function(){return this._rect},g.update=function(t,e){function i(t){var e=n[t];for(var i in e){var r=e[i];if(r&&("category"===r.type||!d(r)))return!0}return!1}var n=this._axesMap;this._updateScale(t,this._model),f(n.x,function(t){p(t,t.model)}),f(n.y,function(t){p(t,t.model)}),f(n.x,function(t){i("y")&&(t.onZero=!1)}),f(n.y,function(t){i("x")&&(t.onZero=!1)}),this.resize(this._model,e)},g.resize=function(t,e){function i(){f(a,function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),o(t,e?n.x:n.y)})}var n=s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var a=this._axesList;i(),t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=r(t);if(e){var i=t.isHorizontal()?"height":"width",a=t.model.get("axisLabel.margin");n[i]-=e[i]+a,"top"===t.position?n.y+=e.height+a:"left"===t.position&&(n.x+=e.width+a)}}}),i())},g.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)return i[n];return i[e]}},g.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}for(var n=0,r=this._coordsList;n.5?e:t}function s(t,e,i,n,r){var o=t.length;if(1==r)for(var s=0;o>s;s++)n[s]=a(t[s],e[s],i);else for(var l=t[0].length,s=0;o>s;s++)for(var h=0;l>h;h++)n[s][h]=a(t[s][h],e[s][h],i)}function l(t,e,i){var n=t.length,r=e.length;if(n!==r){var a=n>r;if(a)t.length=r;else for(var o=n;r>o;o++)t.push(1===i?e[o]:_.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;ol;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function h(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;n>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function u(t,e,i,n,r,a,o,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=c(t[u],e[u],i[u],n[u],r,a,o);else for(var f=t[0].length,u=0;h>u;u++)for(var d=0;f>d;d++)s[u][d]=c(t[u][d],e[u][d],i[u][d],n[u][d],r,a,o)}function c(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function f(t){if(y(t)){var e=t.length;if(y(t[0])){for(var i=[],n=0;e>n;n++)i.push(_.call(t[n]));return i}return _.call(t)}return t}function d(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function p(t,e,i,n,r){var f=t._getter,p=t._setter,m="spline"===e,_=n.length;if(_){var x,b=n[0].value,w=y(b),M=!1,S=!1,T=w&&y(b[0])?2:1;n.sort(function(t,e){return t.time-e.time}),x=n[_-1].time;for(var A=[],C=[],L=n[0].value,I=!0,k=0;_>k;k++){A.push(n[k].time/x);var P=n[k].value;if(w&&h(P,L,T)||!w&&P===L||(I=!1),L=P,"string"==typeof P){var D=v.parse(P);D?(P=D,M=!0):S=!0}C.push(P)}if(!I){for(var O=C[_-1],k=0;_-1>k;k++)w?l(C[k],O,T):!isNaN(C[k])||isNaN(O)||S||M||(C[k]=O);w&&l(f(t._target,r),O,T);var E,z,R,B,N,F,G=0,V=0;if(M)var H=[0,0,0,0];var q=function(t,e){var i;if(V>e){for(E=Math.min(G+1,_-1),i=E;i>=0&&!(A[i]<=e);i--);i=Math.min(i,_-2)}else{for(i=G;_>i&&!(A[i]>e);i++);i=Math.min(i-1,_-2)}G=i,V=e;var n=A[i+1]-A[i];if(0!==n)if(z=(e-A[i])/n,m)if(B=C[i],R=C[0===i?i:i-1],N=C[i>_-2?_-1:i+1],F=C[i>_-3?_-1:i+2],w)u(R,B,N,F,z,z*z,z*z*z,f(t,r),T);else{var l;if(M)l=u(R,B,N,F,z,z*z,z*z*z,H,1),l=d(H);else{if(S)return o(B,N,z);l=c(R,B,N,F,z,z*z,z*z*z)}p(t,r,l)}else if(w)s(C[i],C[i+1],z,f(t,r),T);else{var l;if(M)s(C[i],C[i+1],z,H,1),l=d(H);else{if(S)return o(C[i],C[i+1],z);l=a(C[i],C[i+1],z)}p(t,r,l)}},W=new g({target:t._target,life:x,loop:t._loop,delay:t._delay,onframe:q,ondestroy:i});return e&&"spline"!==e&&(W.easing=e),W}}}var g=i(142),v=i(17),m=i(1),y=m.isArrayLike,_=Array.prototype.slice,x=function(t,e,i,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||n,this._setter=a||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};x.prototype={when:function(t,e){var i=this._tracks;for(var n in e){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:f(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;i++)t[i].call(this)},start:function(t){var e,i=this,n=0,r=function(){n--,n||i._doneCallback()};for(var a in this._tracks){var o=p(this,t,r,this._tracks[a],a);o&&(this._clipList.push(o),n++,this.animation&&this.animation.addClip(o),e=o)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var n=0;nt&&(t+=i),t}}},function(t,e){var i=2311;t.exports=function(){return i++}},function(t,e){var i=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};i.prototype.getCanvasPattern=function(t){return this._canvasPattern||(this._canvasPattern=t.createPattern(this.image,this.repeat))},t.exports=i},function(t,e){function i(t,e,i){var n=e.x,r=e.x2,a=e.y,o=e.y2;e.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y);var s=t.createLinearGradient(n,a,r,o);return s}function n(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=e.x,s=e.y,l=e.r;e.global||(o=o*n+i.x,s=s*r+i.y,l*=a);var h=t.createRadialGradient(o,s,0,o,s,l);return h}var r=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],a=function(t){this.extendFrom(t)};a.prototype={constructor:a,fill:"#000000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,textFill:"#000",textStroke:null,textPosition:"inside",textBaseline:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,blend:null,bind:function(t,e,i){for(var n=this,a=i&&i.style,o=!a,s=0;s0},extendFrom:function(t,e){if(t){var i=this;for(var n in t)!t.hasOwnProperty(n)||!e&&i.hasOwnProperty(n)||(i[n]=t[n])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var a="radial"===e.type?n:i,o=a(t,e,r),s=e.colorStops,l=0;l=2){if(o&&"spline"!==o){var s=r(a,o,i,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,h=0;(i?l:l-1)>h;h++){var u=s[2*h],c=s[2*h+1],f=a[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],f[0],f[1])}}else{"spline"===o&&(a=n(a,i)),t.moveTo(a[0][0],a[0][1]);for(var h=1,d=a.length;d>h;h++)t.lineTo(a[h][0],a[h][1])}i&&t.closePath()}}}},function(t,e){t.exports={buildPath:function(t,e){var i,n,r,a,o=e.x,s=e.y,l=e.width,h=e.height,u=e.r;0>l&&(o+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=r=a=u:u instanceof Array?1===u.length?i=n=r=a=u[0]:2===u.length?(i=r=u[0],n=a=u[1]):3===u.length?(i=u[0],n=a=u[1],r=u[2]):(i=u[0],n=u[1],r=u[2],a=u[3]):i=n=r=a=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),n+r>h&&(c=n+r,n*=h/c,r*=h/c),i+a>h&&(c=i+a,i*=h/c,a*=h/c),t.moveTo(o+i,s),t.lineTo(o+l-n,s),0!==n&&t.quadraticCurveTo(o+l,s,o+l,s+n),t.lineTo(o+l,s+h-r),0!==r&&t.quadraticCurveTo(o+l,s+h,o+l-r,s+h),t.lineTo(o+a,s+h),0!==a&&t.quadraticCurveTo(o,s+h,o,s+h-a),t.lineTo(o,s+i),0!==i&&t.quadraticCurveTo(o,s,o+i,s)}}},function(t,e,i){var n=i(1);t.exports={updateSelectedMap:function(t){this._selectTargetMap=n.reduce(t||[],function(t,e){return t[e.name]=e,t},{})},select:function(t){var e=this._selectTargetMap,i=e[t],r=this.get("selectedMode");"single"===r&&n.each(e,function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t){var e=this._selectTargetMap[t];e&&(e.selected=!1)},toggleSelected:function(t){var e=this._selectTargetMap[t];return null!=e?(this[e.selected?"unSelect":"select"](t),e.selected):void 0},isSelected:function(t){var e=this._selectTargetMap[t];return e&&e.selected}}},,,,function(t,e){t.exports=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;rd;d++){var _=m(t,i,a,h,p[d]);c[0]=o(_,c[0]),f[0]=s(_,f[0])}for(y=v(e,n,l,u,g),d=0;y>d;d++){var x=m(e,n,l,u,g[d]);c[1]=o(x,c[1]),f[1]=s(x,f[1])}c[0]=o(t,c[0]),f[0]=s(t,f[0]),c[0]=o(h,c[0]),f[0]=s(h,f[0]),c[1]=o(e,c[1]),f[1]=s(e,f[1]),c[1]=o(u,c[1]),f[1]=s(u,f[1])},a.fromQuadratic=function(t,e,i,n,a,l,h,u){var c=r.quadraticExtremum,f=r.quadraticAt,d=s(o(c(t,i,a),1),0),p=s(o(c(e,n,l),1),0),g=f(t,i,a,d),v=f(e,n,l,p);h[0]=o(t,a,g),h[1]=o(e,l,v),u[0]=s(t,a,g),u[1]=s(e,l,v)},a.fromArc=function(t,e,i,r,a,o,s,p,g){var v=n.min,m=n.max,y=Math.abs(a-o);if(1e-4>y%d&&y>1e-4)return p[0]=t-i,p[1]=e-r,g[0]=t+i,void(g[1]=e+r);if(u[0]=h(a)*i+t,u[1]=l(a)*r+e,c[0]=h(o)*i+t,c[1]=l(o)*r+e,v(p,u,c),m(g,u,c),a%=d,0>a&&(a+=d),o%=d,0>o&&(o+=d),a>o&&!s?o+=d:o>a&&s&&(a+=d),s){var _=o;o=a,a=_}for(var x=0;o>x;x+=Math.PI/2)x>a&&(f[0]=h(x)*i+t,f[1]=l(x)*r+e,v(p,f,p),m(g,f,g))},t.exports=a},function(t,e,i){var n=i(37),r=i(1),a=i(18),o=function(t){n.call(this,t)};o.prototype={constructor:o,type:"text",brush:function(t,e){var i=this.style,n=i.x||0,r=i.y||0,o=i.text;if(null!=o&&(o+=""),i.bind(t,this,e),o){this.setTransform(t);var s,l=i.textAlign;if(i.textVerticalAlign){var h=a.getBoundingRect(o,t.font,i.textAlign,"top");switch(s="middle",i.textVerticalAlign){case"middle":r-=h.height/2-h.lineHeight/2;break;case"bottom":r-=h.height-h.lineHeight/2;break;default:r+=h.lineHeight/2}}else s=i.textBaseline;t.font=i.textFont||i.font,t.textAlign=l||"left",t.textAlign!==l&&(t.textAlign="left"),t.textBaseline=s||"alphabetic",t.textBaseline!==s&&(t.textBaseline="alphabetic");for(var u=a.measureText("国",t.font).width,c=o.split("\n"),f=0;f=0?parseFloat(t)/100*e:parseFloat(t):t}var r=i(18),a=i(7),o=new a,s=function(){};s.prototype={constructor:s,drawRectText:function(t,e,i){var a=this.style,s=a.text;if(null!=s&&(s+=""),s){t.save();var l,h,u=a.textPosition,c=a.textDistance,f=a.textAlign,d=a.textFont||a.font,p=a.textBaseline,g=a.textVerticalAlign;i=i||r.getBoundingRect(s,d,f,p);var v=this.transform;if(v&&(o.copy(e),o.applyTransform(v),e=o),u instanceof Array){if(l=e.x+n(u[0],e.width),h=e.y+n(u[1],e.height),f=f||"left",p=p||"top",g){switch(g){case"middle":h-=i.height/2-i.lineHeight/2;break;case"bottom":h-=i.height-i.lineHeight/2;break;default:h+=i.lineHeight/2}p="middle"}}else{var m=r.adjustTextPositionOnRect(u,e,i,c);l=m.x,h=m.y,f=f||m.textAlign,p=p||m.textBaseline}t.textAlign=f||"left",t.textBaseline=p||"alphabetic";var y=a.textFill,_=a.textStroke;y&&(t.fillStyle=y),_&&(t.strokeStyle=_),t.font=d,t.shadowBlur=a.textShadowBlur,t.shadowColor=a.textShadowColor||"transparent",t.shadowOffsetX=a.textShadowOffsetX,t.shadowOffsetY=a.textShadowOffsetY;for(var x=s.split("\n"),b=0;be&&a>n||e>a&&n>a)return 0;if(n===e)return 0;var o=e>n?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(o=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?o:0}},function(t,e,i){"use strict";var n=i(1),r=i(30),a=function(t,e,i,n,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",r.call(this,a)};a.prototype={constructor:a},n.inherits(a,r),t.exports=a},function(t,e,i){"use strict";function n(t){return t>s||-s>t}var r=i(19),a=i(5),o=r.identity,s=5e-5,l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},h=l.prototype;h.transform=null,h.needLocalTransform=function(){return n(this.rotation)||n(this.position[0])||n(this.position[1])||n(this.scale[0]-1)||n(this.scale[1]-1)},h.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||r.create(),i?this.getLocalTransform(n):o(n),e&&(i?r.mul(n,t.transform,n):r.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,n)):void(n&&o(n))},h.getLocalTransform=function(t){t=t||[],o(t);var e=this.origin,i=this.scale,n=this.rotation,a=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),n&&r.rotate(t,t,n),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=a[0],t[5]+=a[1],t},h.setTransform=function(t){var e=this.transform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},h.restoreTransform=function(t){var e=this.invTransform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])};var u=[];h.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(r.mul(u,t.invTransform,e),e=u);var i=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],o=this.position,s=this.scale;n(i-1)&&(i=Math.sqrt(i)),n(a-1)&&(a=Math.sqrt(a)),e[0]<0&&(i=-i),e[3]<0&&(a=-a),o[0]=e[4],o[1]=e[5],s[0]=i,s[1]=a,this.rotation=Math.atan2(-e[1]/a,e[0]/i)}},h.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},h.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&a.applyTransform(i,i,n),i},h.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&a.applyTransform(i,i,n),i},t.exports=l},function(t,e,i){"use strict";function n(t){r.each(a,function(e){this[e]=r.bind(t[e],t)},this)}var r=i(1),a=["getDom","getZr","getWidth","getHeight","dispatchAction","on","off","getDataURL","getConnectedDataURL","getModel","getOption"];t.exports=n},function(t,e,i){var n=i(1);i(53),i(86),i(87);var r=i(114),a=i(2);a.registerLayout(n.curry(r,"bar")),a.registerVisual(function(t){t.eachSeriesByType("bar",function(t){var e=t.getData();e.setVisual("legendSymbol","roundRect")})}),i(36)},function(t,e,i){"use strict";var n=i(15),r=i(35);t.exports=n.extend({type:"series.bar",dependencies:["grid","polar"],getInitialData:function(t,e){return r(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),r=n.getLayout("offset"),a=n.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return i[o]+=r+a/2,i}return[NaN,NaN]},brushSelector:"rect",defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,itemStyle:{normal:{barBorderColor:"#fff",barBorderWidth:0},emphasis:{barBorderColor:"#fff",barBorderWidth:0}}}})},function(t,e,i){"use strict";function n(t,e){var i=t.width>0?1:-1,n=t.height>0?1:-1;e=Math.min(e,Math.abs(t.width),Math.abs(t.height)),t.x+=i*e/2,t.y+=n*e/2,t.width-=i*e,t.height-=n*e}var r=i(1),a=i(3);r.extend(i(12).prototype,i(88)),t.exports=i(2).extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"===n&&this._renderOnCartesian(t,e,i),this.group},_renderOnCartesian:function(t,e,i){function o(e,i){var o=l.getItemLayout(e),s=l.getItemModel(e).get(p)||0;n(o,s);var h=new a.Rect({shape:r.extend({},o)});if(d){var u=h.shape,c=f?"height":"width",g={};u[c]=0,g[c]=o[c],a[i?"updateProps":"initProps"](h,{shape:g},t,e)}return h}var s=this.group,l=t.getData(),h=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),f=c.isHorizontal(),d=t.get("animation"),p=["itemStyle","normal","barBorderWidth"];l.diff(h).add(function(t){if(l.hasValue(t)){var e=o(t);l.setItemGraphicEl(t,e),s.add(e)}}).update(function(e,i){var r=h.getItemGraphicEl(i);if(!l.hasValue(e))return void s.remove(r);r||(r=o(e,!0));var u=l.getItemLayout(e),c=l.getItemModel(e).get(p)||0;n(u,c),a.updateProps(r,{shape:u},t,e),l.setItemGraphicEl(e,r),s.add(r)}).remove(function(e){var i=h.getItemGraphicEl(e);i&&(i.style.text="",a.updateProps(i,{shape:{width:0}},t,e,function(){s.remove(i)}))}).execute(),this._updateStyle(t,l,f),this._data=l},_updateStyle:function(t,e,i){function n(t,e,i,n,r){a.setText(t,e,i),t.text=n,"outside"===t.textPosition&&(t.textPosition=r)}e.eachItemGraphicEl(function(o,s){var l=e.getItemModel(s),h=e.getItemVisual(s,"color"),u=e.getItemVisual(s,"opacity"),c=e.getItemLayout(s),f=l.getModel("itemStyle.normal"),d=l.getModel("itemStyle.emphasis").getBarItemStyle();o.setShape("r",f.get("barBorderRadius")||0),o.useStyle(r.defaults({fill:h,opacity:u},f.getBarItemStyle()));var p=i?c.height>0?"bottom":"top":c.width>0?"left":"right",g=l.getModel("label.normal"),v=l.getModel("label.emphasis"),m=o.style;g.get("show")?n(m,g,h,r.retrieve(t.getFormattedLabel(s,"normal"),t.getRawValue(s)),p):m.text="",v.get("show")?n(d,v,h,r.retrieve(t.getFormattedLabel(s,"emphasis"),t.getRawValue(s)),p):d.text="",a.setHoverStyle(o,d)})},remove:function(t,e){var i=this.group;t.get("animation")?this._data&&this._data.eachItemGraphicEl(function(e){e.style.text="",a.updateProps(e,{shape:{width:0}},t,e.dataIndex,function(){i.remove(e)})}):i.removeAll()}})},function(t,e,i){t.exports={getBarItemStyle:i(32)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]])}},,,function(t,e,i){var n=i(1),r=i(2),a=r.PRIORITY;i(92),i(93),r.registerVisual(n.curry(i(46),"line","circle","line")),r.registerLayout(n.curry(i(54),"line")),r.registerProcessor(a.PROCESSOR.STATISTIC,n.curry(i(126),"line")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return n(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},function(t,e,i){"use strict";function n(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function o(t){return t>=0?1:-1}function s(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=i.onZero?0:n.scale.getExtent()[0],a=n.dim,s="x"===a||"radius"===a?1:0;return e.mapArray([a],function(n,l){for(var h,u=e.stackedOn;u&&o(u.get(a,l))===o(n);){h=u;break}var c=[];return c[s]=e.get(i.dim,l),c[1-s]=h?h.get(a,l,!0):r,t.dataToPoint(c)},!0)}function l(t,e){return null!=e.dataIndex?e.dataIndex:null!=e.name?t.indexOfName(e.name):void 0}function h(t,e,i){var n=a(t.getAxis("x")),r=a(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),s=Math.min(n[0],n[1]),l=Math.min(r[0],r[1]),h=Math.max(n[0],n[1])-s,u=Math.max(r[0],r[1])-l,c=i.get("lineStyle.normal.width")||2,f=i.get("clipOverflow")?c/2:Math.max(h,u);o?(l-=f,u+=2*f):(s-=f,h+=2*f);var d=new m.Rect({shape:{x:s,y:l,width:h,height:u}});return e&&(d.shape[o?"width":"height"]=0,m.initProps(d,{shape:{width:h,height:u}},i)),d}function u(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),a=r.getExtent(),o=n.getExtent(),s=Math.PI/180,l=new m.Sector({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-o[0]*s,endAngle:-o[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-o[0]*s,m.initProps(l,{shape:{endAngle:-o[1]*s}},i)),l}function c(t,e,i){return"polar"===t.type?u(t,e,i):h(t,e,i)}function f(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,a=[],o=0;o=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);o=new g(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else _.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),a=l(r,n);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else _.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new y.Polyline({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new y.Polygon({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];return i&&i.isLabelIgnored?d.bind(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var a=this._polyline,o=this._polygon,s=t.hostModel,l=v(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;r&&(h=f(l.current,i,r),u=f(l.stackedOnCurrent,i,r),c=f(l.next,i,r),d=f(l.stackedOnNext,i,r)),a.shape.__points=l.current,a.shape.points=h,m.updateProps(a,{shape:{points:c}},s),o&&(o.setShape({points:h,stackedOnPoints:u}),m.updateProps(o,{shape:{points:c,stackedOnPoints:d,__points:l.next}},s));for(var p=[],g=l.status,y=0;y=0?1:-1}function n(t,e,n){for(var r,a=t.getBaseAxis(),o=t.getOtherAxis(a),s=a.onZero?0:o.scale.getExtent()[0],l=o.dim,h="x"===l||"radius"===l?1:0,u=e.stackedOn,c=e.get(l,n);u&&i(u.get(l,n))===i(c);){r=u;break}var f=[];return f[h]=e.get(a.dim,n),f[1-h]=r?r.get(l,n,!0):s,t.dataToPoint(f)}function r(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}t.exports=function(t,e,i,a,o,s){for(var l=r(t,e),h=[],u=[],c=[],f=[],d=[],p=[],g=[],v=s.dimensions,m=0;mw;w++){var M=e[b];if(b>=a||0>b)break;if(n(M)){if(_){b+=o;continue}break}if(b===i)t[o>0?"moveTo":"lineTo"](M[0],M[1]),c(d,M);else if(m>0){var S=b+o,T=e[S];if(_)for(;T&&n(e[S]);)S+=o,T=e[S];var A=.5,C=e[x],T=e[S];if(!T||n(T))c(p,M);else{n(T)&&!_&&(T=M),s.sub(f,T,C);var I,L;if("x"===y||"y"===y){var k="x"===y?0:1;I=Math.abs(M[k]-C[k]),L=Math.abs(M[k]-T[k])}else I=s.dist(M,C),L=s.dist(M,T);A=L/(L+I),u(p,M,f,-m*(1-A))}l(d,d,v),h(d,d,g),l(p,p,v),h(p,p,g),t.bezierCurveTo(d[0],d[1],p[0],p[1],M[0],M[1]),u(d,M,f,m*A)}else t.lineTo(M[0],M[1]);x=b,b+=o}return w}function a(t,e){var i=[1/0,1/0],n=[-(1/0),-(1/0)];if(e)for(var r=0;rn[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var o=i(6),s=i(5),l=s.min,h=s.max,u=s.scaleAndAdd,c=s.copy,f=[],d=[],p=[];t.exports={Polyline:o.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},buildPath:function(t,e){var i=e.points,o=0,s=i.length,l=a(i,e.smoothConstraint);if(e.connectNulls){for(;s>0&&n(i[s-1]);s--);for(;s>o&&n(i[o]);o++);}for(;s>o;)o+=r(t,i,o,s,s,1,l.min,l.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Polygon:o.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},buildPath:function(t,e){var i=e.points,o=e.stackedOnPoints,s=0,l=i.length,h=e.smoothMonotone,u=a(i,e.smoothConstraint),c=a(o,e.smoothConstraint);if(e.connectNulls){for(;l>0&&n(i[l-1]);l--);for(;l>s&&n(i[s]);s++);}for(;l>s;){var f=r(t,i,s,l,l,1,u.min,u.max,e.smooth,h,e.connectNulls);r(t,o,s+f-1,f,l,-1,c.min,c.max,e.stackedOnSmooth,h,e.connectNulls),s+=f+1,t.closePath()}}})}},function(t,e,i){var n=i(1),r=i(2);i(97),i(98),i(75)("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(n.curry(i(70),"pie")),r.registerLayout(n.curry(i(100),"pie")),r.registerProcessor(n.curry(i(69),"pie"))},function(t,e,i){"use strict";var n=i(13),r=i(1),a=i(8),o=i(31),s=i(64),l=i(2).extendSeriesModel({type:"series.pie",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){l.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=o(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},getDataParams:function(t){var e=this._data,i=l.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},_defaultLabelLine:function(t){a.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,avoidLabelOverlap:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationEasing:"cubicOut",data:[]}});r.mixin(l,s),t.exports=l},function(t,e,i){function n(t,e,i,n){var a=e.getData(),o=this.dataIndex,s=a.getName(o),l=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),a.each(function(t){r(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),l,i)})}function r(t,e,i,n,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=i?n:0,h=[o*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function a(t,e){function i(){a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore}function n(){a.ignore=a.normalIgnore,o.ignore=o.normalIgnore}s.Group.call(this);var r=new s.Sector({z2:2}),a=new s.Polyline,o=new s.Text;this.add(r),this.add(a),this.add(o),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function o(t,e,i,n,r){var a=n.getModel("textStyle"),o="inside"===r||"inner"===r;return{fill:a.getTextColor()||(o?"#fff":t.getItemVisual(e,"color")),opacity:t.getItemVisual(e,"opacity"),textFont:a.getFont(),text:l.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var s=i(3),l=i(1),h=a.prototype;h.updateData=function(t,e,i){function n(){o.stopAnimation(!0),o.animateTo({shape:{r:c.r+10}},300,"elasticOut")}function a(){o.stopAnimation(!0),o.animateTo({shape:{r:c.r}},300,"elasticOut")}var o=this.childAt(0),h=t.hostModel,u=t.getItemModel(e),c=t.getItemLayout(e),f=l.extend({},c);f.label=null,i?(o.setShape(f),o.shape.endAngle=c.startAngle,s.updateProps(o,{shape:{endAngle:c.endAngle}},h,e)):s.updateProps(o,{shape:f},h,e);var d=u.getModel("itemStyle"),p=t.getItemVisual(e,"color");o.useStyle(l.defaults({lineJoin:"bevel",fill:p},d.getModel("normal").getItemStyle())),o.hoverStyle=d.getModel("emphasis").getItemStyle(),r(this,t.getItemLayout(e),u.get("selected"),h.get("selectedOffset"),h.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&h.ifEnableAnimation()&&o.on("mouseover",n).on("mouseout",a).on("emphasis",n).on("normal",a),this._updateLabel(t,e),s.setHoverStyle(this)},h._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,a=t.getItemModel(e),l=t.getItemLayout(e),h=l.label,u=t.getItemVisual(e,"color");s.updateProps(i,{shape:{points:h.linePoints||[[h.x,h.y],[h.x,h.y],[h.x,h.y]]}},r,e),s.updateProps(n,{style:{x:h.x,y:h.y}},r,e),n.attr({style:{textVerticalAlign:h.verticalAlign,textAlign:h.textAlign,textFont:h.font},rotation:h.rotation,origin:[h.x,h.y],z2:10});var c=a.getModel("label.normal"),f=a.getModel("label.emphasis"),d=a.getModel("labelLine.normal"),p=a.getModel("labelLine.emphasis"),g=c.get("position")||f.get("position");n.setStyle(o(t,e,"normal",c,g)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!f.get("show"),i.ignore=i.normalIgnore=!d.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(d.getModel("lineStyle").getLineStyle()),n.hoverStyle=o(t,e,"emphasis",f,g),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var v=d.get("smooth");v&&v===!0&&(v=.4),i.setShape({smooth:v})},l.inherits(a,s.Group);var u=i(27).extend({type:"pie",init:function(){var t=new s.Group;this._sectorGroup=t},render:function(t,e,i,r){if(!r||r.from!==this.uid){var o=t.getData(),s=this._data,h=this.group,u=e.get("animation"),c=!s,f=l.curry(n,this.uid,t,u,i),d=t.get("selectedMode");if(o.diff(s).add(function(t){var e=new a(o,t);c&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",f),o.setItemGraphicEl(t,e),h.add(e)}).update(function(t,e){var i=s.getItemGraphicEl(e);i.updateData(o,t),i.off("click"),d&&i.on("click",f),h.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=s.getItemGraphicEl(t);h.remove(e)}).execute(),u&&c&&o.count()>0){var p=o.getItemLayout(0),g=Math.max(i.getWidth(),i.getHeight())/2,v=l.bind(h.removeClipPath,h);h.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,v,t))}this._data=o}},_createClipPath:function(t,e,i,n,r,a,o){var l=new s.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return s.initProps(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},o,a),l}});t.exports=u},function(t,e,i){"use strict";function n(t,e,i,n,r,a,o){function s(e,i,n,r){for(var a=e;i>a;a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void l(a,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,r,a){for(var o=a>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,f=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&f>=o&&(f=o-10),!e&&o>=f&&(f=o+10),t[s].x=i+f*a,o=f}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,f=t.length,d=[],p=[],g=0;f>g;g++)u=t[g].y-c,0>u&&s(g,f,-u,r),c=t[g].y+t[g].height;0>o-c&&l(f-1,c-o);for(var g=0;f>g;g++)t[g].y>=i?p.push(t[g]):d.push(t[g]);h(d,!1,e,i,n,r),h(p,!0,e,i,n,r)}function r(t,e,i,r,a,o){for(var s=[],l=[],h=0;hb?-1:1)*_,L=C;n=I+(0>b?-5:5),r=L,c=[[S,T],[A,C],[I,L]]}f=M?"center":b>0?"left":"right"}var k=g.getModel("textStyle").getFont(),P=g.get("rotate")?0>b?-x+Math.PI:-x:0,D=t.getFormattedLabel(i,"normal")||l.getName(i),O=a.getBoundingRect(D,k,f,"top");u=!!P,d.label={x:n,y:r,position:v,height:O.height,len:y,len2:_,linePoints:c,textAlign:f,verticalAlign:"middle",font:k,rotation:P},M||h.push(d.label)}),!u&&t.get("avoidLabelOverlap")&&r(h,o,s,e,i,n)}},function(t,e,i){var n=i(4),r=n.parsePercent,a=i(99),o=i(1),s=2*Math.PI,l=Math.PI/180;t.exports=function(t,e,i,h){e.eachSeriesByType(t,function(t){var e=t.get("center"),h=t.get("radius");o.isArray(h)||(h=[0,h]),o.isArray(e)||(e=[e,e]);var u=i.getWidth(),c=i.getHeight(),f=Math.min(u,c),d=r(e[0],u),p=r(e[1],c),g=r(h[0],f/2),v=r(h[1],f/2),m=t.getData(),y=-t.get("startAngle")*l,_=t.get("minAngle")*l,x=m.getSum("value"),b=Math.PI/(x||m.count())*2,w=t.get("clockwise"),M=t.get("roseType"),S=m.getDataExtent("value");S[0]=0;var T=s,A=0,C=y,I=w?1:-1;if(m.each("value",function(t,e){var i;i="area"!==M?0===x?b:t*b:s/(m.count()||1),_>i?(i=_,T-=_):A+=t;var r=C+I*i;m.setItemLayout(e,{angle:i,startAngle:C,endAngle:r,clockwise:w,cx:d,cy:p,r0:g,r:M?n.linearMap(t,S,[g,v]):v}),C=r},!0),s>T)if(.001>=T){var L=s/m.count();m.each(function(t){var e=m.getItemLayout(t);e.startAngle=y+I*t*L,e.endAngle=y+I*(t+1)*L})}else b=T/A,C=y,m.each("value",function(t,e){var i=m.getItemLayout(e),n=i.angle===_?_:t*b;i.startAngle=C,i.endAngle=C+I*n,C+=n});a(t,v,u,c)})}},function(t,e,i){"use strict";i(52),i(102)},function(t,e,i){function n(t,e){function i(t,e){var i=n.getAxis(t);return i.toGlobalCoord(i.dataToCoord(0))}var n=t.coordinateSystem,r=e.axis,a={},o=r.position,s=r.onZero?"onZero":o,l=r.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={x:{top:u[2],bottom:u[3]},y:{left:u[0],right:u[1]}};c.x.onZero=Math.max(Math.min(i("y"),c.x.bottom),c.x.top),c.y.onZero=Math.max(Math.min(i("x"),c.y.right),c.y.left),a.position=["y"===l?c.y[s]:u[0],"x"===l?c.x[s]:u[3]];var f={x:0,y:1};a.rotation=Math.PI/2*f[l];var d={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=d[o],r.onZero&&(a.labelOffset=c[l][o]-c[l].onZero),e.getModel("axisTick").get("inside")&&(a.tickDirection=-a.tickDirection),e.getModel("axisLabel").get("inside")&&(a.labelDirection=-a.labelDirection);var p=e.getModel("axisLabel").get("rotate");return a.labelRotation="top"===s?-p:p,a.labelInterval=r.getLabelInterval(),a.z2=1,a}var r=i(1),a=i(3),o=i(50),s=o.ifIgnoreOnTick,l=o.getInterval,h=["axisLine","axisLabel","axisTick","axisName"],u=["splitArea","splitLine"],c=i(2).extendComponentView({type:"axis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("grid",t.get("gridIndex")),a=n(i,t),s=new o(t,a);r.each(h,s.add,s),this.group.add(s.getGroup()),r.each(u,function(e){t.get(e+".show")&&this["_"+e](t,i,a.labelInterval)},this)}},_splitLine:function(t,e,i){var n=t.axis,o=t.getModel("splitLine"),h=o.getModel("lineStyle"),u=h.get("width"),c=h.get("color"),f=l(o,i);c=r.isArray(c)?c:[c];for(var d=e.coordinateSystem.getRect(),p=n.isHorizontal(),g=[],v=0,m=n.getTicksCoords(),y=[],_=[],x=0;xi&&(i=Math.min(i,u),u-=i,t.width=i,c--)}),f=(u-s)/(c+(c-1)*h),f=Math.max(f,0);var d,p=0;o.each(i,function(t,e){t.width||(t.width=f),d=t,p+=t.width*(1+h)}),d&&(p-=d.width*h);var g=-p/2;o.each(i,function(t,i){r[e][i]=r[e][i]||{offset:g,width:t.width},g+=t.width*(1+h)})}),r}function a(t,e,i){var a=r(o.filter(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),s={};e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),o=n(t),l=a[r.index][o],h=l.offset,u=l.width,c=i.getOtherAxis(r),f=t.get("barMinHeight")||0,d=r.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=i.dataToPoints(e,!0);s[o]=s[o]||[],e.setLayout({offset:h,size:u}),e.each(c.dim,function(t,i){if(!isNaN(t)){s[o][i]||(s[o][i]={p:d,n:d});var n,r,a,l,g=t>=0?"p":"n",v=p[i],m=s[o][i][g];c.isHorizontal()?(n=m,r=v[1]+h,a=v[0]-m,l=u,Math.abs(a)a?-1:1)*f),s[o][i][g]+=a):(n=v[0]+h,r=m,a=u,l=v[1]-m,Math.abs(l)=l?-1:1)*f),s[o][i][g]+=l),e.setItemLayout(i,{x:n,y:r,width:a,height:l})}},!0)},this)}var o=i(1),s=i(4),l=s.parsePercent;t.exports=a},function(t,e,i){var n=i(3),r=i(1),a=Math.PI;t.exports=function(t,e){e=e||{},r.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new n.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),o=new n.Arc({shape:{startAngle:-a/2,endAngle:-a/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),s=new n.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*a/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*a/2}).delay(300).start("circularInOut");var l=new n.Group;return l.add(o),l.add(s),l.add(i),l.resize=function(){var e=t.getWidth()/2,n=t.getHeight()/2;o.setShape({cx:e,cy:n});var r=o.shape.r;s.setShape({x:e-r,y:n-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},l.resize(),l}},function(t,e,i){function n(t,e){for(var i in e)x.hasClass(i)||("object"==typeof e[i]?t[i]=t[i]?c.merge(t[i],e[i],!1):c.clone(e[i]):null==t[i]&&(t[i]=e[i]))}function r(t){t=t,this.option={},this.option[w]=1,this._componentsMap={},this._seriesIndices=null,n(t,this._theme.option),c.merge(t,b,!1),this.mergeOption(t)}function a(t,e){c.isArray(e)||(e=e?[e]:[]);var i={};return p(e,function(e){i[e]=(t[e]||[]).slice()}),i}function o(t,e){var i={};p(e,function(t,e){var n=t.exist;n&&(i[n.id]=t)}),p(e,function(e,n){var r=e.option;if(c.assert(!r||null==r.id||!i[r.id]||i[r.id]===e,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&(i[r.id]=e),_(r)){var a=s(t,r,e.exist);e.keyInfo={mainType:t,subType:a}}}),p(e,function(t,e){var n=t.exist,r=t.option,a=t.keyInfo;if(_(r)){if(a.name=null!=r.name?r.name+"":n?n.name:"\x00-",n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(i[a.id])}i[a.id]=t}})}function s(t,e,i){var n=e.type?e.type:i?i.subType:x.determineSubType(t,e);return n}function l(t){return v(t,function(t){return t.componentIndex})||[]}function h(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function u(t){}var c=i(1),f=i(8),d=i(12),p=c.each,g=c.filter,v=c.map,m=c.isArray,y=c.indexOf,_=c.isObject,x=i(10),b=i(118),w="\x00_ec_inner",M=d.extend({constructor:M,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new d(i),this._optionManager=n},setOption:function(t,e){c.assert(!(w in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption()},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):r.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&p(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,r){var s=f.normalizeToArray(t[e]),h=f.mappingToExists(n[e],s);o(e,h);var u=a(n,r);i[e]=[],n[e]=[],p(h,function(t,r){var a=t.exist,o=t.option;if(c.assert(_(o)||a,"Empty component definition"),o){var s=x.getClass(e,t.keyInfo.subType,!0);a&&a instanceof s?(a.mergeOption(o,this),a.optionUpdated(o,!1)):(a=new s(o,this,this,c.extend({dependentModels:u,componentIndex:r},t.keyInfo)),a.optionUpdated(null,!0))}else a.mergeOption({},this),a.optionUpdated({},!1);n[e][r]=a,i[e][r]=a.option},this),"series"===e&&(this._seriesIndices=l(n.series))}var i=this.option,n=this._componentsMap,r=[];p(t,function(t,e){null!=t&&(x.hasClass(e)?r.push(e):i[e]=null==i[e]?c.clone(t):c.merge(i[e],t,!0))}),x.topologicalTravel(r,x.getAllClassMainTypes(),e,this)},getOption:function(){var t=c.clone(this.option);return p(t,function(e,i){if(x.hasClass(i)){for(var e=f.normalizeToArray(e),n=e.length-1;n>=0;n--)f.isIdInner(e[n])&&e.splice(n,1);t[i]=e}}),delete t[w],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap[t];return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,a=this._componentsMap[e];if(!a||!a.length)return[];var o;if(null!=i)m(i)||(i=[i]),o=g(v(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=m(n);o=g(a,function(t){return s&&y(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=m(r);o=g(a,function(t){return l&&y(r,t.name)>=0||!l&&t.name===r})}return h(o,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(i)||t.hasOwnProperty(n))?{mainType:r,index:t[e],id:t[i],name:t[n]}:null}function i(e){return t.filter?g(e,t.filter):e}var n=t.query,r=t.mainType,a=e(n),o=a?this.queryComponents(a):this._componentsMap[r];return i(h(o,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,p(n,function(t,n){p(t,function(t,r){e.call(i,n,t,r)})});else if(c.isString(t))p(n[t],e,i);else if(_(t)){var r=this.findComponents(t);p(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){u(this),p(this._seriesIndices,function(i){var n=this._componentsMap.series[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){p(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,i){u(this),p(this._seriesIndices,function(n){var r=this._componentsMap.series[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return p(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return u(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){u(this);var i=g(this._componentsMap.series,t,e);this._seriesIndices=l(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=l(t.series);var e=[];p(t,function(t,i){e.push(i)}),x.topologicalTravel(e,x.getAllClassMainTypes(),function(e,i){p(t[e],function(t){t.restoreData()})})}});c.mixin(M,i(55)),t.exports=M},function(t,e,i){function n(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e){var i,n,r=[],a=[],o=t.timeline;if(t.baseOption&&(n=t.baseOption),(o||t.options)&&(n=n||{},r=(t.options||[]).slice()),t.media){n=n||{};var s=t.media;f(s,function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))})}return n||(n=t),n.timeline||(n.timeline=o),f([n].concat(r).concat(h.map(a,function(t){return t.option})),function(t){f(e,function(e){e(t)})}),{baseOption:n,timelineOptions:r,mediaDefault:i,mediaList:a}}function a(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return h.each(t,function(t,e){var i=e.match(v);if(i&&i[1]&&i[2]){var a=i[1],s=i[2].toLowerCase();o(n[s],t,a)||(r=!1)}}),r}function o(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},f(e,function(e,i){if(null!=e){var n=t[i];if(c.hasClass(i)){e=u.normalizeToArray(e),n=u.normalizeToArray(n);var r=u.mappingToExists(n,e);t[i]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[i]=g(n,e,!0)}})}var h=i(1),u=i(8),c=i(10),f=h.each,d=h.clone,p=h.map,g=h.merge,v=/^(min|max)?(.+)$/;n.prototype={constructor:n,setOption:function(t,e){t=d(t,!0);var i=this._optionBackup,n=r.call(this,t,e);this._newBaseOption=n.baseOption,i?(l(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,d),this._mediaList=p(e.mediaList,d),this._mediaDefault=d(e.mediaDefault),this._currentMediaIndices=[],d(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=d(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,r=this._mediaDefault,o=[],l=[];if(!n.length&&!r)return l;for(var h=0,u=n.length;u>h;h++)a(n[h].query,e,i)&&o.push(h);return!o.length&&r&&(o=[-1]),o.length&&!s(o,this._currentMediaIndices)&&(l=p(o,function(t){return d(-1===t?r.option:n[t].option)})),this._currentMediaIndices=o,l}},t.exports=n},function(t,e){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||""),t.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],grid:{},textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},animation:!0,animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3}},function(t,e,i){t.exports={getAreaStyle:i(32)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]])}},function(t,e){t.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(t,e,i){var n=i(32)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getItemStyle:function(t){var e=n.call(this,t),i=this.getBorderLineDash();return i&&(e.lineDash=i),e},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){var n=i(32)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getLineStyle:function(t){var e=n.call(this,t),i=this.getLineDash();return i&&(e.lineDash=i),e},getLineDash:function(){var t=this.get("type");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){function n(t,e){return t&&t.getShallow(e)}var r=i(18);t.exports={getTextColor:function(){var t=this.ecModel;return this.getShallow("color")||t&&t.get("textStyle.color")},getFont:function(){var t=this.ecModel,e=t&&t.getModel("textStyle");return[this.getShallow("fontStyle")||n(e,"fontStyle"),this.getShallow("fontWeight")||n(e,"fontWeight"),(this.getShallow("fontSize")||n(e,"fontSize")||12)+"px",this.getShallow("fontFamily")||n(e,"fontFamily")||"sans-serif"].join(" ")},getTextRect:function(t){var e=this.get("textStyle")||{};return r.getBoundingRect(t,this.getFont(),e.align,e.baseline)},ellipsis:function(t,e,i){return r.ellipsis(t,this.getFont(),e,i)}}},function(t,e,i){function n(t,e){e=e.split(",");for(var i=t,n=0;ne&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var c;"string"==typeof r?c=i[r]:"function"==typeof r&&(c=r),c&&(e=e.downSample(s.dim,1/u,c,n),t.setData(e))}}},this)}},function(t,e,i){var n=i(1),r=i(33),a=i(4),o=i(38),s=r.prototype,l=o.prototype,h=Math.floor,u=Math.ceil,c=Math.pow,f=10,d=Math.log,p=r.extend({type:"log",getTicks:function(){return n.map(l.getTicks.call(this),function(t){return a.round(c(f,t))})},getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),c(f,t)},setExtent:function(t,e){t=d(t)/d(f),e=d(e)/d(f),l.setExtent.call(this,t,e)},getExtent:function(){var t=s.getExtent.call(this);return t[0]=c(f,t[0]),t[1]=c(f,t[1]),t},unionExtent:function(t){t[0]=d(t[0])/d(f),t[1]=d(t[1])/d(f),s.unionExtent.call(this,t)},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||0>=i)){var n=c(10,h(d(i/t)/Math.LN10)),r=t/i*n;.5>=r&&(n*=10);var o=[a.round(u(e[0]/n)*n),a.round(h(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:l.niceExtent});n.each(["contain","normalize"],function(t){p.prototype[t]=function(e){return e=d(e)/d(f),s[t].call(this,e)}}),p.create=function(){return new p},t.exports=p},function(t,e,i){var n=i(1),r=i(33),a=r.prototype,o=r.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?n.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),a.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return a.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(a.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},niceTicks:n.noop,niceExtent:n.noop});o.create=function(){return new o},t.exports=o},function(t,e,i){var n=i(1),r=i(4),a=i(9),o=i(38),s=o.prototype,l=Math.ceil,h=Math.floor,u=1e3,c=60*u,f=60*c,d=24*f,p=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][2]=0;r--)if(!n[r].silent&&n[r]!==i&&!n[r].ignore&&o(n[r],t,e))return n[r]}},d.mixin(T,v),d.mixin(T,p),t.exports=T},function(t,e,i){function n(){return!1}function r(t,e,i,n){var r=document.createElement(e),a=i.getWidth(),o=i.getHeight(),s=r.style;return s.position="absolute",s.left=0,s.top=0,s.width=a+"px",s.height=o+"px",r.width=a*n,r.height=o*n,r.setAttribute("data-zr-dom-id",t),r}var a=i(1),o=i(34),s=function(t,e,i){var s;i=i||o.devicePixelRatio,"string"==typeof t?s=r(t,"canvas",e,i):a.isObject(t)&&(s=t,t=s.id),this.id=t,this.dom=s;var l=s.style;l&&(s.onselectstart=n,l["-webkit-user-select"]="none",l["user-select"]="none",l["-webkit-touch-callout"]="none",l["-webkit-tap-highlight-color"]="rgba(0,0,0,0)"),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};s.prototype={constructor:s,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d");var t=this.dpr;1!=t&&this.ctx.scale(t,t)},createBackBuffer:function(){var t=this.dpr;this.domBack=r("back-"+this.id,"canvas",this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,a=this.domBack;r.width=t+"px",r.height=e+"px",n.width=t*i,n.height=e*i,1!=i&&this.ctx.scale(i,i),a&&(a.width=t*i,a.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e=this.dom,i=this.ctx,n=e.width,r=e.height,a=this.clearColor,o=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(o&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,n/l,r/l)),i.clearRect(0,0,n/l,r/l),a&&(i.save(),i.fillStyle=this.clearColor,i.fillRect(0,0,n/l,r/l),i.restore()),o){var h=this.domBack;i.save(),i.globalAlpha=s,i.drawImage(h,0,0,n/l,r/l),i.restore()}}},t.exports=s},function(t,e,i){"use strict";function n(t){return parseInt(t,10)}function r(t){return t?t.isBuildin?!0:"function"==typeof t.resize&&"function"==typeof t.refresh:!1}function a(t){t.__unusedCount++}function o(t){1==t.__unusedCount&&t.clear()}function s(t,e,i){return _.copy(t.getBoundingRect()),t.transform&&_.applyTransform(t.transform),x.width=e,x.height=i,!_.intersect(x)}function l(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;ir;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(r,1),o.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,m(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,m(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,f.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(a),this._doPaintList(t,e),this.eachBuildinLayer(o)},_doPaintList:function(t,e){function i(t){a.save(),a.globalAlpha=1,a.shadowBlur=0,n.__dirty=!0,a.drawImage(t.dom,0,0,u,c),a.restore(),n.ctx.restore()}for(var n,r,a,o,s,l,h=0,u=this._width,c=this._height,p=this._progress,g=0,v=t.length;v>g;g++){var m=t[g],_=this._singleCanvas?0:m.zlevel; -r!==_&&(a&&a.restore(),o={},r=_,n=this.getLayer(r),n.isBuildin||d("ZLevel "+r+" has been used by unkown layer "+n.id),a=n.ctx,a.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear());var x=m.__frame;if(n.__dirty||e){if(x>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,y-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(p=l),s.__progress=p+1}x===p&&this._doPaintEl(m,s,!0,s.renderScope)}else s&&(i(s),s=null),this._doPaintEl(m,n,e,o);m.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherProgressive=!1,f.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&t.scale[0]&&t.scale[1]&&(!t.culling||!s(t,this._width,this._height))){var a=t.__clipPaths;(n.prevClipLayer!==e||l(a,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),a&&(r.save(),h(a,r),n.prevClipLayer=e,n.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new v("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&f.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=null,s=-1,l=this._domRoot;if(i[t])return void d("ZLevel "+t+" has been used already");if(!r(e))return void d("Layer of zlevel "+t+" is not valid");if(a>0&&t>n[0]){for(s=0;a-1>s&&!(n[s]t);s++);o=i[n[s]]}if(n.splice(s+1,0,t),o){var h=o.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nh;h++){var c=t[h],d=this._singleCanvas?0:c.zlevel,p=e[d],g=c.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||c.__dirty),g>=0){o!==g&&(o=g,l++);var m=c.__frame=l-1;if(!a){var _=Math.min(s,y-1);a=i[_],a||(a=i[_]=new v("progressive",this,this.dpr),a.initContext()),a.__maxProgress=0}a.__dirty=a.__dirty||c.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,m),a.__maxProgress>=a.__progress&&(p.__dirty=!0)}else c.__frame=-1,a&&(a.__nextIdxNotProg=h,s++,a=null)}a&&(s++,a.__nextIdxNotProg=h),this.eachBuildinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,y),f.each(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?f.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&f.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(f.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;if(i.style.display="none",t=t||this._getWidth(),e=e||this._getHeight(),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers[n].resize(t,e);this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new v("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var i=this.storage.getDisplayList(!0),n={},r=0;rr;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,a.canvasSupported&&s(i,n)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n&&(n.parent=t,n.updateTransform(),e?(e=e.slice(),e.push(n)):e=[n]),t.isGroup){for(var r=t._children,a=0;ae;e++)this.delRoot(t[e]);else{var a;a="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,a);s>=0&&(this.delFromMap(a.id),this._roots.splice(s,1),a instanceof o&&a.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof o&&(t.__storage=this),t.dirty(),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,i=e[t];return i&&(delete e[t],i instanceof o&&(i.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:n},t.exports=l},function(t,e,i){"use strict";var n=i(1),r=i(23).Dispatcher,a=i(59),o=i(58),s=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time=0,r.call(this)};s.prototype={constructor:s,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;io;o++){var s=i[o],l=s.step(t);l&&(r.push(l),a.push(s))}for(var o=0;n>o;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(var o=0;n>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},start:function(){function t(){e._running&&(a(t),e._update())}var e=this;this._running=!0,this._time=(new Date).getTime(),a(t)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new o(t,e.loop,e.getter,e.setter);return i}},n.mixin(s,r),t.exports=s},function(t,e,i){function n(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=i(137);n.prototype={constructor:n,step:function(t){this._initialized||(this._startTime=(new Date).getTime()+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,a="function"==typeof n?n(e):e;return this.fire("frame",a),1==e?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(){var t=(new Date).getTime(),e=(t-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},t.exports=n},function(t,e){var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};t.exports=i},function(t,e,i){var n=i(60).normalizeRadian,r=2*Math.PI;t.exports={containStroke:function(t,e,i,a,o,s,l,h,u){if(0===l)return!1;var c=l;h-=t,u-=e;var f=Math.sqrt(h*h+u*u);if(f-c>i||i>f+c)return!1;if(Math.abs(a-o)%r<1e-4)return!0;if(s){var d=a;a=n(o),o=n(d)}else a=n(a),o=n(o);a>o&&(o+=r);var p=Math.atan2(u,h);return 0>p&&(p+=r),p>=a&&o>=p||p+r>=a&&o>=p+r}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,a,o,s,l,h,u,c){if(0===h)return!1;var f=h;if(c>e+f&&c>r+f&&c>o+f&&c>l+f||e-f>c&&r-f>c&&o-f>c&&l-f>c||u>t+f&&u>i+f&&u>a+f&&u>s+f||t-f>u&&i-f>u&&a-f>u&&s-f>u)return!1;var d=n.cubicProjectPoint(t,e,i,r,a,o,s,l,u,c,null);return f/2>=d}}},function(t,e){t.exports={containStroke:function(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0,h=t;if(o>e+s&&o>n+s||e-s>o&&n-s>o||a>t+s&&a>i+s||t-s>a&&i-s>a)return!1;if(t===i)return Math.abs(a-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*a-o+h,c=u*u/(l*l+1);return s/2*s/2>=c}}},function(t,e,i){"use strict";function n(t,e){return Math.abs(t-e)<_}function r(){var t=b[0];b[0]=b[1],b[1]=t}function a(t,e,i,n,a,o,s,l,h,u){if(u>e&&u>n&&u>o&&u>l||e>u&&n>u&&o>u&&l>u)return 0;var c=g.cubicRootAt(e,n,o,l,u,x);if(0===c)return 0;for(var f,d,p=0,v=-1,m=0;c>m;m++){var y=x[m],_=0===y||1===y?.5:1,w=g.cubicAt(t,i,a,s,y);h>w||(0>v&&(v=g.cubicExtrema(e,n,o,l,b),b[1]1&&r(),f=g.cubicAt(e,n,o,l,b[0]),v>1&&(d=g.cubicAt(e,n,o,l,b[1]))),p+=2==v?yf?_:-_:yd?_:-_:d>l?_:-_:yf?_:-_:f>l?_:-_)}return p}function o(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||e>s&&n>s&&a>s)return 0;var l=g.quadraticRootAt(e,n,a,s,x);if(0===l)return 0;var h=g.quadraticExtremum(e,n,a);if(h>=0&&1>=h){for(var u=0,c=g.quadraticAt(e,n,a,h),f=0;l>f;f++){var d=0===x[f]||1===x[f]?.5:1,p=g.quadraticAt(t,i,r,x[f]);o>p||(u+=x[f]c?d:-d:c>a?d:-d)}return u}var d=0===x[0]||1===x[0]?.5:1,p=g.quadraticAt(t,i,r,x[0]);return o>p?0:e>a?d:-d}function s(t,e,i,n,r,a,o,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);x[0]=-l,x[1]=l;var h=Math.abs(n-r);if(1e-4>h)return 0;if(1e-4>h%y){n=0,r=y;var u=a?1:-1;return o>=x[0]+t&&o<=x[1]+t?u:0}if(a){var l=n;n=p(r),r=p(l)}else n=p(n),r=p(r);n>r&&(r+=y);for(var c=0,f=0;2>f;f++){var d=x[f];if(d+t>o){var g=Math.atan2(s,d),u=a?1:-1;0>g&&(g=y+g),(g>=n&&r>=g||g+y>=n&&r>=g+y)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),c+=u)}}return c}function l(t,e,i,r,l){for(var u=0,p=0,g=0,y=0,_=0,x=0;x1&&(i||(u+=v(p,g,y,_,r,l))),1==x&&(p=t[x],g=t[x+1],y=p,_=g),b){case h.M:y=t[x++],_=t[x++],p=y,g=_;break;case h.L:if(i){if(m(p,g,t[x],t[x+1],e,r,l))return!0}else u+=v(p,g,t[x],t[x+1],r,l)||0;p=t[x++],g=t[x++];break;case h.C:if(i){if(c.containStroke(p,g,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],e,r,l))return!0}else u+=a(p,g,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],r,l)||0;p=t[x++],g=t[x++];break;case h.Q:if(i){if(f.containStroke(p,g,t[x++],t[x++],t[x],t[x+1],e,r,l))return!0}else u+=o(p,g,t[x++],t[x++],t[x],t[x+1],r,l)||0;p=t[x++],g=t[x++];break;case h.A:var w=t[x++],M=t[x++],S=t[x++],T=t[x++],A=t[x++],C=t[x++],I=(t[x++],1-t[x++]),L=Math.cos(A)*S+w,k=Math.sin(A)*T+M;x>1?u+=v(p,g,L,k,r,l):(y=L,_=k);var P=(r-w)*T/S+w;if(i){if(d.containStroke(w,M,T,A,A+C,I,e,P,l))return!0}else u+=s(w,M,T,A,A+C,I,P,l);p=Math.cos(A+C)*S+w,g=Math.sin(A+C)*T+M;break;case h.R:y=p=t[x++],_=g=t[x++];var D=t[x++],O=t[x++],L=y+D,k=_+O;if(i){if(m(y,_,L,_,e,r,l)||m(L,_,L,k,e,r,l)||m(L,k,y,k,e,r,l)||m(y,k,y,_,e,r,l))return!0}else u+=v(L,_,L,k,r,l),u+=v(y,k,y,_,r,l);break;case h.Z:if(i){if(m(p,g,y,_,e,r,l))return!0}else u+=v(p,g,y,_,r,l);p=y,g=_}}return i||n(g,_)||(u+=v(p,g,y,_,r,l)||0),0!==u}var h=i(29).CMD,u=i(140),c=i(139),f=i(142),d=i(138),p=i(60).normalizeRadian,g=i(16),v=i(81),m=u.containStroke,y=2*Math.PI,_=1e-4,x=[-1,-1,-1],b=[-1,-1];t.exports={contain:function(t,e,i){return l(t,0,!1,e,i)},containStroke:function(t,e,i,n){return l(t,e,!0,i,n)}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,a,o,s,l,h){if(0===s)return!1;var u=s;if(h>e+u&&h>r+u&&h>o+u||e-u>h&&r-u>h&&o-u>h||l>t+u&&l>i+u&&l>a+u||t-u>l&&i-u>l&&a-u>l)return!1;var c=n.quadraticProjectPoint(t,e,i,r,a,o,l,h,null);return u/2>=c}}},function(t,e,i){"use strict";function n(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var a=i(23),o=function(){this._track=[]};o.prototype={constructor:o,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,s=n.length;s>o;o++){var l=n[o],h=a.clientToLocal(i,l);r.points.push([h.zrX,h.zrY]),r.touches.push(l)}this._track.push(r)}},_recognize:function(t){for(var e in s)if(s.hasOwnProperty(e)){var i=s[e](this._track,t);if(i)return i}}};var s={pinch:function(t,e){var i=t.length;if(i){var a=(t[i-1]||{}).points,o=(t[i-2]||{}).points||a;if(o&&o.length>1&&a&&a.length>1){var s=n(a)/n(o);!isFinite(s)&&(s=1),e.pinchScale=s;var l=r(a);return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}};t.exports=o},function(t,e){var i=function(){this.head=null,this.tail=null,this._len=0},n=i.prototype;n.insert=function(t){var e=new r(t);return this.insertEntry(e),e},n.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._len++},n.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len};var r=function(t){this.value=t,this.next,this.prev},a=function(t){this._list=new i,this._map={},this._maxSize=t||10},o=a.prototype;o.put=function(t,e){var i=this._list,n=this._map;if(null==n[t]){var r=i.len();if(r>=this._maxSize&&r>0){var a=i.head;i.remove(a),delete n[a.key]}var o=i.insert(e);o.key=t,n[t]=o}},o.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},o.clear=function(){this._list.clear(),this._map={}},t.exports=a},function(t,e,i){var n=i(6);t.exports=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i0},extendFrom:function(t,e){if(t){var i=this;for(var n in t)!t.hasOwnProperty(n)||!e&&i.hasOwnProperty(n)||(i[n]=t[n])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},createLinearGradient:function(t,e,i){var n=e.x*i.width+i.x,r=e.x2*i.width+i.x,a=e.y*i.height+i.y,o=e.y2*i.height+i.y,s=t.createLinearGradient(n,a,r,o);return s},createRadialGradient:function(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=e.x*n+i.x,s=e.y*r+i.y,l=e.r*a,h=t.createRadialGradient(o,s,0,o,s,l);return h},getGradient:function(t,e,i){for(var n="radial"===e.type?"createRadialGradient":"createLinearGradient",r=this[n](t,e,i),a=e.colorStops,o=0;oy;y++)r(f,f,t[y]),a(d,d,t[y]);r(f,f,h[0]),a(d,d,h[1])}for(var y=0,_=t.length;_>y;y++){var x=t[y];if(i)u=t[y?y-1:_-1],c=t[(y+1)%_];else{if(0===y||y===_-1){p.push(n.clone(t[y]));continue}u=t[y-1],c=t[y+1]}n.sub(g,c,u),o(g,g,e);var b=s(x,u),w=s(x,c),M=b+w;0!==M&&(b/=M,w/=M),o(v,g,-b),o(m,g,w);var S=l([],x,v),T=l([],x,m);h&&(a(S,S,f),r(S,S,d),a(T,T,f),r(T,T,d)),p.push(S),p.push(T)}return i&&p.push(p.shift()),p}},function(t,e,i){function n(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}var r=i(5);t.exports=function(t,e){for(var i=t.length,a=[],o=0,s=1;i>s;s++)o+=r.distance(t[s-1],t[s]);var l=o/2;l=i>l?i:l;for(var s=0;l>s;s++){var h,u,c,f=s/(l-1)*(e?i:i-1),d=Math.floor(f),p=f-d,g=t[d%i];e?(h=t[(d-1+i)%i],u=t[(d+1)%i],c=t[(d+2)%i]):(h=t[0===d?d:d-1],u=t[d>i-2?i-1:d+1],c=t[d>i-3?i-1:d+2]);var v=p*p,m=p*v;a.push([n(h[0],g[0],u[0],c[0],p,v,m),n(h[1],g[1],u[1],c[1],p,v,m)])}return a}},function(t,e,i){t.exports=i(6).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,a,o,!s)}})},function(t,e,i){"use strict";function n(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?c:h)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?c:h)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?u:l)(t.x1,t.cpx1,t.x2,e),(i?u:l)(t.y1,t.cpy1,t.y2,e)]}var r=i(16),a=i(5),o=r.quadraticSubdivide,s=r.cubicSubdivide,l=r.quadraticAt,h=r.cubicAt,u=r.quadraticDerivativeAt,c=r.cubicDerivativeAt,f=[];t.exports=i(6).extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,l=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,d=e.percent;0!==d&&(t.moveTo(i,n),null==u||null==c?(1>d&&(o(i,l,r,d,f),l=f[1],r=f[2],o(n,h,a,d,f),h=f[1],a=f[2]),t.quadraticCurveTo(l,h,r,a)):(1>d&&(s(i,l,u,r,d,f),l=f[1],u=f[2],r=f[3],s(n,h,c,a,d,f),h=f[1],c=f[2],a=f[3]),t.bezierCurveTo(l,h,u,c,r,a)))},pointAt:function(t){return n(this.shape,t,!1)},tangentAt:function(t){var e=n(this.shape,t,!0);return a.normalize(e,e)}})},function(t,e,i){"use strict";t.exports=i(6).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(i,n),1>o&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})},function(t,e,i){var n=i(62);t.exports=i(6).extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){n.buildPath(t,e,!0)}})},function(t,e,i){var n=i(62);t.exports=i(6).extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){n.buildPath(t,e,!1)}})},function(t,e,i){var n=i(63);t.exports=i(6).extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,a=e.width,o=e.height;e.r?n.buildPath(t,e):t.rect(i,r,a,o),t.closePath()}})},function(t,e,i){t.exports=i(6).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(o),u=Math.sin(o);t.moveTo(h*r+i,u*r+n),t.lineTo(h*a+i,u*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}})},function(t,e,i){"use strict";var n=i(58),r=i(1),a=r.isString,o=r.isFunction,s=r.isObject,l=i(47),h=function(){this.animators=[]};h.prototype={constructor:h,animate:function(t,e){var i,a=!1,o=this,s=this.__zr;if(t){var h=t.split("."),u=o;a="shape"===h[0];for(var c=0,f=h.length;f>c;c++)u&&(u=u[h[c]]);u&&(i=u)}else i=o;if(!i)return void l('Property "'+t+'" is not existed in element '+o.id);var d=o.animators,p=new n(i,e);return p.during(function(t){o.dirty(a)}).done(function(){d.splice(r.indexOf(d,p),1)}),d.push(p),s&&s.animation.addAnimator(p),p},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r){function s(){h--,h||r&&r()}a(i)?(r=n,n=i,i=0):o(n)?(r=n,n="linear",i=0):o(i)?(r=i,i=0):o(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i,n,r);var l=this.animators.slice(),h=l.length;h||r&&r();for(var u=0;u0&&this.animate(t,!1).when(null==n?500:n,o).delay(a||0),this}},t.exports=h},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}i.prototype={constructor:i,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this._dispatchProxy(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this._dispatchProxy(e,"drag",t.event);var o=this.findHover(i,n,e),s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this._dispatchProxy(s,"dragleave",t.event),o&&o!==s&&this._dispatchProxy(o,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this._dispatchProxy(e,"dragend",t.event),this._dropTarget&&this._dispatchProxy(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},t.exports=i},function(t,e,i){function n(t,e,i,n,r,a,o,s,l,h,u){var g=l*(p/180),y=d(g)*(t-i)/2+f(g)*(e-n)/2,_=-1*f(g)*(t-i)/2+d(g)*(e-n)/2,x=y*y/(o*o)+_*_/(s*s);x>1&&(o*=c(x),s*=c(x));var b=(r===a?-1:1)*c((o*o*(s*s)-o*o*(_*_)-s*s*(y*y))/(o*o*(_*_)+s*s*(y*y)))||0,w=b*o*_/s,M=b*-s*y/o,S=(t+i)/2+d(g)*w-f(g)*M,T=(e+n)/2+f(g)*w+d(g)*M,A=m([1,0],[(y-w)/o,(_-M)/s]),C=[(y-w)/o,(_-M)/s],I=[(-1*y-w)/o,(-1*_-M)/s],L=m(C,I);v(C,I)<=-1&&(L=p),v(C,I)>=1&&(L=0),0===a&&L>0&&(L-=2*p),1===a&&0>L&&(L+=2*p),u.addData(h,S,T,o,s,A,L,g,a)}function r(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===v[0]&&v.shift();for(var m=0;mr;r++){var a=t[r];a.__dirty&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var s=new o(e);return s.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},s}}},function(t,e,i){function n(t,e){var i,n,a,u,c,f,d=t.data,p=r.M,g=r.C,v=r.L,m=r.R,y=r.A,_=r.Q;for(a=0,u=0;ac;c++){var f=s[c];f[0]=d[a++],f[1]=d[a++],o(f,f,e),d[u++]=f[0],d[u++]=f[1]}}}var r=i(29).CMD,a=i(5),o=a.applyTransform,s=[[],[],[]],l=Math.sqrt,h=Math.atan2;t.exports=n}])}); \ No newline at end of file +var r=i(62),a=i(12),o=i(137),s=i(140),l=i(141),h=!a.canvasSupported,u={canvas:i(139)},c={},f={};f.version="3.1.1",f.init=function(t,e){var i=new d(r(),t,e);return c[i.id]=i,i},f.dispose=function(t){if(t)t.dispose();else{for(var e in c)c[e].dispose();c={}}return f},f.getInstance=function(t){return c[t]},f.registerPainter=function(t,e){u[t]=e};var d=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new s,c=i.renderer;if(h){if(!u.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");c="vml"}else c&&u[c]||(c="canvas");var f=new u[c](e,r,i);this.storage=r,this.painter=f,a.node||(this.handler=new o(f.getViewportRoot(),r,f)),this.animation=new l({stage:{update:function(){n._needsRefresh&&n.refreshImmediately(),n._needsRefreshHover&&n.refreshHoverImmediately()}}}),this.animation.start(),this._needsRefresh;var d=r.delFromMap,p=r.addToMap;r.delFromMap=function(t){var e=r.get(t);d.call(r,t),e&&e.removeSelfFromZr(n)},r.addToMap=function(t){p.call(r,t),t.addSelfToZr(n)}};d.prototype={constructor:d,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(){this.painter.resize(),this.handler&&this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e,i){var n=r();return this.painter.pathToImage(n,t,e,i)},setCursorStyle:function(t){this.handler&&this.handler.setCursorStyle(t)},on:function(t,e,i){this.handler&&this.handler.on(t,e,i)},off:function(t,e){this.handler&&this.handler.off(t,e)},trigger:function(t,e){this.handler&&this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler&&this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,n(this.id)}},t.exports=f},function(t,e,i){var n=i(2),r=i(1);t.exports=function(t,e){r.each(e,function(e){e.update="updateView",n.registerAction(e,function(i,n){var r={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name);var n=t.getData();n.each(function(e){var i=n.getName(e);r[i]=t.isSelected(i)||!1})}),{name:i.name,selected:r}})})}},,,function(t,e,i){var n=i(1),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncateLength:null,nameTruncateEllipsis:"...",nameTextStyle:{},nameGap:15,silent:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#333",width:1,type:"solid"}},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},a=n.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{interval:"auto"},axisLabel:{interval:"auto"}},r),o=n.merge({boundaryGap:[0,0],splitNumber:5},r),s=n.defaults({scale:!0,min:"dataMin",max:"dataMax"},o),l=n.defaults({},o);l.scale=!0,t.exports={categoryAxis:a,valueAxis:o,timeAxis:s,logAxis:l}},,function(t,e){t.exports={containStroke:function(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0,h=t;if(o>e+s&&o>n+s||e-s>o&&n-s>o||a>t+s&&a>i+s||t-s>a&&i-s>a)return!1;if(t===i)return Math.abs(a-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*a-o+h,c=u*u/(l*l+1);return s/2*s/2>=c}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,a,o,s,l,h){if(0===s)return!1;var u=s;if(h>e+u&&h>r+u&&h>o+u||e-u>h&&r-u>h&&o-u>h||l>t+u&&l>i+u&&l>a+u||t-u>l&&i-u>l&&a-u>l)return!1;var c=n.quadraticProjectPoint(t,e,i,r,a,o,l,h,null);return u/2>=c}}},function(t,e){t.exports=function(t,e,i,n,r,a){if(a>e&&a>n||e>a&&n>a)return 0;if(n===e)return 0;var o=e>n?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(o=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?o:0}},function(t,e,i){"use strict";var n=i(1),r=i(29),a=function(t,e,i,n,a,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,r.call(this,a)};a.prototype={constructor:a},n.inherits(a,r),t.exports=a},function(t,e,i){"use strict";function n(t){return t>s||-s>t}var r=i(19),a=i(5),o=r.identity,s=5e-5,l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},h=l.prototype;h.transform=null,h.needLocalTransform=function(){return n(this.rotation)||n(this.position[0])||n(this.position[1])||n(this.scale[0]-1)||n(this.scale[1]-1)},h.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||r.create(),i?this.getLocalTransform(n):o(n),e&&(i?r.mul(n,t.transform,n):r.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,n)):void(n&&o(n))},h.getLocalTransform=function(t){t=t||[],o(t);var e=this.origin,i=this.scale,n=this.rotation,a=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),n&&r.rotate(t,t,n),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=a[0],t[5]+=a[1],t},h.setTransform=function(t){var e=this.transform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},h.restoreTransform=function(t){var e=this.invTransform;e&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])};var u=[];h.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(r.mul(u,t.invTransform,e),e=u);var i=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],o=this.position,s=this.scale;n(i-1)&&(i=Math.sqrt(i)),n(a-1)&&(a=Math.sqrt(a)),e[0]<0&&(i=-i),e[3]<0&&(a=-a),o[0]=e[4],o[1]=e[5],s[0]=i,s[1]=a,this.rotation=Math.atan2(-e[1]/a,e[0]/i)}},h.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},h.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&a.applyTransform(i,i,n),i},h.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&a.applyTransform(i,i,n),i},t.exports=l},function(t,e,i){"use strict";function n(t){r.each(a,function(e){this[e]=r.bind(t[e],t)},this)}var r=i(1),a=["getDom","getZr","getWidth","getHeight","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption"];t.exports=n},function(t,e,i){var n=i(1);i(54),i(90),i(91);var r=i(120),a=i(2);a.registerLayout(n.curry(r,"bar")),a.registerVisual(function(t){t.eachSeriesByType("bar",function(t){var e=t.getData();e.setVisual("legendSymbol","roundRect")})}),i(36)},function(t,e,i){"use strict";var n=i(15),r=i(35);t.exports=n.extend({type:"series.bar",dependencies:["grid","polar"],getInitialData:function(t,e){return r(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),r=n.getLayout("offset"),a=n.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return i[o]+=r+a/2,i}return[NaN,NaN]},brushSelector:"rect",defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,itemStyle:{normal:{borderColor:"#fff",borderWidth:0},emphasis:{}}}})},function(t,e,i){"use strict";function n(t,e){var i=t.width>0?1:-1,n=t.height>0?1:-1;e=Math.min(e,Math.abs(t.width),Math.abs(t.height)),t.x+=i*e/2,t.y+=n*e/2,t.width-=i*e,t.height-=n*e}var r=i(1),a=i(3);r.extend(i(9).prototype,i(92)),t.exports=i(2).extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"===n&&this._renderOnCartesian(t,e,i),this.group},_renderOnCartesian:function(t,e,i){function o(e,i){var o=l.getItemLayout(e),s=l.getItemModel(e).get(p)||0;n(o,s);var h=new a.Rect({shape:r.extend({},o)});if(d){var u=h.shape,c=f?"height":"width",g={};u[c]=0,g[c]=o[c],a[i?"updateProps":"initProps"](h,{shape:g},t,e)}return h}var s=this.group,l=t.getData(),h=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),f=c.isHorizontal(),d=t.get("animation"),p=["itemStyle","normal","barBorderWidth"];l.diff(h).add(function(t){if(l.hasValue(t)){var e=o(t);l.setItemGraphicEl(t,e),s.add(e)}}).update(function(e,i){var r=h.getItemGraphicEl(i);if(!l.hasValue(e))return void s.remove(r);r||(r=o(e,!0));var u=l.getItemLayout(e),c=l.getItemModel(e).get(p)||0;n(u,c),a.updateProps(r,{shape:u},t,e),l.setItemGraphicEl(e,r),s.add(r)}).remove(function(e){var i=h.getItemGraphicEl(e);i&&(i.style.text="",a.updateProps(i,{shape:{width:0}},t,e,function(){s.remove(i)}))}).execute(),this._updateStyle(t,l,f),this._data=l},_updateStyle:function(t,e,i){function n(t,e,i,n,r){a.setText(t,e,i),t.text=n,"outside"===t.textPosition&&(t.textPosition=r)}e.eachItemGraphicEl(function(o,s){var l=e.getItemModel(s),h=e.getItemVisual(s,"color"),u=e.getItemVisual(s,"opacity"),c=e.getItemLayout(s),f=l.getModel("itemStyle.normal"),d=l.getModel("itemStyle.emphasis").getBarItemStyle();o.setShape("r",f.get("barBorderRadius")||0),o.useStyle(r.defaults({fill:h,opacity:u},f.getBarItemStyle()));var p=i?c.height>0?"bottom":"top":c.width>0?"left":"right",g=l.getModel("label.normal"),v=l.getModel("label.emphasis"),m=o.style;g.get("show")?n(m,g,h,r.retrieve(t.getFormattedLabel(s,"normal"),t.getRawValue(s)),p):m.text="",v.get("show")?n(d,v,h,r.retrieve(t.getFormattedLabel(s,"emphasis"),t.getRawValue(s)),p):d.text="",a.setHoverStyle(o,d)})},remove:function(t,e){var i=this.group;t.get("animation")?this._data&&this._data.eachItemGraphicEl(function(e){e.style.text="",a.updateProps(e,{shape:{width:0}},t,e.dataIndex,function(){i.remove(e)})}):i.removeAll()}})},function(t,e,i){var n=i(31)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getBarItemStyle:function(t){var e=n.call(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}}},,,function(t,e,i){var n=i(1),r=i(2),a=r.PRIORITY;i(96),i(97),r.registerVisual(n.curry(i(46),"line","circle","line")),r.registerLayout(n.curry(i(55),"line")),r.registerProcessor(a.PROCESSOR.STATISTIC,n.curry(i(132),"line")),i(36)},function(t,e,i){"use strict";var n=i(35),r=i(15);t.exports=r.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return n(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,polarIndex:0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},function(t,e,i){"use strict";function n(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function o(t){return t>=0?1:-1}function s(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=i.onZero?0:n.scale.getExtent()[0],a=n.dim,s="x"===a||"radius"===a?1:0;return e.mapArray([a],function(n,l){for(var h,u=e.stackedOn;u&&o(u.get(a,l))===o(n);){h=u;break}var c=[];return c[s]=e.get(i.dim,l),c[1-s]=h?h.get(a,l,!0):r,t.dataToPoint(c)},!0)}function l(t,e){return null!=e.dataIndex?e.dataIndex:null!=e.name?t.indexOfName(e.name):void 0}function h(t,e,i){var n=a(t.getAxis("x")),r=a(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),s=Math.min(n[0],n[1]),l=Math.min(r[0],r[1]),h=Math.max(n[0],n[1])-s,u=Math.max(r[0],r[1])-l,c=i.get("lineStyle.normal.width")||2,f=i.get("clipOverflow")?c/2:Math.max(h,u);o?(l-=f,u+=2*f):(s-=f,h+=2*f);var d=new _.Rect({shape:{x:s,y:l,width:h,height:u}});return e&&(d.shape[o?"width":"height"]=0,_.initProps(d,{shape:{width:h,height:u}},i)),d}function u(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),a=r.getExtent(),o=n.getExtent(),s=Math.PI/180,l=new _.Sector({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-o[0]*s,endAngle:-o[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-o[0]*s,_.initProps(l,{shape:{endAngle:-o[1]*s}},i)),l}function c(t,e,i){return"polar"===t.type?u(t,e,i):h(t,e,i)}function f(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,a=[],o=0;o=0;r--)if(i[r].dimension<2){n=i[r];break}if(n&&"cartesian2d"===e.type){var a=n.dimension,o=t.dimensions[a],s=t.getDataExtent(o),l=n.stops,h=[];l[0].interval&&l.sort(function(t,e){return t.interval[0]-e.interval[0]});for(var u=l[0],c=l[l.length-1],f=u.interval?d(u.interval[0],s):u.value,p=c.interval?d(c.interval[1],s):c.value,v=p-f,r=0;r=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);o=new m(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else b.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),a=l(r,n);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else b.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new x.Polyline({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new x.Polygon({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];return i&&i.isLabelIgnored?g.bind(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var a=this._polyline,o=this._polygon,s=t.hostModel,l=y(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;r&&(h=f(l.current,i,r),u=f(l.stackedOnCurrent,i,r),c=f(l.next,i,r),d=f(l.stackedOnNext,i,r)),a.shape.__points=l.current,a.shape.points=h,_.updateProps(a,{shape:{points:c}},s),o&&(o.setShape({points:h,stackedOnPoints:u}),_.updateProps(o,{shape:{points:c,stackedOnPoints:d,__points:l.next}},s));for(var p=[],g=l.status,v=0;v=0?1:-1}function n(t,e,n){for(var r,a=t.getBaseAxis(),o=t.getOtherAxis(a),s=a.onZero?0:o.scale.getExtent()[0],l=o.dim,h="x"===l||"radius"===l?1:0,u=e.stackedOn,c=e.get(l,n);u&&i(u.get(l,n))===i(c);){r=u;break}var f=[];return f[h]=e.get(a.dim,n),f[1-h]=r?r.get(l,n,!0):s,t.dataToPoint(f)}function r(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}t.exports=function(t,e,i,a,o,s){for(var l=r(t,e),h=[],u=[],c=[],f=[],d=[],p=[],g=[],v=s.dimensions,m=0;mw;w++){var M=e[b];if(b>=a||0>b)break;if(n(M)){if(_){b+=o;continue}break}if(b===i)t[o>0?"moveTo":"lineTo"](M[0],M[1]),c(d,M);else if(m>0){var S=b+o,T=e[S];if(_)for(;T&&n(e[S]);)S+=o,T=e[S];var A=.5,C=e[x],T=e[S];if(!T||n(T))c(p,M);else{n(T)&&!_&&(T=M),s.sub(f,T,C);var L,I;if("x"===y||"y"===y){var k="x"===y?0:1;L=Math.abs(M[k]-C[k]),I=Math.abs(M[k]-T[k])}else L=s.dist(M,C),I=s.dist(M,T);A=I/(I+L),u(p,M,f,-m*(1-A))}l(d,d,v),h(d,d,g),l(p,p,v),h(p,p,g),t.bezierCurveTo(d[0],d[1],p[0],p[1],M[0],M[1]),u(d,M,f,m*A)}else t.lineTo(M[0],M[1]);x=b,b+=o}return w}function a(t,e){var i=[1/0,1/0],n=[-(1/0),-(1/0)];if(e)for(var r=0;rn[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var o=i(6),s=i(5),l=s.min,h=s.max,u=s.scaleAndAdd,c=s.copy,f=[],d=[],p=[];t.exports={Polyline:o.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},buildPath:function(t,e){var i=e.points,o=0,s=i.length,l=a(i,e.smoothConstraint);if(e.connectNulls){for(;s>0&&n(i[s-1]);s--);for(;s>o&&n(i[o]);o++);}for(;s>o;)o+=r(t,i,o,s,s,1,l.min,l.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Polygon:o.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},buildPath:function(t,e){var i=e.points,o=e.stackedOnPoints,s=0,l=i.length,h=e.smoothMonotone,u=a(i,e.smoothConstraint),c=a(o,e.smoothConstraint);if(e.connectNulls){for(;l>0&&n(i[l-1]);l--);for(;l>s&&n(i[s]);s++);}for(;l>s;){var f=r(t,i,s,l,l,1,u.min,u.max,e.smooth,h,e.connectNulls);r(t,o,s+f-1,f,l,-1,c.min,c.max,e.stackedOnSmooth,h,e.connectNulls),s+=f+1,t.closePath()}}})}},function(t,e,i){var n=i(1),r=i(2);i(101),i(102),i(78)("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(n.curry(i(73),"pie")),r.registerLayout(n.curry(i(104),"pie")),r.registerProcessor(n.curry(i(71),"pie"))},function(t,e,i){"use strict";var n=i(13),r=i(1),a=i(8),o=i(30),s=i(67),l=i(2).extendSeriesModel({type:"series.pie",init:function(t){l.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._dataBeforeProcessed},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){l.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=o(["value"],t.data),r=new n(i,this);return r.initData(t.data),r},getDataParams:function(t){var e=this._data,i=l.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},_defaultLabelLine:function(t){a.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,avoidLabelOverlap:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationEasing:"cubicOut",data:[]}});r.mixin(l,s),t.exports=l},function(t,e,i){function n(t,e,i,n){var a=e.getData(),o=this.dataIndex,s=a.getName(o),l=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),a.each(function(t){r(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),l,i)})}function r(t,e,i,n,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=i?n:0,h=[o*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function a(t,e){function i(){a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore}function n(){a.ignore=a.normalIgnore,o.ignore=o.normalIgnore}s.Group.call(this);var r=new s.Sector({z2:2}),a=new s.Polyline,o=new s.Text;this.add(r),this.add(a),this.add(o),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function o(t,e,i,n,r){var a=n.getModel("textStyle"),o="inside"===r||"inner"===r;return{fill:a.getTextColor()||(o?"#fff":t.getItemVisual(e,"color")),opacity:t.getItemVisual(e,"opacity"),textFont:a.getFont(),text:l.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var s=i(3),l=i(1),h=a.prototype;h.updateData=function(t,e,i){function n(){o.stopAnimation(!0),o.animateTo({shape:{r:c.r+10}},300,"elasticOut")}function a(){o.stopAnimation(!0),o.animateTo({shape:{r:c.r}},300,"elasticOut")}var o=this.childAt(0),h=t.hostModel,u=t.getItemModel(e),c=t.getItemLayout(e),f=l.extend({},c);f.label=null,i?(o.setShape(f),o.shape.endAngle=c.startAngle,s.updateProps(o,{shape:{endAngle:c.endAngle}},h,e)):s.updateProps(o,{shape:f},h,e);var d=u.getModel("itemStyle"),p=t.getItemVisual(e,"color");o.useStyle(l.defaults({lineJoin:"bevel",fill:p},d.getModel("normal").getItemStyle())),o.hoverStyle=d.getModel("emphasis").getItemStyle(),r(this,t.getItemLayout(e),u.get("selected"),h.get("selectedOffset"),h.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&h.ifEnableAnimation()&&o.on("mouseover",n).on("mouseout",a).on("emphasis",n).on("normal",a),this._updateLabel(t,e),s.setHoverStyle(this)},h._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,a=t.getItemModel(e),l=t.getItemLayout(e),h=l.label,u=t.getItemVisual(e,"color");s.updateProps(i,{shape:{points:h.linePoints||[[h.x,h.y],[h.x,h.y],[h.x,h.y]]}},r,e),s.updateProps(n,{style:{x:h.x,y:h.y}},r,e),n.attr({style:{textVerticalAlign:h.verticalAlign,textAlign:h.textAlign,textFont:h.font},rotation:h.rotation,origin:[h.x,h.y],z2:10});var c=a.getModel("label.normal"),f=a.getModel("label.emphasis"),d=a.getModel("labelLine.normal"),p=a.getModel("labelLine.emphasis"),g=c.get("position")||f.get("position");n.setStyle(o(t,e,"normal",c,g)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!f.get("show"),i.ignore=i.normalIgnore=!d.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(d.getModel("lineStyle").getLineStyle()),n.hoverStyle=o(t,e,"emphasis",f,g),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var v=d.get("smooth");v&&v===!0&&(v=.4),i.setShape({smooth:v})},l.inherits(a,s.Group);var u=i(27).extend({type:"pie",init:function(){var t=new s.Group;this._sectorGroup=t},render:function(t,e,i,r){if(!r||r.from!==this.uid){var o=t.getData(),s=this._data,h=this.group,u=e.get("animation"),c=!s,f=l.curry(n,this.uid,t,u,i),d=t.get("selectedMode");if(o.diff(s).add(function(t){var e=new a(o,t);c&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",f),o.setItemGraphicEl(t,e),h.add(e)}).update(function(t,e){var i=s.getItemGraphicEl(e);i.updateData(o,t),i.off("click"),d&&i.on("click",f),h.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=s.getItemGraphicEl(t);h.remove(e)}).execute(),u&&c&&o.count()>0){var p=o.getItemLayout(0),g=Math.max(i.getWidth(),i.getHeight())/2,v=l.bind(h.removeClipPath,h);h.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,v,t))}this._data=o}},_createClipPath:function(t,e,i,n,r,a,o){var l=new s.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return s.initProps(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},o,a),l}});t.exports=u},function(t,e,i){"use strict";function n(t,e,i,n,r,a,o){function s(e,i,n,r){for(var a=e;i>a;a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void l(a,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,r,a){for(var o=a>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,f=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&f>=o&&(f=o-10),!e&&o>=f&&(f=o+10),t[s].x=i+f*a,o=f}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,f=t.length,d=[],p=[],g=0;f>g;g++)u=t[g].y-c,0>u&&s(g,f,-u,r),c=t[g].y+t[g].height;0>o-c&&l(f-1,c-o);for(var g=0;f>g;g++)t[g].y>=i?p.push(t[g]):d.push(t[g]);h(d,!1,e,i,n,r),h(p,!0,e,i,n,r)}function r(t,e,i,r,a,o){for(var s=[],l=[],h=0;hb?-1:1)*_,I=C;n=L+(0>b?-5:5),r=I,c=[[S,T],[A,C],[L,I]]}f=M?"center":b>0?"left":"right"}var k=g.getModel("textStyle").getFont(),P=g.get("rotate")?0>b?-x+Math.PI:-x:0,D=t.getFormattedLabel(i,"normal")||l.getName(i),O=a.getBoundingRect(D,k,f,"top");u=!!P,d.label={x:n,y:r,position:v,height:O.height,len:y,len2:_,linePoints:c,textAlign:f,verticalAlign:"middle",font:k,rotation:P},M||h.push(d.label)}),!u&&t.get("avoidLabelOverlap")&&r(h,o,s,e,i,n)}},function(t,e,i){var n=i(4),r=n.parsePercent,a=i(103),o=i(1),s=2*Math.PI,l=Math.PI/180;t.exports=function(t,e,i,h){e.eachSeriesByType(t,function(t){var e=t.get("center"),h=t.get("radius");o.isArray(h)||(h=[0,h]),o.isArray(e)||(e=[e,e]);var u=i.getWidth(),c=i.getHeight(),f=Math.min(u,c),d=r(e[0],u),p=r(e[1],c),g=r(h[0],f/2),v=r(h[1],f/2),m=t.getData(),y=-t.get("startAngle")*l,_=t.get("minAngle")*l,x=m.getSum("value"),b=Math.PI/(x||m.count())*2,w=t.get("clockwise"),M=t.get("roseType"),S=m.getDataExtent("value");S[0]=0;var T=s,A=0,C=y,L=w?1:-1;if(m.each("value",function(t,e){var i;i="area"!==M?0===x?b:t*b:s/(m.count()||1),_>i?(i=_,T-=_):A+=t;var r=C+L*i;m.setItemLayout(e,{angle:i,startAngle:C,endAngle:r,clockwise:w,cx:d,cy:p,r0:g,r:M?n.linearMap(t,S,[g,v]):v}),C=r},!0),s>T)if(.001>=T){var I=s/m.count();m.each(function(t){var e=m.getItemLayout(t);e.startAngle=y+L*t*I,e.endAngle=y+L*(t+1)*I})}else b=T/A,C=y,m.each("value",function(t,e){var i=m.getItemLayout(e),n=i.angle===_?_:t*b;i.startAngle=C,i.endAngle=C+L*n,C+=n});a(t,v,u,c)})}},function(t,e,i){"use strict";i(53),i(106)},function(t,e,i){function n(t,e){function i(t,e){var i=n.getAxis(t);return i.toGlobalCoord(i.dataToCoord(0))}var n=t.coordinateSystem,r=e.axis,a={},o=r.position,s=r.onZero?"onZero":o,l=r.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={x:{top:u[2],bottom:u[3]},y:{left:u[0],right:u[1]}};c.x.onZero=Math.max(Math.min(i("y"),c.x.bottom),c.x.top),c.y.onZero=Math.max(Math.min(i("x"),c.y.right),c.y.left),a.position=["y"===l?c.y[s]:u[0],"x"===l?c.x[s]:u[3]],a.rotation=Math.PI/2*("x"===l?0:1);var f={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=f[o],r.onZero&&(a.labelOffset=c[l][o]-c[l].onZero),e.getModel("axisTick").get("inside")&&(a.tickDirection=-a.tickDirection),e.getModel("axisLabel").get("inside")&&(a.labelDirection=-a.labelDirection);var d=e.getModel("axisLabel").get("rotate");return a.labelRotation="top"===s?-d:d,a.labelInterval=r.getLabelInterval(),a.z2=1,a}var r=i(1),a=i(3),o=i(50),s=o.ifIgnoreOnTick,l=o.getInterval,h=["axisLine","axisLabel","axisTick","axisName"],u=["splitArea","splitLine"],c=i(2).extendComponentView({ +type:"axis",render:function(t,e){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new a.Group,this.group.add(this._axisGroup),t.get("show")){var s=e.getComponent("grid",t.get("gridIndex")),l=n(s,t),c=new o(t,l);r.each(h,c.add,c),this._axisGroup.add(c.getGroup()),r.each(u,function(e){t.get(e+".show")&&this["_"+e](t,s,l.labelInterval)},this),a.groupTransition(i,this._axisGroup,t)}},_splitLine:function(t,e,i){var n=t.axis,o=t.getModel("splitLine"),h=o.getModel("lineStyle"),u=h.get("color"),c=l(o,i);u=r.isArray(u)?u:[u];for(var f=e.coordinateSystem.getRect(),d=n.isHorizontal(),p=0,g=n.getTicksCoords(),v=n.scale.getTicks(),m=[],y=[],_=h.getLineStyle(),x=0;xi&&(i=Math.min(i,u),u-=i,t.width=i,c--)}),f=(u-s)/(c+(c-1)*h),f=Math.max(f,0);var d,p=0;o.each(i,function(t,e){t.width||(t.width=f),d=t,p+=t.width*(1+h)}),d&&(p-=d.width*h);var g=-p/2;o.each(i,function(t,i){r[e][i]=r[e][i]||{offset:g,width:t.width},g+=t.width*(1+h)})}),r}function a(t,e,i){var a=r(o.filter(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),s={};e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),o=n(t),l=a[r.index][o],h=l.offset,u=l.width,c=i.getOtherAxis(r),f=t.get("barMinHeight")||0,d=r.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=i.dataToPoints(e,!0);s[o]=s[o]||[],e.setLayout({offset:h,size:u}),e.each(c.dim,function(t,i){if(!isNaN(t)){s[o][i]||(s[o][i]={p:d,n:d});var n,r,a,l,g=t>=0?"p":"n",v=p[i],m=s[o][i][g];c.isHorizontal()?(n=m,r=v[1]+h,a=v[0]-m,l=u,Math.abs(a)a?-1:1)*f),s[o][i][g]+=a):(n=v[0]+h,r=m,a=u,l=v[1]-m,Math.abs(l)=l?-1:1)*f),s[o][i][g]+=l),e.setItemLayout(i,{x:n,y:r,width:a,height:l})}},!0)},this)}var o=i(1),s=i(4),l=s.parsePercent;t.exports=a},function(t,e,i){var n=i(3),r=i(1),a=Math.PI;t.exports=function(t,e){e=e||{},r.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new n.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),o=new n.Arc({shape:{startAngle:-a/2,endAngle:-a/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),s=new n.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*a/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*a/2}).delay(300).start("circularInOut");var l=new n.Group;return l.add(o),l.add(s),l.add(i),l.resize=function(){var e=t.getWidth()/2,n=t.getHeight()/2;o.setShape({cx:e,cy:n});var r=o.shape.r;s.setShape({x:e-r,y:n-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},l.resize(),l}},function(t,e,i){function n(t,e){for(var i in e)x.hasClass(i)||("object"==typeof e[i]?t[i]=t[i]?c.merge(t[i],e[i],!1):c.clone(e[i]):null==t[i]&&(t[i]=e[i]))}function r(t){t=t,this.option={},this.option[w]=1,this._componentsMap={},this._seriesIndices=null,n(t,this._theme.option),c.merge(t,b,!1),this.mergeOption(t)}function a(t,e){c.isArray(e)||(e=e?[e]:[]);var i={};return p(e,function(e){i[e]=(t[e]||[]).slice()}),i}function o(t,e){var i={};p(e,function(t,e){var n=t.exist;n&&(i[n.id]=t)}),p(e,function(e,n){var r=e.option;if(c.assert(!r||null==r.id||!i[r.id]||i[r.id]===e,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&(i[r.id]=e),_(r)){var a=s(t,r,e.exist);e.keyInfo={mainType:t,subType:a}}}),p(e,function(t,e){var n=t.exist,r=t.option,a=t.keyInfo;if(_(r)){if(a.name=null!=r.name?r.name+"":n?n.name:"\x00-",n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(i[a.id])}i[a.id]=t}})}function s(t,e,i){var n=e.type?e.type:i?i.subType:x.determineSubType(t,e);return n}function l(t){return v(t,function(t){return t.componentIndex})||[]}function h(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function u(t){}var c=i(1),f=i(8),d=i(9),p=c.each,g=c.filter,v=c.map,m=c.isArray,y=c.indexOf,_=c.isObject,x=i(10),b=i(124),w="\x00_ec_inner",M=d.extend({constructor:M,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new d(i),this._optionManager=n},setOption:function(t,e){c.assert(!(w in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption()},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):r.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&p(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,r){var s=f.normalizeToArray(t[e]),h=f.mappingToExists(n[e],s);o(e,h);var u=a(n,r);i[e]=[],n[e]=[],p(h,function(t,r){var a=t.exist,o=t.option;if(c.assert(_(o)||a,"Empty component definition"),o){var s=x.getClass(e,t.keyInfo.subType,!0);a&&a instanceof s?(a.mergeOption(o,this),a.optionUpdated(o,!1)):(a=new s(o,this,this,c.extend({dependentModels:u,componentIndex:r},t.keyInfo)),a.optionUpdated(null,!0))}else a.mergeOption({},this),a.optionUpdated({},!1);n[e][r]=a,i[e][r]=a.option},this),"series"===e&&(this._seriesIndices=l(n.series))}var i=this.option,n=this._componentsMap,r=[];p(t,function(t,e){null!=t&&(x.hasClass(e)?r.push(e):i[e]=null==i[e]?c.clone(t):c.merge(i[e],t,!0))}),x.topologicalTravel(r,x.getAllClassMainTypes(),e,this)},getOption:function(){var t=c.clone(this.option);return p(t,function(e,i){if(x.hasClass(i)){for(var e=f.normalizeToArray(e),n=e.length-1;n>=0;n--)f.isIdInner(e[n])&&e.splice(n,1);t[i]=e}}),delete t[w],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap[t];return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,a=this._componentsMap[e];if(!a||!a.length)return[];var o;if(null!=i)m(i)||(i=[i]),o=g(v(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=m(n);o=g(a,function(t){return s&&y(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=m(r);o=g(a,function(t){return l&&y(r,t.name)>=0||!l&&t.name===r})}return h(o,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(i)||t.hasOwnProperty(n))?{mainType:r,index:t[e],id:t[i],name:t[n]}:null}function i(e){return t.filter?g(e,t.filter):e}var n=t.query,r=t.mainType,a=e(n),o=a?this.queryComponents(a):this._componentsMap[r];return i(h(o,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,p(n,function(t,n){p(t,function(t,r){e.call(i,n,t,r)})});else if(c.isString(t))p(n[t],e,i);else if(_(t)){var r=this.findComponents(t);p(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return g(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){u(this),p(this._seriesIndices,function(i){var n=this._componentsMap.series[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){p(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,i){u(this),p(this._seriesIndices,function(n){var r=this._componentsMap.series[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return p(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return u(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){u(this);var i=g(this._componentsMap.series,t,e);this._seriesIndices=l(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=l(t.series);var e=[];p(t,function(t,i){e.push(i)}),x.topologicalTravel(e,x.getAllClassMainTypes(),function(e,i){p(t[e],function(t){t.restoreData()})})}});c.mixin(M,i(56)),t.exports=M},function(t,e,i){function n(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e,i){var n,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;f(l,function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))})}return r||(r=t),r.timeline||(r.timeline=s),f([r].concat(a).concat(h.map(o,function(t){return t.option})),function(t){f(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}function a(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return h.each(t,function(t,e){var i=e.match(v);if(i&&i[1]&&i[2]){var a=i[1],s=i[2].toLowerCase();o(n[s],t,a)||(r=!1)}}),r}function o(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},f(e,function(e,i){if(null!=e){var n=t[i];if(c.hasClass(i)){e=u.normalizeToArray(e),n=u.normalizeToArray(n);var r=u.mappingToExists(n,e);t[i]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[i]=g(n,e,!0)}})}var h=i(1),u=i(8),c=i(10),f=h.each,d=h.clone,p=h.map,g=h.merge,v=/^(min|max)?(.+)$/;n.prototype={constructor:n,setOption:function(t,e){t=d(t,!0);var i=this._optionBackup,n=r.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(l(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,d),this._mediaList=p(e.mediaList,d),this._mediaDefault=d(e.mediaDefault),this._currentMediaIndices=[],d(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=d(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,r=this._mediaDefault,o=[],l=[];if(!n.length&&!r)return l;for(var h=0,u=n.length;u>h;h++)a(n[h].query,e,i)&&o.push(h);return!o.length&&r&&(o=[-1]),o.length&&!s(o,this._currentMediaIndices)&&(l=p(o,function(t){return d(-1===t?r.option:n[t].option)})),this._currentMediaIndices=o,l}},t.exports=n},function(t,e){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||""),t.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],grid:{},textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:!0,animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3}},function(t,e,i){t.exports={getAreaStyle:i(31)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]])}},function(t,e){t.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(t,e,i){var n=i(31)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getItemStyle:function(t){var e=n.call(this,t),i=this.getBorderLineDash();return i&&(e.lineDash=i),e},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){var n=i(31)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getLineStyle:function(t){var e=n.call(this,t),i=this.getLineDash();return i&&(e.lineDash=i),e},getLineDash:function(){var t=this.get("type");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},function(t,e,i){function n(t,e){return t&&t.getShallow(e)}var r=i(18);t.exports={getTextColor:function(){var t=this.ecModel;return this.getShallow("color")||t&&t.get("textStyle.color")},getFont:function(){var t=this.ecModel,e=t&&t.getModel("textStyle");return[this.getShallow("fontStyle")||n(e,"fontStyle"),this.getShallow("fontWeight")||n(e,"fontWeight"),(this.getShallow("fontSize")||n(e,"fontSize")||12)+"px",this.getShallow("fontFamily")||n(e,"fontFamily")||"sans-serif"].join(" ")},getTextRect:function(t){var e=this.get("textStyle")||{};return r.getBoundingRect(t,this.getFont(),e.align,e.baseline)},ellipsis:function(t,e,i){return r.ellipsis(t,this.getFont(),e,i)}}},function(t,e,i){function n(t,e){e=e.split(",");for(var i=t,n=0;ne&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var c;"string"==typeof r?c=i[r]:"function"==typeof r&&(c=r),c&&(e=e.downSample(s.dim,1/u,c,n),t.setData(e))}}},this)}},function(t,e,i){var n=i(1),r=i(32),a=i(4),o=i(38),s=r.prototype,l=o.prototype,h=Math.floor,u=Math.ceil,c=Math.pow,f=10,d=Math.log,p=r.extend({type:"log",getTicks:function(){return n.map(l.getTicks.call(this),function(t){return a.round(c(f,t))})},getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),c(f,t)},setExtent:function(t,e){t=d(t)/d(f),e=d(e)/d(f),l.setExtent.call(this,t,e)},getExtent:function(){var t=s.getExtent.call(this);return t[0]=c(f,t[0]),t[1]=c(f,t[1]),t},unionExtent:function(t){t[0]=d(t[0])/d(f),t[1]=d(t[1])/d(f),s.unionExtent.call(this,t)},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||0>=i)){var n=c(10,h(d(i/t)/Math.LN10)),r=t/i*n;.5>=r&&(n*=10);var o=[a.round(u(e[0]/n)*n),a.round(h(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:l.niceExtent});n.each(["contain","normalize"],function(t){p.prototype[t]=function(e){return e=d(e)/d(f),s[t].call(this,e)}}),p.create=function(){return new p},t.exports=p},function(t,e,i){var n=i(1),r=i(32),a=r.prototype,o=r.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?n.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),a.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return a.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(a.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},niceTicks:n.noop,niceExtent:n.noop});o.create=function(){return new o},t.exports=o},function(t,e,i){var n=i(1),r=i(4),a=i(11),o=i(38),s=o.prototype,l=Math.ceil,h=Math.floor,u=1e3,c=60*u,f=60*c,d=24*f,p=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][2]=0;r--)if(!n[r].silent&&n[r]!==i&&!n[r].ignore&&o(n[r],t,e))return n[r]}},d.mixin(T,v),d.mixin(T,p),t.exports=T},function(t,e,i){function n(){return!1}function r(t,e,i,n){var r=document.createElement(e),a=i.getWidth(),o=i.getHeight(),s=r.style;return s.position="absolute",s.left=0,s.top=0,s.width=a+"px",s.height=o+"px",r.width=a*n,r.height=o*n,r.setAttribute("data-zr-dom-id",t),r}var a=i(1),o=i(33),s=i(64),l=i(63),h=function(t,e,i){var s;i=i||o.devicePixelRatio,"string"==typeof t?s=r(t,"canvas",e,i):a.isObject(t)&&(s=t,t=s.id),this.id=t,this.dom=s;var l=s.style;l&&(s.onselectstart=n,l["-webkit-user-select"]="none",l["user-select"]="none",l["-webkit-touch-callout"]="none",l["-webkit-tap-highlight-color"]="rgba(0,0,0,0)"),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};h.prototype={constructor:h,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d");var t=this.dpr;1!=t&&this.ctx.scale(t,t)},createBackBuffer:function(){var t=this.dpr;this.domBack=r("back-"+this.id,"canvas",this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,a=this.domBack;r.width=t+"px",r.height=e+"px",n.width=t*i,n.height=e*i,1!=i&&this.ctx.scale(i,i),a&&(a.width=t*i,a.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e=this.dom,i=this.ctx,n=e.width,r=e.height,a=this.clearColor,o=this.motionBlur&&!t,h=this.lastFrameAlpha,u=this.dpr;if(o&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,n/u,r/u)),i.clearRect(0,0,n/u,r/u),a){var c;a.colorStops?(c=a.__canvasGradient||s.getGradient(i,a,{x:0,y:0,width:n/u,height:r/u}),a.__canvasGradient=c):a.image&&(c=l.prototype.getCanvasPattern.call(a,i)),i.save(),i.fillStyle=c||a,i.fillRect(0,0,n/u,r/u),i.restore()}if(o){var f=this.domBack;i.save(),i.globalAlpha=h,i.drawImage(f,0,0,n/u,r/u),i.restore()}}},t.exports=h},function(t,e,i){"use strict";function n(t){return parseInt(t,10)}function r(t){return t?t.isBuildin?!0:"function"==typeof t.resize&&"function"==typeof t.refresh:!1}function a(t){t.__unusedCount++}function o(t){1==t.__unusedCount&&t.clear()}function s(t,e,i){return _.copy(t.getBoundingRect()),t.transform&&_.applyTransform(t.transform),x.width=e,x.height=i,!_.intersect(x)}function l(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;ir;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(r,1),o.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,m(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,m(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,f.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(a),this._doPaintList(t,e),this.eachBuildinLayer(o)},_doPaintList:function(t,e){function i(t){a.save(),a.globalAlpha=1,a.shadowBlur=0,n.__dirty=!0,a.drawImage(t.dom,0,0,u,c),a.restore(),n.ctx.restore()}for(var n,r,a,o,s,l,h=0,u=this._width,c=this._height,p=this._progress,g=0,v=t.length;v>g;g++){var m=t[g],_=this._singleCanvas?0:m.zlevel,x=m.__frame;if(0>x&&s&&(i(s),s=null),r!==_&&(a&&a.restore(),o={},r=_,n=this.getLayer(r),n.isBuildin||d("ZLevel "+r+" has been used by unkown layer "+n.id),a=n.ctx,a.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear()),n.__dirty||e){if(x>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,y-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(p=l),s.__progress=p+1}x===p&&this._doPaintEl(m,s,!0,s.renderScope)}else this._doPaintEl(m,n,e,o);m.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherProgressive=!1,f.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&t.scale[0]&&t.scale[1]&&(!t.culling||!s(t,this._width,this._height))){var a=t.__clipPaths;(n.prevClipLayer!==e||l(a,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),a&&(r.save(),h(a,r),n.prevClipLayer=e,n.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new v("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&f.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=null,s=-1,l=this._domRoot;if(i[t])return void d("ZLevel "+t+" has been used already");if(!r(e))return void d("Layer of zlevel "+t+" is not valid");if(a>0&&t>n[0]){for(s=0;a-1>s&&!(n[s]t);s++);o=i[n[s]]}if(n.splice(s+1,0,t),o){var h=o.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nh;h++){var c=t[h],d=this._singleCanvas?0:c.zlevel,p=e[d],g=c.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||c.__dirty),g>=0){o!==g&&(o=g,l++);var m=c.__frame=l-1;if(!a){var _=Math.min(s,y-1);a=i[_],a||(a=i[_]=new v("progressive",this,this.dpr),a.initContext()),a.__maxProgress=0}a.__dirty=a.__dirty||c.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,m),a.__maxProgress>=a.__progress&&(p.__dirty=!0)}else c.__frame=-1,a&&(a.__nextIdxNotProg=h,s++,a=null)}a&&(s++,a.__nextIdxNotProg=h),this.eachBuildinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,y),f.each(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?f.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&f.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(f.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;if(i.style.display="none",t=t||this._getWidth(),e=e||this._getHeight(),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers[n].resize(t,e);this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new v("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var i=this.storage.getDisplayList(!0),n={},r=0;rr;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,a.canvasSupported&&s(i,n)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n&&(n.parent=t,n.updateTransform(),e?(e=e.slice(),e.push(n)):e=[n]),t.isGroup){for(var r=t._children,a=0;ae;e++)this.delRoot(t[e]);else{var a;a="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,a);s>=0&&(this.delFromMap(a.id),this._roots.splice(s,1),a instanceof o&&a.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof o&&(t.__storage=this),t.dirty(),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,i=e[t];return i&&(delete e[t],i instanceof o&&(i.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:n},t.exports=l},function(t,e,i){"use strict";var n=i(1),r=i(24).Dispatcher,a=i(60),o=i(59),s=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time=0,r.call(this)};s.prototype={constructor:s,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;io;o++){var s=i[o],l=s.step(t);l&&(r.push(l),a.push(s))}for(var o=0;n>o;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(var o=0;n>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},start:function(){function t(){e._running&&(a(t),e._update())}var e=this;this._running=!0,this._time=(new Date).getTime(),a(t)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new o(t,e.loop,e.getter,e.setter);return i}},n.mixin(s,r),t.exports=s},function(t,e,i){function n(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=i(143);n.prototype={constructor:n,step:function(t){this._initialized||(this._startTime=(new Date).getTime()+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,a="function"==typeof n?n(e):e;return this.fire("frame",a),1==e?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(){var t=(new Date).getTime(),e=(t-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},t.exports=n},function(t,e){var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};t.exports=i},function(t,e,i){var n=i(61).normalizeRadian,r=2*Math.PI;t.exports={containStroke:function(t,e,i,a,o,s,l,h,u){if(0===l)return!1;var c=l;h-=t,u-=e;var f=Math.sqrt(h*h+u*u);if(f-c>i||i>f+c)return!1;if(Math.abs(a-o)%r<1e-4)return!0;if(s){var d=a;a=n(o),o=n(d)}else a=n(a),o=n(o);a>o&&(o+=r);var p=Math.atan2(u,h);return 0>p&&(p+=r),p>=a&&o>=p||p+r>=a&&o>=p+r}}},function(t,e,i){var n=i(16);t.exports={containStroke:function(t,e,i,r,a,o,s,l,h,u,c){if(0===h)return!1;var f=h;if(c>e+f&&c>r+f&&c>o+f&&c>l+f||e-f>c&&r-f>c&&o-f>c&&l-f>c||u>t+f&&u>i+f&&u>a+f&&u>s+f||t-f>u&&i-f>u&&a-f>u&&s-f>u)return!1;var d=n.cubicProjectPoint(t,e,i,r,a,o,s,l,u,c,null);return f/2>=d}}},function(t,e,i){"use strict";function n(t,e){return Math.abs(t-e)<_}function r(){var t=b[0];b[0]=b[1],b[1]=t}function a(t,e,i,n,a,o,s,l,h,u){if(u>e&&u>n&&u>o&&u>l||e>u&&n>u&&o>u&&l>u)return 0;var c=g.cubicRootAt(e,n,o,l,u,x);if(0===c)return 0;for(var f,d,p=0,v=-1,m=0;c>m;m++){var y=x[m],_=0===y||1===y?.5:1,w=g.cubicAt(t,i,a,s,y);h>w||(0>v&&(v=g.cubicExtrema(e,n,o,l,b),b[1]1&&r(),f=g.cubicAt(e,n,o,l,b[0]),v>1&&(d=g.cubicAt(e,n,o,l,b[1]))),p+=2==v?yf?_:-_:yd?_:-_:d>l?_:-_:yf?_:-_:f>l?_:-_)}return p}function o(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||e>s&&n>s&&a>s)return 0;var l=g.quadraticRootAt(e,n,a,s,x);if(0===l)return 0;var h=g.quadraticExtremum(e,n,a);if(h>=0&&1>=h){for(var u=0,c=g.quadraticAt(e,n,a,h),f=0;l>f;f++){var d=0===x[f]||1===x[f]?.5:1,p=g.quadraticAt(t,i,r,x[f]);o>p||(u+=x[f]c?d:-d:c>a?d:-d)}return u}var d=0===x[0]||1===x[0]?.5:1,p=g.quadraticAt(t,i,r,x[0]);return o>p?0:e>a?d:-d}function s(t,e,i,n,r,a,o,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);x[0]=-l,x[1]=l;var h=Math.abs(n-r);if(1e-4>h)return 0;if(1e-4>h%y){n=0,r=y;var u=a?1:-1;return o>=x[0]+t&&o<=x[1]+t?u:0}if(a){var l=n;n=p(r),r=p(l)}else n=p(n),r=p(r);n>r&&(r+=y);for(var c=0,f=0;2>f;f++){var d=x[f];if(d+t>o){var g=Math.atan2(s,d),u=a?1:-1;0>g&&(g=y+g),(g>=n&&r>=g||g+y>=n&&r>=g+y)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),c+=u)}}return c}function l(t,e,i,r,l){for(var u=0,p=0,g=0,y=0,_=0,x=0;x1&&(i||(u+=v(p,g,y,_,r,l))),1==x&&(p=t[x],g=t[x+1],y=p,_=g),b){case h.M:y=t[x++],_=t[x++],p=y,g=_;break;case h.L:if(i){if(m(p,g,t[x],t[x+1],e,r,l))return!0}else u+=v(p,g,t[x],t[x+1],r,l)||0;p=t[x++],g=t[x++];break;case h.C:if(i){if(c.containStroke(p,g,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],e,r,l))return!0}else u+=a(p,g,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],r,l)||0;p=t[x++],g=t[x++];break;case h.Q:if(i){if(f.containStroke(p,g,t[x++],t[x++],t[x],t[x+1],e,r,l))return!0}else u+=o(p,g,t[x++],t[x++],t[x],t[x+1],r,l)||0;p=t[x++],g=t[x++];break;case h.A:var w=t[x++],M=t[x++],S=t[x++],T=t[x++],A=t[x++],C=t[x++],L=(t[x++],1-t[x++]),I=Math.cos(A)*S+w,k=Math.sin(A)*T+M;x>1?u+=v(p,g,I,k,r,l):(y=I,_=k);var P=(r-w)*T/S+w;if(i){if(d.containStroke(w,M,T,A,A+C,L,e,P,l))return!0}else u+=s(w,M,T,A,A+C,L,P,l);p=Math.cos(A+C)*S+w,g=Math.sin(A+C)*T+M;break;case h.R:y=p=t[x++],_=g=t[x++];var D=t[x++],O=t[x++],I=y+D,k=_+O;if(i){if(m(y,_,I,_,e,r,l)||m(I,_,I,k,e,r,l)||m(I,k,y,k,e,r,l)||m(y,k,y,_,e,r,l))return!0}else u+=v(I,_,I,k,r,l),u+=v(y,k,y,_,r,l);break;case h.Z:if(i){if(m(p,g,y,_,e,r,l))return!0}else u+=v(p,g,y,_,r,l);p=y,g=_}}return i||n(g,_)||(u+=v(p,g,y,_,r,l)||0),0!==u}var h=i(28).CMD,u=i(83),c=i(145),f=i(84),d=i(144),p=i(61).normalizeRadian,g=i(16),v=i(85),m=u.containStroke,y=2*Math.PI,_=1e-4,x=[-1,-1,-1],b=[-1,-1];t.exports={contain:function(t,e,i){return l(t,0,!1,e,i)},containStroke:function(t,e,i,n){return l(t,e,!0,i,n)}}},function(t,e,i){"use strict";function n(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var a=i(24),o=function(){this._track=[]};o.prototype={constructor:o,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,s=n.length;s>o;o++){var l=n[o],h=a.clientToLocal(i,l);r.points.push([h.zrX,h.zrY]),r.touches.push(l)}this._track.push(r)}},_recognize:function(t){for(var e in s)if(s.hasOwnProperty(e)){var i=s[e](this._track,t);if(i)return i}}};var s={pinch:function(t,e){var i=t.length;if(i){var a=(t[i-1]||{}).points,o=(t[i-2]||{}).points||a;if(o&&o.length>1&&a&&a.length>1){var s=n(a)/n(o);!isFinite(s)&&(s=1),e.pinchScale=s;var l=r(a);return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}};t.exports=o},function(t,e){var i=function(){this.head=null,this.tail=null,this._len=0},n=i.prototype;n.insert=function(t){var e=new r(t);return this.insertEntry(e),e},n.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._len++},n.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len};var r=function(t){this.value=t,this.next,this.prev},a=function(t){this._list=new i,this._map={},this._maxSize=t||10},o=a.prototype;o.put=function(t,e){var i=this._list,n=this._map;if(null==n[t]){var r=i.len();if(r>=this._maxSize&&r>0){var a=i.head;i.remove(a),delete n[a.key]}var o=i.insert(e);o.key=t,n[t]=o}},o.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},o.clear=function(){this._list.clear(),this._map={}},t.exports=a},function(t,e,i){var n=i(6);t.exports=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;iy;y++)r(f,f,t[y]),a(d,d,t[y]);r(f,f,h[0]),a(d,d,h[1])}for(var y=0,_=t.length;_>y;y++){var x=t[y];if(i)u=t[y?y-1:_-1],c=t[(y+1)%_];else{if(0===y||y===_-1){p.push(n.clone(t[y]));continue}u=t[y-1],c=t[y+1]}n.sub(g,c,u),o(g,g,e);var b=s(x,u),w=s(x,c),M=b+w;0!==M&&(b/=M,w/=M),o(v,g,-b),o(m,g,w);var S=l([],x,v),T=l([],x,m);h&&(a(S,S,f),r(S,S,d),a(T,T,f),r(T,T,d)),p.push(S),p.push(T)}return i&&p.push(p.shift()),p}},function(t,e,i){function n(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}var r=i(5);t.exports=function(t,e){for(var i=t.length,a=[],o=0,s=1;i>s;s++)o+=r.distance(t[s-1],t[s]);var l=o/2;l=i>l?i:l;for(var s=0;l>s;s++){var h,u,c,f=s/(l-1)*(e?i:i-1),d=Math.floor(f),p=f-d,g=t[d%i];e?(h=t[(d-1+i)%i],u=t[(d+1)%i],c=t[(d+2)%i]):(h=t[0===d?d:d-1],u=t[d>i-2?i-1:d+1],c=t[d>i-3?i-1:d+2]);var v=p*p,m=p*v;a.push([n(h[0],g[0],u[0],c[0],p,v,m),n(h[1],g[1],u[1],c[1],p,v,m)])}return a}},function(t,e,i){t.exports=i(6).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,a,o,!s)}})},function(t,e,i){"use strict";function n(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?c:h)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?c:h)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?u:l)(t.x1,t.cpx1,t.x2,e),(i?u:l)(t.y1,t.cpy1,t.y2,e)]}var r=i(16),a=i(5),o=r.quadraticSubdivide,s=r.cubicSubdivide,l=r.quadraticAt,h=r.cubicAt,u=r.quadraticDerivativeAt,c=r.cubicDerivativeAt,f=[];t.exports=i(6).extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,l=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,d=e.percent;0!==d&&(t.moveTo(i,n),null==u||null==c?(1>d&&(o(i,l,r,d,f),l=f[1],r=f[2],o(n,h,a,d,f),h=f[1],a=f[2]),t.quadraticCurveTo(l,h,r,a)):(1>d&&(s(i,l,u,r,d,f),l=f[1],u=f[2],r=f[3],s(n,h,c,a,d,f),h=f[1],c=f[2],a=f[3]),t.bezierCurveTo(l,h,u,c,r,a)))},pointAt:function(t){return n(this.shape,t,!1)},tangentAt:function(t){var e=n(this.shape,t,!0);return a.normalize(e,e)}})},function(t,e,i){"use strict";t.exports=i(6).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(i,n),1>o&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})},function(t,e,i){var n=i(65);t.exports=i(6).extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){n.buildPath(t,e,!0)}})},function(t,e,i){var n=i(65);t.exports=i(6).extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){n.buildPath(t,e,!1)}})},function(t,e,i){var n=i(66);t.exports=i(6).extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,a=e.width,o=e.height;e.r?n.buildPath(t,e):t.rect(i,r,a,o),t.closePath()}})},function(t,e,i){t.exports=i(6).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(o),u=Math.sin(o);t.moveTo(h*r+i,u*r+n),t.lineTo(h*a+i,u*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}})},function(t,e,i){"use strict";var n=i(59),r=i(1),a=r.isString,o=r.isFunction,s=r.isObject,l=i(47),h=function(){this.animators=[]};h.prototype={constructor:h,animate:function(t,e){var i,a=!1,o=this,s=this.__zr;if(t){var h=t.split("."),u=o;a="shape"===h[0];for(var c=0,f=h.length;f>c;c++)u&&(u=u[h[c]]);u&&(i=u)}else i=o;if(!i)return void l('Property "'+t+'" is not existed in element '+o.id);var d=o.animators,p=new n(i,e);return p.during(function(t){o.dirty(a)}).done(function(){d.splice(r.indexOf(d,p),1)}),d.push(p),s&&s.animation.addAnimator(p),p},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r){function s(){h--,h||r&&r()}a(i)?(r=n,n=i,i=0):o(n)?(r=n,n="linear",i=0):o(i)?(r=i,i=0):o(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i,n,r);var l=this.animators.slice(),h=l.length;h||r&&r();for(var u=0;u0&&this.animate(t,!1).when(null==n?500:n,o).delay(a||0),this}},t.exports=h},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}i.prototype={constructor:i,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this._dispatchProxy(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this._dispatchProxy(e,"drag",t.event);var o=this.findHover(i,n,e),s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this._dispatchProxy(s,"dragleave",t.event),o&&o!==s&&this._dispatchProxy(o,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this._dispatchProxy(e,"dragend",t.event),this._dropTarget&&this._dispatchProxy(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},t.exports=i},function(t,e,i){function n(t,e,i,n,r,a,o,s,l,h,u){var g=l*(p/180),y=d(g)*(t-i)/2+f(g)*(e-n)/2,_=-1*f(g)*(t-i)/2+d(g)*(e-n)/2,x=y*y/(o*o)+_*_/(s*s);x>1&&(o*=c(x),s*=c(x));var b=(r===a?-1:1)*c((o*o*(s*s)-o*o*(_*_)-s*s*(y*y))/(o*o*(_*_)+s*s*(y*y)))||0,w=b*o*_/s,M=b*-s*y/o,S=(t+i)/2+d(g)*w-f(g)*M,T=(e+n)/2+f(g)*w+d(g)*M,A=m([1,0],[(y-w)/o,(_-M)/s]),C=[(y-w)/o,(_-M)/s],L=[(-1*y-w)/o,(-1*_-M)/s],I=m(C,L);v(C,L)<=-1&&(I=p),v(C,L)>=1&&(I=0),0===a&&I>0&&(I-=2*p),1===a&&0>I&&(I+=2*p),u.addData(h,S,T,o,s,A,I,g,a)}function r(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===v[0]&&v.shift();for(var m=0;mr;r++){var a=t[r];a.__dirty&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var s=new o(e);return s.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},s}}},function(t,e,i){function n(t,e){var i,n,a,u,c,f,d=t.data,p=r.M,g=r.C,v=r.L,m=r.R,y=r.A,_=r.Q;for(a=0,u=0;ac;c++){var f=s[c];f[0]=d[a++],f[1]=d[a++],o(f,f,e),d[u++]=f[0],d[u++]=f[1]}}}var r=i(28).CMD,a=i(5),o=a.applyTransform,s=[[],[],[]],l=Math.sqrt,h=Math.atan2;t.exports=n}])}); \ No newline at end of file diff --git a/package.json b/package.json index 1c878ca2c0..004362afc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "echarts", - "version": "3.1.10", + "version": "3.2.0", "description": "A powerful charting and visualization library for browser", "keywords": [ "visualization", @@ -35,7 +35,7 @@ "prepublish": "node build/amd2common.js" }, "dependencies": { - "zrender": "^3.1.0" + "zrender": "^3.1.1" }, "devDependencies": { "coordtransform": "^2.0.2", @@ -45,6 +45,6 @@ "fs-extra": "^0.26.5", "glob": "^7.0.0", "webpack": "^1.12.13", - "zrender": "^3.1.0" + "zrender": "^3.1.1" } } diff --git a/src/echarts.js b/src/echarts.js index a5d90ff603..6d9fb6e5c7 100644 --- a/src/echarts.js +++ b/src/echarts.js @@ -1151,9 +1151,9 @@ define(function (require) { /** * @type {number} */ - version: '3.1.10', + version: '3.2.0', dependencies: { - zrender: '3.1.0' + zrender: '3.1.1' } };