text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("echarts/lib/echarts"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/chart/bar")):"function"==typeof define&&define.amd?define(["echarts/lib/echarts","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/chart/bar"],e):t.VeBar=e(t.echarts)}(this,function(t){"use strict";function e(t){var e=rt.call(t,ot),n=t[ot];try{t[ot]=void 0;var i=!0}catch(t){}var r=at.call(t);return i&&(e?t[ot]=n:delete t[ot]),r}function n(t){return st.call(t)}function i(t){return null==t?void 0===t?lt:ct:ut&&ut in Object(t)?e(t):n(t)}function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function a(t){if(!r(t))return!1;var e=i(t);return e==ft||e==dt||e==ht||e==pt}function o(t){return!!yt&&yt in t}function s(t){if(null!=t){try{return mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function c(t){return!(!r(t)||o(t))&&(a(t)?wt:gt).test(s(t))}function l(t,e){return null==t?void 0:t[e]}function u(t,e){var n=l(t,e);return c(n)?n:void 0}function h(t,e,n){"__proto__"==e&&St?St(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function f(t,e){return t===e||t!==t&&e!==e}function d(t,e,n){var i=t[e];At.call(t,e)&&f(i,n)&&(void 0!==n||e in t)||h(t,e,n)}function p(t){return null!=t&&"object"==typeof t}function b(t){return"symbol"==typeof t||p(t)&&i(t)==Et}function y(t,e){if(kt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!b(t))||($t.test(t)||!Tt.test(t)||null!=e&&t in Object(e))}function m(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function v(t,e){for(var n=t.length;n--;)if(f(t[n][0],e))return n;return-1}function g(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function x(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function O(t,e){var n=t.__data__;return x(e)?n["string"==typeof e?"string":"hash"]:n.map}function _(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function j(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Ft);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var o=t.apply(this,i);return n.cache=a.set(r,o)||a,o};return n.cache=new(j.Cache||_),n}function w(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}function S(t){if("string"==typeof t)return t;if(kt(t))return w(t,S)+"";if(b(t))return It?It.call(t):"";var e=t+"";return"0"==e&&1/t==-qt?"-0":e}function A(t){return null==t?"":S(t)}function k(t,e){return kt(t)?t:y(t,e)?[t]:Gt(A(t))}function E(t,e){return!!(e=null==e?Zt:e)&&("number"==typeof t||Jt.test(t))&&t>-1&&t%1==0&&t<e}function T(t){if("string"==typeof t||b(t))return t;var e=t+"";return"0"==e&&1/t==-Kt?"-0":e}function $(t,e,n,i){if(!r(t))return t;for(var a=-1,o=(e=k(e,t)).length,s=o-1,c=t;null!=c&&++a<o;){var l=T(e[a]),u=n;if(a!=s){var h=c[l];void 0===(u=i?i(h,l,c):void 0)&&(u=r(h)?h:E(e[a+1])?[]:{})}d(c,l,u),c=c[l]}return t}function C(t,e,n){return null==t?t:$(t,e,n)}function P(t,e){for(var n=0,i=(e=k(e,t)).length;null!=t&&n<i;)t=t[T(e[n++])];return n&&n==i?t:void 0}function z(t,e,n){var i=null==t?void 0:P(t,e);return void 0===i?n:i}function N(t){var e=t.innerRows,n=t.dimAxisName,i=t.dimension,r=t.axisVisible,a=t.dimAxisType,o=t.dims;return i.map(function(t){return{type:"category",name:n,nameLocation:"middle",nameGap:22,data:"value"===a?L(o):e.map(function(e){return e[t]}),axisLabel:{formatter:function(t){return String(t)}},show:r}})}function L(t){for(var e=Math.max.apply(null,t),n=[],i=Math.min.apply(null,t);i<=e;i++)n.push(i);return n}function M(t){for(var e=t.meaAxisName,n=t.meaAxisType,i=t.axisVisible,r=t.digit,a=t.scale,o=t.min,s=t.max,c={type:"value",axisTick:{show:!1},show:i},l=[],u=0;u<2;u++)!function(t){n[t]?l[t]=Qt({},c,{axisLabel:{formatter:function(e){return I(e,n[t],r)}}}):l[t]=Qt({},c),l[t].name=e[t]||"",l[t].scale=a[t]||!1,l[t].min=o[t]||null,l[t].max=s[t]||null}(u);return l}function H(t){var e=t.axisSite,n=t.isHistogram,i=t.meaAxisType,r=t.digit,a=t.labelMap,o=n?e.right||[]:e.top||[];return a&&(o=o.map(function(t){return void 0===a[t]?t:a[t]})),{trigger:"axis",formatter:function(t){var e=[];return e.push(t[0].name+"<br>"),t.forEach(function(t){var n=t.seriesName,a=~o.indexOf(n)?i[1]:i[0];e.push(R(t.color)),e.push(n+": "),e.push(I(t.value,a,r)),e.push("<br>")}),e.join("")}}}function F(t,e){for(var n=Math.max.apply(null,e),i=[],r=Math.min.apply(null,e);r<=n;r++){var a=e.indexOf(r);~a?i.push(t[a]):i.push(null)}return i}function V(t){var e=t.innerRows,n=t.metrics,i=t.stack,r=t.axisSite,a=t.isHistogram,o=t.labelMap,s=t.itemStyle,c=t.label,l=t.showLine,u=void 0===l?[]:l,h=t.dimAxisType,f=t.barGap,d=t.opacity,p=t.dims,b=[],y={},m=a?r.right||[]:r.top||[],v=a?"yAxisIndex":"xAxisIndex",g=i&&Z(i);return n.forEach(function(t){y[t]=[]}),e.forEach(function(t){n.forEach(function(e){y[e].push(t[e])})}),!!(b=Object.keys(y).map(function(t,e){var n="value"===h?F(y[t],p):y[t],r=Ut({name:o&&o[t]||t,type:~u.indexOf(t)?"line":"bar",data:n},v,~m.indexOf(t)?"1":"0");i&&g[t]&&(r.stack=g[t]),c&&(r.label=c),s&&(r.itemStyle=s);var a=d||z(r,"itemStyle.normal.opacity");return"value"===h&&(r.barGap=f,r.barCategoryGap="1%",null==a&&(a=Xt)),null!=a&&C(r,"itemStyle.normal.opacity",a),r})).length&&b}function B(t){var e=t.metrics,n=t.labelMap,i=t.legendName;return i||n?{data:n?e.map(function(t){return null==n[t]?t:n[t]}):e,formatter:function(t){return i&&i[t]||t}}:{data:e}}function W(t,e){return t.map(function(t){return t[e[0]]})}(t="default"in t?t.default:t).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 R=function(t){return['<span style="',"background-color:"+t+";","display: inline-block;","width: 10px;","height: 10px;","border-radius: 50%;","margin-right:2px;",'"></span>'].join("")},G=["#19d4ae","#5ab1ef","#fa6e86","#ffb980","#0067a6","#c4b4e4","#d87a80","#9cbbff","#d9d0c7","#87a997","#d49ea2","#5b4947","#7ba3a8"],q=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(isNaN(+t))return t;for(var n=[{value:1e18,symbol:"E"},{value:1e15,symbol:"P"},{value:1e12,symbol:"T"},{value:1e9,symbol:"B"},{value:1e6,symbol:"M"},{value:1e3,symbol:"k"}],i=0;i<n.length;i++)if(Math.abs(t)>=n[i].value)return(t/n[i].value).toFixed(e)+n[i].symbol;return t.toString()},D=function(t){return String(t).replace(/^(\s+|-)?\d+(?=.?\d*($|\s))/g,function(t){return t.replace(/(?=(?!\b)(\d{3})+$)/g,",")})},I=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"-";if(null==t||isNaN(t))return i;switch(e){case"KMB":return q(t);case"percent":return parseFloat((100*t).toFixed(n))+"%";case"normal":return D(t);default:return t}},Z=function(t){var e={};return Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[t]=n})}),e},J=function(t){return JSON.parse(JSON.stringify(t))},K=function(t){return Object.prototype.toString.call(t)},U=function(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},Q=function(t){return"[object Array]"===K(t)},X=function(t){return"[object Object]"===K(t)},Y="object"==typeof global&&global&&global.Object===Object&&global,tt="object"==typeof self&&self&&self.Object===Object&&self,et=Y||tt||Function("return this")(),nt=et.Symbol,it=Object.prototype,rt=it.hasOwnProperty,at=it.toString,ot=nt?nt.toStringTag:void 0,st=Object.prototype.toString,ct="[object Null]",lt="[object Undefined]",ut=nt?nt.toStringTag:void 0,ht="[object AsyncFunction]",ft="[object Function]",dt="[object GeneratorFunction]",pt="[object Proxy]",bt=et["__core-js_shared__"],yt=function(){var t=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),mt=Function.prototype.toString,vt=/[\\^$.*+?()[\]{}|]/g,gt=/^\[object .+?Constructor\]$/,xt=Function.prototype,Ot=Object.prototype,_t=xt.toString,jt=Ot.hasOwnProperty,wt=RegExp("^"+_t.call(jt).replace(vt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),St=function(){try{var t=u(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),At=Object.prototype.hasOwnProperty,kt=Array.isArray,Et="[object Symbol]",Tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$t=/^\w*$/,Ct=u(Object,"create"),Pt="__lodash_hash_undefined__",zt=Object.prototype.hasOwnProperty,Nt=Object.prototype.hasOwnProperty,Lt="__lodash_hash_undefined__";m.prototype.clear=function(){this.__data__=Ct?Ct(null):{},this.size=0},m.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},m.prototype.get=function(t){var e=this.__data__;if(Ct){var n=e[t];return n===Pt?void 0:n}return zt.call(e,t)?e[t]:void 0},m.prototype.has=function(t){var e=this.__data__;return Ct?void 0!==e[t]:Nt.call(e,t)},m.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ct&&void 0===e?Lt:e,this};var Mt=Array.prototype.splice;g.prototype.clear=function(){this.__data__=[],this.size=0},g.prototype.delete=function(t){var e=this.__data__,n=v(e,t);return!(n<0||(n==e.length-1?e.pop():Mt.call(e,n,1),--this.size,0))},g.prototype.get=function(t){var e=this.__data__,n=v(e,t);return n<0?void 0:e[n][1]},g.prototype.has=function(t){return v(this.__data__,t)>-1},g.prototype.set=function(t,e){var n=this.__data__,i=v(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};var Ht=u(et,"Map");_.prototype.clear=function(){this.size=0,this.__data__={hash:new m,map:new(Ht||g),string:new m}},_.prototype.delete=function(t){var e=O(this,t).delete(t);return this.size-=e?1:0,e},_.prototype.get=function(t){return O(this,t).get(t)},_.prototype.has=function(t){return O(this,t).has(t)},_.prototype.set=function(t,e){var n=O(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};var Ft="Expected a function";j.Cache=_;var Vt=500,Bt=/^\./,Wt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/\\(\\)?/g,Gt=function(t){var e=j(t,function(t){return n.size===Vt&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return Bt.test(t)&&e.push(""),t.replace(Wt,function(t,n,i,r){e.push(i?r.replace(Rt,"$1"):n||t)}),e}),qt=1/0,Dt=nt?nt.prototype:void 0,It=Dt?Dt.toString:void 0,Zt=9007199254740991,Jt=/^(?:0|[1-9]\d*)$/,Kt=1/0,Ut=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Qt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Xt=.5,Yt=function(t,e,n,i){var r=J(e),a=n.axisSite,o=void 0===a?{}:a,s=n.dimension,c=void 0===s?[t[0]]:s,l=n.stack,u=void 0===l?{}:l,h=n.axisVisible,f=void 0===h||h,d=n.digit,p=void 0===d?2:d,b=n.dataOrder,y=void 0!==b&&b,m=n.scale,v=void 0===m?[!1,!1]:m,g=n.min,x=void 0===g?[null,null]:g,O=n.max,_=void 0===O?[null,null]:O,j=n.legendName,w=n.labelMap,S=n.label,A=n.itemStyle,k=n.showLine,E=n.barGap,T=void 0===E?"-100%":E,$=n.opacity,C=i.tooltipVisible,P=i.legendVisible,z=t.slice();o.top&&o.bottom?z=o.top.concat(o.bottom):o.bottom&&!o.right?z=o.bottom:n.metrics?z=n.metrics:z.splice(t.indexOf(c[0]),1);var L=n.xAxisType||["normal","normal"],F=n.yAxisType||"category",R=n.xAxisName||[],G=n.yAxisName||"";if(y){var q=y.label,D=y.order;q&&D?r.sort(function(t,e){return"desc"===D?t[q]-e[q]:e[q]-t[q]}):console.warn("Need to provide name and order parameters")}var I=W(r,c),Z=P&&B({metrics:z,labelMap:w,legendName:j}),K=N({innerRows:r,dimAxisName:G,dimension:c,axisVisible:f,dimAxisType:F,dims:I}),U=M({meaAxisName:R,meaAxisType:L,axisVisible:f,digit:p,scale:v,min:x,max:_}),Q={axisSite:o,isHistogram:!1,meaAxisType:L,digit:p,labelMap:w};return{legend:Z,yAxis:K,series:V({innerRows:r,metrics:z,stack:u,axisSite:o,isHistogram:!1,labelMap:w,itemStyle:A,label:S,showLine:k,dimAxisType:F,dimension:c,barGap:T,opacity:$,dims:I}),xAxis:U,tooltip:C&&H(Q)}},te={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-charts-component-loading"},[n("div",{staticClass:"loader"},[n("div",{staticClass:"loading-spinner"},[n("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[n("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])])])])},staticRenderFns:[]},ee={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"v-charts-data-empty"},[t._v(" 暂无数据 ")])},staticRenderFns:[]};return{name:"VeBar",mixins:[{render:function(t){return t("div",{class:[U(this.$options.name||this.$options._componentTag)],style:this.canvasStyle},[t("div",{style:this.canvasStyle,ref:"canvas"}),t(te,{style:{display:this.loading?"":"none"}}),t(ee,{style:{display:this.dataEmpty?"":"none"}}),this.$slots.default])},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,Array],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,loading:Boolean,dataEmpty:Boolean,extend:Object,judgeWidth:{type:Boolean,default:!0},widthChangeDelay:{type:Number,default:300}},watch:{data:{deep:!0,handler:function(t){t&&this.dataHandler(t)}},settings:{deep:!0,handler:function(t){t.type&&this.chartLib&&(this.chartHandler=this.chartLib[t.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||G}},methods:{dataHandler:function(t){if(this.chartHandler){var e=t,n=e.columns,i=void 0===n?[]:n,r=e.rows,a=void 0===r?[]:r,o={tooltipVisible:this.tooltipVisible,legendVisible:this.legendVisible,echarts:this.echarts,color:this.chartColor};this.beforeConfig&&(t=this.beforeConfig(t));var s=this.chartHandler(i,a,this.settings,o);s&&("function"==typeof s.then?s.then(this.optionsHandler):this.optionsHandler(s))}},resize:function(){this.echarts.resize()},optionsHandler:function(t){var e=this;if(this.legendPosition&&t.legend&&(t.legend[this.legendPosition]=10,~["left","right"].indexOf(this.legendPosition)&&(t.legend.top="middle",t.legend.orient="vertical")),this.themeName||(t.color=this.chartColor),["grid","dataZoom","visualMap","toolbox","title","legend","xAxis","yAxis","radar","tooltip","axisPointer","brush","geo","timeline","graphic","series","backgroundColor","textStyle"].forEach(function(n){e[n]&&(t[n]=e[n])}),this.animation&&Object.keys(this.animation).forEach(function(n){t[n]=e.animation[n]}),this.markArea||this.markLine||this.markPoint){var n={markArea:this.markArea,markLine:this.markLine,markPoint:this.markPoint},i=t.series;"[object Array]"===K(i)?i.forEach(function(t){e.addMark(t,n)}):"[object Object]"===K(i)&&this.addMark(i,n)}this.extend&&Object.keys(this.extend).forEach(function(n){"function"==typeof e.extend[n]?t[n]=e.extend[n](t[n]):Q(t[n])&&X(t[n][0])?t[n].forEach(function(i,r){t[n][r]=Qt({},i,e.extend[n])}):X(t[n])?t[n]=Qt({},t[n],e.extend[n]):t[n]=e.extend[n]}),this.afterConfig&&(t=this.afterConfig(t)),this.echarts.setOption(t,!0),this.judgeWidth&&this.judgeWidthHandler(t),this.afterSetOption&&this.afterSetOption(this.echarts),this.afterSetOptionOnce&&!this._once.afterSetOptionOnce&&(this._once.afterSetOptionOnce=this.afterSetOptionOnce(this.echarts))},judgeWidthHandler:function(t){var e=this;this.$el.clientWidth?this.echarts.resize():this.$nextTick(function(t){e.$el.clientWidth?e.echarts.resize():setTimeout(function(t){e.echarts.resize(),e.$el.clientWidth||console.warn(" Can't get dom width or height ")},e.widthChangeDelay)})},addMark:function(t,e){Object.keys(e).forEach(function(n){e[n]&&(t[n]=e[n])})},init:function(){if(!this.echarts){var t=this.themeName||(this.theme?"outer-theme":"ve-chart");this.echarts=this.echartsLib.init(this.$refs.canvas,t,this.initOptions),this.data&&this.dataHandler(this.data),this.events&&this.bindEvents()}},bindEvents:function(){var t=this;Object.keys(this.events).forEach(function(e){t.echarts.on(e,t.events[e])})},addWatchToProps:function(){var t=this,e=this._watchers.map(function(t){return t.expression});Object.keys(this.$props).forEach(function(n){if(!~e.indexOf(n)){var i={};"[object Object]"===K(n)&&(i.deep=!0),t.$watch(n,function(){t.dataHandler(t.data)},i)}})},registerTheme:function(){t.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)},beforeDestroy:function(){window.removeEventListener("resize",this.echarts.resize),this.echarts.dispose()}}],created:function(){this.chartHandler=Yt,this.echartsLib=t}}});
  