!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("echarts/lib/echarts"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend")):"function"==typeof define&&define.amd?define(["echarts/lib/echarts","echarts/lib/component/tooltip","echarts/lib/component/legend"],t):e.VeChart=t(e.echarts)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={categoryAxis:{axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1}},line:{smooth:!0},grid:{containLabel:!0,left:10,right:10}},i=["#19d4ae","#5ab1ef","#fa6e86","#ffb980","#0067a6","#c4b4e4","#d87a80","#9cbbff","#d9d0c7","#87a997","#d49ea2","#5b4947","#7ba3a8"],n=function(e){return[''].join("")},a={th:3,mi:6,bi:9,tr:12},r={zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0,abbrLabel:{th:"k",mi:"m",bi:"b",tr:"t"}},o=1e12,s=1e9,l=1e6,c=1e3;function u(e,t,i,n){var a=e.toString().split("."),r=t-(n||0),o=2===a.length?Math.min(Math.max(a[1].length,r),t):r,s=Math.pow(10,o),l=(i(e+"e+"+o)/s).toFixed(o);if(n>t-o){var c=new RegExp("\\.?0{1,"+(n-(t-o))+"}$");l=l.replace(c,"")}return l}function d(e,t,i,n){var r=Math.abs(t),d=!1,m=!1,h="",f="",p=!1,v=void 0,y=void 0;i=i||"",t=t||0,~i.indexOf("(")?(d=!0,i=i.replace(/[(|)]/g,"")):(~i.indexOf("+")||~i.indexOf("-"))&&(y=~i.indexOf("+")?i.indexOf("+"):t<0?i.indexOf("-"):-1,i=i.replace(/[+|-]/g,"")),~i.indexOf("a")&&(v=!!(v=i.match(/a(k|m|b|t)?/))&&v[1],~i.indexOf(" a")&&(h=" "),i=i.replace(new RegExp(h+"a[kmbt]?"),""),r>=o&&!v||"t"===v?(h+=e.abbrLabel.tr,t/=o):r=s&&!v||"b"===v?(h+=e.abbrLabel.bi,t/=s):r=l&&!v||"m"===v?(h+=e.abbrLabel.mi,t/=l):(r=c&&!v||"k"===v)&&(h+=e.abbrLabel.th,t/=c)),~i.indexOf("[.]")&&(m=!0,i=i.replace("[.]","."));var b=t.toString().split(".")[0],g=i.split(".")[1],x=i.indexOf(","),O=(i.split(".")[0].split(",")[0].match(/0/g)||[]).length;if(g?(b=(f=~g.indexOf("[")?u(t,(g=(g=g.replace("]","")).split("["))[0].length+g[1].length,n,g[1].length):u(t,g.length,n)).split(".")[0],f=~f.indexOf(".")?"."+f.split(".")[1]:"",m&&0==+f.slice(1)&&(f="")):b=u(t,0,n),h&&!v&&+b>=1e3&&h!==a.trillion&&(b=""+ +b/1e3,h=a.million),~b.indexOf("-")&&(b=b.slice(1),p=!0),b.length0;A--)b="0"+b;x>-1&&(b=b.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")),i.indexOf(".")||(b="");var S=b+f+(h||"");return d?S=(d&&p?"(":"")+S+(d&&p?")":""):y>=0?S=0===y?(p?"-":"+")+S:S+(p?"-":"+"):p&&(S="-"+S),S}function m(e,t){Object.keys(t).forEach(function(i){e[i]=t[i]})}var h={},f={};function p(e,t,i){return function(e,t,i){t=t||h.defaultFormat,i=i||Math.round;var n=void 0,a=void 0;if(0===e&&null!==h.zeroFormat)n=h.zeroFormat;else if(null===e&&null!==h.nullFormat)n=h.nullFormat;else{for(var r in f)if(f[r]&&t.match(f[r].regexp)){a=f[r].format;break}n=(a=a||d.bind(null,h))(e,t,i,p)}return n}(0===e||void 0===e?0:null===e||function(e){return"number"==typeof e&&isNaN(e)}(e)?null:"string"==typeof e?h.zeroFormat&&e===h.zeroFormat?0:h.nullFormat&&e===h.nullFormat||!e.replace(/[^0-9]+/g,"").length?null:+e:+e||null,t,i)}function v(e,t){var i=null;return function(){var n=this,a=arguments;clearTimeout(i),i=setTimeout(function(){e.apply(n,a)},t)}}function y(e,t,i){if(t){var n=e,a=t.split(".");a.forEach(function(e,t){t===a.length-1?n[e]=i:(n[e]||(n[e]={}),n=n[e])})}}function b(e){return Object.prototype.toString.call(e)}function g(e){return"[object Object]"===b(e)}function x(e){return"[object Array]"===b(e)}function O(e){return JSON.parse(JSON.stringify(e))}m(h,r),p.options=h,p._numberToFormat=d.bind(null,h),p.register=function(e,t){f[e]=t},p.unregister=function(e){f[e]=null},p.setOptions=function(e){m(h,e)},p.reset=function(){m(h,r)},p.register("percentage",{regexp:/%/,format:function(e,t,i,n){var a=~t.indexOf(" %")?" ":"",r=void 0;return n.options.scalePercentBy100&&(e*=100),t=t.replace(/\s?%/,""),~(r=n._numberToFormat(e,t,i)).indexOf(")")?((r=r.split("")).splice(-1,0,a+"%"),r=r.join("")):r=r+a+"%",r}});var A=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"-";if(isNaN(e))return n;if(!t)return e;if("[object Function]"===b(t))return t(e,p);i=isNaN(i)?0:++i;var a=".["+new Array(i).join(0)+"]",r=t;switch(t){case"KMB":r=i?"0,0"+a+"a":"0,0a";break;case"normal":r=i?"0,0"+a:"0,0";break;case"percent":r=i?"0,0"+a+"%":"0,0.[00]%"}return p(e,r)},S=function(e){var t={};return Object.keys(e).forEach(function(i){e[i].forEach(function(e){t[e]=i})}),t},w=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},N=Object.assign||function(e){for(var t=1;t"),e.forEach(function(e){var i=e.seriesName,o=~s.indexOf(i)?a[1]:a[0];t.push(n(e.color)),t.push(i+": "),t.push(A(e.value,o,r)),t.push("
")}),t.join("")}}}function M(e){var t,i=e.innerRows,n=e.metrics,a=e.stack,r=e.axisSite,o=e.isHistogram,s=e.labelMap,l=e.itemStyle,c=e.label,u=e.showLine,d=void 0===u?[]:u,m=e.dimAxisType,h=e.barGap,f=e.opacity,p=e.dims,v={},b=o?r.right||[]:r.top||[],g=o?"yAxisIndex":"xAxisIndex",x=a&&S(a);return n.forEach(function(e){v[e]=[]}),i.forEach(function(e){n.forEach(function(t){v[t].push(e[t])})}),!!(t=Object.keys(v).map(function(e,t){var i="value"===m?function(e,t){for(var i=Math.max.apply(null,t),n=[],a=Math.min.apply(null,t);a<=i;a++){var r=t.indexOf(a);~r?n.push(e[r]):n.push(null)}return n}(v[e],p):v[e],n=w({name:null!=s[e]?s[e]:e,type:~d.indexOf(e)?"line":"bar",data:i},g,~b.indexOf(e)?"1":"0");a&&x[e]&&(n.stack=x[e]),c&&(n.label=c),l&&(n.itemStyle=l);var r=f||function(e,t,i){if(!t)return e;var n=e;return t.split(".").some(function(e,t){if(void 0===n[e])return n=i,!0;n=n[e]}),n}(n,"itemStyle.normal.opacity");return"value"===m&&(n.barGap=h,n.barCategoryGap="1%",null==r&&(r=j)),null!=r&&y(n,"itemStyle.normal.opacity",r),n})).length&&t}function L(e){var t=e.metrics,i=e.labelMap,n=e.legendName;return n||i?{data:i?t.map(function(e){return null==i[e]?e:i[e]}):t,formatter:function(e){return null!=n[e]?n[e]:e}}:{data:t}}function V(e,t){return e.map(function(e){return e[t[0]]})}var F=function(e,t,i,n){var a=O(t),r=i.axisSite,o=void 0===r?{}:r,s=i.dimension,l=void 0===s?[e[0]]:s,c=i.stack,u=void 0===c?{}:c,d=i.axisVisible,m=void 0===d||d,h=i.digit,f=void 0===h?2:h,p=i.dataOrder,v=void 0!==p&&p,y=i.scale,b=void 0===y?[!1,!1]:y,g=i.min,x=void 0===g?[null,null]:g,A=i.max,S=void 0===A?[null,null]:A,w=i.legendName,N=void 0===w?{}:w,j=i.labelMap,F=void 0===j?{}:j,C=i.label,z=i.itemStyle,H=i.showLine,P=i.barGap,R=void 0===P?"-100%":P,$=i.opacity,_=n.tooltipVisible,B=n.legendVisible,D=e.slice();o.top&&o.bottom?D=o.top.concat(o.bottom):o.bottom&&!o.right?D=o.bottom:i.metrics?D=i.metrics:D.splice(e.indexOf(l[0]),1);var W=i.xAxisType||["normal","normal"],G=i.yAxisType||"category",Z=i.xAxisName||[],q=i.yAxisName||"";if(v){var I=v.label,Y=v.order;I&&Y?a.sort(function(e,t){return"desc"===Y?e[I]-t[I]:t[I]-e[I]}):console.warn("Need to provide name and order parameters")}var J=V(a,l),K=B&&L({metrics:D,labelMap:F,legendName:N}),Q=T({innerRows:a,dimAxisName:q,dimension:l,axisVisible:m,dimAxisType:G,dims:J}),U=k({meaAxisName:Z,meaAxisType:W,axisVisible:m,digit:f,scale:b,min:x,max:S});return{legend:K,yAxis:Q,series:M({innerRows:a,metrics:D,stack:u,axisSite:o,isHistogram:!1,labelMap:F,itemStyle:z,label:C,showLine:H,dimAxisType:G,dimension:l,barGap:R,opacity:$,dims:J}),xAxis:U,tooltip:_&&E({axisSite:o,isHistogram:!1,meaAxisType:W,digit:f,labelMap:F})}},C=function(e,t,i,n){var a=O(t),r=i.axisSite,o=void 0===r?{}:r,s=i.dimension,l=void 0===s?[e[0]]:s,c=i.stack,u=void 0===c?{}:c,d=i.axisVisible,m=void 0===d||d,h=i.digit,f=void 0===h?2:h,p=i.dataOrder,v=void 0!==p&&p,y=i.scale,b=void 0===y?[!1,!1]:y,g=i.min,x=void 0===g?[null,null]:g,A=i.max,S=void 0===A?[null,null]:A,w=i.labelMap,N=void 0===w?{}:w,j=i.legendName,F=void 0===j?{}:j,C=i.label,z=i.itemStyle,H=i.showLine,P=i.barGap,R=void 0===P?"-100%":P,$=i.opacity;if(v){var _=v.label,B=v.order;_&&B?a.sort(function(e,t){return"desc"===B?e[_]-t[_]:t[_]-e[_]}):console.warn("Need to provide name and order parameters")}var D=n.tooltipVisible,W=n.legendVisible,G=e.slice();o.left&&o.right?G=o.left.concat(o.right):o.left&&!o.right?G=o.left:i.metrics?G=i.metrics:G.splice(e.indexOf(l[0]),1);var Z=i.yAxisType||["normal","normal"],q=i.xAxisType||"category",I=i.yAxisName||[],Y=i.xAxisName||"",J=V(a,l),K=W&&L({metrics:G,labelMap:N,legendName:F}),Q=T({innerRows:a,dimAxisName:Y,dimension:l,axisVisible:m,dimAxisType:q,dims:J});return{legend:K,yAxis:k({meaAxisName:I,meaAxisType:Z,axisVisible:m,digit:f,scale:b,min:x,max:S}),series:M({innerRows:a,metrics:G,stack:u,axisSite:o,isHistogram:!0,labelMap:N,itemStyle:z,label:C,showLine:H,dimAxisType:q,dimension:l,barGap:R,opacity:$,dims:J}),xAxis:Q,tooltip:D&&E({axisSite:o,isHistogram:!0,meaAxisType:Z,digit:f,labelMap:N})}};var z=function(e,t,i,a){t=x(t)?t:[],e=x(e)?e:[];var r=i.axisSite,o=void 0===r?{}:r,s=i.yAxisType,l=void 0===s?["normal","normal"]:s,c=i.xAxisType,u=void 0===c?"category":c,d=i.yAxisName,m=void 0===d?[]:d,h=i.dimension,f=void 0===h?[e[0]]:h,p=i.xAxisName,v=void 0===p?[]:p,y=i.axisVisible,b=void 0===y||y,g=i.area,O=i.stack,w=i.scale,j=void 0===w?[!1,!1]:w,T=i.min,k=void 0===T?[null,null]:T,E=i.max,M=void 0===E?[null,null]:E,L=i.nullAddZero,V=void 0!==L&&L,F=i.digit,C=void 0===F?2:F,z=i.legendName,H=void 0===z?{}:z,P=i.labelMap,R=void 0===P?{}:P,$=i.label,_=i.itemStyle,B=i.lineStyle,D=i.areaStyle,W=a.tooltipVisible,G=a.legendVisible,Z=a.tooltipFormatter,q=e.slice();o.left&&o.right?q=o.left.concat(o.right):o.left&&!o.right?q=o.left:i.metrics?q=i.metrics:q.splice(e.indexOf(f[0]),1);var I=G&&function(e){var t=e.metrics,i=e.legendName,n=e.labelMap;return i||n?{data:n?t.map(function(e){return null==n[e]?e:n[e]}):t,formatter:function(e){return null!=i[e]?i[e]:e}}:{data:t}}({metrics:q,legendName:H,labelMap:R}),Y=W&&function(e){var t=e.axisSite,i=e.yAxisType,a=e.digit,r=e.labelMap,o=e.xAxisType,s=e.tooltipFormatter,l=t.right||[],c=r?l.map(function(e){return void 0===r[e]?e:r[e]}):l;return{trigger:"axis",formatter:function(e){if(s)return s.apply(null,arguments);var t=[],r=e[0],l=r.name,u=r.axisValueLabel,d=l||u;return t.push(d+"
"),e.forEach(function(e){var r,s=~c.indexOf(e.seriesName)?i[1]:i[0],l="category"===o?e.data:e.data[1];r=A(l,s,a),t.push(n(e.color)),t.push(e.seriesName+": "+r),t.push("
")}),t.join("")}}}({axisSite:o,yAxisType:l,digit:C,labelMap:R,xAxisType:u,tooltipFormatter:Z}),J=function(e){var t=e.dimension,i=e.rows,n=e.xAxisName,a=e.axisVisible,r=e.xAxisType;return t.map(function(e,t){return{type:r,nameLocation:"middle",nameGap:22,name:n[t]||"",axisTick:{show:!0,lineStyle:{color:"#eee"}},data:i.map(function(t){return t[e]}),show:a}})}({dimension:f,rows:t,xAxisName:v,axisVisible:b,xAxisType:u}),K=function(e){for(var t=e.yAxisName,i=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=function(e){i[e]?c[e]=N({},l,{axisLabel:{formatter:function(t){return A(t,i[e],s)}}}):c[e]=N({},l),c[e].name=t[e]||"",c[e].scale=a[e]||!1,c[e].min=r[e]||null,c[e].max=o[e]||null},d=0;d<2;d++)u(d);return c}({yAxisName:m,yAxisType:l,axisVisible:b,scale:j,min:k,max:M,digit:C});return{legend:I,xAxis:J,series:function(e){var t=e.rows,i=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=e.xAxisType,h=e.dimension,f=[],p={},v=r&&S(r);return n.forEach(function(e){p[e]=[]}),t.forEach(function(e){n.forEach(function(t){var i=null;null!=e[t]?i=e[t]:o&&(i=0);var n="category"===m?i:[e[h[0]],i];p[t].push(n)})}),n.forEach(function(e){var t={name:null!=s[e]?s[e]:e,type:"line",data:p[e]};a&&(t.areaStyle={normal:{}}),i.right&&(t.yAxisIndex=~i.right.indexOf(e)?1:0),r&&v[e]&&(t.stack=v[e]),l&&(t.label=l),c&&(t.itemStyle=c),u&&(t.lineStyle=u),d&&(t.areaStyle=d),f.push(t)}),f}({rows:t,axisSite:o,metrics:q,area:g,stack:O,nullAddZero:V,labelMap:R,label:$,itemStyle:_,lineStyle:B,areaStyle:D,xAxisType:u,dimension:f}),yAxis:K,tooltip:Y}},H=[80,100],P=[20,100];var R=function(e,t,i,a,r){var o=O(t),s=i.dataType,l=void 0===s?"normal":s,c=i.percentShow,u=i.dimension,d=void 0===u?e[0]:u,m=i.metrics,h=void 0===m?e[1]:m,f=i.roseType,p=void 0!==f&&f,v=i.radius,y=void 0===v?r?p?P:H:100:v,b=i.offsetY,g=void 0===b?200:b,x=i.legendLimit,S=void 0===x?30:x,w=i.selectedMode,j=void 0!==w&&w,T=i.hoverAnimation,k=void 0===T||T,E=i.digit,M=void 0===E?2:E,L=i.legendName,V=void 0===L?{}:L,F=i.label,C=void 0!==F&&F,z=i.level,R=void 0!==z&&z,$=i.limitShowNum,_=void 0===$?0:$,B=i.labelLine,D=i.itemStyle,W=a.tooltipVisible,G=a.legendVisible;return _&&o.sort(function(e,t){return t[h]-e[h]}),{series:function(e){var t=e.innerRows,i=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=e.labelLine,y=e.itemStyle,b=[],g={},x=[];h?(h.forEach(function(e,t){e.forEach(function(e){g[e]=t})}),t.forEach(function(e){var t=g[e[a]];void 0!==t&&(x[t]?x[t].push(e):x[t]=[e])})):x.push(t);var O={type:"pie",selectedMode:l,hoverAnimation:c,roseType:d,center:["50%",s]},S=x.length;if(x.forEach(function(e,t){var s=N({data:[]},O),l=o/S;if(t){var c=l+o/(2*S)*(2*t-1),d=c+o/(2*S);s.radius=[c,d]}else s.radius=p?o:l;S>1&&0===t&&(s.label={normal:{position:"inner"}}),m&&(s.label=m),v&&(s.labelLine=v),y&&(s.itemStyle=y),n&&(s.label={normal:{show:!0,position:S>1&&0===t?"inner":"outside",formatter:function(e){var t=[];return t.push(e.name+":"),t.push(A(e.value,i,u)),t.push("("+e.percent+"%)"),t.join(" ")}}}),s.data=e.map(function(e){return{name:e[a],value:e[r]}}),b.push(s)}),f&&f"+n+":"),i.push(A(a,t,r)),i.push("("+o+")")})):(i.push(e.name+":"),i.push(A(e.value,t,r)),i.push("("+e.percent+"%)")),i.join(" ")}}}({dataType:l,innerRows:o,limitShowNum:_,digit:M,metrics:h,dimension:d})}},$=function(e,t,i,n){return R(e,t,i,n,!0)};var _=function(e,t,i,a){var r=e.slice(),o=t.slice(),s=i.dataType,l=void 0===s?"normal":s,c=i.dimension,u=void 0===c?r[0]:c,d=i.sequence,m=void 0===d?o.map(function(e){return e[u]}):d,h=i.digit,f=void 0===h?2:h,p=i.ascending,v=i.label,y=i.labelLine,b=i.legendName,g=void 0===b?{}:b,x=i.itemStyle,O=i.filterZero,S=i.useDefaultOrder,w=a.tooltipVisible,N=a.legendVisible,j=void 0;if(i.metrics)j=i.metrics;else{var T=r.slice();T.splice(r.indexOf(u),1),j=T[0]}return{tooltip:w&&function(e,t){return{trigger:"item",formatter:function(i){var a=[];return a.push(n(i.color)),a.push(i.name+": "+A(i.data.realValue,e,t)),a.join("")}}}(l,f),legend:N&&function(e){var t=e.data,i=e.legendName;return{data:t,formatter:function(e){return null!=i[e]?i[e]:e}}}({data:m,legendName:g}),series:function(e){var t=e.dimension,i=e.metrics,n=e.rows,a=e.sequence,r=e.ascending,o=e.label,s=e.labelLine,l=e.itemStyle,c=e.filterZero,u=e.useDefaultOrder,d={type:"funnel"},m=n.sort(function(e,i){return a.indexOf(e[t])-a.indexOf(i[t])});c&&(m=m.filter(function(e){return e[i]}));var h=!1;m.some(function(e,t){if(t&&e[i]>m[t-1][i])return h=!0,!0});var f=100/m.length;return d.data=h&&!u?m.slice().reverse().map(function(e,n){return{name:e[t],value:(n+1)*f,realValue:e[i]}}):m.map(function(e){return{name:e[t],value:e[i],realValue:e[i]}}),r&&(d.sort="ascending"),o&&(d.label=o),s&&(d.labelLine=s),l&&(d.itemStyle=l),d}({dimension:u,metrics:j,rows:o,sequence:m,ascending:p,label:v,labelLine:y,itemStyle:x,filterZero:O,useDefaultOrder:S})}};var B=function(e,t,i,a){var r=i.dataType,o=void 0===r?{}:r,s=i.legendName,l=void 0===s?{}:s,c=i.labelMap,u=void 0===c?{}:c,d=i.dimension,m=void 0===d?e[0]:d,h=i.digit,f=void 0===h?2:h,p=i.label,v=i.itemStyle,y=i.lineStyle,b=i.areaStyle,g=a.tooltipVisible,x=a.legendVisible,O=e.slice();i.metrics?O=i.metrics:O.splice(e.indexOf(m),1);var S=x&&function(e,t,i){return{data:e.map(function(e){return e[t]}),formatter:function(e){return null!=i[e]?i[e]:e}}}(t,m,l),w=function(e,t,i){var n={indicator:[],shape:"circle",splitNumber:5},a={};return e.forEach(function(e){t.forEach(function(t){var n=null!=i[t]?i[t]:t;a[n]?a[n].push(e[t]):a[n]=[e[t]]})}),n.indicator=Object.keys(a).map(function(e){return{name:e,max:Math.max.apply(null,a[e])}}),n}(t,O,u);return{legend:S,tooltip:g&&function(e,t,i){var a=[],r=[];return t.indicator.map(function(t,i){a[i]=e[t.name],r[i]=t.name}),{formatter:function(e){var t=[];return t.push(n(e.color)),t.push(e.name+"
"),e.data.value.forEach(function(e,n){t.push(r[n]+": "),t.push(A(e,a[n],i)+"
")}),t.join("")}}}(o,w,f),radar:w,series:function(e){var t=e.rows,i=e.dimension,n=e.metrics,a=e.radar,r=e.label,o=e.itemStyle,s=e.lineStyle,l=e.labelMap,c=e.areaStyle,u={};a.indicator.forEach(function(e,t){var i=e.name;u[i]=t});var d=t.map(function(e){var t={value:[],name:e[i]};return Object.keys(e).forEach(function(i){if(~n.indexOf(i)){var a=null!=l[i]?u[l[i]]:u[i];t.value[a]=e[i]}}),t}),m={name:i,type:"radar",data:d};return r&&(m.label=r),o&&(m.itemStyle=o),s&&(m.lineStyle=s),c&&(m.areaStyle=c),[m]}({rows:t,dimension:m,metrics:O,radar:w,label:p,itemStyle:v,lineStyle:y,labelMap:u,areaStyle:b})}};var D=function(e,t,i,n){var a=i.dataType,r=void 0===a?"normal":a,o=i.dimension,s=void 0===o?e[0]:o,l=i.totalName,c=void 0===l?"总计":l,u=i.totalNum,d=i.remainName,m=void 0===d?"其他":d,h=i.xAxisName,f=void 0===h?s:h,p=i.labelMap,v=void 0===p?{}:p,y=i.axisVisible,b=void 0===y||y,g=i.digit,x=void 0===g?2:g,O=n.tooltipVisible,S=e.slice();S.splice(S.indexOf(s),1);var w=S[0],j=w,T=O&&function(e,t){return{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(i){var n=i[1];return[n.name+"
"+n.seriesName+" :",""+A(n.value,e,t)].join("")}}}(r,x),k=parseFloat(t.reduce(function(e,t){return e+Number(t[w])},0).toFixed(x)),E=function(e,t){return t?t>e?"have-remain":"none-remain":"not-total"}(k,u);return{tooltip:T,xAxis:function(e){var t=e.dimension,i=e.rows,n=e.remainStatus,a=e.totalName,r=e.remainName,o=e.labelMap,s=e.xAxisName,l=e.axisVisible,c=[a].concat(i.map(function(e){return e[t]}));return"have-remain"===n&&(c=c.concat([r])),{type:"category",name:o&&o[s]||s,splitLine:{show:!1},data:c,show:l}}({dimension:s,rows:t,remainStatus:E,totalName:c,remainName:m,xAxisName:f,labelMap:v,axisVisible:b}),yAxis:function(e){var t=e.dataType,i=e.yAxisName,n=e.axisVisible,a=e.digit,r=e.labelMap;return{type:"value",name:null!=r[i]?r[i]:i,axisTick:{show:!1},axisLabel:{formatter:function(e){return A(e,t,a)}},show:n}}({dataType:r,yAxisName:j,axisVisible:b,digit:x,labelMap:v}),series:function(e){var t=e.dataType,i=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=i.map(function(e){return e[n]});"have-remain"===r?(d=[0].concat(i.map(function(e){return u-=e[n]})).concat([0]),m=[a].concat(h).concat([a-o])):(d=[0].concat(i.map(function(e){return c-=e[n]})),m=[o].concat(h));var f=[];return f.push(N({name:"辅助",itemStyle:{normal:{opacity:0},emphasis:{opacity:0}},data:d},l)),f.push(N({name:"数值",label:{normal:{show:!0,position:"top",formatter:function(e){return A(e.value,t,s)}}},data:m},l)),f}({dataType:r,rows:t,dimension:s,metrics:w,totalNum:u,remainStatus:E,dataSum:k,digit:x})}},W={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"v-charts-component-loading"},[t("div",{staticClass:"loader"},[t("div",{staticClass:"loading-spinner"},[t("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[t("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])])])])},staticRenderFns:[]},G={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"v-charts-data-empty"},[this._v(" 暂无数据 ")])},staticRenderFns:[]},Z=["initOptions","loading","dataEmpty","judgeWidth","widthChangeDelay"],q={render:function(e){return e("div",{class:[(t=this.$options.name||this.$options._componentTag,t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())],style:this.canvasStyle},[e("div",{style:this.canvasStyle,ref:"canvas"}),e(G,{style:{display:this.dataEmpty?"":"none"}}),e(W,{style:{display:this.loading?"":"none"}}),this.$slots.default]);var t},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,Array]},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,Array]},initOptions:{type:Object,default:function(){return{}}},title:[Object,Array],legend:[Object,Array],xAxis:[Object,Array],yAxis:[Object,Array],radar:Object,tooltip:Object,axisPointer:[Object,Array],brush:[Object,Array],geo:[Object,Array],timeline:[Object,Array],graphic:[Object,Array],series:[Object,Array],backgroundColor:[Object,String],textStyle:[Object,Array],animation:Object,theme:Object,themeName:String,loading:Boolean,dataEmpty:Boolean,extend:Object,judgeWidth:{type:Boolean,default:!1},widthChangeDelay:{type:Number,default:300},tooltipFormatter:{type:Function},resizeable:{type:Boolean,default:!0},resizeDelay:{type:Number,default:200},changeDelay:{type:Number,default:0},setOptionOpts:{type:[Boolean,Object],default:!0}},watch:{data:{deep:!0,handler:function(e){e&&this.changeHandler()}},settings:{deep:!0,handler:function(e){e.type&&this.chartLib&&(this.chartHandler=this.chartLib[e.type]),this.changeHandler()}},width:"nextTickResize",height:"nextTickResize",events:{deep:!0,handler:function(){this.createEventProxy()}},theme:{deep:!0,handler:function(e){this.themeChange(e)}},themeName:function(e){this.themeChange(e)}},computed:{canvasStyle:function(){return{width:this.width,height:this.height,position:"relative"}},chartColor:function(){return this.colors||this.theme&&this.theme.color||i}},methods:{dataHandler:function(){if(this.chartHandler){var e=this.data,t=e,i=t.columns,n=void 0===i?[]:i,a=t.rows,r=void 0===a?[]:a,o={tooltipVisible:this.tooltipVisible,legendVisible:this.legendVisible,echarts:this.echarts,color:this.chartColor,tooltipFormatter:this.tooltipFormatter,_once:this._once};this.beforeConfig&&(e=this.beforeConfig(e));var s=this.chartHandler(n,r,this.settings,o);s&&("function"==typeof s.then?s.then(this.optionsHandler):this.optionsHandler(s))}},nextTickResize:function(){var e=this;this.$nextTick(function(t){e.echarts.resize()})},resize:function(){this.echarts.resize()},optionsHandler:function(e){var t=this;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);if(["grid","dataZoom","visualMap","toolbox","title","legend","xAxis","yAxis","radar","tooltip","axisPointer","brush","geo","timeline","graphic","series","backgroundColor","textStyle"].forEach(function(i){t[i]&&(e[i]=t[i])}),this.animation&&Object.keys(this.animation).forEach(function(i){e[i]=t.animation[i]}),this.markArea||this.markLine||this.markPoint){var i={markArea:this.markArea,markLine:this.markLine,markPoint:this.markPoint},n=e.series;"[object Array]"===b(n)?n.forEach(function(e){t.addMark(e,i)}):"[object Object]"===b(n)&&this.addMark(n,i)}this.extend&&Object.keys(this.extend).forEach(function(i){var n=t.extend[i];~i.indexOf(".")?y(e,i,n):"function"==typeof n?e[i]=n(e[i]):x(e[i])&&g(e[i][0])?e[i].forEach(function(t,a){e[i][a]=N({},t,n)}):g(e[i])?e[i]=N({},e[i],n):e[i]=n}),this.afterConfig&&(e=this.afterConfig(e));var a=this.setOptionOpts;(this.settings.bmap||this.settings.amap)&&(a=!1),this.echarts.setOption(e,a),this.$emit("ready",this.echarts),this._once["ready-once"]||(this._once["ready-once"]=!0,this.$emit("ready-once",this.echarts)),this.judgeWidth&&this.judgeWidthHandler(e),this.afterSetOption&&this.afterSetOption(this.echarts),this.afterSetOptionOnce&&!this._once.afterSetOptionOnce&&(this._once.afterSetOptionOnce=!0,this.afterSetOptionOnce(this.echarts))},judgeWidthHandler:function(e){var t=this,i=this.echarts,n=this.widthChangeDelay;this.$el.clientWidth?i&&i.resize():this.$nextTick(function(e){t.$el.clientWidth?i&&i.resize():setTimeout(function(e){i&&i.resize(),t.$el.clientWidth||console.warn(" Can't get dom width or height ")},n)})},addMark:function(e,t){Object.keys(t).forEach(function(i){t[i]&&(e[i]=t[i])})},init:function(){if(!this.echarts){var i=this.themeName||this.theme||t;this.echarts=e.init(this.$refs.canvas,i,this.initOptions),this.data&&this.changeHandler(),this.createEventProxy(),this.resizeable&&window.addEventListener("resize",this.resizeHandler)}},addWatchToProps:function(){var e=this,t=this._watchers.map(function(e){return e.expression});Object.keys(this.$props).forEach(function(i){if(!~t.indexOf(i)&&!~Z.indexOf(i)){var n={};~["[object Object]","[object Array]"].indexOf(b(e.$props[i]))&&(n.deep=!0),e.$watch(i,function(){e.changeHandler()},n)}})},createEventProxy:function(){var e=this,t=this,i=Object.keys(this.events||{});i.length&&i.forEach(function(i){-1===e.registeredEvents.indexOf(i)&&(e.registeredEvents.push(i),e.echarts.on(i,function(e){return function(){if(e in t.events){for(var i=arguments.length,n=Array(i),a=0;a