text: !function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("echarts/lib/echarts"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/chart/bar"),require("echarts/lib/chart/line"),require("echarts/lib/chart/pie"),require("echarts/lib/chart/funnel"),require("echarts/lib/chart/radar")):"function"==typeof define&&define.amd?define(["echarts/lib/echarts","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/chart/bar","echarts/lib/chart/line","echarts/lib/chart/pie","echarts/lib/chart/funnel","echarts/lib/chart/radar"],i):e.VeChart=i(e.echarts)}(this,function(e){"use strict";function i(e){var i=e.innerRows,t=e.dimAxisName,n=e.dimension,a=e.axisVisible;return n.map(function(e){return{type:"category",name:t,nameLocation:"middle",nameGap:22,data:i.map(function(i){return i[e]}),axisLabel:{formatter:function(e){return String(e)}},show:a}})}function t(e){for(var i=e.meaAxisName,t=e.meaAxisType,n=e.axisVisible,a=e.digit,r=e.scale,o=e.min,s=e.max,l={type:"value",axisTick:{show:!1},show:n},c=[],u=0;u<2;u++)!function(e){t[e]?c[e]=Object.assign({},l,{axisLabel:{formatter:function(i){return V(i,t[e],a)}}}):c[e]=Object.assign({},l),c[e].name=i[e]||"",c[e].scale=r[e]||!1,c[e].min=o[e]||null,c[e].max=s[e]||null}(u);return c}function n(e){var i=e.axisSite,t=e.isHistogram,n=e.meaAxisType,a=e.digit,r=e.labelMap,o=t?i.right:i.top;return r&&(o=o.map(function(e){return void 0===r[e]?e:r[e]})),{trigger:"axis",formatter:function(e){var i=[];return i.push(e[0].name+"<br>"),e.forEach(function(e){var t=e.seriesName,r=~o.indexOf(t)?n[1]:n[0];i.push(j(e.color)),i.push(t+": "),i.push(V(e.value,r,a)),i.push("<br>")}),i.join("")}}}function a(e){var i=e.innerRows,t=e.metrics,n=e.stack,a=e.axisSite,r=e.isHistogram,o=e.labelMap,s=e.itemStyle,l=e.label,c=[],u={},d=r?a.right:a.top,m=r?"yAxisIndex":"xAxisIndex",h=n&&E(n);return t.forEach(function(e){u[e]=[]}),i.forEach(function(e){t.forEach(function(i){u[i].push(e[i])})}),!!(c=Object.keys(u).map(function(e){var i=H({name:o&&o[e]||e,type:"bar",data:u[e]},m,~d.indexOf(e)?"1":"0");return n&&h[e]&&(i.stack=h[e]),l&&(i.label=l),s&&(i.itemStyle=s),i})).length&&c}function r(e){var i=e.metrics,t=e.labelMap,n=e.legendName;return n||t?{data:t?i.map(function(e){return null==t[e]?e:t[e]}):i,formatter:function(e){return n&&n[e]||e}}:{data:i}}function o(e){var i=e.dimension,t=e.rows,n=e.xAxisName,a=e.axisVisible;return i.map(function(e,i){return{type:"category",nameLocation:"middle",nameGap:22,boundaryGap:!1,name:n[i]||"",axisTick:{show:!0,lineStyle:{color:"#eee"}},data:t.map(function(i){return i[e]}),axisLabel:{formatter:function(e){return String(e)}},show:a}})}function s(e){var i=e.rows,t=e.axisSite,n=e.metrics,a=e.area,r=e.stack,o=e.nullAddZero,s=e.labelMap,l=e.label,c=e.itemStyle,u=e.lineStyle,d=e.areaStyle,m=[],h={},f=r&&E(r);return n.forEach(function(e){h[e]=[]}),i.forEach(function(e){n.forEach(function(i){var t=null;null!=e[i]?t=e[i]:o&&(t=0),h[i].push(t)})}),n.forEach(function(e){var i={name:s&&s[e]||e,type:"line",data:h[e]};a&&(i.areaStyle={normal:{}}),i.yAxisIndex=~t.right.indexOf(e)?1:0,r&&f[e]&&(i.stack=f[e]),l&&(i.label=l),c&&(i.itemStyle=c),u&&(i.lineStyle=u),d&&(i.areaStyle=d),m.push(i)}),!!m.length&&m}function l(e){for(var i=e.yAxisName,t=e.yAxisType,n=e.axisVisible,a=e.scale,r=e.min,o=e.max,s=e.digit,l={type:"value",axisTick:{show:!1},show:n},c=[],u=0;u<2;u++)!function(e){t[e]?c[e]=Object.assign({},l,{axisLabel:{formatter:function(i){return V(i,t[e],s)}}}):c[e]=Object.assign({},l),c[e].name=i[e]||"",c[e].scale=a[e]||!1,c[e].min=r[e]||null,c[e].max=o[e]||null}(u);return c}function c(e){var i=e.axisSite,t=e.yAxisType,n=e.digit,a=e.labelMap,r=a?i.right.map(function(e){return void 0===a[e]?e:a[e]}):i.right;return{trigger:"axis",formatter:function(e){var i=[];return i.push(e[0].name+"<br>"),e.forEach(function(e){var a=null,o=~r.indexOf(e.seriesName)?t[1]:t[0];a=V(e.data,o,n),i.push(j(e.color)),i.push(e.seriesName+": "+a),i.push("<br>")}),i.join("")}}}function u(e){var i=e.metrics,t=e.legendName,n=e.labelMap;return t||n?{data:n?i.map(function(e){return null==n[e]?e:n[e]}):i,formatter:function(e){return t&&t[e]||e}}:{data:i}}function d(e){var i=e.innerRows,t=e.dataType,n=e.percentShow,a=e.dimension,r=e.metrics,o=e.radius,s=e.offsetY,l=e.selectedMode,c=e.hoverAnimation,u=e.digit,d=e.roseType,m=e.label,h=e.level,f=e.limitShowNum,p=e.isRing,v=[],b={},g=[];h?(h.forEach(function(e,i){e.forEach(function(e){b[e]=i})}),i.forEach(function(e){var i=b[e[a]];void 0!==i&&(g[i]?g[i].push(e):g[i]=[e])})):g.push(i);var x={type:"pie",selectedMode:l,hoverAnimation:c,roseType:d,center:["50%",s]},y=g.length;if(g.forEach(function(e,i){var s=Object.assign({data:[]},x),l=o/y;if(i){var c=l+o/(2*y)*(2*i-1),d=c+o/(2*y);s.radius=[c,d]}else s.radius=p?o:l;y>1&&0===i&&(s.label={normal:{position:"inner"}}),m&&(s.label=m),n&&(s.label={normal:{show:!0,position:y>1&&0===i?"inner":"outside",formatter:function(e){var i=[];return i.push(e.name+":"),i.push(V(e.value,t,u)),i.push("("+e.percent+"%)"),i.join(" ")}}}),s.data=e.map(function(e){return{name:e[a],value:e[r]}}),v.push(s)}),f&&f<v[0].data.length){var O=v[0].data,S=0;O.slice(f,O.length).forEach(function(e){S+=e.value}),v[0].data=O.slice(0,f),v[0].data.push({name:"其他",value:S})}return v}function m(e){var i=e.innerRows,t=e.dimension,n=e.legendLimit,a=e.level,r=e.limitShowNum,o=[],s=[];if(a)a.forEach(function(e){e.forEach(function(e){s.push(e)})}),o=s;else if(r&&r<i.length){for(var l=0;l<r;l++)o.push(i[l][t]);o.push("其他")}else o=i.map(function(e){return e[t]});return!!o.length&&{data:o,show:o.length<n}}function h(e){var i=e.dataType,t=e.innerRows,n=e.limitShowNum,a=e.digit,r=e.metrics,o=e.dimension,s=0,l=t.map(function(e){return s+=e[r],{name:e[o],value:e[r]}}).slice(n,t.length);return{formatter:function(e){var t=[];return t.push(j(e.color)),n&&"其他"===e.name?(t.push("其他:"),l.forEach(function(e){var n=e.name,r=e.value,o=V(r/s,"percent");t.push("<br>"+n+":"),t.push(V(r,i,a)),t.push("("+o+")")})):(t.push(e.name+":"),t.push(V(e.value,i,a)),t.push("("+e.percent+"%)")),t.join(" ")}}}function f(e,i){return{trigger:"item",formatter:function(t){var n=[];return n.push(j(t.color)),n.push(t.name+": "+V(t.data.realValue,e,i)),n.join("")}}}function p(e){var i=e.dimension,t=e.metrics,n=e.rows,a=e.sequence,r=e.ascending,o={type:"funnel"};n.sort(function(e,t){return a.indexOf(e[i])-a.indexOf(t[i])});var s=!1;n.some(function(e,i){if(i&&e[t]>n[i-1][t])return s=!0,!0});var l=100/n.length;return o.data=s?n.slice().reverse().map(function(e,n){return{name:e[i],value:(n+1)*l,realValue:e[t]}}):n.map(function(e){return{name:e[i],value:e[t],realValue:e[t]}}),r&&(o.sort="ascending"),o}function v(e,i){return{data:e.map(function(e){return e[i]})}}function b(e,i,t){var n=[],a=[];return i.indicator.map(function(i,t){n[t]=e[i.name],a[t]=i.name}),{formatter:function(e){var i=[];return i.push(j(e.color)),i.push(e.seriesName+"<br />"),e.data.value.forEach(function(e,r){i.push(a[r]+": "),i.push(V(e,n[r],t)+"<br />")}),i.join("")}}}function g(e,i){var t={indicator:[],shape:"circle",splitNumber:5},n={};return e.forEach(function(e){i.forEach(function(i){n[i]?n[i].push(e[i]):n[i]=[e[i]]})}),t.indicator=Object.keys(n).map(function(e){return{name:e,max:Math.max.apply(null,n[e])}}),t}function x(e){var i=e.rows,t=e.dimension,n=e.metrics,a={};e.radar.indicator.forEach(function(e,i){a[e.name]=i});var r=i.map(function(e){var i={value:[],name:e[t]};return Object.keys(e).forEach(function(t){~n.indexOf(t)&&(i.value[a[t]]=e[t])}),i});return[{name:t,type:"radar",data:r}]}function y(e,i){return{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(t){var n=t[1];return[n.name+"<br/>"+n.seriesName+" :",""+V(n.value,e,i)].join("")}}}function O(e){var i=e.dimension,t=e.rows,n=e.remainStatus,a=e.totalName,r=e.remainName,o=e.xAxisName,s=e.axisVisible,l=[a].concat(t.map(function(e){return e[i]}));return"have-remain"===n&&(l=l.concat([r])),{type:"category",name:o,splitLine:{show:!1},data:l,show:s}}function S(e){var i=e.dataType,t=e.yAxisName,n=e.axisVisible,a=e.digit;return{type:"value",name:t,axisTick:{show:!1},axisLabel:{formatter:function(e){return V(e,i,a)}},show:n}}function w(e){var i=e.dataType,t=e.rows,n=e.metrics,a=e.totalNum,r=e.remainStatus,o=e.dataSum,s=e.digit,l={type:"bar",stack:"总量"},c=o,u=a,d=void 0,m=void 0,h=t.map(function(e){return e[n]});"have-remain"===r?(d=[0].concat(t.map(function(e){return u-=e[n]})).concat([0]),m=[a].concat(h).concat([a-o])):(d=[0].concat(t.map(function(e){return c-=e[n]})),m=[o].concat(h));var f=[];return f.push(Object.assign({name:"辅助",itemStyle:{normal:{opacity:0},emphasis:{opacity:0}},data:d},l)),f.push(Object.assign({name:"数值",label:{normal:{show:!0,position:"top",formatter:function(e){return V(e.value,i,s)}}},data:m},l)),f}function A(e,i){return i?i>e?"have-remain":"none-remain":"not-total"}e="default"in e?e.default:e,"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");e=Object(e);for(var i=1;i<arguments.length;i++){var t=arguments[i];if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}),e.registerTheme("ve-chart",{categoryAxis:{axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1}},line:{smooth:!0},grid:{containLabel:!0,left:10,right:10}});var j=function(e){return['<span style="',"background-color:"+e+";","display: inline-block;","width: 10px;","height: 10px;","border-radius: 50%;","margin-right:2px;",'"></span>'].join("")},N=["#19d4ae","#5ab1ef","#fa6e86","#ffb980","#0067a6","#c4b4e4","#d87a80","#9cbbff","#d9d0c7","#87a997","#d49ea2","#5b4947","#7ba3a8"],k=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(isNaN(+e))return e;for(var t=[{value:1e18,symbol:"E"},{value:1e15,symbol:"P"},{value:1e12,symbol:"T"},{value:1e9,symbol:"B"},{value:1e6,symbol:"M"},{value:1e3,symbol:"k"}],n=0;n<t.length;n++)if(Math.abs(e)>=t[n].value)return(e/t[n].value).toFixed(i)+t[n].symbol;return e.toString()},T=function(e){return String(e).replace(/^(\s+|-)?\d+(?=.?\d*($|\s))/g,function(e){return e.replace(/(?=(?!\b)(\d{3})+$)/g,",")})},V=function(e,i){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"-";if(null==e||isNaN(e))return n;switch(i){case"KMB":return k(e);case"percent":return parseFloat((100*e).toFixed(t))+"%";case"normal":return T(e);default:return e}},E=function(e){var i={};return Object.keys(e).forEach(function(t){e[t].forEach(function(e){i[e]=t})}),i},M=function(e){return JSON.parse(JSON.stringify(e))},L=function(e){return Object.prototype.toString.call(e)},H=function(e,i,t){return i in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e},P=function(e,o,s,l){var c=M(o),u=s.axisSite,d=void 0===u?{top:[]}:u,m=s.dimension,h=void 0===m?[e[0]]:m,f=s.stack,p=void 0===f?{}:f,v=s.axisVisible,b=void 0===v||v,g=s.digit,x=void 0===g?2:g,y=s.dataOrder,O=void 0!==y&&y,S=s.scale,w=void 0===S?[!1,!1]:S,A=s.min,j=void 0===A?[null,null]:A,N=s.max,k=void 0===N?[null,null]:N,T=s.legendName,V=s.labelMap,E=s.label,L=s.itemStyle,H=l.tooltipVisible,P=l.legendVisible,C=e.slice();s.metrics?C=s.metrics:C.splice(e.indexOf(h[0]),1);var R=s.xAxisType||["normal","normal"],q=s.xAxisName||[],F=s.yAxisName||"";if(O){var $=O.label,_=O.order;$&&_?c.sort(function(e,i){return"desc"===_?e[$]-i[$]:i[$]-e[$]}):console.warn("Need to provide name and order parameters")}var Z=P&&r({metrics:C,labelMap:V,legendName:T}),z=i({innerRows:c,dimAxisName:F,dimension:h,axisVisible:b}),B=t({meaAxisName:q,meaAxisType:R,axisVisible:b,digit:x,scale:w,min:j,max:k}),G={axisSite:d,isHistogram:!1,meaAxisType:R,digit:x,labelMap:V};return{legend:Z,yAxis:z,series:a({innerRows:c,metrics:C,stack:p,axisSite:d,isHistogram:!1,labelMap:V,itemStyle:L,label:E}),xAxis:B,tooltip:H&&n(G)}},C=function(e,o,s,l){var c=M(o),u=s.axisSite,d=void 0===u?{right:[]}:u,m=s.dimension,h=void 0===m?[e[0]]:m,f=s.stack,p=void 0===f?{}:f,v=s.axisVisible,b=void 0===v||v,g=s.digit,x=void 0===g?2:g,y=s.dataOrder,O=void 0!==y&&y,S=s.scale,w=void 0===S?[!1,!1]:S,A=s.min,j=void 0===A?[null,null]:A,N=s.max,k=void 0===N?[null,null]:N,T=s.labelMap,V=s.legendName,E=s.label,L=s.itemStyle;if(O){var H=O.label,P=O.order;H&&P?c.sort(function(e,i){return"desc"===P?e[H]-i[H]:i[H]-e[H]}):console.warn("Need to provide name and order parameters")}var C=l.tooltipVisible,R=l.legendVisible,q=e.slice();s.metrics?q=s.metrics:q.splice(e.indexOf(h[0]),1);var F=s.yAxisType||["normal","normal"],$=s.yAxisName||[],_=s.xAxisName||"",Z=R&&r({metrics:q,labelMap:T,legendName:V}),z=i({innerRows:c,dimAxisName:_,dimension:h,axisVisible:b}),B={axisSite:d,isHistogram:!0,meaAxisType:F,digit:x,labelMap:T};return{legend:Z,yAxis:t({meaAxisName:$,meaAxisType:F,axisVisible:b,digit:x,scale:w,min:j,max:k}),series:a({innerRows:c,metrics:q,stack:p,axisSite:d,isHistogram:!0,labelMap:T,itemStyle:L,label:E}),xAxis:z,tooltip:C&&n(B)}},R=function(e,i,t,n){var a=t.axisSite,r=void 0===a?{right:[]}:a,d=t.yAxisType,m=void 0===d?["normal","normal"]:d,h=t.yAxisName,f=void 0===h?[]:h,p=t.dimension,v=void 0===p?[e[0]]:p,b=t.xAxisName,g=void 0===b?[]:b,x=t.axisVisible,y=void 0===x||x,O=t.area,S=t.stack,w=t.scale,A=void 0===w?[!1,!1]:w,j=t.min,N=void 0===j?[null,null]:j,k=t.max,T=void 0===k?[null,null]:k,V=t.nullAddZero,E=void 0!==V&&V,M=t.digit,L=void 0===M?2:M,H=t.legendName,P=t.labelMap,C=t.label,R=t.itemStyle,q=t.lineStyle,F=t.areaStyle,$=n.tooltipVisible,_=n.legendVisible,Z=e.slice();t.metrics?Z=t.metrics:Z.splice(e.indexOf(v[0]),1);var z=_&&u({metrics:Z,legendName:H,labelMap:P}),B=$&&c({axisSite:r,yAxisType:m,digit:L,labelMap:P}),G=o({dimension:v,rows:i,xAxisName:g,axisVisible:y}),I=l({yAxisName:f,yAxisType:m,axisVisible:y,scale:A,min:N,max:T,digit:L}),Y=s({rows:i,axisSite:r,metrics:Z,area:O,stack:S,nullAddZero:E,labelMap:P,label:C,itemStyle:R,lineStyle:q,areaStyle:F});return!(!G||!Y)&&{legend:z,xAxis:G,series:Y,yAxis:I,tooltip:B}},q=[80,100],F=[20,100],$=function(e,i,t,n,a){var r=M(i),o=t.dataType,s=void 0===o?"normal":o,l=t.percentShow,c=t.dimension,u=void 0===c?e[0]:c,f=t.metrics,p=void 0===f?e[1]:f,v=t.roseType,b=void 0!==v&&v,g=t.radius,x=void 0===g?a?b?F:q:100:g,y=t.offsetY,O=void 0===y?200:y,S=t.legendLimit,w=void 0===S?30:S,A=t.selectedMode,j=void 0!==A&&A,N=t.hoverAnimation,k=void 0===N||N,T=t.digit,V=void 0===T?2:T,E=t.label,L=void 0!==E&&E,H=t.level,P=void 0!==H&&H,C=t.limitShowNum,R=void 0===C?0:C,$=n.tooltipVisible,_=n.legendVisible;R&&r.sort(function(e,i){return i[p]-e[p]});var Z={innerRows:r,dimension:u,legendLimit:w,level:P,limitShowNum:R};return{series:d({innerRows:r,dataType:s,percentShow:l,dimension:u,metrics:p,radius:x,offsetY:O,selectedMode:j,hoverAnimation:k,digit:V,roseType:b,label:L,level:P,limitShowNum:R,isRing:a}),legend:_&&m(Z),tooltip:$&&h({dataType:s,innerRows:r,limitShowNum:R,digit:V,metrics:p,dimension:u})}},_=function(e,i,t,n){return $(e,i,t,n,!0)},Z=function(e,i,t,n){var a=e.slice(),r=i.slice(),o=t.dataType,s=void 0===o?"normal":o,l=t.dimension,c=void 0===l?a[0]:l,u=t.sequence,d=void 0===u?r.map(function(e){return e[c]}):u,m=t.digit,h=void 0===m?2:m,v=t.ascending,b=n.tooltipVisible,g=n.legendVisible,x=void 0;if(t.metrics)x=t.metrics;else{var y=a.slice();y.splice(a.indexOf(c),1),x=y[0]}return{tooltip:b&&f(s,h),legend:g&&{data:d},series:p({dimension:c,metrics:x,rows:r,sequence:d,ascending:v})}},z=function(e,i,t,n){var a=t.dataType,r=void 0===a?{}:a,o=t.dimension,s=void 0===o?e[0]:o,l=t.digit,c=void 0===l?2:l,u=n.tooltipVisible,d=n.legendVisible,m=e.slice();t.metrics?m=t.metrics:m.splice(e.indexOf(s),1);var h=d&&v(i,s),f=g(i,m);return{legend:h,tooltip:u&&b(r,f,c),radar:f,series:x({rows:i,dimension:s,metrics:m,radar:f})}},B=function(e,i,t,n){var a=t.dataType,r=void 0===a?"normal":a,o=t.dimension,s=void 0===o?e[0]:o,l=t.totalName,c=void 0===l?"总计":l,u=t.totalNum,d=t.remainName,m=void 0===d?"其他":d,h=t.xAxisName,f=void 0===h?s:h,p=t.axisVisible,v=void 0===p||p,b=t.digit,g=void 0===b?2:b,x=n.tooltipVisible,j=e.slice();j.splice(j.indexOf(s),1);var N=j[0],k=N,T=x&&y(r,g),V=i.reduce(function(e,i){return e+Number(i[N])},0).toFixed(2),E=A(V,u);return{tooltip:T,xAxis:O({dimension:s,rows:i,remainStatus:E,totalName:c,remainName:m,xAxisName:f,axisVisible:v}),yAxis:S({dataType:r,yAxisName:k,axisVisible:v,digit:g}),series:w({dataType:r,rows:i,dimension:s,metrics:N,totalNum:u,remainStatus:E,dataSum:V,digit:g})}};return{render:function(){var e=this,i=e.$createElement;return(e._self._c||i)("div",{ref:"canvas",staticClass:"ve-chart",style:e.canvasStyle})},staticRenderFns:[],name:"VeChart",mixins:[{props:{data:{type:[Object,Array],default:function(){return{}}},settings:{type:Object,default:function(){return{}}},width:{type:String,default:"auto"},height:{type:String,default:"400px"},beforeConfig:{type:Function},afterConfig:{type:Function},afterSetOption:{type:Function},afterSetOptionOnce:{type:Function},events:{type:Object},grid:{type:Object},colors:{type:Array},tooltipVisible:{type:Boolean,default:!0},legendVisible:{type:Boolean,default:!0},legendPosition:{type:String},markLine:{type:Object},markArea:{type:Object},markPoint:{type:Object},visualMap:{type:[Object,Array]},dataZoom:{type:[Object,Array]},toolbox:{type:Object},initOptions:{type:Object,default:function(){return{}}},title:Object,legend:Object,xAxis:Object,yAxis:Object,radar:Object,tooltip:Object,axisPointer:Object,brush:Object,geo:Object,timeline:Object,graphic:Object,series:[Object,Array],backgroundColor:[Object,String],textStyle:Object,animation:Object,theme:Object,themeName:String},watch:{data:{deep:!0,handler:function(e){e&&this.dataHandler(e)}},settings:{deep:!0,handler:function(e){e.type&&this.chartLib&&(this.chartHandler=this.chartLib[e.type]),this.dataHandler(this.data)}}},computed:{canvasStyle:function(){return{width:this.width,height:this.height,position:"relative"}},chartColor:function(){return this.colors||this.theme&&this.theme.color||N}},methods:{dataHandler:function(e){if(this.chartHandler){var i=e,t=i.columns,n=i.rows,a={tooltipVisible:this.tooltipVisible,legendVisible:this.legendVisible,echarts:this.echarts,color:this.chartColor};this.beforeConfig&&(e=this.beforeConfig(e));var r=this.chartHandler(t,n,this.settings,a);r&&("function"==typeof r.then?r.then(this.optionsHandler):this.optionsHandler(r))}},optionsHandler:function(e){var i=this;if(this.legendPosition&&e.legend&&(e.legend[this.legendPosition]=10,~["left","right"].indexOf(this.legendPosition)&&(e.legend.top="middle",e.legend.orient="vertical")),this.themeName||(e.color=this.chartColor),["grid","dataZoom","visualMap","toolbox","title","legend","xAxis","yAxis","radar","tooltip","axisPointer","brush","geo","timeline","graphic","series","backgroundColor","textStyle"].forEach(function(t){i[t]&&(e[t]=i[t])}),this.animation&&Object.keys(this.animation).forEach(function(t){e[t]=i.animation[t]}),this.markArea||this.markLine||this.markPoint){var t={markArea:this.markArea,markLine:this.markLine,markPoint:this.markPoint},n=e.series;"[object Array]"===L(n)?n.forEach(function(e){i.addMark(e,t)}):"[object Object]"===L(n)&&this.addMark(n,t)}this.afterConfig&&(e=this.afterConfig(e)),this.echarts.setOption(e,!0),this.afterSetOption&&this.afterSetOption(this.echarts),this.afterSetOptionOnce&&!this._once.afterSetOptionOnce&&(this._once.afterSetOptionOnce=this.afterSetOptionOnce(this.echarts))},addMark:function(e,i){Object.keys(i).forEach(function(t){i[t]&&(e[t]=i[t])})},init:function(){if(!this.echarts){var e=this.themeName||(this.theme?"outer-theme":"ve-chart");this.echarts=this.echartsLib.init(this.$refs.canvas,e,this.initOptions),this.data&&this.dataHandler(this.data),this.events&&this.bindEvents()}},bindEvents:function(){var e=this;Object.keys(this.events).forEach(function(i){e.echarts.on(i,e.events[i])})},addWatchToProps:function(){var e=this,i=this._watchers.map(function(e){return e.expression});Object.keys(this.$props).forEach(function(t){if(!~i.indexOf(t)){var n={};"[object Object]"===L(t)&&(n.deep=!0),e.$watch(t,function(){e.dataHandler(e.data)},n)}})},registerTheme:function(){e.registerTheme("outer-theme",this.theme)}},created:function(){this.echarts=null,this._once={},this.addWatchToProps(),this.theme&&this.registerTheme()},mounted:function(){this.init(),window.addEventListener("resize",this.echarts.resize)},beforeDestory:function(){window.removeEventListener("resize",this.echarts.resize),this.echarts.dispose()}}],created:function(){this.chartLib={bar:P,histogram:C,line:R,pie:$,ring:_,funnel:Z,radar:z,waterfall:B},this.chartHandler=this.chartLib[this.settings.type],this.echartsLib=e}}});
  