OpenAuth.Net/OpenAuth.Mvc/Content/echarts/chart/line.js

1 line
12 KiB
JavaScript
Raw Normal View History

define("echarts/chart/line",["require","../component/base","./base","zrender/shape/BrokenLine","../util/shape/Icon","../util/shape/HalfSmoothPolygon","../component/axis","../component/grid","../component/dataZoom","../config","../util/ecData","zrender/tool/util","zrender/tool/color","../chart"],function(e){function t(e,t,i,o,r){n.call(this,e,t,i,o,r),a.call(this),this.refresh(o)}function i(e,t,i){var n=t.x,a=t.y,o=t.width,s=t.height,l=s/2;t.symbol.match("empty")&&(e.fillStyle="#fff"),t.brushType="both";var h=t.symbol.replace("empty","").toLowerCase();h.match("star")?(l=h.replace("star","")-0||5,a-=1,h="star"):("rectangle"===h||"arrow"===h)&&(n+=(o-s)/2,o=s);var d="";if(h.match("image")&&(d=h.replace(new RegExp("^image:\\/\\/"),""),h="image",n+=Math.round((o-s)/2)-1,o=s+=2),h=r.prototype.iconLibrary[h]){var m=t.x,c=t.y;e.moveTo(m,c+l),e.lineTo(m+5,c+l),e.moveTo(m+t.width-5,c+l),e.lineTo(m+t.width,c+l);var p=this;h(e,{x:n+4,y:a+4,width:o-8,height:s-8,n:l,image:d},function(){p.modSelf(),i()})}else e.moveTo(n,a+l),e.lineTo(n+o,a+l)}var n=e("../component/base"),a=e("./base"),o=e("zrender/shape/BrokenLine"),r=e("../util/shape/Icon"),s=e("../util/shape/HalfSmoothPolygon");e("../component/axis"),e("../component/grid"),e("../component/dataZoom");var l=e("../config"),h=e("../util/ecData"),d=e("zrender/tool/util"),m=e("zrender/tool/color");return t.prototype={type:l.CHART_TYPE_LINE,_buildShape:function(){this.finalPLMap={},this._bulidPosition()},_buildHorizontal:function(e,t,i,n){for(var a,o,r,s,l,h,d,m,c,p,u=this.series,V=i[0][0],U=u[V],y=U.xAxisIndex,g=this.component.xAxis.getAxis(y),f={},b=0,_=t;_>b&&null!=g.getNameByIndex(b);b++){r=g.getCoordByIndex(b);for(var x=0,k=i.length;k>x;x++){a=u[i[x][0]].yAxisIndex||0,o=this.component.yAxis.getAxis(a),h=l=m=d=o.getCoord(0);for(var L=0,v=i[x].length;v>L;L++)V=i[x][L],U=u[V],c=U.data[b],p=null!=c?null!=c.value?c.value:c:"-",f[V]=f[V]||[],n[V]=n[V]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},"-"!==p?(p>=0?(l-=L>0?o.getCoordSize(p):h-o.getCoord(p),s=l):0>p&&(d+=L>0?o.getCoordSize(p):o.getCoord(p)-m,s=d),f[V].push([r,s,b,g.getNameByIndex(b),r,h]),n[V].min>p&&(n[V].min=p,n[V].minY=s,n[V].minX=r),n[V].max<p&&(n[V].max=p,n[V].maxY=s,n[V].maxX=r),n[V].sum+=p,n[V].counter++):f[V].length>0&&(this.finalPLMap[V]=this.finalPLMap[V]||[],this.finalPLMap[V].push(f[V]),f[V]=[])}l=this.component.grid.getY();for(var W,x=0,k=i.length;k>x;x++)for(var L=0,v=i[x].length;v>L;L++)V=i[x][L],U=u[V],c=U.data[b],p=null!=c?null!=c.value?c.value:c:"-","-"==p&&this.deepQuery([c,U,this.option],"calculable")&&(W=this.deepQuery([c,U],"symbolSize"),l+=2*W+5,s=l,this.shapeList.push(this._getCalculableItem(V,b,g.getNameByIndex(b),r,s,"horizontal")))}for(var w in f)f[w].length>0&&(this.finalPLMap[w]=this.finalPLMap[w]||[],this.finalPLMap[w].push(f[w]),f[w]=[]);this._calculMarkMapXY(n,i,"y"),this._buildBorkenLine(e,this.finalPLMap,g,"horizontal")},_buildVertical:function(e,t,i,n){for(var a,o,r,s,l,h,d,m,c,p,u=this.series,V=i[0][0],U=u[V],y=U.yAxisIndex,g=this.component.yAxis.getAxis(y),f={},b=0,_=t;_>b&&null!=g.getNameByIndex(b);b++){s=g.getCoordByIndex(b);for(var x=0,k=i.length;k>x;x++){a=u[i[x][0]].xAxisIndex||0,o=this.component.xAxis.getAxis(a),h=l=m=d=o.getCoord(0);for(var L=0,v=i[x].length;v>L;L++)V=i[x][L],U=u[V],c=U.data[b],p=null!=c?null!=c.value?c.value:c:"-",f[V]=f[V]||[],n[V]=n[V]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},"-"!==p?(p>=0?(l+=L>0?o.getCoordSize(p):o.getCoord(p)-h,r=l):0>p&&(d-=L>0?o.getCoordSize(p):m-o.getCoord(p),r=d),f[V].push([r,s,b,g.getNameByIndex(b),h,s]),n[V].min>p&&(n[V].min=p,n[V].minX=r,n[V].minY=s),n[V].max<p&&(n[V].max=p,n[V].maxX=r,n[V].maxY=s),n[V].sum+=p,n[V].counter++):f[V].length>0&&(this.finalPLMap[V]=this.finalPLMap[V]||[],this.finalPLMap[V].push(f[V]),f[V]=[])}l=this.component.grid.getXend();for(var W,x=0,k=i.length;k>x;x++)for(var L=0,v=i[x].length;v>L;L++)V=i[x][L],U=u[V],c=U.data[b],p=null!=c?null!=c.value?c.value:c:"-","-"==p&&this.deepQuery([c,U,this.option],"calculable")&&(W=this.deepQuer