(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["echarts"] = factory();
else
root["echarts"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
/**
* Export echarts as CommonJS module
*/
module.exports = __webpack_require__(1);
// Import all charts and components
__webpack_require__(92);
__webpack_require__(128);
__webpack_require__(133);
__webpack_require__(142);
__webpack_require__(146);
__webpack_require__(156);
__webpack_require__(177);
__webpack_require__(189);
__webpack_require__(210);
__webpack_require__(214);
__webpack_require__(218);
__webpack_require__(233);
__webpack_require__(239);
__webpack_require__(246);
__webpack_require__(252);
__webpack_require__(256);
__webpack_require__(261);
__webpack_require__(107);
__webpack_require__(265);
__webpack_require__(271);
__webpack_require__(275);
__webpack_require__(286);
__webpack_require__(219);
__webpack_require__(289);
__webpack_require__(290);
__webpack_require__(304);
__webpack_require__(319);
__webpack_require__(323);
__webpack_require__(326);
__webpack_require__(335);
__webpack_require__(349);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
/*!
* 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
*/
var GlobalModel = __webpack_require__(2);
var ExtensionAPI = __webpack_require__(24);
var CoordinateSystemManager = __webpack_require__(25);
var OptionManager = __webpack_require__(26);
var ComponentModel = __webpack_require__(19);
var SeriesModel = __webpack_require__(27);
var ComponentView = __webpack_require__(28);
var ChartView = __webpack_require__(41);
var graphic = __webpack_require__(42);
var zrender = __webpack_require__(78);
var zrUtil = __webpack_require__(3);
var colorTool = __webpack_require__(38);
var env = __webpack_require__(79);
var Eventful = __webpack_require__(32);
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 DEPREC