vue-echarts-v3
Version:
Vue.js component wrap for ECharts.js(v3.x+)
3 lines (2 loc) • 23.1 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("echarts")):"function"==typeof define&&define.amd?define(["echarts"],t):e.VueECharts=t(e.echarts)}(this,function(e){"use strict";var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var i="Expected a function",o=NaN,r="[object Symbol]",a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u="object"==typeof t&&t&&t.Object===Object&&t,f="object"==typeof self&&self&&self.Object===Object&&self,h=u||f||Function("return this")(),g=Object.prototype.toString,p=Math.max,v=Math.min,m=function(){return h.Date.now()};function b(e,t,n){var o,r,a,s,l,c,d=0,u=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError(i);function g(t){var n=o,i=r;return o=r=void 0,d=t,s=e.apply(i,n)}function b(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-d>=a}function x(){var e=m();if(b(e))return z(e);l=setTimeout(x,function(e){var n=t-(e-c);return f?v(n,a-(e-d)):n}(e))}function z(e){return l=void 0,h&&o?g(e):(o=r=void 0,s)}function E(){var e=m(),n=b(e);if(o=arguments,r=this,c=e,n){if(void 0===l)return function(e){return d=e,l=setTimeout(x,t),u?g(e):s}(c);if(f)return l=setTimeout(x,t),g(c)}return void 0===l&&(l=setTimeout(x,t)),s}return t=w(t)||0,y(n)&&(u=!!n.leading,a=(f="maxWait"in n)?p(w(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),E.cancel=function(){void 0!==l&&clearTimeout(l),d=0,o=c=r=l=void 0},E.flush=function(){return void 0===l?s:z(m())},E}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&g.call(e)==r}(e))return o;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=l.test(e);return n||c.test(e)?d(e.slice(2),n?2:8):s.test(e)?o:+e}var x=function(e,t,n){var o=!0,r=!0;if("function"!=typeof e)throw new TypeError(i);return y(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),b(e,t,{leading:o,maxWait:t,trailing:r})},z=n(function(e){(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var i=t(e[n]);if(i)return i}}}),E=n(function(e){var t=e.exports={};t.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/"))&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},t.isLegacyOpera=function(){return!!window.opera}}),S=n(function(e){(e.exports={}).getOption=function(e,t,n){var i=e[t];if(null==i&&void 0!==n)return n;return i}}),O=function(e){var t=(e=e||{}).reporter,n=S.getOption(e,"async",!0),i=S.getOption(e,"auto",!0);i&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var o,r=L(),a=!1;function s(){for(a=!0;r.size();){var e=r;r=L(),e.process()}a=!1}function l(){var e;e=s,o=setTimeout(e,0)}return{add:function(e,t){!a&&i&&n&&0===r.size()&&l(),r.add(e,t)},force:function(e){a||(void 0===e&&(e=n),o&&(clearTimeout(o),o=null),e?l():s())}}};function L(){var e={},t=0,n=0,i=0;return{add:function(o,r){r||(r=o,o=0),o>n?n=o:o<i&&(i=o),e[o]||(e[o]=[]),e[o].push(r),t++},process:function(){for(var t=i;t<=n;t++)for(var o=e[t],r=0;r<o.length;r++)(0,o[r])()},size:function(){return t}}}var A="_erd";function T(e){return e[A]}var k={initState:function(e){return e[A]={},T(e)},getState:T,cleanState:function(e){delete e[A]}},C=z.forEach,D=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,i=e.stateHandler.getState,o=(e.stateHandler.hasState,e.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!t)throw new Error("Missing required dependency: reporter.");var r=function(){var e=document.createElement("div");e.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var t=document.createElement("div");t.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,i=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:i}}(),a="erd_scroll_detection_container";function s(e,n,i){if(e.addEventListener)e.addEventListener(n,i);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,i)}}function l(e,n,i){if(e.removeEventListener)e.removeEventListener(n,i);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,i)}}function c(e){return i(e).container.childNodes[0].childNodes[0].childNodes[0]}function d(e){return i(e).container.childNodes[0].childNodes[0].childNodes[1]}return function(e,t){if(!document.getElementById(e)){var n=t+"_animation",i=t+"_animation_active",o="/* Created by the element-resize-detector library. */\n";o+="."+t+" > div::-webkit-scrollbar { display: none; }\n\n",o+="."+i+" { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+n+"; animation-name: "+n+"; }\n",o+="@-webkit-keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(t,n){n=n||function(e){document.head.appendChild(e)};var i=document.createElement("style");i.innerHTML=t,i.id=e,n(i)}(o+="@keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}("erd_scroll_detection_scrollbar_style",a),{makeDetectable:function(e,l,u){function f(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(o.get(l),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var i=0;i<n.length;i++)t.log(n[i])}}function h(e){var t=i(e).container.childNodes[0],n=window.getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function g(){var e=window.getComputedStyle(l),t={};return t.position=e.position,t.width=l.offsetWidth,t.height=l.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function p(){if(f("storeStyle invoked."),i(l)){var e=g();i(l).style=e}else f("Aborting because element has been uninstalled")}function v(e,t,n){i(e).lastWidth=t,i(e).lastHeight=n}function m(){return 2*r.width+1}function b(){return 2*r.height+1}function y(e){return e+10+m()}function w(e){return e+10+b()}function x(e,t,n){var i=c(e),o=d(e),r=y(t),a=w(n),s=function(e){return 2*e+m()}(t),l=function(e){return 2*e+b()}(n);i.scrollLeft=r,i.scrollTop=a,o.scrollLeft=s,o.scrollTop=l}function z(){var e=i(l).container;if(!e){(e=document.createElement("div")).className=a,e.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",i(l).container=e,function(e){e.className+=" "+a+"_animation_active"}(e),l.appendChild(e);var t=function(){i(l).onRendered&&i(l).onRendered()};s(e,"animationstart",t),i(l).onAnimationStart=t}return e}function E(){if(f("Injecting elements"),i(l)){!function(){var e=i(l).style;if("static"===e.position){l.style.position="relative";var n=function(e,t,n,i){var o=n[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(e.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};n(t,l,e,"top"),n(t,l,e,"right"),n(t,l,e,"bottom"),n(t,l,e,"left")}}();var e=i(l).container;e||(e=z());var n,o,c,d,u=r.width,h=r.height,g="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; left: "+(n=(n=-(1+u))?n+"px":"0")+"; top: "+(o=(o=-(1+h))?o+"px":"0")+"; right: "+(d=(d=-u)?d+"px":"0")+"; bottom: "+(c=(c=-h)?c+"px":"0")+";",p=document.createElement("div"),v=document.createElement("div"),m=document.createElement("div"),b=document.createElement("div"),y=document.createElement("div"),w=document.createElement("div");p.dir="ltr",p.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",p.className=a,v.className=a,v.style.cssText=g,m.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",b.style.cssText="position: absolute; left: 0; top: 0;",y.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",w.style.cssText="position: absolute; width: 200%; height: 200%;",m.appendChild(b),y.appendChild(w),v.appendChild(m),v.appendChild(y),p.appendChild(v),e.appendChild(p),s(m,"scroll",x),s(y,"scroll",E),i(l).onExpandScroll=x,i(l).onShrinkScroll=E}else f("Aborting because element has been uninstalled");function x(){i(l).onExpand&&i(l).onExpand()}function E(){i(l).onShrink&&i(l).onShrink()}}function S(){function r(e,t,n){var i=function(e){return c(e).childNodes[0]}(e),o=y(t),r=w(n);i.style.width=o+"px",i.style.height=r+"px"}function a(a){var c=l.offsetWidth,d=l.offsetHeight;f("Storing current size",c,d),v(l,c,d),n.add(0,function(){if(i(l))if(s()){if(e.debug){var n=l.offsetWidth,a=l.offsetHeight;n===c&&a===d||t.warn(o.get(l),"Scroll: Size changed before updating detector elements.")}r(l,c,d)}else f("Aborting because element container has not been initialized");else f("Aborting because element has been uninstalled")}),n.add(1,function(){i(l)?s()?x(l,c,d):f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")}),a&&n.add(2,function(){i(l)?s()?a():f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")})}function s(){return!!i(l).container}function u(){f("notifyListenersIfNeeded invoked");var e=i(l);return void 0===i(l).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?f("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?f("Not notifying: Size already notified"):(f("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void C(i(l).listeners,function(e){e(l)}))}function g(){if(f("Scroll detected."),h(l))f("Scroll event fired while unrendered. Ignoring...");else{var e=l.offsetWidth,t=l.offsetHeight;e!==i(l).lastWidth||t!==i(l).lastHeight?(f("Element size changed."),a(u)):f("Element size has not changed ("+e+"x"+t+").")}}if(f("registerListenersAndPositionElements invoked."),i(l)){i(l).onRendered=function(){if(f("startanimation triggered."),h(l))f("Ignoring since element is still unrendered...");else{f("Element rendered.");var e=c(l),t=d(l);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(f("Scrollbars out of sync. Updating detector elements..."),a(u))}},i(l).onExpand=g,i(l).onShrink=g;var p=i(l).style;r(l,p.width,p.height)}else f("Aborting because element has been uninstalled")}function O(){if(f("finalizeDomMutation invoked."),i(l)){var e=i(l).style;v(l,e.width,e.height),x(l,e.width,e.height)}else f("Aborting because element has been uninstalled")}function L(){u(l)}function A(){var e;f("Installing..."),i(l).listeners=[],e=g(),i(l).startSize={width:e.width,height:e.height},f("Element start size",i(l).startSize),n.add(0,p),n.add(1,E),n.add(2,S),n.add(3,O),n.add(4,L)}u||(u=l,l=e,e=null),e=e||{},f("Making detectable..."),function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)||null===window.getComputedStyle(e)}(l)?(f("Element is detached"),z(),f("Waiting until element is attached..."),i(l).onRendered=function(){f("Element is now attached"),A()}):A()},addListener:function(e,t){if(!i(e).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");i(e).listeners.push(t)},uninstall:function(e){var t=i(e);t&&(t.onExpandScroll&&l(c(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&l(d(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&l(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))}}},j=z.forEach;function H(e){return Array.isArray(e)||void 0!==e.length}function R(e){if(Array.isArray(e))return e;var t=[];return j(e,function(e){t.push(e)}),t}function I(e){return e&&1===e.nodeType}var M=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var i=n(e);if(!i)throw new Error("setId required the element to have a resize detection state.");var o=t.generate();return i.id=o,o}}}({idGenerator:function(){var e=1;return{generate:function(){return e++}}}(),stateHandler:k});t=n}var i=e.reporter;i||(i=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var i=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}(!1===i));var o=N(e,"batchProcessor",O({reporter:i})),r={};r.callOnAdd=!!N(e,"callOnAdd",!0),r.debug=!!N(e,"debug",!1);var a,s=function(e){var t={};function n(n){var i=e.get(n);return void 0===i?[]:t[i]||[]}return{get:n,add:function(n,i){var o=e.get(n);t[o]||(t[o]=[]),t[o].push(i)},removeListener:function(e,t){for(var i=n(e),o=0,r=i.length;o<r;++o)if(i[o]===t){i.splice(o,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}}(t),l=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}({stateHandler:k}),c=N(e,"strategy","object"),d={reporter:i,batchProcessor:o,stateHandler:k,idHandler:t};if("scroll"===c&&(E.isLegacyOpera()?(i.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),c="object"):E.isIE(9)&&(i.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),c="object")),"scroll"===c)a=D(d);else{if("object"!==c)throw new Error("Invalid strategy name: "+c);a=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,i=e.stateHandler.getState;if(!t)throw new Error("Missing required dependency: reporter.");function o(e){return i(e).object}return{makeDetectable:function(e,o,r){r||(r=o,o=e,e=null),(e=e||{}).debug,E.isIE(8)?r(o):function(e,o){var r="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",a=!1,s=window.getComputedStyle(e),l=e.offsetWidth,c=e.offsetHeight;function d(){function n(){if("static"===s.position){e.style.position="relative";var n=function(e,t,n,i){var o=n[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(e.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};n(t,e,s,"top"),n(t,e,s,"right"),n(t,e,s,"bottom"),n(t,e,s,"left")}}""!==s.position&&(n(),a=!0);var l=document.createElement("object");l.style.cssText=r,l.tabIndex=-1,l.type="text/html",l.setAttribute("aria-hidden","true"),l.onload=function(){a||n(),function e(t,n){t.contentDocument?n(t.contentDocument):setTimeout(function(){e(t,n)},100)}(this,function(t){o(e)})},E.isIE()||(l.data="about:blank"),e.appendChild(l),i(e).object=l,E.isIE()&&(l.data="about:blank")}i(e).startSize={width:l,height:c},n?n.add(d):d()}(o,r)},addListener:function(e,t){if(!o(e))throw new Error("Element is not detectable by this strategy.");function n(){t(e)}E.isIE(8)?(i(e).object={proxy:n},e.attachEvent("onresize",n)):o(e).contentDocument.defaultView.addEventListener("resize",n)},uninstall:function(e){E.isIE(8)?e.detachEvent("onresize",i(e).object.proxy):e.removeChild(o(e)),delete i(e).object}}}(d)}var u={};return{listenTo:function(e,n,o){function c(e){var t=s.get(e);j(t,function(t){t(e)})}function d(e,t,n){s.add(t,n),e&&n(t)}if(o||(o=n,n=e,e={}),!n)throw new Error("At least one element required.");if(!o)throw new Error("Listener required.");if(I(n))n=[n];else{if(!H(n))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=R(n)}var f=0,h=N(e,"callOnAdd",r.callOnAdd),g=N(e,"onReady",function(){}),p=N(e,"debug",r.debug);j(n,function(e){k.getState(e)||(k.initState(e),t.set(e));var r=t.get(e);if(p&&i.log("Attaching listener to element",r,e),!l.isDetectable(e))return p&&i.log(r,"Not detectable."),l.isBusy(e)?(p&&i.log(r,"System busy making it detectable"),d(h,e,o),u[r]=u[r]||[],void u[r].push(function(){++f===n.length&&g()})):(p&&i.log(r,"Making detectable..."),l.markBusy(e,!0),a.makeDetectable({debug:p},e,function(e){if(p&&i.log(r,"onElementDetectable"),k.getState(e)){l.markAsDetectable(e),l.markBusy(e,!1),a.addListener(e,c),d(h,e,o);var t=k.getState(e);if(t&&t.startSize){var s=e.offsetWidth,v=e.offsetHeight;t.startSize.width===s&&t.startSize.height===v||c(e)}u[r]&&j(u[r],function(e){e()})}else p&&i.log(r,"Element uninstalled before being detectable.");delete u[r],++f===n.length&&g()}));p&&i.log(r,"Already detecable, adding listener."),d(h,e,o),f++}),f===n.length&&g()},removeListener:s.removeListener,removeAllListeners:s.removeAllListeners,uninstall:function(e){if(!e)return i.error("At least one element is required.");if(I(e))e=[e];else{if(!H(e))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=R(e)}j(e,function(e){s.removeAllListeners(e),a.uninstall(e),k.cleanState(e)})}}};function N(e,t,n){var i=e[t];return null==i&&void 0!==n?n:i}var _=["click","dblclick","mouseover","mouseout","mousedown","mouseup","globalout","legendselectchanged","legendselected","legendunselected","datazoom","datarangeselected","timelinechanged","timelineplaychanged","restore","dataviewchanged","magictypechanged","geoselectchanged","geoselected","geounselected","pieselectchanged","pieselected","pieunselected","mapselectchanged","mapselected","mapunselected","axisareaselected","brush","brushselected"];var W,q=(W=e,{name:"IEcharts",props:{styles:{type:Object,required:!1,default:function(){return{width:"100%",height:"100%"}}},theme:{type:[String,Object],required:!1},group:{type:String,required:!1},option:{type:Object,required:!0},initOpts:{type:Object,required:!1},notMerge:{type:Boolean,required:!1,default:!1},lazyUpdate:{type:Boolean,required:!1,default:!1},loading:{type:Boolean,required:!1,default:!1},loadingOpts:{type:Object,required:!1},resizable:{type:Boolean,required:!1,default:!1}},data:function(){return{fnResize:null,insResize:null,instance:null,watches:{loading:null,option:null,group:null}}},computed:{width:{cache:!1,get:function(){return this.instance.getWidth()}},height:{cache:!1,get:function(){return this.instance.getHeight()}},isDisposed:{cache:!1,get:function(){return this.instance.isDisposed()}}},watch:{loading:{handler:function(e){this.ifLoading(e)},deep:!1},option:{handler:function(e){this.instance.setOption(e,this.notMerge,this.lazyUpdate)},deep:!0},group:{handler:function(e){this.instance.group=e},deep:!1}},methods:{initResize:function(e){var t=this;t.resizable&&(t.insResize=t.insResize||M({strategy:"scroll"}),t.fnResize=t.fnResize||x(t.resize,250,{leading:!0,trailing:!0}),t.insResize.listenTo(e,function(e){var n=e.offsetWidth,i=e.offsetHeight;t.fnResize({width:n,height:i,silent:!1})}))},init:function(){var e=this;if(!e.instance){var t=e.$el,n=W.getInstanceByDom(t);n||(n=W.init(t,e.theme,e.initOpts)),n.group=e.group,e.instance=n,e.$emit("ready",n,W),e.$nextTick(function(){e.ifLoading(e.loading),e.update(),e.bind(),e.initResize(t)})}},bind:function(){var e=this,t=function(t){e.instance.on(t,function(n){e.$emit(t,n,e.instance,W)})};if(e._events){for(var n in e._events)if(Object.prototype.hasOwnProperty.call(e._events,n)){var i=n.toLowerCase();_.indexOf(i)>-1&&t(i)}}else for(var o=0,r=_.length;o<r;o++)t(_[o])},unbind:function(){if(this._events){for(var e in this._events)if(Object.prototype.hasOwnProperty.call(this._events,e)){var t=e.toLowerCase();_.indexOf(t)>-1&&this.instance.off(t)}}else for(var n=0,i=_.length;n<i;n++)this.instance.off(_[n])},ifLoading:function(e){e?this.showLoading():this.hideLoading()},watch:function(){var e=this;e.watches.loading=e.$watch("loading",function(t){e.ifLoading(t)}),e.watches.option=e.$watch("option",function(t){e.instance.setOption(t,e.notMerge,e.lazyUpdate)},{deep:!0}),e.watches.group=e.$watch("group",function(t){e.instance.group=t})},unwatch:function(){this.watches.loading&&(this.watches.loading(),this.watches.loading=null),this.watches.option&&(this.watches.option(),this.watches.option=null),this.watches.group&&(this.watches.group(),this.watches.group=null)},resize:function(e){if(this.instance){var t=e&&e.width,n=e&&e.height;this.$emit("resize",t,n),this.instance.resize(e)}},update:function(){this.instance&&(this.instance.setOption(this.option,this.notMerge,this.lazyUpdate),this.resize())},mergeOption:function(e){this.instance&&(this.instance.setOption(e,!1,this.lazyUpdate),this.resize())},dispatchAction:function(e){this.instance&&this.instance.dispatchAction(e)},convertToPixel:function(e,t){return this.instance.convertToPixel(e,t)},convertFromPixel:function(e,t){return this.instance.convertFromPixel(e,t)},containPixel:function(e,t){return this.instance.containPixel(e,t)},showLoading:function(){this.instance&&this.instance.showLoading("default",this.loadingOpts)},hideLoading:function(){this.instance&&this.instance.hideLoading()},getDataURL:function(e){return this.instance.getDataURL(e)},getConnectedDataURL:function(e){return this.instance.getConnectedDataURL(e)},clear:function(){this.instance&&this.instance.clear()},uninitResize:function(){this.insResize&&this.insResize.uninstall&&(this.insResize.uninstall(this.$el),this.insResize=null),this.fnResize&&this.fnResize.cancel&&(this.fnResize.cancel(),this.fnResize=null)},uninit:function(){this.instance&&(this.unbind(),this.uninitResize(),this.instance.dispose(),this.instance=null)}},mounted:function(){this.init()},beforeDestroy:function(){this.uninit()},connect:function(e){return W.connect(e)},disConnect:function(e){return W.disConnect(e)},dispose:function(e){return W.dispose(e)},getInstanceByDom:function(e){return W.getInstanceByDom(e)},registerMap:function(e,t,n){return W.registerMap(e,t,n)},getMap:function(e){return W.getMap(e)},registerTheme:function(e,t){return W.registerTheme(e,t)},render:function(e){return e("div",{style:this.styles})}});return q.__echarts__=e,q});
//# sourceMappingURL=VueECharts.min.js.map