1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5255dea8"],{"17b8":function(e,t,a){var r=a("3014"),i=r.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});e.exports=i},3014:function(e,t,a){var r=a("4f85"),i=a("3301"),n=r.extend({type:"series.__base_bar__",getInitialData:function(e,t){return i(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var a=t.dataToPoint(t.clampData(e)),r=this.getData(),i=r.getLayout("offset"),n=r.getLayout("size"),o=t.getBaseAxis().isHorizontal()?0:1;return a[o]+=i+n/2,a}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});e.exports=n},"67cc":function(e,t,a){var r=a("4e08"),i=(r.__DEV__,a("3eba")),n=a("6d8b"),o=a("2306"),s=a("e7aa"),l=s.setLabel,d=a("4319"),u=a("b5c7"),c=a("cbe5"),h=a("e1fc"),g=a("88b3"),p=g.throttle,m=a("b0af"),f=m.createClipPath,v=a("c2be"),y=["itemStyle","barBorderWidth"],b=[0,0];function x(e,t){var a=e.getArea&&e.getArea();if("cartesian2d"===e.type){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(a.x-=i,a.width+=2*i):(a.y-=i,a.height+=2*i)}}return a}n.extend(d.prototype,u);var w=i.extendChartView({type:"bar",render:function(e,t,a){this._updateDrawMode(e);var r=e.get("coordinateSystem");return"cartesian2d"!==r&&"polar"!==r||(this._isLargeDraw?this._renderLarge(e,t,a):this._renderNormal(e,t,a)),this.group},incrementalPrepareRender:function(e,t,a){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,a,r){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,a){var r,i=this.group,n=e.getData(),s=this._data,l=e.coordinateSystem,d=l.getBaseAxis();"cartesian2d"===l.type?r=d.isHorizontal():"polar"===l.type&&(r="angle"===d.dim);var u=e.isAnimationEnabled()?e:null,c=e.get("clip",!0),g=x(l,n);i.removeClipPath();var p=e.get("roundCap",!0),m=e.get("showBackground",!0),f=e.getModel("backgroundStyle"),v=f.get("barBorderRadius")||0,y=[],b=this._backgroundEls||[],w=function(e){var t=P[l.type](n,e),a=G(l,r,t);return a.useStyle(f.getBarItemStyle()),"cartesian2d"===l.type&&a.setShape("r",v),y[e]=a,a};n.diff(s).add((function(t){var a=n.getItemModel(t),o=P[l.type](n,t,a);if(m&&w(t),n.hasValue(t)){if(c){var s=S[l.type](g,o);if(s)return void i.remove(d)}var d=I[l.type](t,o,r,u,!1,p);n.setItemGraphicEl(t,d),i.add(d),D(d,n,t,a,o,e,r,"polar"===l.type)}})).update((function(t,a){var d=n.getItemModel(t),h=P[l.type](n,t,d);if(m){var x;0===b.length?x=w(a):(x=b[a],x.useStyle(f.getBarItemStyle()),"cartesian2d"===l.type&&x.setShape("r",v),y[t]=x);var _=P[l.type](n,t),A=E(r,_,l);o.updateProps(x,{shape:A},u,t)}var M=s.getItemGraphicEl(a);if(n.hasValue(t)){if(c){var L=S[l.type](g,h);if(L)return void i.remove(M)}M?o.updateProps(M,{shape:h},u,t):M=I[l.type](t,h,r,u,!0,p),n.setItemGraphicEl(t,M),i.add(M),D(M,n,t,d,h,e,r,"polar"===l.type)}else i.remove(M)})).remove((function(e){var t=s.getItemGraphicEl(e);"cartesian2d"===l.type?t&&M(e,u,t):t&&L(e,u,t)})).execute();var _=this._backgroundGroup||(this._backgroundGroup=new h);_.removeAll();for(var A=0;A<y.length;++A)_.add(y[A]);i.add(_),this._backgroundEls=y,this._data=n},_renderLarge:function(e,t,a){this._clear(),V(e,this.group);var r=e.get("clip",!0)?f(e.coordinateSystem,!1,e):null;r?this.group.setClipPath(r):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),V(t,this.group,!0)},dispose:n.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,a=this._data;e&&e.get("animation")&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl((function(t){"sector"===t.type?L(t.dataIndex,e,t):M(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}}),_=Math.max,A=Math.min,S={cartesian2d:function(e,t){var a=t.width<0?-1:1,r=t.height<0?-1:1;a<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=_(t.x,e.x),n=A(t.x+t.width,e.x+e.width),o=_(t.y,e.y),s=A(t.y+t.height,e.y+e.height);t.x=i,t.y=o,t.width=n-i,t.height=s-o;var l=t.width<0||t.height<0;return a<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e,t){var a=t.r0<=t.r?1:-1;if(a<0){var r=t.r;t.r=t.r0,t.r0=r}r=A(t.r,e.r);var i=_(t.r0,e.r0);t.r=r,t.r0=i;var n=r-i<0;if(a<0){r=t.r;t.r=t.r0,t.r0=r}return n}},I={cartesian2d:function(e,t,a,r,i){var s=new o.Rect({shape:n.extend({},t),z2:1});if(s.name="item",r){var l=s.shape,d=a?"height":"width",u={};l[d]=0,u[d]=t[d],o[i?"updateProps":"initProps"](s,{shape:u},r,e)}return s},polar:function(e,t,a,r,i,s){var l=t.startAngle<t.endAngle,d=!a&&s?v:o.Sector,u=new d({shape:n.defaults({clockwise:l},t),z2:1});if(u.name="item",r){var c=u.shape,h=a?"r":"endAngle",g={};c[h]=a?0:t.startAngle,g[h]=t[h],o[i?"updateProps":"initProps"](u,{shape:g},r,e)}return u}};function M(e,t,a){a.style.text=null,o.updateProps(a,{shape:{width:0}},t,e,(function(){a.parent&&a.parent.remove(a)}))}function L(e,t,a){a.style.text=null,o.updateProps(a,{shape:{r:a.shape.r0}},t,e,(function(){a.parent&&a.parent.remove(a)}))}var P={cartesian2d:function(e,t,a){var r=e.getItemLayout(t),i=a?T(a,r):0,n=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+n*i/2,y:r.y+o*i/2,width:r.width-n*i,height:r.height-o*i}},polar:function(e,t,a){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle}}};function k(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function D(e,t,a,r,i,s,d,u){var c=t.getItemVisual(a,"color"),h=t.getItemVisual(a,"opacity"),g=t.getVisual("borderColor"),p=r.getModel("itemStyle"),m=r.getModel("emphasis.itemStyle").getBarItemStyle();u||e.setShape("r",p.get("barBorderRadius")||0),e.useStyle(n.defaults({stroke:k(i)?"none":g,fill:k(i)?"none":c,opacity:h},p.getBarItemStyle()));var f=r.getShallow("cursor");f&&e.attr("cursor",f);var v=d?i.height>0?"bottom":"top":i.width>0?"left":"right";u||l(e.style,m,r,c,s,a,v),k(i)&&(m.fill=m.stroke="none"),o.setHoverStyle(e,m)}function T(e,t){var a=e.get(y)||0,r=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,r,i)}var B=c.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var a=t.points,r=this.__startPoint,i=this.__baseDimIdx,n=0;n<a.length;n+=2)r[i]=a[n+i],e.moveTo(r[0],r[1]),e.lineTo(a[n],a[n+1])}});function V(e,t,a){var r=e.getData(),i=[],n=r.getLayout("valueAxisHorizontal")?1:0;i[1-n]=r.getLayout("valueAxisStart");var o=r.getLayout("largeDataIndices"),s=r.getLayout("barWidth"),l=e.getModel("backgroundStyle"),d=e.get("showBackground",!0);if(d){var u=r.getLayout("largeBackgroundPoints"),c=[];c[1-n]=r.getLayout("backgroundStart");var h=new B({shape:{points:u},incremental:!!a,__startPoint:c,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});C(h,l,r),t.add(h)}var g=new B({shape:{points:r.getLayout("largePoints")},incremental:!!a,__startPoint:i,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s});t.add(g),R(g,e,r),g.seriesIndex=e.seriesIndex,e.get("silent")||(g.on("mousedown",N),g.on("mousemove",N))}var N=p((function(e){var t=this,a=O(t,e.offsetX,e.offsetY);t.dataIndex=a>=0?a:null}),30,!1);function O(e,t,a){var r=e.__baseDimIdx,i=1-r,n=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[i];b[0]=t,b[1]=a;for(var d=b[r],u=b[1-r],c=d-s,h=d+s,g=0,p=n.length/2;g<p;g++){var m=2*g,f=n[m+r],v=n[m+i];if(f>=c&&f<=h&&(l<=v?u>=l&&u<=v:u>=v&&u<=l))return o[g]}return-1}function R(e,t,a){var r=a.getVisual("borderColor")||a.getVisual("color"),i=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(i),e.style.fill=null,e.style.stroke=r,e.style.lineWidth=a.getLayout("barWidth")}function C(e,t,a){var r=t.get("borderColor")||t.get("color"),i=t.getItemStyle(["color","borderColor"]);e.useStyle(i),e.style.fill=null,e.style.stroke=r,e.style.lineWidth=a.getLayout("barWidth")}function E(e,t,a){var r,i="polar"===a.type;return r=i?a.getArea():a.grid.getRect(),i?{cx:r.cx,cy:r.cy,r0:e?r.r0:t.r0,r:e?r.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:r.x,y:e?r.y:t.y,width:e?t.width:r.width,height:e?r.height:t.height}}function G(e,t,a){var r="polar"===e.type?o.Sector:o.Rect;return new r({shape:E(t,a,e),silent:!0,z2:0})}e.exports=w},"94b1":function(e,t,a){var r=a("3eba"),i=a("6d8b"),n=a("9d57"),o=n.layout,s=n.largeLayout;a("5aa9"),a("17b8"),a("67cc"),a("01ed"),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,i.curry(o,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,s),r.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}})},b5c7:function(e,t,a){var r=a("282b"),i=r([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),n={getBarItemStyle:function(e){var t=i(this,e);if(this.getBorderLineDash){var a=this.getBorderLineDash();a&&(t.lineDash=a)}return t}};e.exports=n},c2be:function(e,t,a){var r=a("2306"),i=r.extendShape,n=i({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var a=t.cx,r=t.cy,i=Math.max(t.r0||0,0),n=Math.max(t.r,0),o=.5*(n-i),s=i+o,l=t.startAngle,d=t.endAngle,u=t.clockwise,c=Math.cos(l),h=Math.sin(l),g=Math.cos(d),p=Math.sin(d),m=u?d-l<2*Math.PI:l-d<2*Math.PI;m&&(e.moveTo(c*i+a,h*i+r),e.arc(c*s+a,h*s+r,o,-Math.PI+l,l,!u)),e.arc(a,r,n,l,d,!u),e.moveTo(g*n+a,p*n+r),e.arc(g*s+a,p*s+r,o,d-2*Math.PI,d-Math.PI,!u),0!==i&&(e.arc(a,r,i,d,l,u),e.moveTo(c*i+a,p*i+r)),e.closePath()}});e.exports=n},d768:function(e,t,a){"use strict";function r(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}var i=a("89d6"),n=a("6f0c"),o=a("4cbb");a("94b1");var s=r(a("6521")),l=function(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e},d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},u=.5;function c(e){var t=e.innerRows,a=e.dimAxisName,r=e.dimension,i=e.axisVisible,n=e.dimAxisType,o=e.dims;return r.map((function(e){return{type:"category",name:a,nameLocation:"middle",nameGap:22,data:"value"===n?h(o):t.map((function(t){return t[e]})),axisLabel:{formatter:function(e){return String(e)}},show:i}}))}function h(e){for(var t=Math.max.apply(null,e),a=Math.min.apply(null,e),r=[],i=a;i<=t;i++)r.push(i);return r}function g(e){for(var t=e.meaAxisName,a=e.meaAxisType,r=e.axisVisible,i=e.digit,o=e.scale,s=e.min,l=e.max,u={type:"value",axisTick:{show:!1},show:r},c=[],h=function(e){a[e]?c[e]=d({},u,{axisLabel:{formatter:function(t){return n.getFormated(t,a[e],i)}}}):c[e]=d({},u),c[e].name=t[e]||"",c[e].scale=o[e]||!1,c[e].min=s[e]||null,c[e].max=l[e]||null},g=0;g<2;g++)h(g);return c}function p(e){var t=e.axisSite,a=e.isHistogram,r=e.meaAxisType,o=e.digit,s=e.labelMap,l=a?t.right||[]:t.top||[];return s&&(l=l.map((function(e){return void 0===s[e]?e:s[e]}))),{trigger:"axis",formatter:function(e){var t=[];return t.push(e[0].name+"<br>"),e.forEach((function(e){var a=e.seriesName,s=~l.indexOf(a)?r[1]:r[0];t.push(i.itemPoint(e.color)),t.push(a+": "),t.push(n.getFormated(e.value,s,o)),t.push("<br>")})),t.join("")}}}function m(e,t){for(var a=Math.max.apply(null,t),r=Math.min.apply(null,t),i=[],n=r;n<=a;n++){var o=t.indexOf(n);~o?i.push(e[o]):i.push(null)}return i}function f(e){var t=e.innerRows,a=e.metrics,r=e.stack,i=e.axisSite,s=e.isHistogram,d=e.labelMap,c=e.itemStyle,h=e.label,g=e.showLine,p=void 0===g?[]:g,f=e.dimAxisType,v=e.barGap,y=e.opacity,b=e.dims,x=[],w={},_=s?i.right||[]:i.top||[],A=s?"yAxisIndex":"xAxisIndex",S=r&&n.getStackMap(r);return a.forEach((function(e){w[e]=[]})),t.forEach((function(e){a.forEach((function(t){w[t].push(e[t])}))})),x=Object.keys(w).map((function(e,t){var a="value"===f?m(w[e],b):w[e],i=l({name:null!=d[e]?d[e]:e,type:~p.indexOf(e)?"line":"bar",data:a},A,~_.indexOf(e)?"1":"0");r&&S[e]&&(i.stack=S[e]),h&&(i.label=h),c&&(i.itemStyle=c);var n=y||o.get(i,"itemStyle.normal.opacity");return"value"===f&&(i.barGap=v,i.barCategoryGap="1%",null==n&&(n=u)),null!=n&&o.set(i,"itemStyle.normal.opacity",n),i})),!!x.length&&x}function v(e){var t=e.metrics,a=e.labelMap,r=e.legendName;if(!r&&!a)return{data:t};var i=a?t.map((function(e){return null==a[e]?e:a[e]})):t;return{data:i,formatter:function(e){return null!=r[e]?r[e]:e}}}function y(e,t){return e.map((function(e){return e[t[0]]}))}var b=function(e,t,a,r){var i=o.cloneDeep(t),n=a.axisSite,s=void 0===n?{}:n,l=a.dimension,d=void 0===l?[e[0]]:l,u=a.stack,h=void 0===u?{}:u,m=a.axisVisible,b=void 0===m||m,x=a.digit,w=void 0===x?2:x,_=a.dataOrder,A=void 0!==_&&_,S=a.scale,I=void 0===S?[!1,!1]:S,M=a.min,L=void 0===M?[null,null]:M,P=a.max,k=void 0===P?[null,null]:P,D=a.labelMap,T=void 0===D?{}:D,B=a.legendName,V=void 0===B?{}:B,N=a.label,O=a.itemStyle,R=a.showLine,C=a.barGap,E=void 0===C?"-100%":C,G=a.opacity;if(A){var W=A.label,H=A.order;W&&H?i.sort((function(e,t){return"desc"===H?e[W]-t[W]:t[W]-e[W]})):console.warn("Need to provide name and order parameters")}var z=r.tooltipVisible,Y=r.legendVisible,j=e.slice();s.left&&s.right?j=s.left.concat(s.right):s.left&&!s.right?j=s.left:a.metrics?j=a.metrics:j.splice(e.indexOf(d[0]),1);var U=a.yAxisType||["normal","normal"],X=a.xAxisType||"category",F=a.yAxisName||[],J=a.xAxisName||"",q=!0,K=y(i,d),Q=Y&&v({metrics:j,labelMap:T,legendName:V}),Z=c({innerRows:i,dimAxisName:J,dimension:d,axisVisible:b,dimAxisType:X,dims:K}),$=g({meaAxisName:F,meaAxisType:U,axisVisible:b,digit:w,scale:I,min:L,max:k}),ee=f({innerRows:i,metrics:j,stack:h,axisSite:s,isHistogram:q,labelMap:T,itemStyle:O,label:N,showLine:R,dimAxisType:X,dimension:d,barGap:E,opacity:G,dims:K}),te={axisSite:s,isHistogram:q,meaAxisType:U,digit:w,labelMap:T},ae=z&&p(te),re={legend:Q,yAxis:$,series:ee,xAxis:Z,tooltip:ae};return re},x=d({},s,{name:"VeHistogram",data:function(){return this.chartHandler=b,{}}});e.exports=x},e7aa:function(e,t,a){var r=a("2306"),i=a("c775f"),n=i.getDefaultLabel;function o(e,t,a,i,o,l,d){var u=a.getModel("label"),c=a.getModel("emphasis.label");r.setLabelStyle(e,t,u,c,{labelFetcher:o,labelDataIndex:l,defaultText:n(o.getData(),l),isRectText:!0,autoColor:i}),s(e),s(t)}function s(e,t){"outside"===e.textPosition&&(e.textPosition=t)}t.setLabel=o}}]);
|