text: !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"),require("echarts/lib/chart/heatmap"),require("echarts/lib/component/visualMap"),require("echarts/extension/bmap/bmap"),require("echarts/lib/chart/map")):"function"==typeof define&&define.amd?define(["echarts/lib/echarts","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/chart/heatmap","echarts/lib/component/visualMap","echarts/extension/bmap/bmap","echarts/lib/chart/map"],t):e.Veheatmap=t(e.echarts)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e.default: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 t=function(e){return['<span style="',"background-color:"+e+";","display: inline-block;","width: 10px;","height: 10px;","border-radius: 50%;","margin-right:2px;",'"></span>'].join("")},i=["#19d4ae","#5ab1ef","#fa6e86","#ffb980","#0067a6","#c4b4e4","#d87a80","#9cbbff","#d9d0c7","#87a997","#d49ea2","#5b4947","#7ba3a8"],n=["#313695","#4575b4","#74add1","#abd9e9","#e0f3f8","#ffffbf","#fee090","#fdae61","#f46d43","#d73027","#a50026"],r=["blue","blue","green","yellow","red"],a={th:3,mi:6,bi:9,tr:12},o={zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0,abbrLabel:{th:"k",mi:"m",bi:"b",tr:"t"}},s=1e12,c=1e9,l=1e6,h=1e3;function d(e,t,i,n){var r=e.toString().split("."),a=t-(n||0),o=2===r.length?Math.min(Math.max(r[1].length,a),t):a,s=Math.pow(10,o),c=(i(e+"e+"+o)/s).toFixed(o);if(n>t-o){var l=new RegExp("\\.?0{1,"+(n-(t-o))+"}$");c=c.replace(l,"")}return c}function u(e,t,i,n){var r=Math.abs(t),o=!1,u=!1,p="",f="",m=!1,b=void 0,y=void 0;i=i||"",t=t||0,~i.indexOf("(")?(o=!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")&&(b=!!(b=i.match(/a(k|m|b|t)?/))&&b[1],~i.indexOf(" a")&&(p=" "),i=i.replace(new RegExp(p+"a[kmbt]?"),""),r>=s&&!b||"t"===b?(p+=e.abbrLabel.tr,t/=s):r<s&&r>=c&&!b||"b"===b?(p+=e.abbrLabel.bi,t/=c):r<c&&r>=l&&!b||"m"===b?(p+=e.abbrLabel.mi,t/=l):(r<l&&r>=h&&!b||"k"===b)&&(p+=e.abbrLabel.th,t/=h)),~i.indexOf("[.]")&&(u=!0,i=i.replace("[.]","."));var g=t.toString().split(".")[0],v=i.split(".")[1],x=i.indexOf(","),O=(i.split(".")[0].split(",")[0].match(/0/g)||[]).length;if(v?(g=(f=~v.indexOf("[")?d(t,(v=(v=v.replace("]","")).split("["))[0].length+v[1].length,n,v[1].length):d(t,v.length,n)).split(".")[0],f=~f.indexOf(".")?"."+f.split(".")[1]:"",u&&0==+f.slice(1)&&(f="")):g=d(t,0,n),p&&!b&&+g>=1e3&&p!==a.trillion&&(g=""+ +g/1e3,p=a.million),~g.indexOf("-")&&(g=g.slice(1),m=!0),g.length<O)for(var j=O-g.length;j>0;j--)g="0"+g;x>-1&&(g=g.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")),i.indexOf(".")||(g="");var A=g+f+(p||"");return o?A=(o&&m?"(":"")+A+(o&&m?")":""):y>=0?A=0===y?(m?"-":"+")+A:A+(m?"-":"+"):m&&(A="-"+A),A}function p(e,t){Object.keys(t).forEach(function(i){e[i]=t[i]})}var f={},m={};function b(e,t,i){var n=void 0;return 0===e||void 0===e?n=0:null===e||function(e){return"number"==typeof e&&isNaN(e)}(e)?n=null:"string"==typeof e?f.zeroFormat&&e===f.zeroFormat?n=0:(f.nullFormat&&e===f.nullFormat||!e.replace(/[^0-9]+/g,"").length)&&(n=null):n=+e||null,function(e,t,i){t=t||f.defaultFormat,i=i||Math.round;var n=void 0,r=void 0;if(0===e&&null!==f.zeroFormat)n=f.zeroFormat;else if(null===e&&null!==f.nullFormat)n=f.nullFormat;else{for(var a in m)if(m[a]&&t.match(m[a].regexp)){r=m[a].format;break}n=(r=r||u.bind(null,f))(e,t,i,b)}return n}(n,t,i)}function y(e,t){var i=null;return function(){var n=this,r=arguments;clearTimeout(i),i=setTimeout(function(){e.apply(n,r)},t)}}function g(e){return Object.prototype.toString.call(e)}function v(e){return"[object Object]"===g(e)}p(f,o),b.options=f,b._numberToFormat=u.bind(null,f),b.register=function(e,t){m[e]=t},b.unregister=function(e){m[e]=null},b.setOptions=function(e){p(f,e)},b.reset=function(){p(f,o)},b.register("percentage",{regexp:/%/,format:function(e,t,i,n){var r=~t.indexOf(" %")?" ":"",a=void 0;return n.options.scalePercentBy100&&(e*=100),t=t.replace(/\s?%/,""),~(a=n._numberToFormat(e,t,i)).indexOf(")")?((a=a.split("")).splice(-1,0,r+"%"),a=a.join("")):a=a+r+"%",a}});var x=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]"===g(t))return t(e,b);i=isNaN(i)?0:++i;var r=".["+new Array(i).join(0)+"]",a=t;switch(t){case"KMB":a=i?"0,0"+r+"a":"0,0a";break;case"normal":a=i?"0,0"+r:"0,0";break;case"percent":a=i?"0,0"+r+"%":"0,0.[00]%"}return b(e,a)},O={},j=function(e){var t,i=e.position,n=e.positionJsonLink,r=e.beforeRegisterMapOnce,a=e.mapURLProfix,o=n||""+a+i+".json";return O[o]||(O[o]=(t=o,new Promise(function(e,i){var n=new XMLHttpRequest;n.open("GET",t),n.send(null),n.onload=function(){e(JSON.parse(n.responseText))},n.onerror=function(){i(JSON.parse(n.responseText))}})).then(function(e){return r&&(e=r(e)),e})),O[o]},A=null,w=null,k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},L=function(e){return Array.isArray(e)?e:Array.from(e)};function S(e,t){var i=[];return e.forEach(function(e){~i.indexOf(e[t])||i.push(e[t])}),i}function E(e){var t=e.rows,i=e.innerXAxisList,n=e.innerYAxisList,r=e.xDim,a=e.yDim,o=e.metrics,s=e.type,c=e.extraMetrics;return"cartesian"===s?t.map(function(e){var t=i.indexOf(e[r]),s=n.indexOf(e[a]),l=o?e[o]:1,h=c.map(function(t){return e[t]||"-"});return{value:[t,s,l].concat(h)}}):t.map(function(e){var t=o?e[o]:1;return{value:[e[r],e[a],t]}})}function M(e,t){return{type:"category",data:e,name:t,nameLocation:"end",splitArea:{show:!0}}}var C=function(i,a,o,s){var c=o.type,l=void 0===c?"cartesian":c,h=o.xAxisList,d=o.yAxisList,u=o.dimension,p=void 0===u?[i[0],i[1]]:u,f=o.metrics,m=void 0===f?i[2]:f,b=o.dataType,y=void 0===b?"normal":b,g=o.min,v=o.max,O=o.digit,C=o.bmap,z=o.amap,F=o.geo,P=o.key,H=o.v,$=void 0===H?"2.0":H,D=o.position,N=o.positionJsonLink,T=o.beforeRegisterMap,_=o.pointSize,R=void 0===_?10:_,B=o.blurSize,W=void 0===B?5:B,V=o.heatColor,q=o.yAxisName,J=o.xAxisName,X=o.beforeRegisterMapOnce,Y=o.mapURLProfix,U=void 0===Y?"https://unpkg.com/echarts@3.6.2/map/json/":Y,Z=o.specialAreas,G=void 0===Z?{}:Z,K=s.tooltipVisible,I=h,Q=d,ee=[],te=[],ie=p.concat([m]);i.forEach(function(e){~ie.indexOf(e)||te.push(e)}),"cartesian"===l?(I&&I.length||(I=S(a,p[0])),Q&&Q.length||(Q=S(a,p[1])),ee=E({rows:a,innerXAxisList:I,innerYAxisList:Q,xDim:p[0],yDim:p[1],metrics:m,type:l,extraMetrics:te})):ee=E({rows:a,xDim:p[0],yDim:p[1],metrics:m,type:l,extraMetrics:te});var ne=m?a.map(function(e){return e[m]}):[0,5],re=g||Math.min.apply(null,ne),ae=v||Math.max.apply(null,ne),oe=M(I,J),se=M(Q,q),ce=function(e){var t=e.innerMin,i=e.innerMax,a=e.type,o=e.heatColor;return k({min:t,max:i,calculable:!0},"map"===a?{orient:"vertical",left:0,bottom:0,inRange:{color:o||n}}:"bmap"===a||"amap"===a?{show:!1,orient:"vertical",left:0,bottom:0,inRange:{color:o||r}}:{orient:"horizontal",left:"center",bottom:10,dimension:2,inRange:o&&{color:o}})}({innerMin:re,innerMax:ae,type:l,heatColor:V}),le=[{type:"heatmap",data:{chartData:ee}.chartData}],he=K&&function(e){var i=e.dataType,n=e.innerXAxisList,r=e.innerYAxisList,a=e.digit,o=e.extraMetrics,s=e.metrics;return{trigger:"item",formatter:function(e){var c=e.color,l=L(e.data.value),h=l[0],d=l[1],u=l[2],p=l.slice(3),f=[];return f.push(n[h]+" ~ "+r[d]+"<br>"),o.forEach(function(e,t){f.push(e+": "+p[t]+"<br>")}),f.push(t(c)+" "+s+": "+x(u,i,a)+"<br>"),f.join("")}}}({dataType:y,innerXAxisList:I,innerYAxisList:Q,digit:O,extraMetrics:te,metrics:m}),de={visualMap:ce,series:le};return"bmap"===l?(k(de.series[0],{coordinateSystem:"bmap",pointSize:R,blurSize:W}),function(e,t){return A||(A=new Promise(function(i,n){var r="bmap"+Date.now();window[r]=i;var a=document.createElement("script");a.src=["https://api.map.baidu.com/api?v="+(t||"2.0"),"ak="+e,"callback="+r].join("&"),document.body.appendChild(a)})),A}(P,$).then(function(e){return k({bmap:C},de)})):"map"===l?(de.series[0].coordinateSystem="geo",j({position:D,positionJsonLink:N,beforeRegisterMapOnce:X,mapURLProfix:U}).then(function(t){var i=k({map:D},F);return T&&(t=T(t)),e.registerMap(D,t,G),k({geo:i},de)})):"amap"===l?(k(de.series[0],{coordinateSystem:"amap",pointSize:R,blurSize:W}),function(e,t){return w||(w=new Promise(function(i,n){var r="amap"+Date.now();window[r]=i;var a=document.createElement("script");a.src=["https://webapi.amap.com/maps?v="+(t||"1.4.3"),"key="+e,"callback="+r].join("&"),document.body.appendChild(a)})),w}(P,$).then(function(e){return k({amap:z},de)})):k({xAxis:oe,yAxis:se,tooltip:he},de)},z={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:[]},F={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"v-charts-data-empty"},[this._v(" 暂无数据 ")])},staticRenderFns:[]},P=["initOptions","loading","dataEmpty","judgeWidth","widthChangeDelay"];return{name:"VeHeatmap",mixins:[{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(F,{style:{display:this.dataEmpty?"":"none"}}),e(z,{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()}},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,r=t.rows,a=void 0===r?[]:r,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,a,this.settings,o);s&&("function"==typeof s.then?s.then(this.optionsHandler):this.optionsHandler(s))}},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]"===g(n)?n.forEach(function(e){t.addMark(e,i)}):"[object Object]"===g(n)&&this.addMark(n,i)}this.extend&&Object.keys(this.extend).forEach(function(i){var n=t.extend[i];~i.indexOf(".")?function(e,t,i){if(t){var n=e,r=t.split(".");r.forEach(function(e,t){t===r.length-1?n[e]=i:(n[e]||(n[e]={}),n=n[e])})}}(e,i,n):"function"==typeof n?e[i]=n(e[i]):"[object Array]"===g(e[i])&&v(e[i][0])?e[i].forEach(function(t,r){e[i][r]=k({},t,n)}):v(e[i])?e[i]=k({},e[i],n):e[i]=n}),this.afterConfig&&(e=this.afterConfig(e)),this.echarts.setOption(e,this.setOptionOpts),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 e=this.themeName||this.theme||"ve-chart";this.echarts=this.echartsLib.init(this.$refs.canvas,e,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)&&!~P.indexOf(i)){var n={};~["[object Object]","[object Array]"].indexOf(g(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),r=0;r<i;r++)n[r]=arguments[r];t.events[e].apply(null,n)}}}(i)))})},themeChange:function(e){this.clean(),this.echarts=null,this.init()},clean:function(){this.resizeable&&window.removeEventListener("resize",this.resizeHandler),this.echarts.dispose()}},created:function(){var e=this;this.echarts=null,this.registeredEvents=[],this._once={},this.resizeHandler=y(function(t){e.echarts&&e.echarts.resize()},this.resizeDelay),this.changeHandler=y(function(t){e.dataHandler()},this.changeDelay),this.addWatchToProps()},mounted:function(){this.init()},beforeDestroy:function(){this.clean()}}],created:function(){this.chartHandler=C,this.echartsLib=e}}});
  