通过百度echarts实现数据图表展示功能

现在我们在工作中,在开发中都会或多或少的用到图表统计数据显示给用户。通过图表可以很直观的,直接的将数据呈现出来。这里我就介绍说一下利用百度开源的echarts图表技术实现的具体功能。

1、对于不太理解echarts是个怎样技术的开发者来说,可以到echarts官网进行学习了解,官网有详细的API文档和实例供大家参考学习。

2、以下是我在工作中实现整理出来的实例源码:

公用的支持js文件 echarts.js、echarts.min.js,还有其他的图表需要支持的js文件也可以到官网下载

echarts.js

/*!
 * ECharts, a javascript interactive chart library.
 *
 * Copyright (c) 2015, Baidu Inc.
 * All rights reserved.
 *
 * LICENSE
 * https://github.com/ecomfe/echarts/blob/master/LICENSE.txt
 */

/**
 * @module echarts
 */
define(function (require) {

    var GlobalModel = require('./model/Global');
    var ExtensionAPI = require('./ExtensionAPI');
    var CoordinateSystemManager = require('./CoordinateSystem');
    var OptionManager = require('./model/OptionManager');

    var ComponentModel = require('./model/Component');
    var SeriesModel = require('./model/Series');

    var ComponentView = require('./view/Component');
    var ChartView = require('./view/Chart');
    var graphic = require('./util/graphic');

    var zrender = require('zrender');
    var zrUtil = require('zrender/core/util');
    var colorTool = require('zrender/tool/color');
    var env = require('zrender/core/env');
    var Eventful = require('zrender/mixin/Eventful');

    var each = zrUtil.each;

    var VISUAL_CODING_STAGES = ['echarts', 'chart', 'component'];

    // TODO Transform first or filter first
    var PROCESSOR_STAGES = ['transform', 'filter', 'statistic'];

    function createRegisterEventWithLowercaseName(method) {
        return function (eventName, handler, context) {
            // Event name is all lowercase
            eventName = eventName && eventName.toLowerCase();
            Eventful.prototype[method].call(this, eventName, handler, context);
        };
    }
    /**
     * @module echarts~MessageCenter
     */
    function MessageCenter() {
        Eventful.call(this);
    }
    MessageCenter.prototype.on = createRegisterEventWithLowercaseName('on');
    MessageCenter.prototype.off = createRegisterEventWithLowercaseName('off');
    MessageCenter.prototype.one = createRegisterEventWithLowercaseName('one');
    zrUtil.mixin(MessageCenter, Eventful);
    /**
     * @module echarts~ECharts
     */
    function ECharts (dom, theme, opts) {
        opts = opts || {};

        // Get theme by name
        if (typeof theme === 'string') {
            theme = themeStorage[theme];
        }

        if (theme) {
            each(optionPreprocessorFuncs, function (preProcess) {
                preProcess(theme);
            });
        }
        /**
         * @type {string}
         */
        this.id;
        /**
         * Group id
         * @type {string}
         */
        this.group;
        /**
         * @type {HTMLDomElement}
         * @private
         */
        this._dom = dom;
        /**
         * @type {module:zrender/ZRender}
         * @private
         */
        this._zr = zrender.init(dom, {
            renderer: opts.renderer || 'canvas',
            devicePixelRatio: opts.devicePixelRatio
        });

        /**
         * @type {Object}
         * @private
         */
        this._theme = zrUtil.clone(theme);

        /**
         * @type {Array.<module:echarts/view/Chart>}
         * @private
         */
        this._chartsViews = [];

        /**
         * @type {Object.<string, module:echarts/view/Chart>}
         * @private
         */
        this._chartsMap = {};

        /**
         * @type {Array.<module:echarts/view/Component>}
         * @private
         */
        this._componentsViews = [];

        /**
         * @type {Object.<string, module:echarts/view/Component>}
         * @private
         */
        this._componentsMap = {};

        /**
         * @type {module:echarts/ExtensionAPI}
         * @private
         */
        this._api = new ExtensionAPI(this);

        /**
         * @type {module:echarts/CoordinateSystem}
         * @private
         */
        this._coordSysMgr = new CoordinateSystemManager();

        Eventful.call(this);

        /**
         * @type {module:echarts~MessageCenter}
         * @private
         */
        this._messageCenter = new MessageCenter();

        // Init mouse events
        this._initEvents();

        // In case some people write `window.onresize = chart.resize`
        this.resize = zrUtil.bind(this.resize, this);
    }

    var echartsProto = ECharts.prototype;

    /**
     * @return {HTMLDomElement}
     */
    echartsProto.getDom = function () {
        return this._dom;
    };

    /**
     * @return {module:zrender~ZRender}
     */
    echartsProto.getZr = function () {
        return this._zr;
    };

    /**
     * @param {Object} option
     * @param {boolean} notMerge
     * @param {boolean} [notRefreshImmediately=false] Useful when setOption frequently.
     */
    echartsProto.setOption = function (option, notMerge, notRefreshImmediately) {
        if (!this._model || notMerge) {
            this._model = new GlobalModel(
                null, null, this._theme, new OptionManager(this._api)
            );
        }

        this._model.setOption(option, optionPreprocessorFuncs);

        updateMethods.prepareAndUpdate.call(this);

        !notRefreshImmediately && this._zr.refreshImmediately();
    };

    /**
     * @DEPRECATED
     */
    echartsProto.setTheme = function () {
        console.log('ECharts#setTheme() is DEPRECATED in ECharts 3.0');
    };

    /**
     * @return {module:echarts/model/Global}
     */
    echartsProto.getModel = function () {
        return this._model;
    };

    /**
     * @return {Object}
     */
    echartsProto.getOption = function () {
        return this._model.getOption();
    };

    /**
     * @return {number}
     */
    echartsProto.getWidth = function () {
        return this._zr.getWidth();
    };

    /**
     * @return {number}
     */
    echartsProto.getHeight = function () {
        return this._zr.getHeight();
    };

    /**
     * Get canvas which has all thing rendered
     * @param {Object} opts
     * @param {string} [opts.backgroundColor]
     */
    echartsProto.getRenderedCanvas = function (opts) {
        if (!env.canvasSupported) {
            return;
        }
        opts = opts || {};
        opts.pixelRatio = opts.pixelRatio || 1;
        opts.backgroundColor = opts.backgroundColor
            || this._model.get('backgroundColor');
        var zr = this._zr;
        var list = zr.storage.getDisplayList();
        // Stop animations
        zrUtil.each(list, function (el) {
            el.stopAnimation(true);
        });
        return zr.painter.getRenderedCanvas(opts);
    };
    /**
     * @return {string}
     * @param {Object} opts
     * @param {string} [opts.type='png']
     * @param {string} [opts.pixelRatio=1]
     * @param {string} [opts.backgroundColor]
     */
    echartsProto.getDataURL = function (opts) {
        opts = opts || {};
        var excludeComponents = opts.excludeComponents;
        var ecModel = this._model;
        var excludesComponentViews = [];
        var self = this;

        each(excludeComponents, function (componentType) {
            ecModel.eachComponent({
                mainType: componentType
            }, function (component) {
                var view = self._componentsMap[component.__viewId];
                if (!view.group.ignore) {
                    excludesComponentViews.push(view);
                    view.group.ignore = true;
                }
            });
        });

        var url = this.getRenderedCanvas(opts).toDataURL(
            'image/' + (opts && opts.type || 'png')
        );

        each(excludesComponentViews, function (view) {
            view.group.ignore = false;
        });
        return url;
    };


    /**
     * @return {string}
     * @param {Object} opts
     * @param {string} [opts.type='png']
     * @param {string} [opts.pixelRatio=1]
     * @param {string} [opts.backgroundColor]
     */
    echartsProto.getConnectedDataURL = function (opts) {
        if (!env.canvasSupported) {
            return;
        }
        var groupId = this.group;
        var mathMin = Math.min;
        var mathMax = Math.max;
        var MAX_NUMBER = Infinity;
        if (connectedGroups[groupId]) {
            var left = MAX_NUMBER;
            var top = MAX_NUMBER;
            var right = -MAX_NUMBER;
            var bottom = -MAX_NUMBER;
            var canvasList = [];
            var dpr = (opts && opts.pixelRatio) || 1;
            for (var id in instances) {
                var chart = instances[id];
                if (chart.group === groupId) {
                    var canvas = chart.getRenderedCanvas(
                        zrUtil.clone(opts)
                    );
                    var boundingRect = chart.getDom().getBoundingClientRect();
                    left = mathMin(boundingRect.left, left);
                    top = mathMin(boundingRect.top, top);
                    right = mathMax(boundingRect.right, right);
                    bottom = mathMax(boundingRect.bottom, bottom);
                    canvasList.push({
                        dom: canvas,
                        left: boundingRect.left,
                        top: boundingRect.top
                    });
                }
            }

            left *= dpr;
            top *= dpr;
            right *= dpr;
            bottom *= dpr;
            var width = right - left;
            var height = bottom - top;
            var targetCanvas = zrUtil.createCanvas();
            targetCanvas.width = width;
            targetCanvas.height = height;
            var zr = zrender.init(targetCanvas);

            each(canvasList, function (item) {
                var img = new graphic.Image({
                    style: {
                        x: item.left * dpr - left,
                        y: item.top * dpr - top,
                        image: item.dom
                    }
                });
                zr.add(img);
            });
            zr.refreshImmediately();

            return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
        }
        else {
            return this.getDataURL(opts);
        }
    };

    var updateMethods = {

        /**
         * @param {Object} payload
         * @private
         */
        update: function (payload) {
            // console.time && console.time('update');

            var ecModel = this._model;
            var api = this._api;
            var coordSysMgr = this._coordSysMgr;
            // update before setOption
            if (!ecModel) {
                return;
            }

            // Fixme First time update ?
            ecModel.restoreData();

            // TODO
            // Save total ecModel here for undo/redo (after restoring data and before processing data).
            // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call.

            // Create new coordinate system each update
            // In LineView may save the old coordinate system and use it to get the orignal point
            coordSysMgr.create(this._model, this._api);

            processData.call(this, ecModel, api);

            stackSeriesData.call(this, ecModel);

            coordSysMgr.update(ecModel, api);

            doLayout.call(this, ecModel, payload);

            doVisualCoding.call(this, ecModel, payload);

            doRender.call(this, ecModel, payload);

            // Set background
            var backgroundColor = ecModel.get('backgroundColor') || 'transparent';

            var painter = this._zr.painter;
            // TODO all use clearColor ?
            if (painter.isSingleCanvas && painter.isSingleCanvas()) {
                this._zr.configLayer(0, {
                    clearColor: backgroundColor
                });
            }
            else {
                // In IE8
                if (!env.canvasSupported) {
                    var colorArr = colorTool.parse(backgroundColor);
                    backgroundColor = colorTool.stringify(colorArr, 'rgb');
                    if (colorArr[3] === 0) {
                        backgroundColor = 'transparent';
                    }
                }
                backgroundColor = backgroundColor;
                this._dom.style.backgroundColor = backgroundColor;
            }

            // console.time && console.timeEnd('update');
        },

        // PENDING
        /**
         * @param {Object} payload
         * @private
         */
        updateView: function (payload) {
            var ecModel = this._model;

            // update before setOption
            if (!ecModel) {
                return;
            }

            doLayout.call(this, ecModel, payload);

            doVisualCoding.call(this, ecModel, payload);

            invokeUpdateMethod.call(this, 'updateView', ecModel, payload);
        },

        /**
         * @param {Object} payload
         * @private
         */
        updateVisual: function (payload) {
            var ecModel = this._model;

            // update before setOption
            if (!ecModel) {
                return;
            }

            doVisualCoding.call(this, ecModel, payload);

            invokeUpdateMethod.call(this, 'updateVisual', ecModel, payload);
        },

        /**
         * @param {Object} payload
         * @private
         */
        updateLayout: function (payload) {
            var ecModel = this._model;

            // update before setOption
            if (!ecModel) {
                return;
            }

            doLayout.call(this, ecModel, payload);

            invokeUpdateMethod.call(this, 'updateLayout', ecModel, payload);
        },

        /**
         * @param {Object} payload
         * @private
         */
        highlight: function (payload) {
            toggleHighlight.call(this, 'highlight', payload);
        },

        /**
         * @param {Object} payload
         * @private
         */
        downplay: function (payload) {
            toggleHighlight.call(this, 'downplay', payload);
        },

        /**
         * @param {Object} payload
         * @private
         */
        prepareAndUpdate: function (payload) {
            var ecModel = this._model;

            prepareView.call(this, 'component', ecModel);

            prepareView.call(this, 'chart', ecModel);

            updateMethods.update.call(this, payload);
        }
    };

    /**
     * @param {Object} payload
     * @private
     */
    function toggleHighlight(method, payload) {
        var ecModel = this._model;

        // dispatchAction before setOption
        if (!ecModel) {
            return;
        }

        ecModel.eachComponent(
            {mainType: 'series', query: payload},
            function (seriesModel, index) {
                var chartView = this._chartsMap[seriesModel.__viewId];
                if (chartView && chartView.__alive) {
                    chartView[method](
                        seriesModel, ecModel, this._api, payload
                    );
                }
            },
            this
        );
    }

    /**
     * Resize the chart
     */
    echartsProto.resize = function () {
        this._zr.resize();

        var optionChanged = this._model && this._model.resetOption('media');
        updateMethods[optionChanged ? 'prepareAndUpdate' : 'update'].call(this);

        // Resize loading effect
        this._loadingFX && this._loadingFX.resize();
    };

    var defaultLoadingEffect = require('./loading/default');
    /**
     * Show loading effect
     * @param  {string} [name='default']
     * @param  {Object} [cfg]
     */
    echartsProto.showLoading = function (name, cfg) {
        if (zrUtil.isObject(name)) {
            cfg = name;
            name = 'default';
        }
        this.hideLoading();
        var el = defaultLoadingEffect(this._api, cfg);
        var zr = this._zr;
        this._loadingFX = el;

        zr.add(el);
    };

    /**
     * Hide loading effect
     */
    echartsProto.hideLoading = function () {
        this._loadingFX && this._zr.remove(this._loadingFX);
        this._loadingFX = null;
    };

    /**
     * @param {Object} eventObj
     * @return {Object}
     */
    echartsProto.makeActionFromEvent = function (eventObj) {
        var payload = zrUtil.extend({}, eventObj);
        payload.type = eventActionMap[eventObj.type];
        return payload;
    };

    /**
     * @pubilc
     * @param {Object} payload
     * @param {string} [payload.type] Action type
     * @param {boolean} [silent=false] Whether trigger event.
     */
    echartsProto.dispatchAction = function (payload, silent) {
        var actionWrap = actions[payload.type];
        if (actionWrap) {
            var actionInfo = actionWrap.actionInfo;
            var updateMethod = actionInfo.update || 'update';

            var payloads = [payload];
            var batched = false;
            // Batch action
            if (payload.batch) {
                batched = true;
                payloads = zrUtil.map(payload.batch, function (item) {
                    item = zrUtil.defaults(zrUtil.extend({}, item), payload);
                    item.batch = null;
                    return item;
                });
            }

            var eventObjBatch = [];
            var eventObj;
            var isHighlightOrDownplay = payload.type === 'highlight' || payload.type === 'downplay';
            for (var i = 0; i < payloads.length; i++) {
                var batchItem = payloads[i];
                // Action can specify the event by return it.
                eventObj = actionWrap.action(batchItem, this._model);
                // Emit event outside
                eventObj = eventObj || zrUtil.extend({}, batchItem);
                // Convert type to eventType
                eventObj.type = actionInfo.event || eventObj.type;
                eventObjBatch.push(eventObj);

                // Highlight and downplay are special.
                isHighlightOrDownplay && updateMethods[updateMethod].call(this, batchItem);
            }

            (updateMethod !== 'none' && !isHighlightOrDownplay)
                && updateMethods[updateMethod].call(this, payload);

            if (!silent) {
                // Follow the rule of action batch
                if (batched) {
                    eventObj = {
                        type: actionInfo.event || payload.type,
                        batch: eventObjBatch
                    };
                }
                else {
                    eventObj = eventObjBatch[0];
                }
                this._messageCenter.trigger(eventObj.type, eventObj);
            }
        }
    };

    /**
     * Register event
     * @method
     */
    echartsProto.on = createRegisterEventWithLowercaseName('on');
    echartsProto.off = createRegisterEventWithLowercaseName('off');
    echartsProto.one = createRegisterEventWithLowercaseName('one');

    /**
     * @param {string} methodName
     * @private
     */
    function invokeUpdateMethod(methodName, ecModel, payload) {
        var api = this._api;

        // Update all components
        each(this._componentsViews, function (component) {
            var componentModel = component.__model;
            component[methodName](componentModel, ecModel, api, payload);

            updateZ(componentModel, component);
        }, this);

        // Upate all charts
        ecModel.eachSeries(function (seriesModel, idx) {
            var chart = this._chartsMap[seriesModel.__viewId];
            chart[methodName](seriesModel, ecModel, api, payload);

            updateZ(seriesModel, chart);
        }, this);

    }

    /**
     * Prepare view instances of charts and components
     * @param  {module:echarts/model/Global} ecModel
     * @private
     */
    function prepareView(type, ecModel) {
        var isComponent = type === 'component';
        var viewList = isComponent ? this._componentsViews : this._chartsViews;
        var viewMap = isComponent ? this._componentsMap : this._chartsMap;
        var zr = this._zr;

        for (var i = 0; i < viewList.length; i++) {
            viewList[i].__alive = false;
        }

        ecModel[isComponent ? 'eachComponent' : 'eachSeries'](function (componentType, model) {
            if (isComponent) {
                if (componentType === 'series') {
                    return;
                }
            }
            else {
                model = componentType;
            }

            // Consider: id same and type changed.
            var viewId = model.id + '_' + model.type;
            var view = viewMap[viewId];
            if (!view) {
                var classType = ComponentModel.parseClassType(model.type);
                var Clazz = isComponent
                    ? ComponentView.getClass(classType.main, classType.sub)
                    : ChartView.getClass(classType.sub);
                if (Clazz) {
                    view = new Clazz();
                    view.init(ecModel, this._api);
                    viewMap[viewId] = view;
                    viewList.push(view);
                    zr.add(view.group);
                }
                else {
                    // Error
                    return;
                }
            }

            model.__viewId = viewId;
            view.__alive = true;
            view.__id = viewId;
            view.__model = model;
        }, this);

        for (var i = 0; i < viewList.length;) {
            var view = viewList[i];
            if (!view.__alive) {
                zr.remove(view.group);
                view.dispose(ecModel, this._api);
                viewList.splice(i, 1);
                delete viewMap[view.__id];
            }
            else {
                i++;
            }
        }
    }

    /**
     * Processor data in each series
     *
     * @param {module:echarts/model/Global} ecModel
     * @private
     */
    function processData(ecModel, api) {
        each(PROCESSOR_STAGES, function (stage) {
            each(dataProcessorFuncs[stage] || [], function (process) {
                process(ecModel, api);
            });
        });
    }

    /**
     * @private
     */
    function stackSeriesData(ecModel) {
        var stackedDataMap = {};
        ecModel.eachSeries(function (series) {
            var stack = series.get('stack');
            var data = series.getData();
            if (stack && data.type === 'list') {
                var previousStack = stackedDataMap[stack];
                if (previousStack) {
                    data.stackedOn = previousStack;
                }
                stackedDataMap[stack] = data;
            }
        });
    }

    /**
     * Layout before each chart render there series, after visual coding and data processing
     *
     * @param {module:echarts/model/Global} ecModel
     * @private
     */
    function doLayout(ecModel, payload) {
        var api = this._api;
        each(layoutFuncs, function (layout) {
            layout(ecModel, api, payload);
        });
    }

    /**
     * Code visual infomation from data after data processing
     *
     * @param {module:echarts/model/Global} ecModel
     * @private
     */
    function doVisualCoding(ecModel, payload) {
        each(VISUAL_CODING_STAGES, function (stage) {
            each(visualCodingFuncs[stage] || [], function (visualCoding) {
                visualCoding(ecModel, payload);
            });
        });
    }

    /**
     * Render each chart and component
     * @private
     */
    function doRender(ecModel, payload) {
        var api = this._api;
        // Render all components
        each(this._componentsViews, function (componentView) {
            var componentModel = componentView.__model;
            componentView.render(componentModel, ecModel, api, payload);

            updateZ(componentModel, componentView);
        }, this);

        each(this._chartsViews, function (chart) {
            chart.__alive = false;
        }, this);

        // Render all charts
        ecModel.eachSeries(function (seriesModel, idx) {
            var chartView = this._chartsMap[seriesModel.__viewId];
            chartView.__alive = true;
            chartView.render(seriesModel, ecModel, api, payload);

            chartView.group.silent = !!seriesModel.get('silent');

            updateZ(seriesModel, chartView);
        }, this);

        // Remove groups of unrendered charts
        each(this._chartsViews, function (chart) {
            if (!chart.__alive) {
                chart.remove(ecModel, api);
            }
        }, this);
    }

    var MOUSE_EVENT_NAMES = [
        'click', 'dblclick', 'mouseover', 'mouseout', 'mousedown', 'mouseup', 'globalout'
    ];
    /**
     * @private
     */
    echartsProto._initEvents = function () {
        each(MOUSE_EVENT_NAMES, function (eveName) {
            this._zr.on(eveName, function (e) {
                var ecModel = this.getModel();
                var el = e.target;
                if (el && el.dataIndex != null) {
                    var dataModel = el.dataModel || ecModel.getSeriesByIndex(el.seriesIndex);
                    var params = dataModel && dataModel.getDataParams(el.dataIndex, el.dataType) || {};
                    params.event = e;
                    params.type = eveName;
                    this.trigger(eveName, params);
                }
                // If element has custom eventData of components
                else if (el && el.eventData) {
                    this.trigger(eveName, el.eventData);
                }
            }, this);
        }, this);

        each(eventActionMap, function (actionType, eventType) {
            this._messageCenter.on(eventType, function (event) {
                this.trigger(eventType, event);
            }, this);
        }, this);
    };

    /**
     * @return {boolean}
     */
    echartsProto.isDisposed = function () {
        return this._disposed;
    };

    /**
     * Clear
     */
    echartsProto.clear = function () {
        this.setOption({}, true);
    };
    /**
     * Dispose instance
     */
    echartsProto.dispose = function () {
        this._disposed = true;
        var api = this._api;
        var ecModel = this._model;

        each(this._componentsViews, function (component) {
            component.dispose(ecModel, api);
        });
        each(this._chartsViews, function (chart) {
            chart.dispose(ecModel, api);
        });

        this._zr.dispose();

        delete instances[this.id];
    };

    zrUtil.mixin(ECharts, Eventful);

    /**
     * @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');
        var zlevel = model.get('zlevel');
        // Set z and zlevel
        view.group.traverse(function (el) {
            z != null && (el.z = z);
            zlevel != null && (el.zlevel = zlevel);
        });
    }
    /**
     * @type {Array.<Function>}
     * @inner
     */
    var actions = [];

    /**
     * Map eventType to actionType
     * @type {Object}
     */
    var eventActionMap = {};

    /**
     * @type {Array.<Function>}
     * @inner
     */
    var layoutFuncs = [];

    /**
     * Data processor functions of each stage
     * @type {Array.<Object.<string, Function>>}
     * @inner
     */
    var dataProcessorFuncs = {};

    /**
     * @type {Array.<Function>}
     * @inner
     */
    var optionPreprocessorFuncs = [];

    /**
     * Visual coding functions of each stage
     * @type {Array.<Object.<string, Function>>}
     * @inner
     */
    var visualCodingFuncs = {};
    /**
     * Theme storage
     * @type {Object.<key, Object>}
     */
    var themeStorage = {};


    var instances = {};
    var connectedGroups = {};

    var idBase = new Date() - 0;
    var groupIdBase = new Date() - 0;
    var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
    /**
     * @alias module:echarts
     */
    var echarts = {
        /**
         * @type {number}
         */
        version: '3.1.10',
        dependencies: {
            zrender: '3.1.0'
        }
    };

    function enableConnect(chart) {

        var STATUS_PENDING = 0;
        var STATUS_UPDATING = 1;
        var STATUS_UPDATED = 2;
        var STATUS_KEY = '__connectUpdateStatus';
        function updateConnectedChartsStatus(charts, status) {
            for (var i = 0; i < charts.length; i++) {
                var otherChart = charts[i];
                otherChart[STATUS_KEY] = status;
            }
        }
        zrUtil.each(eventActionMap, function (actionType, eventType) {
            chart._messageCenter.on(eventType, function (event) {
                if (connectedGroups[chart.group] && chart[STATUS_KEY] !== STATUS_PENDING) {
                    var action = chart.makeActionFromEvent(event);
                    var otherCharts = [];
                    for (var id in instances) {
                        var otherChart = instances[id];
                        if (otherChart !== chart && otherChart.group === chart.group) {
                            otherCharts.push(otherChart);
                        }
                    }
                    updateConnectedChartsStatus(otherCharts, STATUS_PENDING);
                    each(otherCharts, function (otherChart) {
                        if (otherChart[STATUS_KEY] !== STATUS_UPDATING) {
                            otherChart.dispatchAction(action);
                        }
                    });
                    updateConnectedChartsStatus(otherCharts, STATUS_UPDATED);
                }
            });
        });

    }
    /**
     * @param {HTMLDomElement} dom
     * @param {Object} [theme]
     * @param {Object} opts
     */
    echarts.init = function (dom, theme, opts) {
        // Check version
        if ((zrender.version.replace('.', '') - 0) < (echarts.dependencies.zrender.replace('.', '') - 0)) {
            throw new Error(
                'ZRender ' + zrender.version
                + ' is too old for ECharts ' + echarts.version
                + '. Current version need ZRender '
                + echarts.dependencies.zrender + '+'
            );
        }
        if (!dom) {
            throw new Error('Initialize failed: invalid dom.');
        }

        var chart = new ECharts(dom, theme, opts);
        chart.id = 'ec_' + idBase++;
        instances[chart.id] = chart;

        dom.setAttribute &&
            dom.setAttribute(DOM_ATTRIBUTE_KEY, chart.id);

        enableConnect(chart);

        return chart;
    };

    /**
     * @return {string|Array.<module:echarts~ECharts>} groupId
     */
    echarts.connect = function (groupId) {
        // Is array of charts
        if (zrUtil.isArray(groupId)) {
            var charts = groupId;
            groupId = null;
            // If any chart has group
            zrUtil.each(charts, function (chart) {
                if (chart.group != null) {
                    groupId = chart.group;
                }
            });
            groupId = groupId || ('g_' + groupIdBase++);
            zrUtil.each(charts, function (chart) {
                chart.group = groupId;
            });
        }
        connectedGroups[groupId] = true;
        return groupId;
    };

    /**
     * @return {string} groupId
     */
    echarts.disConnect = function (groupId) {
        connectedGroups[groupId] = false;
    };

    /**
     * Dispose a chart instance
     * @param  {module:echarts~ECharts|HTMLDomElement|string} chart
     */
    echarts.dispose = function (chart) {
        if (zrUtil.isDom(chart)) {
            chart = echarts.getInstanceByDom(chart);
        }
        else if (typeof chart === 'string') {
            chart = instances[chart];
        }
        if ((chart instanceof ECharts) && !chart.isDisposed()) {
            chart.dispose();
        }
    };

    /**
     * @param  {HTMLDomElement} dom
     * @return {echarts~ECharts}
     */
    echarts.getInstanceByDom = function (dom) {
        var key = dom.getAttribute(DOM_ATTRIBUTE_KEY);
        return instances[key];
    };
    /**
     * @param {string} key
     * @return {echarts~ECharts}
     */
    echarts.getInstanceById = function (key) {
        return instances[key];
    };

    /**
     * Register theme
     */
    echarts.registerTheme = function (name, theme) {
        themeStorage[name] = theme;
    };

    /**
     * Register option preprocessor
     * @param {Function} preprocessorFunc
     */
    echarts.registerPreprocessor = function (preprocessorFunc) {
        optionPreprocessorFuncs.push(preprocessorFunc);
    };

    /**
     * @param {string} stage
     * @param {Function} processorFunc
     */
    echarts.registerProcessor = function (stage, processorFunc) {
        if (zrUtil.indexOf(PROCESSOR_STAGES, stage) < 0) {
            throw new Error('stage should be one of ' + PROCESSOR_STAGES);
        }
        var funcs = dataProcessorFuncs[stage] || (dataProcessorFuncs[stage] = []);
        funcs.push(processorFunc);
    };

    /**
     * Usage:
     * registerAction('someAction', 'someEvent', function () { ... });
     * registerAction('someAction', function () { ... });
     * registerAction(
     *     {type: 'someAction', event: 'someEvent', update: 'updateView'},
     *     function () { ... }
     * );
     *
     * @param {(string|Object)} actionInfo
     * @param {string} actionInfo.type
     * @param {string} [actionInfo.event]
     * @param {string} [actionInfo.update]
     * @param {string} [eventName]
     * @param {Function} action
     */
    echarts.registerAction = function (actionInfo, eventName, action) {
        if (typeof eventName === 'function') {
            action = eventName;
            eventName = '';
        }
        var actionType = zrUtil.isObject(actionInfo)
            ? actionInfo.type
            : ([actionInfo, actionInfo = {
                event: eventName
            }][0]);

        // Event name is all lowercase
        actionInfo.event = (actionInfo.event || actionType).toLowerCase();
        eventName = actionInfo.event;

        if (!actions[actionType]) {
            actions[actionType] = {action: action, actionInfo: actionInfo};
        }
        eventActionMap[eventName] = actionType;
    };

    /**
     * @param {string} type
     * @param {*} CoordinateSystem
     */
    echarts.registerCoordinateSystem = function (type, CoordinateSystem) {
        CoordinateSystemManager.register(type, CoordinateSystem);
    };

    /**
     * @param {*} layout
     */
    echarts.registerLayout = function (layout) {
        // PENDING All functions ?
        if (zrUtil.indexOf(layoutFuncs, layout) < 0) {
            layoutFuncs.push(layout);
        }
    };

    /**
     * @param {string} stage
     * @param {Function} visualCodingFunc
     */
    echarts.registerVisualCoding = function (stage, visualCodingFunc) {
        if (zrUtil.indexOf(VISUAL_CODING_STAGES, stage) < 0) {
            throw new Error('stage should be one of ' + VISUAL_CODING_STAGES);
        }
        var funcs = visualCodingFuncs[stage] || (visualCodingFuncs[stage] = []);
        funcs.push(visualCodingFunc);
    };

    /**
     * @param {Object} opts
     */
    echarts.extendChartView = function (opts) {
        return ChartView.extend(opts);
    };

    /**
     * @param {Object} opts
     */
    echarts.extendComponentModel = function (opts) {
        return ComponentModel.extend(opts);
    };

    /**
     * @param {Object} opts
     */
    echarts.extendSeriesModel = function (opts) {
        return SeriesModel.extend(opts);
    };

    /**
     * @param {Object} opts
     */
    echarts.extendComponentView = function (opts) {
        return ComponentView.extend(opts);
    };

    /**
     * ZRender need a canvas context to do measureText.
     * But in node environment canvas may be created by node-canvas.
     * So we need to specify how to create a canvas instead of using document.createElement('canvas')
     *
     * Be careful of using it in the browser.
     *
     * @param {Function} creator
     * @example
     *     var Canvas = require('canvas');
     *     var echarts = require('echarts');
     *     echarts.setCanvasCreator(function () {
     *         // Small size is enough.
     *         return new Canvas(32, 32);
     *     });
     */
    echarts.setCanvasCreator = function (creator) {
        zrUtil.createCanvas = creator;
    };

    echarts.registerVisualCoding('echarts', zrUtil.curry(
        require('./visual/seriesColor'), '', 'itemStyle'
    ));
    echarts.registerPreprocessor(require('./preprocessor/backwardCompat'));

    // Default action
    echarts.registerAction({
        type: 'highlight',
        event: 'highlight',
        update: 'highlight'
    }, zrUtil.noop);
    echarts.registerAction({
        type: 'downplay',
        event: 'downplay',
        update: 'downplay'
    }, zrUtil.noop);


    // --------
    // Exports
    // --------

    echarts.graphic = require('./util/graphic');
    echarts.number = require('./util/number');
    echarts.format = require('./util/format');
    echarts.matrix = require('zrender/core/matrix');
    echarts.vector = require('zrender/core/vector');

    echarts.util = {};
    each([
            'map', 'each', 'filter', 'indexOf', 'inherits',
            'reduce', 'filter', 'bind', 'curry', 'isArray',
            'isString', 'isObject', 'isFunction', 'extend'
        ],
        function (name) {
            echarts.util[name] = zrUtil[name];
        }
    );

    return echarts;
});

echarts.min.js

!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 o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(2),i(85),i(79),i(90),i(165),i(283),i(272),i(293),i(248),i(244),i(240),i(279),i(288),i(226),i(231),i(237),i(268),i(261),i(36),i(178),i(198),i(308),i(305),i(214),i(189),i(168),i(321),i(184),i(183),i(312),i(190),i(206)},function(t,e,i){function n(t){if("object"==typeof t&&null!==t){var e=t;if(t instanceof Array){e=[];for(var i=0,o=t.length;o>i;i++)e[i]=n(t[i])}else if(!A(t)&&!I(t)){e={};for(var a in t)t.hasOwnProperty(a)&&(e[a]=n(t[a]))}return e}return t}function o(t,e,i){if(!M(e)||!M(t))return i?n(e):t;for(var a in e)if(e.hasOwnProperty(a)){var r=t[a],s=e[a];!M(s)||!M(r)||b(s)||b(r)||I(s)||I(r)||A(s)||A(r)?!i&&a in t||(t[a]=n(e[a],!0)):o(r,s,i)}return t}function a(t,e){for(var i=t[0],n=1,a=t.length;a>n;n++)i=o(i,t[n],e);return i}function r(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(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 l(){return document.createElement("canvas")}function h(){return D||(D=G.createCanvas().getContext("2d")),D}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 c(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var o in n)t.prototype[o]=n[o];t.prototype.constructor=t,t.superClass=e}function d(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function f(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function p(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,o=t.length;o>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 g(t,e,i){if(t&&e){if(t.map&&t.map===N)return t.map(e,i);for(var n=[],o=0,a=t.length;a>o;o++)n.push(e.call(i,t[o],o,t));return n}}function m(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===B)return t.reduce(e,i,n);for(var o=0,a=t.length;a>o;o++)i=e.call(n,i,t[o],o,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===R)return t.filter(e,i);for(var n=[],o=0,a=t.length;a>o;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function y(t,e,i){if(t&&e)for(var n=0,o=t.length;o>n;n++)if(e.call(i,t[n],n,t))return t[n]}function x(t,e){var i=V.call(arguments,2);return function(){return t.apply(e,i.concat(V.call(arguments)))}}function _(t){var e=V.call(arguments,1);return function(){return t.apply(this,e.concat(V.call(arguments)))}}function b(t){return"[object Array]"===z.call(t)}function w(t){return"function"==typeof t}function S(t){return"[object String]"===z.call(t)}function M(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function A(t){return!!k[z.call(t)]||t instanceof P}function I(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 L(){return Function.call.apply(V,arguments)}function C(t,e){if(!t)throw new Error(e)}var D,P=i(17),k={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},z=Object.prototype.toString,E=Array.prototype,O=E.forEach,R=E.filter,V=E.slice,N=E.map,B=E.reduce,G={inherits:c,mixin:d,clone:n,merge:o,mergeAll:a,extend:r,defaults:s,getContext:h,createCanvas:l,indexOf:u,slice:L,find:y,isArrayLike:f,each:p,map:g,reduce:m,filter:v,bind:x,curry:_,isArray:b,isString:S,isObject:M,isFunction:w,isBuildInObject:A,isDom:I,retrieve:T,assert:C,noop:function(){}};t.exports=G},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),C.prototype[t].call(this,e,i,n)}}function o(){C.call(this)}function a(t,e,i){i=i||{},"string"==typeof e&&(e=W[e]),e&&D(F,function(t){t(e)}),this.id,this.group,this._dom=t,this._zr=A.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 v(this),this._coordSysMgr=new y,C.call(this),this._messageCenter=new o,this._initEvents(),this.resize=I.bind(this.resize,this)}function r(t,e){var i=this._model;i&&i.eachComponent({mainType:"series",query:e},function(n,o){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;D(this._componentsViews,function(o){var a=o.__model;o[t](a,e,n,i),p(a,o)},this),e.eachSeries(function(o,a){var r=this._chartsMap[o.__viewId];r[t](o,e,n,i),p(o,r)},this)}function l(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,o=i?this._componentsMap:this._chartsMap,a=this._zr,r=0;r<n.length;r++)n[r].__alive=!1;e[i?"eachComponent":"eachSeries"](function(t,r){if(i){if("series"===t)return}else r=t;var s=r.id+"_"+r.type,l=o[s];if(!l){var h=_.parseClassType(r.type),u=i?w.getClass(h.main,h.sub):S.getClass(h.sub);if(!u)return;l=new u,l.init(e,this._api),o[s]=l,n.push(l),a.add(l.group)}r.__viewId=s,l.__alive=!0,l.__id=s,l.__model=r},this);for(var r=0;r<n.length;){var s=n[r];s.__alive?r++:(a.remove(s.group),s.dispose(e,this._api),n.splice(r,1),delete o[s.__id])}}function h(t,e){D(k,function(i){D(G[i]||[],function(i){i(t,e)})})}function u(t){var e={};t.eachSeries(function(t){var i=t.get("stack"),n=t.getData();if(i&&"list"===n.type){var o=e[i];o&&(n.stackedOn=o),e[i]=n}})}function c(t,e){var i=this._api;D(B,function(n){n(t,i,e)})}function d(t,e){D(P,function(i){D(H[i]||[],function(i){i(t,e)})})}function f(t,e){var i=this._api;D(this._componentsViews,function(n){var o=n.__model;n.render(o,t,i,e),p(o,n)},this),D(this._chartsViews,function(t){t.__alive=!1},this),t.eachSeries(function(n,o){var a=this._chartsMap[n.__viewId];a.__alive=!0,a.render(n,t,i,e),a.group.silent=!!n.get("silent"),p(n,a)},this),D(this._chartsViews,function(e){e.__alive||e.remove(t,i)},this)}function p(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){null!=i&&(t.z=i),null!=n&&(t.zlevel=n)})}function g(t){function e(t,e){for(var i=0;i<t.length;i++){var n=t[i];n[a]=e}}var i=0,n=1,o=2,a="__connectUpdateStatus";I.each(N,function(r,s){t._messageCenter.on(s,function(r){if(q[t.group]&&t[a]!==i){var s=t.makeActionFromEvent(r),l=[];for(var h in Z){var u=Z[h];u!==t&&u.group===t.group&&l.push(u)}e(l,i),D(l,function(t){t[a]!==n&&t.dispatchAction(s)}),e(l,o)}})})}/*!
	 * ECharts, a javascript interactive chart library.
	 *
	 * Copyright (c) 2015, Baidu Inc.
	 * All rights reserved.
	 *
	 * LICENSE
	 * https://github.com/ecomfe/echarts/blob/master/LICENSE.txt
	 */
var m=i(111),v=i(78),y=i(23),x=i(112),_=i(10),b=i(13),w=i(54),S=i(26),M=i(3),A=i(68),I=i(1),T=i(22),L=i(14),C=i(21),D=I.each,P=["echarts","chart","component"],k=["transform","filter","statistic"];o.prototype.on=n("on"),o.prototype.off=n("off"),o.prototype.one=n("one"),I.mixin(o,C);var z=a.prototype;z.getDom=function(){return this._dom},z.getZr=function(){return this._zr},z.setOption=function(t,e,i){this._model&&!e||(this._model=new m(null,null,this._theme,new x(this._api))),this._model.setOption(t,F),E.prepareAndUpdate.call(this),!i&&this._zr.refreshImmediately()},z.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},z.getModel=function(){return this._model},z.getOption=function(){return this._model.getOption()},z.getWidth=function(){return this._zr.getWidth()},z.getHeight=function(){return this._zr.getHeight()},z.getRenderedCanvas=function(t){if(L.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 I.each(i,function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},z.getDataURL=function(t){t=t||{};var e=t.excludeComponents,i=this._model,n=[],o=this;D(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._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 D(n,function(t){t.group.ignore=!1}),a},z.getConnectedDataURL=function(t){if(L.canvasSupported){var e=this.group,i=Math.min,n=Math.max,o=1/0;if(q[e]){var a=o,r=o,s=-o,l=-o,h=[],u=t&&t.pixelRatio||1;for(var c in Z){var d=Z[c];if(d.group===e){var f=d.getRenderedCanvas(I.clone(t)),p=d.getDom().getBoundingClientRect();a=i(p.left,a),r=i(p.top,r),s=n(p.right,s),l=n(p.bottom,l),h.push({dom:f,left:p.left,top:p.top})}}a*=u,r*=u,s*=u,l*=u;var g=s-a,m=l-r,v=I.createCanvas();v.width=g,v.height=m;var y=A.init(v);return D(h,function(t){var e=new M.Image({style:{x:t.left*u-a,y:t.top*u-r,image:t.dom}});y.add(e)}),y.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}};var E={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr;if(e){e.restoreData(),n.create(this._model,this._api),h.call(this,e,i),u.call(this,e),n.update(e,i),c.call(this,e,t),d.call(this,e,t),f.call(this,e,t);var o=e.get("backgroundColor")||"transparent",a=this._zr.painter;if(a.isSingleCanvas&&a.isSingleCanvas())this._zr.configLayer(0,{clearColor:o});else{if(!L.canvasSupported){var r=T.parse(o);o=T.stringify(r,"rgb"),0===r[3]&&(o="transparent")}o=o,this._dom.style.backgroundColor=o}}},updateView:function(t){var e=this._model;e&&(c.call(this,e,t),d.call(this,e,t),s.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(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){r.call(this,"highlight",t)},downplay:function(t){r.call(this,"downplay",t)},prepareAndUpdate:function(t){var e=this._model;l.call(this,"component",e),l.call(this,"chart",e),E.update.call(this,t)}};z.resize=function(){this._zr.resize();var t=this._model&&this._model.resetOption("media");E[t?"prepareAndUpdate":"update"].call(this),this._loadingFX&&this._loadingFX.resize()};var O=i(110);z.showLoading=function(t,e){I.isObject(t)&&(e=t,t="default"),this.hideLoading();var i=O(this._api,e),n=this._zr;this._loadingFX=i,n.add(i)},z.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},z.makeActionFromEvent=function(t){var e=I.extend({},t);return e.type=N[t.type],e},z.dispatchAction=function(t,e){var i=V[t.type];if(i){var n=i.actionInfo,o=n.update||"update",a=[t],r=!1;t.batch&&(r=!0,a=I.map(t.batch,function(e){return e=I.defaults(I.extend({},e),t),e.batch=null,e}));for(var s,l=[],h="highlight"===t.type||"downplay"===t.type,u=0;u<a.length;u++){var c=a[u];s=i.action(c,this._model),s=s||I.extend({},c),s.type=n.event||s.type,l.push(s),h&&E[o].call(this,c)}"none"!==o&&!h&&E[o].call(this,t),e||(s=r?{type:n.event||t.type,batch:l}:l[0],this._messageCenter.trigger(s.type,s))}},z.on=n("on"),z.off=n("off"),z.one=n("one");var R=["click","dblclick","mouseover","mouseout","mousedown","mouseup","globalout"];z._initEvents=function(){D(R,function(t){this._zr.on(t,function(e){var i=this.getModel(),n=e.target;if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex),a=o&&o.getDataParams(n.dataIndex,n.dataType)||{};a.event=e,a.type=t,this.trigger(t,a)}else n&&n.eventData&&this.trigger(t,n.eventData)},this)},this),D(N,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},z.isDisposed=function(){return this._disposed},z.clear=function(){this.setOption({},!0)},z.dispose=function(){this._disposed=!0;var t=this._api,e=this._model;D(this._componentsViews,function(i){i.dispose(e,t)}),D(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete Z[this.id]},I.mixin(a,C);var V=[],N={},B=[],G={},F=[],H={},W={},Z={},q={},j=new Date-0,U=new Date-0,X="_echarts_instance_",Y={version:"3.1.10",dependencies:{zrender:"3.1.0"}};Y.init=function(t,e,i){if(A.version.replace(".","")-0<Y.dependencies.zrender.replace(".","")-0)throw new Error("ZRender "+A.version+" is too old for ECharts "+Y.version+". Current version need ZRender "+Y.dependencies.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.");var n=new a(t,e,i);return n.id="ec_"+j++,Z[n.id]=n,t.setAttribute&&t.setAttribute(X,n.id),g(n),n},Y.connect=function(t){if(I.isArray(t)){var e=t;t=null,I.each(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+U++,I.each(e,function(e){e.group=t})}return q[t]=!0,t},Y.disConnect=function(t){q[t]=!1},Y.dispose=function(t){I.isDom(t)?t=Y.getInstanceByDom(t):"string"==typeof t&&(t=Z[t]),t instanceof a&&!t.isDisposed()&&t.dispose()},Y.getInstanceByDom=function(t){var e=t.getAttribute(X);return Z[e]},Y.getInstanceById=function(t){return Z[t]},Y.registerTheme=function(t,e){W[t]=e},Y.registerPreprocessor=function(t){F.push(t)},Y.registerProcessor=function(t,e){if(I.indexOf(k,t)<0)throw new Error("stage should be one of "+k);var i=G[t]||(G[t]=[]);i.push(e)},Y.registerAction=function(t,e,i){"function"==typeof e&&(i=e,e="");var n=I.isObject(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,V[n]||(V[n]={action:i,actionInfo:t}),N[e]=n},Y.registerCoordinateSystem=function(t,e){y.register(t,e)},Y.registerLayout=function(t){I.indexOf(B,t)<0&&B.push(t)},Y.registerVisualCoding=function(t,e){if(I.indexOf(P,t)<0)throw new Error("stage should be one of "+P);var i=H[t]||(H[t]=[]);i.push(e)},Y.extendChartView=function(t){return S.extend(t)},Y.extendComponentModel=function(t){return _.extend(t)},Y.extendSeriesModel=function(t){return b.extend(t)},Y.extendComponentView=function(t){return w.extend(t)},Y.setCanvasCreator=function(t){I.createCanvas=t},Y.registerVisualCoding("echarts",I.curry(i(74),"","itemStyle")),Y.registerPreprocessor(i(119)),Y.registerAction({type:"highlight",event:"highlight",update:"highlight"},I.noop),Y.registerAction({type:"downplay",event:"downplay",update:"downplay"},I.noop),Y.graphic=i(3),Y.number=i(4),Y.format=i(9),Y.matrix=i(19),Y.vector=i(5),Y.util={},D(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend"],function(t){Y.util[t]=I[t]}),t.exports=Y},function(t,e,i){"use strict";function n(t){return null!=t&&"none"!=t}function o(t){return t instanceof S?t:_.lift(t,-.1)}function a(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,a=t.__hoverStl;a.fill=a.fill||(n(i)?o(i):null),a.stroke=a.stroke||(n(e)?o(e):null);var r={};for(var s in a)a.hasOwnProperty(s)&&(r[s]=t.style[s]);t.__normalStl=r,t.__hoverStlDirty=!1}}function r(t){t.__isHover||(a(t),t.setStyle(t.__hoverStl),t.z2+=1,t.__isHover=!0)}function s(t){if(t.__isHover){var e=t.__normalStl;e&&t.setStyle(e),t.z2-=1,t.__isHover=!1}}function l(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&r(t)}):r(t)}function h(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&s(t)}):s(t)}function u(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&a(t)}function c(){!this.__isEmphasis&&l(this)}function d(){!this.__isEmphasis&&h(this)}function f(){this.__isEmphasis=!0,l(this)}function p(){this.__isEmphasis=!1,h(this)}function g(t,e,i,n,o,a){"function"==typeof o&&(a=o,o=null);var r=t?"Update":"",s=n&&n.getShallow("animationDuration"+r),l=n&&n.getShallow("animationEasing"+r),h=n&&n.getShallow("animationDelay"+r);"function"==typeof h&&(h=h(o)),n&&n.getShallow("animation")?e.animateTo(i,s,h||0,l,a):(e.attr(i),a&&a())}var m=i(1),v=i(156),y=Math.round,x=i(6),_=i(22),b=i(19),w=i(5),S=i(17),M={};M.Group=i(27),M.Image=i(46),M.Text=i(66),M.Circle=i(147),M.Sector=i(153),M.Ring=i(152),M.Polygon=i(149),M.Polyline=i(150),M.Rect=i(151),M.Line=i(148),M.BezierCurve=i(146),M.Arc=i(145),M.CompoundPath=i(140),M.LinearGradient=i(76),M.RadialGradient=i(141),M.BoundingRect=i(8),M.extendShape=function(t){return x.extend(t)},M.extendPath=function(t,e){return v.extendFromString(t,e)},M.makePath=function(t,e,i,n){var o=v.createFromString(t,e),a=o.getBoundingRect();if(i){var r=a.width/a.height;if("center"===n){var s,l=i.height*r;l<=i.width?s=i.height:(l=i.width,s=l/r);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(o,i)}return o},M.mergePath=v.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,o=i.x,a=i.y,r=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(o+r,n,!1)-i.x,0===r?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",o=n.indexOf("inside")>=0?"white":i,a=e.getModel("textStyle");m.extend(t,{textDistance:e.getShallow("distance")||5,textFont:a.getFont(),textPosition:n,textFill:a.getTextColor()||o})},M.updateProps=m.curry(g,!0),M.initProps=m.curry(g,!1),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]),o=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?-o:"bottom"===t?o: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={},o=1e-4;n.linearMap=function(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0===o)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(o>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])/o*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,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n);return Math.max(-o+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>-o&&o>t},n.parseDate=function(t){return t instanceof Date?t:new Date("string"==typeof t?t.replace(/-/g,"/"):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,o=n.quantity(t),a=t/o;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*o},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],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+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){var e=t.fill;return null!=e&&"none"!==e}function o(t){var e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0}function a(t){r.call(this,t),this.path=new l}var r=i(37),s=i(1),l=i(28),h=i(136),u=(i(17),Math.abs);a.prototype={constructor:a,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t){t.save();var e=this.style,i=this.path,a=o(e),r=n(e),s=r&&!!e.fill.colorStops,l=a&&!!e.stroke.colorStops;if(e.bind(t,this),this.setTransform(t),this.__dirtyPath){var h=this.getBoundingRect();s&&(this._fillGradient=e.getGradient(t,e.fill,h)),l&&(this._strokeGradient=e.getGradient(t,e.stroke,h))}s&&(t.fillStyle=this._fillGradient),l&&(t.strokeStyle=this._strokeGradient);var u=e.lineDash,c=e.lineDashOffset,d=!!t.setLineDash,f=this.getGlobalScale();i.setScale(f[0],f[1]),this.__dirtyPath||u&&!d&&a?(i=this.path.beginPath(t),u&&!d&&(i.setLineDash(u),i.setLineDashOffset(c)),this.buildPath(i,this.shape),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),r&&i.fill(t),u&&d&&(t.setLineDash(u),t.lineDashOffset=c),a&&i.stroke(t),null!=e.text&&this.drawRectText(t,this.getBoundingRect()),t.restore()},buildPath:function(t,e){},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var a=this.path;this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape)),t=a.getBoundingRect()}if(this._rect=t,o(e)){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var s=e.lineWidth,l=e.strokeNoScale?this.getLineScale():1;n(e)||(s=Math.max(s,this.strokeContainThreshold)),l>1e-10&&(r.width+=s/l,r.height+=s/l,r.x-=s/l/2,r.y-=s/l/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),a=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],a.contain(t,e)){var s=this.path.data;if(o(r)){var l=r.lineWidth,u=r.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(n(r)||(l=Math.max(l,this.strokeContainThreshold)),h.containStroke(s,l/u,t,e)))return!0}if(n(r))return h.contain(s,t,e)}return!1},dirty:function(t){0===arguments.length&&(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):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(s.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}},a.extend=function(t){var e=function(e){a.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};s.inherits(e,a);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},s.inherits(a,r),t.exports=a},function(t,e,i){var n=i(9),o=i(4),a=i(1),r=["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(o,r){a.each(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l<e.length;l++)s[e[l]]=t+n[l];o.call(r,s)})}},s.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},s.eachAxisDim=s.createNameEach(r,["axisIndex","axis","index"]),s.normalizeToArray=function(t){return a.isArray(t)?t:null==t?[]:[t]},s.createLinkedNodesFinder=function(t,e,i){function n(t,e){return a.indexOf(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){a.each(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function r(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)&&o(t,s)&&(r(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;r(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.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isFinite(t)||null==t||"-"===t||(t=+o.parseDate(t)),null==t||""===t?NaN:+t)},s.dataFormatMixin={getDataParams:function(t,e){var i=this.getData(e),n=this.seriesIndex,o=this.name,a=this.getRawValue(t,e),r=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:o,name:s,dataIndex:r,data:l,dataType:e,value:a,color:i.getItemVisual(t,"color"),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,o){e=e||"normal";var r=this.getData(i),s=r.getItemModel(t),l=this.getDataParams(t,i);null!=o&&a.isArray(l.value)&&(l.value=l.value[o]);var h=s.get(["label",e,"formatter"]);return"function"==typeof h?(l.status=e,h(l)):"string"==typeof h?n.formatTpl(h,l):void 0},getRawValue:function(t,e){var i=this.getData(e),n=i.getRawDataItem(t);return null!=n?a.isObject(n)&&!a.isArray(n)?n.value:n: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 o=0;o<i.length;o++){var r=i[o].exist;if(!i[o].option&&(null!=t.id&&r.id===t.id+""||null!=t.name&&!s.isIdInner(t)&&!s.isIdInner(r)&&r.name===t.name+"")){i[o].option=t,e[n]=null;break}}}),a.each(e,function(t,e){if(a.isObject(t)){for(var n=0;n<i.length;n++){var o=i[n].exist;if(!i[n].option&&!s.isIdInner(o)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}}),i},s.isIdInner=function(t){return a.isObject(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")},t.exports=s},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 o=i(5),a=i(19),r=o.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,r(t,t,i),r(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,o=a.create();return a.translate(o,o,[-e.x,-e.y]),a.scale(o,o,[i,n]),a.translate(o,o,[t.x,t.y]),o},intersect:function(t){var e=this,i=e.x,n=e.x+e.width,o=e.y,a=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(r>n||i>s||l>a||o>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){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 o(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 r(t){return String(t).replace(/&/g,"&").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,o=0;o<n.length;o++){var a=f[o];t=t.replace(s(a),s(a,0))}for(var r=0;i>r;r++)for(var l=0;l<n.length;l++)t=t.replace(s(f[l],r),e[r][n[l]]);return t}function h(t,e){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=d.parseDate(e),n=i.getFullYear(),o=i.getMonth()+1,a=i.getDate(),r=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return t=t.replace("MM",u(o)).toLowerCase().replace("yyyy",n).replace("yy",n%100).replace("dd",u(a)).replace("d",a).replace("hh",u(r)).replace("h",r).replace("mm",u(s)).replace("m",s).replace("ss",u(l)).replace("s",l)}function u(t){return 10>t?"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:o,encodeHTML:r,formatTpl:l,formatTime:h}},function(t,e,i){function n(t){var e=[];return a.each(u.getClassesByMainType(t),function(t){r.apply(e,t.prototype.dependencies||[])}),a.map(e,function(t){return l.parseClassType(t).main})}var o=i(12),a=i(1),r=Array.prototype.push,s=i(42),l=i(20),h=i(11),u=o.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):{},o=e.getTheme();a.merge(t,o.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){},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={},o=t.length-1;o>=0;o--)n=a.merge(n,t[o],!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(115)),t.exports=u},function(t,e,i){"use strict";function n(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=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=a+m,u>n||l.newline?(a=0,u=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=r+v,c>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=u+i:r=c+i)})}var o=i(1),a=i(8),r=i(4),s=i(9),l=r.parsePercent,h=o.each,u={},c=["left","right","top","bottom","width","height"];u.box=n,u.vbox=o.curry(n,"vertical"),u.hbox=o.curry(n,"horizontal"),u.getAvailableSize=function(t,e,i){var n=e.width,o=e.height,a=l(t.x,n),r=l(t.y,o),h=l(t.x2,n),u=l(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=o),i=s.normalizeCssArray(i||0),{width:Math.max(h-a-i[1]-i[3],0),height:Math.max(u-r-i[0]-i[2],0)}},u.getLayoutRect=function(t,e,i){i=s.normalizeCssArray(i||0);var n=e.width,o=e.height,r=l(t.left,n),h=l(t.top,o),u=l(t.right,n),c=l(t.bottom,o),d=l(t.width,n),f=l(t.height,o),p=i[2]+i[0],g=i[1]+i[3],m=t.aspect;switch(isNaN(d)&&(d=n-u-g-r),isNaN(f)&&(f=o-c-p-h),isNaN(d)&&isNaN(f)&&(m>n/o?d=.8*n:f=.8*o),null!=m&&(isNaN(d)&&(d=m*f),isNaN(f)&&(f=d/m)),isNaN(r)&&(r=n-u-d-g),isNaN(h)&&(h=o-c-f-p),t.left||t.right){case"center":r=n/2-d/2-i[3];break;case"right":r=n-d-g}switch(t.top||t.bottom){case"middle":case"center":h=o/2-f/2-i[0];break;case"bottom":h=o-f-p}r=r||0,h=h||0,isNaN(d)&&(d=n-r-(u||0)),isNaN(f)&&(f=o-h-(c||0));var v=new a(r+i[3],h+i[0],d,f);return v.margin=i,v},u.positionGroup=function(t,e,i,n){var a=t.getBoundingRect();e=o.extend(o.clone(e),{width:a.width,height:a.height}),e=u.getLayoutRect(e,i,n),t.position=[e.x-a.x,e.y-a.y]},u.mergeLayoutParam=function(t,e,i){function n(n){var o={},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)&&(o[t]=l[t]=e[t]),r(o,t)&&s++,r(l,t)&&u++}),u!==c&&s){if(s>=c)return o;for(var d=0;d<n.length;d++){var f=n[d];if(!a(o,f)&&a(t,f)){o[f]=t[f];break}}return o}return l}function a(t,e){return t.hasOwnProperty(e)}function r(t,e){return null!=t[e]&&"auto"!==t[e]}function s(t,e,i){h(t,function(t){e[t]=i[t]})}!o.isObject(i)&&(i={});var l=["width","left","right"],u=["height","top","bottom"],c=n(l),d=n(u);s(l,t,c),s(u,t,d)},u.getLayoutParams=function(t){return u.copyLayoutParams({},t)},u.copyLayoutParams=function(t,e){return e&&t&&h(c,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t},t.exports=u},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 o=i(1),a=i(20);n.prototype={constructor:n,init:null,mergeOption:function(t){o.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,o=0;o<t.length&&(!t[o]||(i=i&&"object"==typeof i?i[t[o]]:null,null!=i));o++);return null==i&&n&&!e&&(i=n.get(t)),i},getShallow:function(t,e){var i=this.option,n=i&&i[t],o=this.parentModel;return null==n&&o&&!e&&(n=o.getShallow(t)),n},getModel:function(t,e){var i=this.get(t,!0),o=this.parentModel,a=new n(i,e||o&&o.getModel(t),this.ecModel);return a},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){var t=this.constructor;return new t(o.clone(this.option))},setReadOnly:function(t){a.setReadOnly(this,t)}},a.enableClassExtend(n);var r=o.mixin;r(n,i(117)),r(n,i(114)),r(n,i(118)),r(n,i(116)),t.exports=n},function(t,e,i){"use strict";var n=i(1),o=i(9),a=i(7),r=i(10),s=o.encodeHTML,l=o.addCommas,h=r.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.mergeDefaultAndTheme(t,i),this._dataBeforeProcessed=this.getInitialData(t,i),this._data=this._dataBeforeProcessed.cloneShallow()},mergeDefaultAndTheme:function(t,e){n.merge(t,e.getTheme().get(this.subType)),n.merge(t,this.getDefaultOption()),a.defaultEmphasis(t.label,a.LABEL_OPTIONS),this.fillDataTextStyle(t.data)},mergeOption:function(t,e){t=n.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.getInitialData(t,e);i&&(this._data=i,this._dataBeforeProcessed=i.cloneShallow())},fillDataTextStyle:function(t){if(t)for(var e=0;e<t.length;e++)t[e]&&t[e].label&&a.defaultEmphasis(t[e].label,a.LABEL_OPTIONS)},getInitialData:function(){},getData:function(t){return null==t?this._data:this._data.getLinkedData(t)},setData:function(t){this._data=t},getRawData:function(){return this._dataBeforeProcessed},coordDimToDataDim:function(t){return[t]},dataDimToCoordDim:function(t){return t},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i){var o=this._data,a=this.getRawValue(t),r=n.isArray(a)?n.map(a,l).join(", "):l(a),h=o.getName(t),u=o.getItemVisual(t,"color"),c='<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'+u+'"></span>',d=this.name;return"\x00-"===d&&(d=""),e?c+s(this.name)+" : "+r:(d&&s(d)+"<br />")+c+(h?s(h)+" : "+r:r)},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()},getAxisTooltipDataIndex:null});n.mixin(h,a.dataFormatMixin),t.exports=h},function(t,e){function i(t){var e={},i={},n=t.match(/Web[kK]it[\/]{0,1}([\d.]+)/),o=t.match(/(Android);?[\s\/]+([\d.]+)?/),a=t.match(/(iPad).*OS\s([\d_]+)/),r=t.match(/(iPod)(.*OS\s([\d_]+))?/),s=!a&&t.match(/(iPhone\sOS)\s([\d_]+)/),l=t.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&t.match(/TouchPad/),u=t.match(/Kindle\/([\d.]+)/),c=t.match(/Silk\/([\d._]+)/),d=t.match(/(BlackBerry).*Version\/([\d.]+)/),f=t.match(/(BB10).*Version\/([\d.]+)/),p=t.match(/(RIM\sTablet\sOS)\s([\d.]+)/),g=t.match(/PlayBook/),m=t.match(/Chrome\/([\d.]+)/)||t.match(/CriOS\/([\d.]+)/),v=t.match(/Firefox\/([\d.]+)/),y=n&&t.match(/Mobile\//)&&!m,x=t.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!m,_=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),b=t.match(/Edge\/([\d.]+)/);return(i.webkit=!!n)&&(i.version=n[1]),o&&(e.android=!0,e.version=o[2]),s&&!r&&(e.ios=e.iphone=!0,e.version=s[2].replace(/_/g,".")),a&&(e.ios=e.ipad=!0,e.version=a[2].replace(/_/g,".")),r&&(e.ios=e.ipod=!0,e.version=r[3]?r[3].replace(/_/g,"."):null),l&&(e.webos=!0,e.version=l[2]),h&&(e.touchpad=!0),d&&(e.blackberry=!0,e.version=d[2]),f&&(e.bb10=!0,e.version=f[2]),p&&(e.rimtabletos=!0,e.version=p[2]),g&&(i.playbook=!0),u&&(e.kindle=!0,e.version=u[1]),c&&(i.silk=!0,i.version=c[1]),!c&&e.android&&t.match(/Kindle Fire/)&&(i.silk=!0),m&&(i.chrome=!0,i.version=m[1]),v&&(i.firefox=!0,i.version=v[1]),_&&(i.ie=!0,i.version=_[1]),y&&(t.match(/Safari/)||e.ios)&&(i.safari=!0),x&&(i.webview=!0),_&&(i.ie=!0,i.version=_[1]),b&&(i.edge=!0,i.version=b[1]),e.tablet=!!(a||g||o&&!t.match(/Mobile/)||v&&t.match(/Tablet/)||_&&!t.match(/Phone/)&&t.match(/Touch/)),e.phone=!(e.tablet||e.ipod||!(o||s||l||d||f||m&&t.match(/Android/)||m&&t.match(/CriOS\/([\d.]+)/)||v&&t.match(/Mobile/)||_&&t.match(/Touch/))),{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 o(t,e){var i=t.dimensions,n=new v(d.map(i,t.getDimensionInfo,t),t.hostModel);m(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r],l=a[s];d.indexOf(e,s)>=0?o[s]=new l.constructor(a[s].length):o[s]=a[s];
}return n}var a="undefined",r="undefined"==typeof window?e:window,s=typeof r.Float64Array===a?Array:r.Float64Array,l=typeof r.Int32Array===a?Array:r.Int32Array,h={"float":s,"int":l,ordinal:Array,number:Array,time:Array},u=i(12),c=i(48),d=i(1),f=i(7),p=d.isObject,g=["stackedOn","_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=[],o=0;o<t.length;o++){var a,r={};"string"==typeof t[o]?(a=t[o],r={name:a,stackable:!1,type:"number"}):(r=t[o],a=r.name,r.type=r.type||"number"),n.push(a),i[a]=r}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this.indices=[],this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this.stackedOn=null,this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawData,this._extent},y=v.prototype;y.type="list",y.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},y.getDimensionInfo=function(t){return d.clone(this._dimensionInfos[this.getDimension(t)])},y.initData=function(t,e,i){if(t=t||[],!d.isArray(t))throw new Error("Invalid data.");this._rawData=t;var n=this._storage={},o=this.indices=[],a=this.dimensions,r=t.length,s=this._dimensionInfos,l=[],u={};e=e||[];for(var c=0;c<a.length;c++){var p=s[a[c]],g=h[p.type];n[a[c]]=new g(r)}i=i||function(t,e,i,n){var o=f.getDataItemValue(t);return f.converDataValue(d.isArray(o)?o[n]:o,s[e])};for(var m=0;m<t.length;m++){for(var v=t[m],y=0;y<a.length;y++){var x=a[y],_=n[x];_[m]=i(v,x,m,y)}o.push(m)}for(var c=0;c<t.length;c++){var b="";e[c]||(e[c]=t[c].name,b=t[c].id);var w=e[c]||"";!b&&w&&(u[w]=u[w]||0,b=w,u[w]>0&&(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,o=this.indices[e];if(null==o)return NaN;var a=n[t]&&n[t][o];if(i){var r=this._dimensionInfos[t];if(r&&r.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 o=0,a=t.length;a>o;o++)n.push(this.get(t[o],e,i));return n},y.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,o=e.length;o>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 o,a=(this._extent||(this._extent={}))[t+!!e];if(a)return a;if(i){for(var r=1/0,s=-(1/0),l=0,h=this.count();h>l;l++)o=this.get(t,l,e),r>o&&(r=o),o>s&&(s=o);return this._extent[t+e]=[r,s]}return[1/0,-(1/0)]},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var o=0,a=this.count();a>o;o++){var r=this.get(t,o,e);isNaN(r)||(n+=r)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],o=this.indices;if(n)for(var a=0,r=o.length;r>a;a++){var s=o[a];if(n[s]===e)return a}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,o=e.length;o>n;n++){var a=e[n];if(i[a]===t)return n}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,o=n[t];if(o){for(var a=Number.MAX_VALUE,r=-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,r=s)}return r}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,o){"function"==typeof t&&(o=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var a=[],r=t.length,s=this.indices;o=o||this;for(var l=0;l<s.length;l++)if(0===r)e.call(o,l);else if(1===r)e.call(o,this.get(t[0],l,i),l);else{for(var h=0;r>h;h++)a[h]=this.get(t[h],l,i);a[h]=l,e.apply(o,a)}},y.filterSelf=function(t,e,i,o){"function"==typeof t&&(o=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var a=[],r=[],s=t.length,l=this.indices;o=o||this;for(var h=0;h<l.length;h++){var u;if(1===s)u=e.call(o,this.get(t[0],h,i),h);else{for(var c=0;s>c;c++)r[c]=this.get(t[c],h,i);r[c]=h,u=e.apply(o,r)}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 o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i,n),o},y.map=function(t,e,i,a){t=d.map(n(t),this.getDimension,this);var r=o(this,t),s=r.indices=this.indices,l=r._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 o=0;o<n.length;o++){var a=t[o],r=l[a],u=s[i];r&&(r[u]=n[o])}}},i,a),r},y.downSample=function(t,e,i,n){for(var a=o(this,[t]),r=this._storage,s=a._storage,l=this.indices,h=a.indices=[],u=[],c=[],d=Math.floor(1/e),f=s[t],p=this.count(),g=0;g<r[t].length;g++)s[t][g]=r[t][g];for(var g=0;p>g;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 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],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);else n[e]=i};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(),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){return t>-w&&w>t}function o(t){return t>w||-w>t}function a(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function r(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function s(t,e,i,o,a,r){var s=o+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))r[0]=0;else{var g=-h/l;g>=0&&1>=g&&(r[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&&(r[p++]=g),y>=0&&1>=y&&(r[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,A):_(w,A),S=0>S?-_(-S,A):_(S,A);var g=(-l-(w+S))/(3*s);g>=0&&1>=g&&(r[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&&(r[p++]=g),y>=0&&1>=y&&(r[p++]=y),D>=0&&1>=D&&(r[p++]=D)}}return p}function l(t,e,i,a,r){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(o(s)){var c=-h/s;c>=0&&1>=c&&(r[u++]=c)}}else{var d=s*s-4*l*h;if(n(d))r[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&&(r[u++]=c),p>=0&&1>=p&&(r[u++]=p)}}return u}function h(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,h=(s-r)*o+r,u=(l-s)*o+s,c=(u-h)*o+h;a[0]=t,a[1]=r,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function u(t,e,i,n,o,r,s,l,h,u,c){var d,f,p,g,m,v=.005,y=1/0;I[0]=h,I[1]=u;for(var _=0;1>_;_+=.05)T[0]=a(t,i,o,s,_),T[1]=a(e,n,r,l,_),g=x(I,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]=a(t,i,o,s,f),T[1]=a(e,n,r,l,f),g=x(T,I),f>=0&&y>g?(d=f,y=g):(L[0]=a(t,i,o,s,p),L[1]=a(e,n,r,l,p),m=x(L,I),1>=p&&y>m?(d=p,y=m):v*=.5);return c&&(c[0]=a(t,i,o,s,d),c[1]=a(e,n,r,l,d)),b(y)}function c(t,e,i,n){var o=1-n;return o*(o*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,r){var s=t-2*e+i,l=2*(e-t),h=t-a,u=0;if(n(s)){if(o(l)){var c=-h/l;c>=0&&1>=c&&(r[u++]=c)}}else{var d=l*l-4*s*h;if(n(d)){var c=-l/(2*s);c>=0&&1>=c&&(r[u++]=c)}else if(d>0){var f=b(d),c=(-l+f)/(2*s),p=(-l-f)/(2*s);c>=0&&1>=c&&(r[u++]=c),p>=0&&1>=p&&(r[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,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function m(t,e,i,n,o,a,r,s,l){var h,u=.005,d=1/0;I[0]=r,I[1]=s;for(var f=0;1>f;f+=.05){T[0]=c(t,i,o,f),T[1]=c(e,n,a,f);var p=x(I,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,o,m),T[1]=c(e,n,a,m);var p=x(T,I);if(m>=0&&d>p)h=m,d=p;else{L[0]=c(t,i,o,v),L[1]=c(e,n,a,v);var y=x(L,I);1>=v&&d>y?(h=v,d=y):u*=.5}}return l&&(l[0]=c(t,i,o,h),l[1]=c(e,n,a,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),A=1/3,I=y(),T=y(),L=y();t.exports={cubicAt:a,cubicDerivativeAt:r,cubicRootAt:s,cubicExtrema:l,cubicSubdivide:h,cubicProjectPoint:u,quadraticAt:c,quadraticDerivativeAt:d,quadraticRootAt:f,quadraticExtremum:p,quadraticSubdivide:g,quadraticProjectPoint:m}},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){var i=t+":"+e;if(h[i])return h[i];for(var n=(t+"").split("\n"),o=0,a=0,r=n.length;r>a;a++)o=Math.max(p.measureText(n[a],e).width,o);return u>c&&(u=0,h={}),u++,h[i]=o,o}function o(t,e,i,o){var a=((t||"")+"").split("\n").length,r=n(t,e),s=n("国",e),l=a*s,h=new f(0,0,r,l);switch(h.lineHeight=s,o){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 o=e.x,a=e.y,r=e.height,s=e.width,l=i.height,h=r/2-l/2,u="left";switch(t){case"left":o-=n,a+=h,u="right";break;case"right":o+=n+s,a+=h,u="left";break;case"top":o+=s/2,a-=n+l,u="center";break;case"bottom":o+=s/2,a+=r+n,u="center";break;case"inside":o+=s/2,a+=h,u="center";break;case"insideLeft":o+=n,a+=h,u="left";break;case"insideRight":o+=s-n,a+=h,u="right";break;case"insideTop":o+=s/2,a+=n,u="center";break;case"insideBottom":o+=s/2,a+=r-l-n,u="center";break;case"insideTopLeft":o+=n,a+=n,u="left";break;case"insideTopRight":o+=s-n,a+=n,u="right";break;case"insideBottomLeft":o+=n,a+=r-l-n;break;case"insideBottomRight":o+=s-n,a+=r-l-n,u="right"}return{x:o,y:a,textAlign:u,textBaseline:"top"}}function r(t,e,i,o){if(!i)return"";o=d.defaults({ellipsis:"...",minCharacters:3,maxIterations:3,cnCharWidth:n("国",e),ascCharWidth:n("a",e)},o,!0),i-=n(o.ellipsis);for(var a=(t+"").split("\n"),r=0,l=a.length;l>r;r++)a[r]=s(a[r],e,i,o);return a.join("\n")}function s(t,e,i,o){for(var a=0;;a++){var r=n(t,e);if(i>r||a>=o.maxIterations){t+=o.ellipsis;break}var s=0===a?l(t,i,o):Math.floor(t.length*i/r);if(s<o.minCharacters){t="";break}t=t.substr(0,s)}return t}function l(t,e,i){for(var n=0,o=0,a=t.length;a>o&&e>n;o++){var r=t.charCodeAt(o);n+=r>=0&&127>=r?i.ascCharWidth:i.cnCharWidth}return o}var h={},u=0,c=5e3,d=i(1),f=i(8),p={getWidth:n,getBoundingRect:o,adjustTextPositionOnRect:a,ellipsis:r,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],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=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]=o,t[2]=a,t[3]=r,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],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+r*h,t[1]=-n*h+r*u,t[2]=o*u+s*h,t[3]=-o*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],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t},invert:function(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-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 o(t,e,i){return this.superClass.prototype[e].apply(t,i)}var a=i(1),r={},s=".",l="___EC__COMPONENT__CONTAINER___",h=r.parseClassType=function(t){var e={main:"",sub:""};return t&&(t=t.split(s),e.main=t[0]||"",e.sub=t[1]||""),e};r.enableClassExtend=function(t,e){t.extend=function(i){var r=function(){e&&e.apply(this,arguments),t.apply(this,arguments)};return a.extend(r.prototype,i),r.extend=this.extend,r.superCall=n,r.superApply=o,a.inherits(r,this),r.superClass=this,r}},r.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 o=i(e);o[e.sub]=t}}else{if(n[e.main])throw new Error(e.main+"exists.");n[e.main]=t}return t},t.getClass=function(t,e,i){var o=n[t];if(o&&o[l]&&(o=e?o[e]:null),i&&!o)throw new Error("Component "+t+"."+(e||"")+" not exists. Load it first.");return o},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 o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerClass(i,e.type)})}return t},r.setReadOnly=function(t,e){},t.exports=r},function(t,e,i){var n=Array.prototype.slice,o=i(1),a=o.indexOf,r=function(){this._$handlers={}};r.prototype={constructor:r,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=[],o=0,a=i[t].length;a>o;o++)i[t][o].h!=e&&n.push(i[t][o]);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 o=this._$handlers[t],a=o.length,r=0;a>r;){switch(i){case 1:o[r].h.call(o[r].ctx);break;case 2:o[r].h.call(o[r].ctx,e[1]);break;case 3:o[r].h.call(o[r].ctx,e[1],e[2]);break;default:o[r].h.apply(o[r].ctx,e)}o[r].one?(o.splice(r,1),a--):r++}}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 o=e[e.length-1],a=this._$handlers[t],r=a.length,s=0;r>s;){switch(i){case 1:a[s].h.call(o);break;case 2:a[s].h.call(o,e[1]);break;case 3:a[s].h.call(o,e[1],e[2]);break;default:a[s].h.apply(o,e)}a[s].one?(a.splice(s,1),r--):s++}}return this}},t.exports=r},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 o(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 r(t){return o(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 o=e.substr(0,i),s=e.substr(i+1,n-(i+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return;l=r(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]=r(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=r(t[1]),o=r(t[2]),a=.5>=o?o*(n+1):o+n-o*n,l=2*o-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,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,h=(s+r)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+r):l/(2-s-r);var u=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===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 o=t*(e.length-1),a=Math.floor(o),r=Math.ceil(o),s=e[a],h=e[r],u=o-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),r=Math.floor(a),s=Math.ceil(a),u=h(e[r]),c=h(e[s]),d=a-r,f=y([i(l(u[0],c[0],d)),i(l(u[1],c[1],d)),i(l(u[2],c[2],d)),o(l(u[3],c[3],d))],"rgba");return n?{color:f,leftIndex:r,rightIndex:s,value:a}:f}}function m(t,e,i,o){return t=h(t),t?(t=c(t),null!=e&&(t[0]=n(e)),null!=i&&(t[1]=r(i)),null!=o&&(t[2]=r(o)),y(u(t),"rgba")):void 0}function v(t,e){return t=h(t),t&&null!=e?(t[3]=o(e),y(t,"rgba")):void 0}function y(t,e){return"rgb"!==e&&"hsv"!==e&&"hsl"!==e||(t=t.slice(0,3)),e+"("+t.join(",")+")"}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){"use strict";function i(){this._coordinateSystems=[]}var n={};i.prototype={constructor:i,create:function(t,e){var i=[];for(var o in n){var a=n[o].create(t,e);a&&(i=i.concat(a))}this._coordinateSystems=i},update:function(t,e){for(var i=this._coordinateSystems,n=0;n<i.length;n++)i[n].update&&i[n].update(t,e)}},i.register=function(t,e){n[t]=e},i.get=function(t){return n[t]},t.exports=i},function(t,e,i){var n=i(123),o=i(38);i(124),i(122);var a=i(32),r=i(4),s=i(1),l=i(18),h={};h.getScaleExtent=function(t,e){var i=t.scale,n=i.getExtent(),o=n[1]-n[0];if("ordinal"===i.type)return isFinite(o)?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]=r.parsePercent(u[0],1),u[1]=r.parsePercent(u[1],1);var c=!0,d=!0;return null==a&&(a=n[0]-u[0]*o,c=!1),null==l&&(l=n[1]+u[1]*o,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),o=null!=(e.getMin?e.getMin():e.get("min")),a=null!=(e.getMax?e.getMax():e.get("max")),r=e.get("splitNumber");i.setExtent(n[0],n[1]),i.niceExtent(r,o,a);var s=e.get("minInterval");if(isFinite(s)&&!o&&!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(r)}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 o;default:return(a.getClass(e)||o).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 o,a=0,r=0,s=1;e.length>40&&(s=Math.round(e.length/40));for(var h=0;h<t.length;h+=s){var u=t[h],c=l.getBoundingRect(e[h],i,"center","top");c[n?"x":"y"]+=u,c[n?"width":"height"]*=1.5,o?o.intersect(c)?(r++,a=Math.max(a,r)):(o.union(c),r=0):o=c.clone()}return 0===a&&s>1?s:a*s},h.getFormattedLabels=function(t,e){var i=t.scale,n=i.getTicksLabels(),o=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(o,function(n,o){return e("category"===t.type?i.getLabel(n):n,o)},this):n},t.exports=h},function(t,e,i){"use strict";var n=i(3),o=i(8),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,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),r=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,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,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,h=Math.asin(s/r),u=Math.cos(h)*r,c=Math.sin(h),d=Math.cos(h);t.arc(i,l,r,Math.PI-h,2*Math.PI+h);var f=.6*r,p=.7*r;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,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),h={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:r,pin:s,arrow:l,triangle:a},u={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.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()}},g={createSymbol:function(t,e,i,a,r,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:r}}):0===t.indexOf("path://")?n.makePath(t.slice(7),{},new o(e,i,a,r)):new f({shape:{symbolType:t,x:e,y:i,width:a,height:r}}),h.__isEmptyBrush=l,h.setColor=p,h.setColor(s),h}};t.exports=g},function(t,e,i){function n(){this.group=new r,this.uid=s.getUID("viewChart")}function o(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)o(t.childAt(i),e)}function a(t,e,i){if(null!=e.dataIndex){var n=t.getItemGraphicEl(e.dataIndex);o(n,i)}else if(e.name){var a=t.indexOfName(e.name),n=t.getItemGraphicEl(a);o(n,i)}else t.eachItemGraphicEl(function(t){o(t,i)})}var r=i(27),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),o=i(55),a=i(8),r=function(t){t=t||{},o.call(this,t);for(var e in t)this[e]=t[e];this._children=[],this.__storage=null,this.__dirty=!0};r.prototype={constructor:r,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<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=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 r&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,o=this._children,a=n.indexOf(o,t);return 0>a?this:(o.splice(a,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof r&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromMap(t.id),t instanceof r&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(e,o,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToMap(i),i instanceof r&&i.addChildrenToStorage(t)}},delC
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值