@canvasjs/charts 3.10.9 → 3.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/canvasjs.min.js +168 -167
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.10.
|
|
2
|
+
CanvasJS Chart - v3.10.11 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2024 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -306,76 +306,76 @@ m.dataSeries),s=ma("indexLabelLineColor",m.dataPoint,m.dataSeries),C=l(m.dataPoi
|
|
|
306
306
|
m.dataPoint);if(m.dataSeries.indexLabelFormatter||m.dataPoint.indexLabelFormatter)W={chart:this,dataSeries:m.dataSeries,dataPoint:m.dataPoint,index:m.indexKeyword,total:u.total,percent:u.percent};var t=m.dataPoint.indexLabelFormatter?m.dataPoint.indexLabelFormatter(W):m.dataPoint.indexLabel?this.replaceKeywordsWithValue(m.dataPoint.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):m.dataSeries.indexLabelFormatter?m.dataSeries.indexLabelFormatter(W):m.dataSeries.indexLabel?this.replaceKeywordsWithValue(m.dataSeries.indexLabel,
|
|
307
307
|
m.dataPoint,m.dataSeries,null,m.indexKeyword):null;if(null!==t&&""!==t){var u=ma("indexLabelPlacement",m.dataPoint,m.dataSeries),W=ma("indexLabelOrientation",m.dataPoint,m.dataSeries),B=ma("indexLabelTextAlign",m.dataPoint,m.dataSeries),v=m.direction,z=m.dataSeries.axisX,K=m.dataSeries.axisY,L=!1,w=new ka(d,{x:0,y:0,maxWidth:e?e:0.5*this.width,maxHeight:n?5*D:1.5*D,angle:"horizontal"===W?0:-90,text:t,padding:0,backgroundColor:w,borderColor:f,borderThickness:h,textAlign:B,fontSize:D,fontFamily:g,fontWeight:q,
|
|
308
308
|
fontColor:x,fontStyle:k,textBaseline:"middle"});w.measureText();m.dataSeries.indexLabelMaxWidth=w.maxWidth;if("stackedarea100"===p){if(m.point.x<c.x1||m.point.x>c.x2||m.point.y<c.y1-1||m.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<K.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>K.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("bubble")||
|
|
309
|
-
0<=p.indexOf("scatter")){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||m.dataPoint.y<K.viewportMinimum||m.dataPoint.y>K.viewportMaximum)continue}else if(0<=p.indexOf("column")
|
|
310
|
-
p.indexOf("bar")||"error"===p){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||m.bounds.x1>c.x2||m.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<K.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>K.viewportMaximum)continue}else if(m.dataPoint.x<
|
|
311
|
-
g=w.height);if("normal"===this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))u="auto",x=4;else if(0<=p.indexOf("stacked"))"auto"===u&&(u="inside");else if("bubble"===p||"scatter"===p)u="inside";q=m.point.x-g/2+("horizontal"===W?0:w._lineHeight/2);if("inside"!==u)e=c.y1,h=c.y2,0<v?(f=m.point.y+w._lineHeight/2-k-x-b,f<e&&(f="auto"===u?Math.max(m.point.y,e)+w._lineHeight/
|
|
312
|
-
0<=p.indexOf("area"))||(f-=b))):(f=m.point.y+w._lineHeight/2+x+b,f>h-k+w._lineHeight/2-x&&(f="auto"===u?Math.min(m.point.y,h)+w._lineHeight/2-k-x-b:h+w._lineHeight/2-k-x-b,L=f-("horizontal"===W?w._lineHeight/2:k)<m.point.y,!L||(0<=p.indexOf("line")||0<=p.indexOf("area"))||(f+=b)));else{Math.max(m.bounds.y1,c.y1);h=Math.min(m.bounds.y2,c.y2)-k+w._lineHeight/2;b=0<=p.indexOf("range")||"error"===
|
|
313
|
-
c.y1)+Math.min(m.bounds.y2,c.y2))/2-k/2+w._lineHeight/2;if(0<v){if(f=b,"bubble"===p||"scatter"===p)f=m.point.y-k/2+w._lineHeight/2,k>m.bounds.y2-m.bounds.y1&&(f-=k/2+x),0>f-w._lineHeight/2&&(f+=Math.abs(f-w._lineHeight/2)<=(m.bounds.y2-m.bounds.y1)/2+x?Math.abs(f-w._lineHeight/2):(m.bounds.y2-m.bounds.y1)/2+x)}else f=Math.min(m.point.y,b),f>h-k-x&&("bubble"===p||"scatter"===p)&&
|
|
314
|
-
(u="auto",n=4):0<=p.indexOf("stacked")?"auto"===u&&(u="inside"):"bubble"===p&&(u="inside"),f=m.point.y+w._lineHeight/2-k/2,"inside"!==u?(h=c.x1,e=c.x2,0>v?(q=m.point.x-g+("horizontal"===W?0:w._lineHeight/2)-n-b,("horizontal"===W?q:q-w._lineHeight/2)<h&&(q="auto"===u?Math.max(m.point.x,h)+("horizontal"===W?0:w._lineHeight/2)+x+b:h+("horizontal"===W?0:w._lineHeight/2)+n,(L=q+
|
|
315
|
-
W?q:q-w._lineHeight/2)>e-g-n-b&&(q="auto"===u?Math.min(m.point.x,e)-("horizontal"===W?g:g-w._lineHeight/2)-n-b:e-g-n+("horizontal"===W?0:w._lineHeight/2),(L=q-("horizontal"===W?0:w._lineHeight/2)<m.point.x)&&(q+=b)))):(h=Math.max(m.bounds.x1,c.x1),Math.min(m.bounds.x2,c.x2),b=0<=p.indexOf("range")||"error"===p?0>v?Math.max(m.bounds.x1,c.x1):Math.min(m.bounds.x2,c.x2)-g-
|
|
316
|
-
2),q=0>v?b:Math.min(m.point.x,b),q=Math.max(q,h+("horizontal"===W?0:w._lineHeight/2+x)));"vertical"===W&&(f+=k-w._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&(L=0<v?f+("horizontal"===W?k-w._lineHeight/2:0)>m.point.y:f-("horizontal"===W?w._lineHeight/2:k)<m.point.y),"bubble"===p||"scatter"===
|
|
317
|
-
c.x1&&m.point.x<c.x2||!L)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&("error"!==p||m.axisSwapped)&&m.point.y>c.y1&&m.point.y<c.y2||!L))&&(d.lineWidth=C,d.strokeStyle=s?s:"gray",d.setLineDash&&d.setLineDash(I(y,C)),d.beginPath(),d.moveTo(m.point.x,m.point.y),0<=p.indexOf("bar")||"error"===p&&
|
|
318
|
-
"error"===p&&!m.axisSwapped?d.lineTo(q+g/2-("horizontal"===W?0:w._lineHeight/2),f+("vertical"===W?f-k<m.point.y?0:-k:(f-w._lineHeight/2<m.point.y?k:0)-w._lineHeight/2)):0<=p.indexOf("waterfall")?d.lineTo(q+g/2-("horizontal"===W?0:w._lineHeight/2),"vertical"===W?0<v&&f<m.point.y?f:0>v&&f-k>m.point.y?f-k:m.point.y:0<v&&f+k-w._lineHeight/2<m.point.y?f+
|
|
319
|
-
f-k<m.point.y?0:-k:(f+k-w._lineHeight/2<m.point.y?k:0)-w._lineHeight/2)),d.stroke())}}d={source:d,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)m=this._indexLabels[a],w=ma("indexLabelBackgroundColor",m.dataPoint,m.dataSeries),
|
|
320
|
-
c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=[],n,x=0;x<a.dataSeriesIndexes.length;x++){var l=a.dataSeriesIndexes[x],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,p="solid";if(c.setLineDash){var q=
|
|
321
|
-
{objectType:"dataSeries",dataSeriesIndex:l};g=U(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,w=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var y=!0,s=0,C,u;c.beginPath();if(0<m.length){for(var W=!1,s=0;s<m.length;s++)if(C=m[s].x.getTime?m[s].x.getTime():m[s].x,!(C<a.axisX.dataInfo.viewPortMin||
|
|
322
|
-
r&&b.stroke()),W=!0;else{C=a.axisX.convertValueToPixel(C);u=a.axisY.convertValueToPixel(m[s].y);var t=k.dataPointIds[s];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:C,y1:u};y||W?(!y&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),
|
|
323
|
-
u),r&&(b.beginPath(),b.moveTo(C,u))),W=y=!1):(c.lineTo(C,u),r&&b.lineTo(C,u),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(C,u),r&&(b.stroke(),b.beginPath(),b.moveTo(C,u))));n={x:C,y:u};s<m.length-1&&(w!==(m[s].lineColor||g)||p!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(C,u),w=m[s].lineColor||g,c.strokeStyle=w,c.setLineDash&&(m[s].lineDashType?
|
|
324
|
-
0<k.markerSize)){var B=k.getMarkerProperties(s,C,u,c);h.push(B);t=U(t);r&&h.push({x:C,y:u,ctx:b,type:B.type,size:B.size,color:t,borderColor:t,borderThickness:B.borderThickness})}(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:m[s],dataSeries:k,point:{x:C,y:u},direction:0>m[s].y===
|
|
325
|
-
c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}};
|
|
326
|
-
t.prototype.renderStepLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=[],n,x=0;x<a.dataSeriesIndexes.length;x++){var l=a.dataSeriesIndexes[x],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,p="solid";if(c.setLineDash){var q=I(k.nullDataLineDashType,k.lineThickness),p=k.lineDashType,
|
|
327
|
-
f=I(p,k.lineThickness);c.setLineDash(f)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=U(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,w=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var y=!0,s=0,C,u;c.beginPath();if(0<m.length){for(var W=!1,s=0;s<m.length;s++)if(C=m[s].getTime?m[s].x.getTime():m[s].x,!(C<a.axisX.dataInfo.viewPortMin||C>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||
|
|
328
|
-
!W)))if("number"!==typeof m[s].y)0<s&&!(k.connectNullData||W||y)&&(c.stroke(),r&&b.stroke()),W=!0;else{var t=u;C=a.axisX.convertValueToPixel(C);u=a.axisY.convertValueToPixel(m[s].y);var B=k.dataPointIds[s];this._eventManager.objectMap[B]={id:B,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:C,y1:u};y||W?(!y&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(n.x,n.y),p=k.nullDataLineDashType,
|
|
329
|
-
c.setLineDash(q)),c.lineTo(C,t),c.lineTo(C,u),r&&(b.lineTo(C,t),b.lineTo(C,u))):(c.beginPath(),c.moveTo(C,u),r&&(b.beginPath(),b.moveTo(C,u))),W=y=!1):(c.lineTo(C,t),r&&b.lineTo(C,t),c.lineTo(C,u),r&&b.lineTo(C,u),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(C,u),r&&(b.stroke(),b.beginPath(),b.moveTo(C,u))));n={x:C,y:u};s<m.length-1&&(w!==(m[s].lineColor||g)||p!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(C,u),w=m[s].lineColor||g,c.strokeStyle=w,c.setLineDash&&(m[s].lineDashType?
|
|
330
|
-
(p=m[s].lineDashType,c.setLineDash(I(p,k.lineThickness))):(p=k.lineDashType,c.setLineDash(f))));0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)&&(t=k.getMarkerProperties(s,C,u,c),h.push(t),B=U(B),r&&h.push({x:C,y:u,ctx:b,type:t.type,size:t.size,color:B,borderColor:B,borderThickness:t.borderThickness}));(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:m[s],dataSeries:k,point:{x:C,y:u},direction:0>m[s].y===
|
|
309
|
+
0<=p.indexOf("scatter")){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||m.dataPoint.y<K.viewportMinimum||m.dataPoint.y>K.viewportMaximum)continue}else if(0<=p.indexOf("column")){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||(0<m.dataPoint.y.length?Math.max.apply(null,m.dataPoint.y):m.dataPoint.y)<K.viewportMinimum||(0<m.dataPoint.y.length?Math.max.apply(null,m.dataPoint.y):m.dataPoint.y)>K.viewportMaximum)continue}else if("waterfall"===p||"error"===p&&
|
|
310
|
+
!m.axisSwapped){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||m.bounds.y1>c.y2||m.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||m.bounds.x1>c.x2||m.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(m.dataPoint.x<z.viewportMinimum||m.dataPoint.x>z.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<K.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>K.viewportMaximum)continue}else if(m.dataPoint.x<
|
|
311
|
+
z.viewportMinimum||m.dataPoint.x>z.viewportMaximum)continue;n=x=2;"horizontal"===W?(g=w.width,k=w.height):(k=w.width,g=w.height);if("normal"===this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))u="auto",x=4;else if(0<=p.indexOf("stacked"))"auto"===u&&(u="inside");else if("bubble"===p||"scatter"===p)u="inside";q=m.point.x-g/2+("horizontal"===W?0:w._lineHeight/2);if("inside"!==u)e=c.y1,h=c.y2,0<v?(f=m.point.y+w._lineHeight/2-k-x-b,f<e&&(f="auto"===u?Math.max(m.point.y,e)+w._lineHeight/
|
|
312
|
+
2+x+b:e+w._lineHeight/2+x+b,L=f+("horizontal"===W?k-w._lineHeight/2:0)>m.point.y,!L||(0<=p.indexOf("line")||0<=p.indexOf("area"))||(f-=b))):(f=m.point.y+w._lineHeight/2+x+b,f>h-k+w._lineHeight/2-x&&(f="auto"===u?Math.min(m.point.y,h)+w._lineHeight/2-k-x-b:h+w._lineHeight/2-k-x-b,L=f-("horizontal"===W?w._lineHeight/2:k)<m.point.y,!L||(0<=p.indexOf("line")||0<=p.indexOf("area"))||(f+=b)));else{Math.max(m.bounds.y1,c.y1);h=Math.min(m.bounds.y2,c.y2)-k+w._lineHeight/2;b=0<=p.indexOf("range")||"error"===
|
|
313
|
+
p?0<v?Math.max(m.bounds.y1,c.y1)+w._lineHeight/2+x:Math.min(m.bounds.y2,c.y2)+w._lineHeight/2-k-x:(Math.max(m.bounds.y1,c.y1)+Math.min(m.bounds.y2,c.y2))/2-k/2+w._lineHeight/2;if(0<v){if(f=b,"bubble"===p||"scatter"===p)f=m.point.y-k/2+w._lineHeight/2,k>m.bounds.y2-m.bounds.y1&&(f-=k/2+x),0>f-w._lineHeight/2&&(f+=Math.abs(f-w._lineHeight/2)<=(m.bounds.y2-m.bounds.y1)/2+x?Math.abs(f-w._lineHeight/2):(m.bounds.y2-m.bounds.y1)/2+x)}else f=Math.min(m.point.y,b),f>h-k-x&&("bubble"===p||"scatter"===p)&&
|
|
314
|
+
(f=Math.min(m.point.y+x,c.y2-k-x));f=Math.min(f,h)}}else 0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("scatter")?(u="auto",n=4):0<=p.indexOf("stacked")?"auto"===u&&(u="inside"):"bubble"===p&&(u="inside"),f=m.point.y+w._lineHeight/2-k/2,"inside"!==u?(h=c.x1,e=c.x2,0>v?(q=m.point.x-g+("horizontal"===W?0:w._lineHeight/2)-n-b,("horizontal"===W?q:q-w._lineHeight/2)<h&&(q="auto"===u?Math.max(m.point.x,h)+("horizontal"===W?0:w._lineHeight/2)+x+b:h+("horizontal"===W?0:w._lineHeight/2)+n,(L=q+
|
|
315
|
+
g-("horizontal"===W?0:w._lineHeight/2)>m.point.x)&&(q-=b))):(q=m.point.x+("horizontal"===W?0:w._lineHeight/2)+n+b,("horizontal"===W?q:q-w._lineHeight/2)>e-g-n-b&&(q="auto"===u?Math.min(m.point.x,e)-("horizontal"===W?g:g-w._lineHeight/2)-n-b:e-g-n+("horizontal"===W?0:w._lineHeight/2),(L=q-("horizontal"===W?0:w._lineHeight/2)<m.point.x)&&(q+=b)))):(h=Math.max(m.bounds.x1,c.x1),Math.min(m.bounds.x2,c.x2),b=0<=p.indexOf("range")||"error"===p?0>v?Math.max(m.bounds.x1,c.x1):Math.min(m.bounds.x2,c.x2)-g-
|
|
316
|
+
n+("horizontal"===W?0:w._lineHeight/2):(Math.max(m.bounds.x1,c.x1)+Math.min(m.bounds.x2,c.x2))/2-g/2+("horizontal"===W?0:w._lineHeight/2),q=0>v?b:Math.min(m.point.x,b),q=Math.max(q,h+("horizontal"===W?0:w._lineHeight/2+x)));"vertical"===W&&(f+=k-w._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&(L=0<v?f+("horizontal"===W?k-w._lineHeight/2:0)>m.point.y:f-("horizontal"===W?w._lineHeight/2:k)<m.point.y),"bubble"===p||"scatter"===
|
|
317
|
+
p)&&(q+=w._lineHeight/2-D/2);w.x=q;w.y=f;w.render(!0);C&&("inside"!==u&&(0>p.indexOf("bar")&&("error"!==p||!m.axisSwapped)&&m.point.x>c.x1&&m.point.x<c.x2||!L)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&("error"!==p||m.axisSwapped)&&m.point.y>c.y1&&m.point.y<c.y2||!L))&&(d.lineWidth=C,d.strokeStyle=s?s:"gray",d.setLineDash&&d.setLineDash(I(y,C)),d.beginPath(),d.moveTo(m.point.x,m.point.y),0<=p.indexOf("bar")||"error"===p&&
|
|
318
|
+
m.axisSwapped?d.lineTo(q+(0<m.direction?0:g)+("vertical"===W?-w._lineHeight/2:0),f+("vertical"===W?-k/2:k/2-w._lineHeight/2)):0<=p.indexOf("column")||"error"===p&&!m.axisSwapped?d.lineTo(q+g/2-("horizontal"===W?0:w._lineHeight/2),f+("vertical"===W?f-k<m.point.y?0:-k:(f-w._lineHeight/2<m.point.y?k:0)-w._lineHeight/2)):0<=p.indexOf("waterfall")?d.lineTo(q+g/2-("horizontal"===W?0:w._lineHeight/2),"vertical"===W?0<v&&f<m.point.y?f:0>v&&f-k>m.point.y?f-k:m.point.y:0<v&&f+k-w._lineHeight/2<m.point.y?f+
|
|
319
|
+
k-w._lineHeight/2:0>v&&f-w._lineHeight/2>m.point.y?f-w._lineHeight/2:m.point.y):d.lineTo(q+g/2-("horizontal"===W?0:w._lineHeight/2),f+("vertical"===W?f-k<m.point.y?0:-k:(f+k-w._lineHeight/2<m.point.y?k:0)-w._lineHeight/2)),d.stroke())}}d={source:d,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)m=this._indexLabels[a],w=ma("indexLabelBackgroundColor",m.dataPoint,m.dataSeries),
|
|
320
|
+
m.dataSeries.indexLabelBackgroundColor=l(w)?r?"transparent":null:w;return d};t.prototype.renderLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=[],n,x=0;x<a.dataSeriesIndexes.length;x++){var l=a.dataSeriesIndexes[x],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,p="solid";if(c.setLineDash){var q=
|
|
321
|
+
I(k.nullDataLineDashType,k.lineThickness),p=k.lineDashType,f=I(p,k.lineThickness);c.setLineDash(f)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=U(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,w=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var y=!0,s=0,C,u;c.beginPath();if(0<m.length){for(var W=!1,s=0;s<m.length;s++)if(C=m[s].x.getTime?m[s].x.getTime():m[s].x,!(C<a.axisX.dataInfo.viewPortMin||
|
|
322
|
+
C>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!W)))if("number"!==typeof m[s].y)0<s&&!(k.connectNullData||W||y)&&(c.stroke(),r&&b.stroke()),W=!0;else{C=a.axisX.convertValueToPixel(C);u=a.axisY.convertValueToPixel(m[s].y);var t=k.dataPointIds[s];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:C,y1:u};y||W?(!y&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),
|
|
323
|
+
c.beginPath(),c.moveTo(n.x,n.y),p=k.nullDataLineDashType,c.setLineDash(q)),c.lineTo(C,u),r&&b.lineTo(C,u)):(c.beginPath(),c.moveTo(C,u),r&&(b.beginPath(),b.moveTo(C,u))),W=y=!1):(c.lineTo(C,u),r&&b.lineTo(C,u),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(C,u),r&&(b.stroke(),b.beginPath(),b.moveTo(C,u))));n={x:C,y:u};s<m.length-1&&(w!==(m[s].lineColor||g)||p!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(C,u),w=m[s].lineColor||g,c.strokeStyle=w,c.setLineDash&&(m[s].lineDashType?
|
|
324
|
+
(p=m[s].lineDashType,c.setLineDash(I(p,k.lineThickness))):(p=k.lineDashType,c.setLineDash(f))));if(0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)){var B=k.getMarkerProperties(s,C,u,c);h.push(B);t=U(t);r&&h.push({x:C,y:u,ctx:b,type:B.type,size:B.size,color:t,borderColor:t,borderThickness:B.borderThickness})}(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:m[s],dataSeries:k,point:{x:C,y:u},direction:0>m[s].y===
|
|
331
325
|
a.axisY.reversed?1:-1,color:g})}c.stroke();r&&b.stroke()}}aa.drawMarkers(h);r&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());
|
|
332
|
-
c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}};t.prototype.
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
a.
|
|
353
|
-
|
|
354
|
-
this.dataPointWidth
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
q,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
326
|
+
c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}};t.prototype.renderStepLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=[],n,x=0;x<a.dataSeriesIndexes.length;x++){var l=a.dataSeriesIndexes[x],k=this.data[l];
|
|
327
|
+
c.lineWidth=k.lineThickness;var m=k.dataPoints,p="solid";if(c.setLineDash){var q=I(k.nullDataLineDashType,k.lineThickness),p=k.lineDashType,f=I(p,k.lineThickness);c.setLineDash(f)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=U(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,w=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var y=!0,s=0,C,u;c.beginPath();if(0<m.length){for(var W=
|
|
328
|
+
!1,s=0;s<m.length;s++)if(C=m[s].getTime?m[s].x.getTime():m[s].x,!(C<a.axisX.dataInfo.viewPortMin||C>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!W)))if("number"!==typeof m[s].y)0<s&&!(k.connectNullData||W||y)&&(c.stroke(),r&&b.stroke()),W=!0;else{var t=u;C=a.axisX.convertValueToPixel(C);u=a.axisY.convertValueToPixel(m[s].y);var B=k.dataPointIds[s];this._eventManager.objectMap[B]={id:B,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:C,y1:u};y||W?(!y&&k.connectNullData?(c.setLineDash&&
|
|
329
|
+
(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(n.x,n.y),p=k.nullDataLineDashType,c.setLineDash(q)),c.lineTo(C,t),c.lineTo(C,u),r&&(b.lineTo(C,t),b.lineTo(C,u))):(c.beginPath(),c.moveTo(C,u),r&&(b.beginPath(),b.moveTo(C,u))),W=y=!1):(c.lineTo(C,t),r&&b.lineTo(C,t),c.lineTo(C,u),r&&b.lineTo(C,u),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(C,u),r&&(b.stroke(),b.beginPath(),b.moveTo(C,u))));n={x:C,y:u};s<m.length-1&&(w!==
|
|
330
|
+
(m[s].lineColor||g)||p!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(C,u),w=m[s].lineColor||g,c.strokeStyle=w,c.setLineDash&&(m[s].lineDashType?(p=m[s].lineDashType,c.setLineDash(I(p,k.lineThickness))):(p=k.lineDashType,c.setLineDash(f))));0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)&&(t=k.getMarkerProperties(s,C,u,c),h.push(t),B=U(B),r&&h.push({x:C,y:u,ctx:b,type:t.type,size:t.size,color:B,borderColor:B,borderThickness:t.borderThickness}));(m[s].indexLabel||
|
|
331
|
+
k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:m[s],dataSeries:k,point:{x:C,y:u},direction:0>m[s].y===a.axisY.reversed?1:-1,color:g})}c.stroke();r&&b.stroke()}}aa.drawMarkers(h);r&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,
|
|
332
|
+
this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}};t.prototype.renderSpline=function(a){function d(a){a=v(a,2);if(0<a.length){b.beginPath();r&&e.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);
|
|
333
|
+
a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);r&&e.moveTo(a[0].x,a[0].y);for(var c=0;c<a.length-3;c+=3)if(b.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),r&&e.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),0<c&&0===c%3E3||a[c+3].newStrokeStyle||a[c+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[c+3].x,a[c+3].y),a[c+3].newStrokeStyle&&(b.strokeStyle=a[c+3].newStrokeStyle),a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),
|
|
334
|
+
r&&(e.stroke(),e.beginPath(),e.moveTo(a[c+3].x,a[c+3].y));b.stroke();r&&e.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx;b.save();var h=this.plotArea;b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();for(var n=[],x=0;x<a.dataSeriesIndexes.length;x++){var l=a.dataSeriesIndexes[x],k=this.data[l];b.lineWidth=k.lineThickness;var m=k.dataPoints,p="solid";if(b.setLineDash){var q=I(k.nullDataLineDashType,
|
|
335
|
+
k.lineThickness),p=k.lineDashType,f=I(p,k.lineThickness);b.setLineDash(f)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=U(g);e.strokeStyle=g;e.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,w=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];b.strokeStyle=g;var y=0,s,C,u=[];b.beginPath();if(0<m.length)for(C=!1,y=0;y<m.length;y++)if(s=m[y].getTime?m[y].x.getTime():m[y].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&
|
|
336
|
+
(!k.connectNullData||!C)))if("number"!==typeof m[y].y)0<y&&!C&&(k.connectNullData?b.setLineDash&&(0<u.length&&(k.options.nullDataLineDashType||!m[y-1].lineDashType))&&(u[u.length-1].newLineDashArray=q,p=k.nullDataLineDashType):(d(u),u=[])),C=!0;else{s=a.axisX.convertValueToPixel(s);C=a.axisY.convertValueToPixel(m[y].y);var W=k.dataPointIds[y];this._eventManager.objectMap[W]={id:W,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:y,x1:s,y1:C};u[u.length]={x:s,y:C};y<m.length-1&&(w!==(m[y].lineColor||
|
|
337
|
+
g)||p!==(m[y].lineDashType||k.lineDashType))&&(w=m[y].lineColor||g,u[u.length-1].newStrokeStyle=w,b.setLineDash&&(m[y].lineDashType?(p=m[y].lineDashType,u[u.length-1].newLineDashArray=I(p,k.lineThickness)):(p=k.lineDashType,u[u.length-1].newLineDashArray=f)));if(0!==m[y].markerSize&&(0<m[y].markerSize||0<k.markerSize)){var t=k.getMarkerProperties(y,s,C,b);n.push(t);W=U(W);r&&n.push({x:s,y:C,ctx:e,type:t.type,size:t.size,color:W,borderColor:W,borderThickness:t.borderThickness})}(m[y].indexLabel||k.indexLabel||
|
|
338
|
+
m[y].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:m[y],dataSeries:k,point:{x:s,y:C},direction:0>m[y].y===a.axisY.reversed?1:-1,color:g});C=!1}d(u)}aa.drawMarkers(n);r&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
|
|
339
|
+
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),e.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}};t.prototype.renderColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=0,n,x,l,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?
|
|
340
|
+
a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(p)/
|
|
341
|
+
Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>m&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<h)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));p<h&&(p=h);p>m&&(p=m);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,
|
|
342
|
+
e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(m=0;m<a.dataSeriesIndexes.length;m++){var q=a.dataSeriesIndexes[m],f=this.data[q],g=f.dataPoints;if(0<g.length)for(var w=5<p&&f.bevelEnabled?!0:!1,h=0;h<g.length;h++)if(g[h].getTime?l=g[h].x.getTime():l=g[h].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof g[h].y){n=a.axisX.convertValueToPixel(l);x=a.axisY.convertValueToPixel(g[h].y);n=a.axisX.reversed?n+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+
|
|
343
|
+
m)*p<<0:n-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+m)*p<<0;var y=a.axisX.reversed?n-p<<0:n+p<<0,s;0<=g[h].y?s=k:(s=x,x=k);x>s&&(b=x,x=s,s=b);b=g[h].color?g[h].color:f._colorSet[h%f._colorSet.length];da(c,a.axisX.reversed?y:n,x,a.axisX.reversed?n:y,s,b,0,null,w&&(a.axisY.reversed?0>g[h].y:0<=g[h].y),(a.axisY.reversed?0<=g[h].y:0>g[h].y)&&w,!1,!1,f.fillOpacity);b=f.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:h,x1:n,y1:x,
|
|
344
|
+
x2:y,y2:s};b=U(b);r&&da(this._eventManager.ghostCtx,a.axisX.reversed?y:n,x,a.axisX.reversed?n:y,s,b,0,null,!1,!1,!1,!1);(g[h].indexLabel||f.indexLabel||g[h].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:g[h],dataSeries:f,point:{x:n+(y-n)/2,y:0>g[h].y===a.axisY.reversed?x:s},direction:0>g[h].y===a.axisY.reversed?1:-1,bounds:{x1:n,y1:Math.min(x,s),x2:y,y2:Math.max(x,s)},color:b})}}r&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation=
|
|
345
|
+
"source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.yScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:k<a.axisY.bounds.y1?
|
|
346
|
+
a.axisY.bounds.y1:k>a.axisY.bounds.y2?a.axisY.bounds.y2:k}}};t.prototype.renderStackedColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],n=[],x=[],l=[],k=0,m,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:
|
|
347
|
+
this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,g=a.axisX.dataInfo.minDiff;isFinite(g)||(g=0.3*Math.abs(a.axisX.range));g=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(g)/Math.log(a.axisX.range):Math.abs(g)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>f&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<k)&&(f=Math.max(this.options.dataPointWidth?
|
|
348
|
+
this.dataPointWidth:-Infinity,k));g<k&&(g=k);g>f&&(g=f);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var w=a.dataSeriesIndexes[f],y=this.data[w],s=y.dataPoints;if(0<s.length){var C=5<g&&y.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<s.length;k++)if(b=
|
|
349
|
+
s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){m=a.axisX.convertValueToPixel(b);m=m-a.plotType.plotUnits.length*g/2+a.index*g<<0;var u=m+g<<0,t;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y)x[b]=s[k].y+(x[b]?x[b]:0),0<x[b]&&(p=a.axisY.convertValueToPixel(x[b]),t="undefined"!==typeof h[b]?h[b]:q,h[b]=p);else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
|
|
350
|
+
0>=s[k].y)l[b]=s[k].y+(l[b]?l[b]:0),t=a.axisY.convertValueToPixel(l[b]),p="undefined"!==typeof n[b]?n[b]:q,n[b]=t;else if(p=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var v="undefined"!==typeof h[b]?h[b]:0;p-=v;t=q-v;h[b]=v+(t-p)}else v=n[b]?n[b]:0,t=p+v,p=q+v,n[b]=v+(t-p);b=s[k].color?s[k].color:y._colorSet[k%y._colorSet.length];da(c,m,a.axisY.reversed?t:p,u,a.axisY.reversed?p:t,b,0,null,C&&(a.axisY.reversed?0>s[k].y:0<=s[k].y),(a.axisY.reversed?0<=s[k].y:0>s[k].y)&&C,!1,!1,y.fillOpacity);b=
|
|
351
|
+
y.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:w,dataPointIndex:k,x1:m,y1:p,x2:u,y2:t};b=U(b);r&&da(this._eventManager.ghostCtx,m,p,u,t,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||y.indexLabel||s[k].indexLabelFormatter||y.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:s[k],dataSeries:y,point:{x:m+(u-m)/2,y:0<=s[k].y?p:t},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:m,y1:Math.min(p,t),x2:u,y2:Math.max(p,t)},color:b})}}}r&&
|
|
352
|
+
(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.yScaleAnimation,
|
|
353
|
+
easingFunction:Q.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};t.prototype.renderStackedColumn100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],n=[],x=[],l=[],k=0,m,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:
|
|
354
|
+
1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,g=a.axisX.dataInfo.minDiff;isFinite(g)||(g=0.3*Math.abs(a.axisX.range));g=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(g)/Math.log(a.axisX.range):Math.abs(g)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>f&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&
|
|
355
|
+
(this.dataPointMinWidth&&f<k)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));g<k&&(g=k);g>f&&(g=f);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var w=a.dataSeriesIndexes[f],y=this.data[w],s=y.dataPoints;if(0<s.length)for(var C=5<g&&
|
|
356
|
+
y.bevelEnabled?!0:!1,k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){m=a.axisX.convertValueToPixel(b);p=0!==a.dataPointYSums[b]?100*(s[k].y/a.dataPointYSums[b]):0;m=m-a.plotType.plotUnits.length*g/2+a.index*g<<0;var u=m+g<<0,t;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y){x[b]=p+("undefined"!==typeof x[b]?x[b]:0);if(0>=x[b])continue;p=a.axisY.convertValueToPixel(x[b]);
|
|
357
|
+
t=h[b]?h[b]:q;h[b]=p}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)l[b]=p+("undefined"!==typeof l[b]?l[b]:0),t=a.axisY.convertValueToPixel(l[b]),p=n[b]?n[b]:q,n[b]=t;else if(p=a.axisY.convertValueToPixel(p),0<=s[k].y){var v="undefined"!==typeof h[b]?h[b]:0;p-=v;t=q-v;a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.y1-p)&&(p=e.y1);h[b]=v+(t-p)}else v="undefined"!==typeof n[b]?n[b]:0,t=p+v,p=q+v,a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.y2-t)&&(t=e.y2),n[b]=
|
|
358
|
+
v+(t-p);b=s[k].color?s[k].color:y._colorSet[k%y._colorSet.length];da(c,m,a.axisY.reversed?t:p,u,a.axisY.reversed?p:t,b,0,null,C&&(a.axisY.reversed?0>s[k].y:0<=s[k].y),(a.axisY.reversed?0<=s[k].y:0>s[k].y)&&C,!1,!1,y.fillOpacity);b=y.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:w,dataPointIndex:k,x1:m,y1:p,x2:u,y2:t};b=U(b);r&&da(this._eventManager.ghostCtx,m,p,u,t,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||y.indexLabel||s[k].indexLabelFormatter||y.indexLabelFormatter)&&
|
|
359
|
+
this._indexLabels.push({chartType:"stackedColumn100",dataPoint:s[k],dataSeries:y,point:{x:m+(u-m)/2,y:0<=s[k].y?p:t},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:m,y1:Math.min(p,t),x2:u,y2:Math.max(p,t)},color:b})}}r&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
|
|
360
|
+
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.yScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};t.prototype.renderBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=
|
|
361
|
+
null,e=this.plotArea,h=0,n,x,l,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.options.dataPointWidth?
|
|
362
|
+
this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>m&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<h)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));p<h&&(p=h);p>m&&(p=m);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);
|
|
363
|
+
c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(m=0;m<a.dataSeriesIndexes.length;m++){var q=a.dataSeriesIndexes[m],f=this.data[q],g=f.dataPoints;if(0<g.length){var w=5<p&&f.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(h=0;h<g.length;h++)if(g[h].getTime?l=g[h].x.getTime():l=g[h].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof g[h].y){x=a.axisX.convertValueToPixel(l);
|
|
364
|
+
n=a.axisY.convertValueToPixel(g[h].y);x=a.axisX.reversed?x+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+m)*p<<0:x-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+m)*p<<0;var y=a.axisX.reversed?x-p<<0:x+p<<0,s;0<=g[h].y?s=k:(s=n,n=k);b=g[h].color?g[h].color:f._colorSet[h%f._colorSet.length];da(c,a.axisY.reversed?n:s,a.axisX.reversed?y:x,a.axisY.reversed?s:n,a.axisX.reversed?x:y,b,0,null,w,!1,!1,!1,f.fillOpacity);b=f.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",
|
|
365
|
+
dataSeriesIndex:q,dataPointIndex:h,x1:s,y1:x,x2:n,y2:y};b=U(b);r&&da(this._eventManager.ghostCtx,s,a.axisX.reversed?y:x,n,a.axisX.reversed?x:y,b,0,null,!1,!1,!1,!1);(g[h].indexLabel||f.indexLabel||g[h].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:g[h],dataSeries:f,point:{x:0<=g[h].y?n:s,y:x+(y-x)/2},direction:0>g[h].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,n),y1:x,x2:Math.max(s,n),y2:y},color:b})}}}r&&(d.drawImage(this._preRenderCanvas,0,0,
|
|
366
|
+
this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.xScaleAnimation,easingFunction:Q.easing.easeOutQuart,
|
|
367
|
+
animationBase:k<a.axisY.bounds.x1?a.axisY.bounds.x1:k>a.axisY.bounds.x2?a.axisY.bounds.x2:k}}};t.prototype.renderStackedBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],n=[],l=[],g=[],k=0,m,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?
|
|
368
|
+
this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,D=a.axisX.dataInfo.minDiff;isFinite(D)||(D=0.3*Math.abs(a.axisX.range));D=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(D)/Math.log(a.axisX.range):Math.abs(D)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>f&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&
|
|
369
|
+
f<k)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));D<k&&(D=k);D>f&&(D=f);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var w=a.dataSeriesIndexes[f],y=this.data[w],s=y.dataPoints;if(0<s.length){var C=5<D&&y.bevelEnabled?!0:!1;c.strokeStyle=
|
|
370
|
+
"#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){p=a.axisX.convertValueToPixel(b);p=p-a.plotType.plotUnits.length*D/2+a.index*D<<0;var u=p+D<<0,t;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y)l[b]=s[k].y+(l[b]?l[b]:0),0<l[b]&&(t=h[b]?h[b]:q,h[b]=m=a.axisY.convertValueToPixel(l[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
|
|
371
|
+
0>=s[k].y)g[b]=s[k].y+(g[b]?g[b]:0),m=n[b]?n[b]:q,n[b]=t=a.axisY.convertValueToPixel(g[b]);else if(m=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var v=h[b]?h[b]:0;t=q+v;m+=v;h[b]=v+(m-t)}else v=n[b]?n[b]:0,t=m-v,m=q-v,n[b]=v+(m-t);b=s[k].color?s[k].color:y._colorSet[k%y._colorSet.length];da(c,a.axisY.reversed?m:t,p,a.axisY.reversed?t:m,u,b,0,null,C,!1,!1,!1,y.fillOpacity);b=y.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:w,dataPointIndex:k,x1:t,y1:p,
|
|
372
|
+
x2:m,y2:u};b=U(b);r&&da(this._eventManager.ghostCtx,t,p,m,u,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||y.indexLabel||s[k].indexLabelFormatter||y.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:s[k],dataSeries:y,point:{x:0<=s[k].y?m:t,y:p+(u-p)/2},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(t,m),y1:p,x2:Math.max(t,m),y2:u},color:b})}}}r&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&
|
|
373
|
+
c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.xScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?
|
|
374
|
+
a.axisY.bounds.x2:q}}};t.prototype.renderStackedBar100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],n=[],l=[],g=[],k=0,m,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
|
|
375
|
+
0.15*this.height<<0,D=a.axisX.dataInfo.minDiff;isFinite(D)||(D=0.3*Math.abs(a.axisX.range));D=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(D)/Math.log(a.axisX.range):Math.abs(D)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>f&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<k)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,
|
|
376
|
+
k));D<k&&(D=k);D>f&&(D=f);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var w=a.dataSeriesIndexes[f],y=this.data[w],s=y.dataPoints;if(0<s.length){var C=5<D&&y.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():
|
|
377
|
+
s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){p=a.axisX.convertValueToPixel(b);var u;u=0!==a.dataPointYSums[b]?100*(s[k].y/a.dataPointYSums[b]):0;p=p-a.plotType.plotUnits.length*D/2+a.index*D<<0;var t=p+D<<0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y){l[b]=u+(l[b]?l[b]:0);if(0>=l[b])continue;u=h[b]?h[b]:q;h[b]=m=a.axisY.convertValueToPixel(l[b])}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
|
|
378
|
+
0>=s[k].y)g[b]=u+(g[b]?g[b]:0),m=n[b]?n[b]:q,n[b]=u=a.axisY.convertValueToPixel(g[b]);else if(m=a.axisY.convertValueToPixel(u),0<=s[k].y){var v=h[b]?h[b]:0;u=q+v;m+=v;a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.x2-m)&&(m=e.x2);h[b]=v+(m-u)}else v=n[b]?n[b]:0,u=m-v,m=q-v,a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.x1-u)&&(u=e.x1),n[b]=v+(m-u);b=s[k].color?s[k].color:y._colorSet[k%y._colorSet.length];da(c,a.axisY.reversed?m:u,p,a.axisY.reversed?u:m,t,b,0,null,C,!1,!1,!1,y.fillOpacity);b=y.dataPointIds[k];
|
|
379
379
|
this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:w,dataPointIndex:k,x1:u,y1:p,x2:m,y2:t};b=U(b);r&&da(this._eventManager.ghostCtx,u,p,m,t,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||y.indexLabel||s[k].indexLabelFormatter||y.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:s[k],dataSeries:y,point:{x:0<=s[k].y?m:u,y:p+(t-p)/2},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(u,m),y1:p,x2:Math.max(u,m),y2:t},color:b})}}}r&&(d.drawImage(this._preRenderCanvas,
|
|
380
380
|
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.xScaleAnimation,easingFunction:Q.easing.easeOutQuart,
|
|
381
381
|
animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};t.prototype.renderArea=function(a){var d,c;function b(){v&&(0<f.lineThickness&&h.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?t=u:0>a.axisY.viewportMaximum?t=l.y1:0<a.axisY.viewportMinimum&&(t=u),h.lineTo(y,t),h.lineTo(v.x,t),h.closePath(),h.globalAlpha=f.fillOpacity,h.fill(),h.globalAlpha=1,r&&(n.lineTo(y,t),n.lineTo(v.x,t),n.closePath(),n.fill()),h.beginPath(),h.moveTo(y,
|
|
@@ -470,10 +470,10 @@ dataSeriesIndex:q,dataPointIndex:h,x1:n,y1:E,x2:g,y2:y};b=U(b);r&&da(this._event
|
|
|
470
470
|
dataPoint:t[h],dataSeries:f,indexKeyword:1,point:{x:t[h].y[1]>=t[h].y[0]?g:n,y:E+(y-E)/2},direction:t[h].y[1]>=t[h].y[0]?1:-1,bounds:{x1:Math.min(n,g),y1:E,x2:Math.max(n,g),y2:y},color:b})}}}r&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
471
471
|
0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}};t.prototype.renderRangeArea=function(a){function d(){if(v){for(var a=null,c=l.length-1;0<=c;c--)a=l[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0<m.lineThickness){b.beginPath();
|
|
472
472
|
b.moveTo(a.x,a.y2);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y2);b.moveTo(l[0].x,l[0].y1);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(t,w);e.beginPath();e.moveTo(t,w);v={x:t,y:w};l=[];l.push({x:t,y1:w,y2:y})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=[],n=this.plotArea;b.save();r&&e.save();b.beginPath();b.rect(n.x1,n.y1,n.width,n.height);b.clip();r&&(e.beginPath(),
|
|
473
|
-
e.rect(n.x1,n.y1,n.width,n.height),e.clip());for(var g=0;g<a.dataSeriesIndexes.length;g++){var l=[],k=a.dataSeriesIndexes[g],m=this.data[k],p=m.dataPoints,h=m.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:k};h=U(h);e.fillStyle=h;var h=[],q=!0,f=0,t,w,y,s,v=null;if(0<p.length){var u=m._colorSet[f%m._colorSet.length],
|
|
473
|
+
e.rect(n.x1,n.y1,n.width,n.height),e.clip());for(var g=0;g<a.dataSeriesIndexes.length;g++){var l=[],k=a.dataSeriesIndexes[g],m=this.data[k],p=m.dataPoints,h=m.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:k};h=U(h);e.fillStyle=h;var h=[],q=!0,f=0,t,w,y,s,v=null;if(0<p.length){var u=m._colorSet[f%m._colorSet.length],z=m.lineColor=m.options.lineColor||u,A=z;b.fillStyle=u;b.strokeStyle=z;b.lineWidth=m.lineThickness;var B="solid";if(b.setLineDash){var G=I(m.nullDataLineDashType,
|
|
474
474
|
m.lineThickness),B=m.lineDashType,J=I(B,m.lineThickness);b.setLineDash(J)}for(var K=!0;f<p.length;f++)if(s=p[f].x.getTime?p[f].x.getTime():p[f].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!K)))if(null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){t=a.axisX.convertValueToPixel(s);w=a.axisY.convertValueToPixel(p[f].y[0]);y=a.axisY.convertValueToPixel(p[f].y[1]);q||K?(m.connectNullData&&!q?(b.setLineDash&&(m.options.nullDataLineDashType||
|
|
475
475
|
B===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=J,B=m.nullDataLineDashType,b.setLineDash(G)),b.lineTo(t,w),r&&e.lineTo(t,w),l.push({x:t,y1:w,y2:y})):(b.beginPath(),b.moveTo(t,w),v={x:t,y:w},l=[],l.push({x:t,y1:w,y2:y}),r&&(e.beginPath(),e.moveTo(t,w))),K=q=!1):(b.lineTo(t,w),l.push({x:t,y1:w,y2:y}),r&&e.lineTo(t,w),0==f%250&&d());s=m.dataPointIds[f];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:f,x1:t,y1:w,
|
|
476
|
-
y2:y};f<p.length-1&&(
|
|
476
|
+
y2:y};f<p.length-1&&(A!==(p[f].lineColor||z)||B!==(p[f].lineDashType||m.lineDashType))&&(d(),A=p[f].lineColor||z,l[l.length-1].newStrokeStyle=A,b.strokeStyle=A,b.setLineDash&&(p[f].lineDashType?(B=p[f].lineDashType,l[l.length-1].newLineDashArray=I(B,m.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):(B=m.lineDashType,l[l.length-1].newLineDashArray=J,b.setLineDash(J))));if(0!==p[f].markerSize&&(0<p[f].markerSize||0<m.markerSize)){var L=m.getMarkerProperties(f,t,y,b);h.push(L);var ca=U(s);
|
|
477
477
|
r&&h.push({x:t,y:y,ctx:e,type:L.type,size:L.size,color:ca,borderColor:ca,borderThickness:L.borderThickness});L=m.getMarkerProperties(f,t,w,b);h.push(L);ca=U(s);r&&h.push({x:t,y:w,ctx:e,type:L.type,size:L.size,color:ca,borderColor:ca,borderThickness:L.borderThickness})}if(p[f].indexLabel||m.indexLabel||p[f].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:m,indexKeyword:0,point:{x:t,y:w},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?
|
|
478
478
|
-1:1,color:u}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:m,indexKeyword:1,point:{x:t,y:y},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?1:-1,color:u})}else K||q||d(),K=!0;d();aa.drawMarkers(h)}}r&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
|
|
479
479
|
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(n.x1,n.y1,n.width,n.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}};t.prototype.renderRangeSplineArea=function(a){function d(a,c){var f=v(w,2);if(0<f.length){if(0<k.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(f[0].x,f[0].y);for(var d=
|
|
@@ -481,19 +481,19 @@ this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height
|
|
|
481
481
|
1].x,f[d+1].y,f[d+2].x,f[d+2].y,f[d+3].x,f[d+3].y);f=v(y,2);b.lineTo(y[y.length-1].x,y[y.length-1].y);for(d=f.length-1;2<d;d-=3)b.bezierCurveTo(f[d-1].x,f[d-1].y,f[d-2].x,f[d-2].y,f[d-3].x,f[d-3].y),r&&e.bezierCurveTo(f[d-1].x,f[d-1].y,f[d-2].x,f[d-2].y,f[d-3].x,f[d-3].y);b.closePath();b.globalAlpha=k.fillOpacity;b.fill();r&&(e.closePath(),e.fill());b.globalAlpha=1;if(0<k.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(f[0].x,f[0].y);for(var h=d=0;d<f.length-
|
|
482
482
|
3;d+=3,h++){if(w[h].newStrokeStyle||w[h].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[d].x,f[d].y),w[h].newStrokeStyle&&(b.strokeStyle=w[h].newStrokeStyle),w[h].newLineDashArray&&b.setLineDash(w[h].newLineDashArray);b.bezierCurveTo(f[d+1].x,f[d+1].y,f[d+2].x,f[d+2].y,f[d+3].x,f[d+3].y)}f=v(w,2);b.moveTo(f[0].x,f[0].y);for(h=d=0;d<f.length-3;d+=3,h++){if(w[h].newStrokeStyle||w[h].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[d].x,f[d].y),w[h].newStrokeStyle&&(b.strokeStyle=w[h].newStrokeStyle),
|
|
483
483
|
w[h].newLineDashArray&&b.setLineDash(w[h].newLineDashArray);b.bezierCurveTo(f[d+1].x,f[d+1].y,f[d+2].x,f[d+2].y,f[d+3].x,f[d+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=[],n=this.plotArea;b.save();r&&e.save();b.beginPath();b.rect(n.x1,n.y1,n.width,n.height);b.clip();r&&(e.beginPath(),e.rect(n.x1,n.y1,n.width,n.height),e.clip());for(var g=0;g<a.dataSeriesIndexes.length;g++){var l=
|
|
484
|
-
a.dataSeriesIndexes[g],k=this.data[l],m=k.dataPoints,h=k.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:l};h=U(h);e.fillStyle=h;var h=[],p=0,q,f,t,w=[],y=[];if(0<m.length){var s=k._colorSet[p%k._colorSet.length],C=k.lineColor=k.options.lineColor||s,u=C;b.fillStyle=s;b.lineWidth=k.lineThickness;var
|
|
484
|
+
a.dataSeriesIndexes[g],k=this.data[l],m=k.dataPoints,h=k.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:l};h=U(h);e.fillStyle=h;var h=[],p=0,q,f,t,w=[],y=[];if(0<m.length){var s=k._colorSet[p%k._colorSet.length],C=k.lineColor=k.options.lineColor||s,u=C;b.fillStyle=s;b.lineWidth=k.lineThickness;var z="solid",A;if(b.setLineDash){var B=I(k.nullDataLineDashType,k.lineThickness),z=k.lineDashType;A=I(z,k.lineThickness)}for(f=!1;p<m.length;p++)if(q=m[p].x.getTime?m[p].x.getTime():
|
|
485
485
|
m[p].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!f)))if(null!==m[p].y&&m[p].y.length&&"number"===typeof m[p].y[0]&&"number"===typeof m[p].y[1]){q=a.axisX.convertValueToPixel(q);f=a.axisY.convertValueToPixel(m[p].y[0]);t=a.axisY.convertValueToPixel(m[p].y[1]);var G=k.dataPointIds[p];this._eventManager.objectMap[G]={id:G,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:p,x1:q,y1:f,y2:t};w[w.length]={x:q,y:f};y[y.length]={x:q,y:t};p<m.length-1&&(u!==
|
|
486
|
-
(m[p].lineColor||C)||
|
|
486
|
+
(m[p].lineColor||C)||z!==(m[p].lineDashType||k.lineDashType))&&(u=m[p].lineColor||C,w[w.length-1].newStrokeStyle=u,b.setLineDash&&(m[p].lineDashType?(z=m[p].lineDashType,w[w.length-1].newLineDashArray=I(z,k.lineThickness)):(z=k.lineDashType,w[w.length-1].newLineDashArray=A)));if(0!==m[p].markerSize&&(0<m[p].markerSize||0<k.markerSize)){var J=k.getMarkerProperties(p,q,f,b);h.push(J);var K=U(G);r&&h.push({x:q,y:f,ctx:e,type:J.type,size:J.size,color:K,borderColor:K,borderThickness:J.borderThickness});
|
|
487
487
|
J=k.getMarkerProperties(p,q,t,b);h.push(J);K=U(G);r&&h.push({x:q,y:t,ctx:e,type:J.type,size:J.size,color:K,borderColor:K,borderThickness:J.borderThickness})}if(m[p].indexLabel||k.indexLabel||m[p].indexLabelFormatter||k.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:m[p],dataSeries:k,indexKeyword:0,point:{x:q,y:f},direction:m[p].y[0]<=m[p].y[1]?-1:1,color:s}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:m[p],dataSeries:k,indexKeyword:1,point:{x:q,
|
|
488
|
-
y:t},direction:m[p].y[0]<=m[p].y[1]?1:-1,color:s});f=!1}else 0<p&&!f&&(k.connectNullData?b.setLineDash&&(0<w.length&&(k.options.nullDataLineDashType||!m[p-1].lineDashType))&&(w[w.length-1].newLineDashArray=B,
|
|
488
|
+
y:t},direction:m[p].y[0]<=m[p].y[1]?1:-1,color:s});f=!1}else 0<p&&!f&&(k.connectNullData?b.setLineDash&&(0<w.length&&(k.options.nullDataLineDashType||!m[p-1].lineDashType))&&(w[w.length-1].newLineDashArray=B,z=k.nullDataLineDashType):(d(A,C),w=[],y=[])),f=!0;d(A,C);aa.drawMarkers(h)}}r&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,
|
|
489
489
|
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(n.x1,n.y1,n.width,n.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}};t.prototype.renderWaterfall=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,
|
|
490
490
|
e=null,h=this.plotArea,n=0,g,l,k,m,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),n=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;l=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?
|
|
491
491
|
this.dataPointWidth:0.6*(h.width*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&n>l&&(n=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&l<n)&&(l=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,n));q<n&&(q=n);q>l&&(q=l);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);
|
|
492
492
|
c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var t=a.dataSeriesIndexes[f],w=this.data[t],y=w.dataPoints,e=w._colorSet[0];w.risingColor=w.options.risingColor?w.options.risingColor:e;w.fallingColor=w.options.fallingColor?w.options.fallingColor:"#e40a0a";var s="number"===typeof w.options.lineThickness?Math.round(w.lineThickness):1,v=1===Math.round(s)%
|
|
493
|
-
2?-0.5:0;if(0<y.length)for(var u=5<q&&w.bevelEnabled?!0:!1,
|
|
493
|
+
2?-0.5:0;if(0<y.length)for(var u=5<q&&w.bevelEnabled?!0:!1,z=!1,A=null,B=null,n=0;n<y.length;n++)if(y[n].getTime?m=y[n].x.getTime():m=y[n].x,"number"!==typeof y[n].y){if(0<n&&!z&&w.connectNullData)var G=w.options.nullDataLineDashType||!y[n-1].lineDashType?w.nullDataLineDashType:y[n-1].lineDashType;z=!0}else{g=a.axisX.convertValueToPixel(m);l=0===w.dataPointEOs[n].cumulativeSum?p:a.axisY.convertValueToPixel(w.dataPointEOs[n].cumulativeSum);k=0===w.dataPointEOs[n].cumulativeSumYStartValue?p:a.axisY.convertValueToPixel(w.dataPointEOs[n].cumulativeSumYStartValue);
|
|
494
494
|
g=a.axisX.reversed?g+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+f)*q<<0:g-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+f)*q<<0;var J=a.axisX.reversed?g-q<<0:g+q<<0;l>k&&(e=l,l=k,k=e);a.axisY.reversed&&(e=l,l=k,k=e);e=w.dataPointIds[n];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:n,x1:g,y1:l,x2:J,y2:k};var K=y[n].color?y[n].color:0<y[n].y?w.risingColor:w.fallingColor;da(c,a.axisX.reversed?J:g,a.axisY.reversed?k:l,a.axisX.reversed?
|
|
495
|
-
g:J,a.axisY.reversed?l:k,K,0,K,u,u,!1,!1,w.fillOpacity);e=U(e);r&&da(this._eventManager.ghostCtx,a.axisX.reversed?J:g,l,a.axisX.reversed?g:J,k,e,0,null,!1,!1,!1,!1);var L,K=g;L="undefined"!==typeof y[n].isIntermediateSum&&!0===y[n].isIntermediateSum||"undefined"!==typeof y[n].isCumulativeSum&&!0===y[n].isCumulativeSum?0<y[n].y?l:k:0<y[n].y?k:l;0<n&&
|
|
496
|
-
B-v),b.lineTo(K,L-v),0<s&&b.stroke()));
|
|
495
|
+
g:J,a.axisY.reversed?l:k,K,0,K,u,u,!1,!1,w.fillOpacity);e=U(e);r&&da(this._eventManager.ghostCtx,a.axisX.reversed?J:g,l,a.axisX.reversed?g:J,k,e,0,null,!1,!1,!1,!1);var L,K=g;L="undefined"!==typeof y[n].isIntermediateSum&&!0===y[n].isIntermediateSum||"undefined"!==typeof y[n].isCumulativeSum&&!0===y[n].isCumulativeSum?0<y[n].y?l:k:0<y[n].y?k:l;0<n&&A&&(!z||w.connectNullData)&&(z&&c.setLineDash&&c.setLineDash(I(G,s)),c.beginPath(),c.moveTo(A,B-v),c.lineTo(K,L-v),0<s&&c.stroke(),r&&(b.beginPath(),b.moveTo(A,
|
|
496
|
+
B-v),b.lineTo(K,L-v),0<s&&b.stroke()));z=!1;A=J;B=0<y[n].y?l:k;K=y[n].lineDashType?y[n].lineDashType:w.options.lineDashType?w.options.lineDashType:"shortDash";c.strokeStyle=y[n].lineColor?y[n].lineColor:w.options.lineColor?w.options.lineColor:"#9e9e9e";c.lineWidth=s;c.setLineDash&&(K=I(K,s),c.setLineDash(K));(y[n].indexLabel||w.indexLabel||y[n].indexLabelFormatter||w.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:y[n],dataSeries:w,point:{x:g+(J-g)/2,y:0<=y[n].y?l:k},
|
|
497
497
|
direction:0>y[n].y===a.axisY.reversed?1:-1,bounds:{x1:g,y1:Math.min(l,k),x2:J,y2:Math.max(l,k)},color:e})}}r&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,
|
|
498
498
|
h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}};var X=function(a,d,c,b,e,h,n,g,l){if(!(0>c)){"undefined"===typeof g&&(g=1);if(!r){var k=Number((n%(2*Math.PI)).toFixed(8));Number((h%(2*Math.PI)).toFixed(8))===k&&(n-=1E-4)}a.save();a.globalAlpha=g;"pie"===e?(a.beginPath(),a.moveTo(d.x,d.y),a.arc(d.x,d.y,c,h,n,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=
|
|
499
499
|
2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(d.x,d.y,c,h,n,!1),0<=l&&a.arc(d.x,d.y,l*c,n,h,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};t.prototype.renderPie=function(a){function d(){if(k&&m){var a=0,b=0,c=0,e=0;l(k.options.indexLabelMaxWidth)&&(k.indexLabelMaxWidth=0.33*q.width);for(var d=0;d<m.length;d++){var h=m[d],n=k.dataPointIds[d];f[d].id=n;f[d].objectType="dataPoint";f[d].dataPointIndex=d;f[d].dataSeriesIndex=
|
|
@@ -501,7 +501,7 @@ h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,des
|
|
|
501
501
|
B;g.percentInnerRadius=J;g.indexLabelText=p;g.indexLabelPlacement=k.indexLabelPlacement;g.indexLabelLineColor=h.indexLabelLineColor?h.indexLabelLineColor:k.options.indexLabelLineColor?k.options.indexLabelLineColor:h.color?h.color:k._colorSet[d%k._colorSet.length];g.indexLabelLineThickness=l(h.indexLabelLineThickness)?k.indexLabelLineThickness:h.indexLabelLineThickness;g.indexLabelLineDashType=h.indexLabelLineDashType?h.indexLabelLineDashType:k.indexLabelLineDashType;g.indexLabelFontColor=h.indexLabelFontColor?
|
|
502
502
|
h.indexLabelFontColor:k.indexLabelFontColor;g.indexLabelFontStyle=h.indexLabelFontStyle?h.indexLabelFontStyle:k.indexLabelFontStyle;g.indexLabelFontWeight=h.indexLabelFontWeight?h.indexLabelFontWeight:k.indexLabelFontWeight;g.indexLabelFontSize=l(h.indexLabelFontSize)?k.indexLabelFontSize:h.indexLabelFontSize;g.indexLabelFontFamily=h.indexLabelFontFamily?h.indexLabelFontFamily:k.indexLabelFontFamily;g.indexLabelBackgroundColor=h.indexLabelBackgroundColor?h.indexLabelBackgroundColor:k.options.indexLabelBackgroundColor?
|
|
503
503
|
k.options.indexLabelBackgroundColor:k.indexLabelBackgroundColor;g.indexLabelBorderColor=h.indexLabelBorderColor?h.indexLabelBorderColor:k.options.indexLabelBorderColor?k.options.indexLabelBorderColor:k.indexLabelBorderColor;g.indexLabelBorderThickness=h.indexLabelBorderThickness?h.indexLabelBorderThickness:k.options.indexLabelBorderThickness?k.options.indexLabelBorderThickness:k.indexLabelBorderThickness;g.indexLabelMaxWidth=h.indexLabelMaxWidth?h.indexLabelMaxWidth:k.indexLabelMaxWidth;g.indexLabelWrap=
|
|
504
|
-
"undefined"!==typeof h.indexLabelWrap?h.indexLabelWrap:k.indexLabelWrap;g.indexLabelTextAlign=h.indexLabelTextAlign?h.indexLabelTextAlign:k.indexLabelTextAlign?k.indexLabelTextAlign:"left";g.startAngle=0===d?k.startAngle?k.startAngle/180*Math.PI:0:f[d-1].endAngle;g.startAngle=(g.startAngle+2*Math.PI)%(2*Math.PI);g.endAngle=g.startAngle+2*Math.PI/
|
|
504
|
+
"undefined"!==typeof h.indexLabelWrap?h.indexLabelWrap:k.indexLabelWrap;g.indexLabelTextAlign=h.indexLabelTextAlign?h.indexLabelTextAlign:k.indexLabelTextAlign?k.indexLabelTextAlign:"left";g.startAngle=0===d?k.startAngle?k.startAngle/180*Math.PI:0:f[d-1].endAngle;g.startAngle=(g.startAngle+2*Math.PI)%(2*Math.PI);g.endAngle=g.startAngle+2*Math.PI/z*Math.abs(h.y);h=(g.endAngle+g.startAngle)/2;h=(h+2*Math.PI)%(2*Math.PI);g.midAngle=h;if(g.midAngle>Math.PI/2-s&&g.midAngle<Math.PI/2+s){if(0===a||f[c].midAngle>
|
|
505
505
|
g.midAngle)c=d;a++}else if(g.midAngle>3*Math.PI/2-s&&g.midAngle<3*Math.PI/2+s){if(0===b||f[e].midAngle>g.midAngle)e=d;b++}g.hemisphere=h>Math.PI/2&&h<=3*Math.PI/2?"left":"right";g.indexLabelTextBlock=new ka(t.plotArea.ctx,{fontSize:g.indexLabelFontSize,fontFamily:g.indexLabelFontFamily,fontColor:g.indexLabelFontColor,fontStyle:g.indexLabelFontStyle,fontWeight:g.indexLabelFontWeight,textAlign:g.indexLabelTextAlign,backgroundColor:g.indexLabelBackgroundColor,borderColor:g.indexLabelBorderColor,borderThickness:g.indexLabelBorderThickness,
|
|
506
506
|
maxWidth:g.indexLabelMaxWidth,maxHeight:g.indexLabelWrap?5*g.indexLabelFontSize:1.5*g.indexLabelFontSize,text:g.indexLabelText,padding:0,textBaseline:"middle"});g.indexLabelTextBlock.measureText()}n=h=0;p=!1;for(d=0;d<m.length;d++)g=f[(c+d)%m.length],1<a&&(g.midAngle>Math.PI/2-s&&g.midAngle<Math.PI/2+s)&&(h<=a/2&&!p?(g.hemisphere="right",h++):(g.hemisphere="left",p=!0));p=!1;for(d=0;d<m.length;d++)g=f[(e+d)%m.length],1<b&&(g.midAngle>3*Math.PI/2-s&&g.midAngle<3*Math.PI/2+s)&&(n<=b/2&&!p?(g.hemisphere=
|
|
507
507
|
"left",n++):(g.hemisphere="right",p=!0))}}function c(a,b){var c=t.plotArea.ctx;c.clearRect(q.x1,q.y1,q.width,q.height);c.fillStyle=t.backgroundColor;c.fillRect(q.x1,q.y1,q.width,q.height);for(c=0;c<m.length;c++){var e=f[c].startAngle,d=f[c].endAngle;if(d>e){var h=0.07*B*Math.cos(f[c].midAngle),n=0.07*B*Math.sin(f[c].midAngle),g=!1;if(m[c].exploded){if(1E-9<Math.abs(f[c].center.x-(u.x+h))||1E-9<Math.abs(f[c].center.y-(u.y+n)))f[c].center.x=u.x+h*a,f[c].center.y=u.y+n*a,g=!0}else if(0<Math.abs(f[c].center.x-
|
|
@@ -522,24 +522,24 @@ g.indexLabelTextBlock.height/2-u.y)<B||Math.abs(g.indexLabelTextBlock.y+g.indexL
|
|
|
522
522
|
u.x)<B&&(x/=Math.abs(Math.sin(g.indexLabelAngle)),9<x&&(x*=0.3),x>d&&(d=x)));var O=function(a,b,c){for(var d=[],e=0;d.push(f[b]),b!==c;b=(b+1+m.length)%m.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,d=0,h=!1,k=0;k<m.length;k++)if(h=!1,l=f[k],l.indexLabelText){var n=e(k);if(null!==n){var g=f[n];A=0;
|
|
523
523
|
A=b(l,g);var q;if(q=0>A){q=l.indexLabelTextBlock.x;var x=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2,s=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2,t=g.indexLabelTextBlock.y-g.indexLabelTextBlock.height/2,r=g.indexLabelTextBlock.x+g.indexLabelTextBlock.width,u=g.indexLabelTextBlock.y+g.indexLabelTextBlock.height/2;q=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width<g.indexLabelTextBlock.x-p||q>r+p||x>u+p||s<t-p?!1:!0}q?(0>a&&(a=k),n!==a&&(c=n,d+=-A),0===k%Math.max(m.length/
|
|
524
524
|
10,3)&&(h=!0)):h=!0;h&&(0<d&&0<=a&&0<=c)&&(O(d,a,c),c=a=-1,d=0)}}0<d&&O(d,a,c)})()}}function g(){t.plotArea.layoutManager.reset();t.title&&(t.title.dockInsidePlotArea||"center"===t.title.horizontalAlign&&"center"===t.title.verticalAlign)&&t.title.render();if(t.subtitles)for(var a=0;a<t.subtitles.length;a++){var b=t.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}t.legend&&(t.legend.dockInsidePlotArea||"center"===t.legend.horizontalAlign&&"center"===
|
|
525
|
-
t.legend.verticalAlign)&&(t.legend.setLayout(),t.legend.render())}var t=this;if(!(0>=a.dataSeriesIndexes.length)){var k=this.data[a.dataSeriesIndexes[0]],m=k.dataPoints,p=10,q=this.plotArea,f=k.dataPointEOs,r=2,w,y=1.3,s=20/180*Math.PI,v=6,u={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},
|
|
526
|
-
0<m[
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
t.
|
|
530
|
-
a.lineTo(Math.round(d.x6),Math.round(d.y6))),a.closePath(),a.fillStyle=b?b:d.color,a.fill(),a.globalAplha=1,a.restore())};t.prototype.renderFunnel=function(a){function d(){for(var a=0,b=[],c=0;c<C.length;c++){if("undefined"===typeof C[c].y)return-1;C[c].y="number"===typeof C[c].y?C[c].y:0;a+=Math.abs(C[c].y)}if(0===a)return-1;for(c=b[0]=0;c<C.length;c++)b.push(Math.abs(C[c].y)*G/a);return b}function c(){var a=Y,b=$,c=O,d=aa,f,e;f=R;e=T-M;d=Math.abs((e-f)*(b-a+(d-c))/2);c=aa-O;f=
|
|
531
|
-
e=d+e;for(var d=[],h=0,k=0;k<C.length;k++){if("undefined"===typeof C[k].y)return-1;C[k].y="number"===typeof C[k].y?C[k].y:0;h+=Math.abs(C[k].y)}if(0===h)return-1;for(var g=d[0]=0,n=0,l,m,b=b-a,g=!1,k=0;k<C.length;k++)a=Math.abs(C[k].y)*e/h,g?l=0==Number(c.toFixed(3))?0:a/c:(m=da*da*b*b-4*Math.abs(da)*a,0>m?(m=c,g=(b+m)*(f-n)/2,a-=g,l=f-n,n+=f-n,l+=0==m?0:a/m,n+=a/m,g=!0):(l=(Math.abs(da)*b-Math.sqrt(m))/2,m=b-2*l/Math.abs(da),n+=l,n>f&&(n-=l,m=c,g=(b+m)*(f-n)/2,a-=g,l=
|
|
532
|
-
b=m)),d.push(l);return d}function b(){if(s&&C){for(var a,b,c,d,e,h,k,n,g,m,p,q,x,t,u,w,E,v=[],A=[],z={percent:null,total:null},D=null,B=0;B<C.length;B++)E=S[B],E="undefined"!==typeof E.x5?(E.y2+E.y4)/2:(E.y2+E.y3)/2,E=f(E).x2+1,v[B]=P-E-U;E=0.5*U;for(var B=0,F=C.length-1;B<C.length||0<=F;B++,F--){b=s.reversed?C[F]:C[B];a=b.color?b.color:s.reversed?s._colorSet[(C.length-1-B)%s._colorSet.length]:s._colorSet[B%s._colorSet.length];c=b.indexLabelPlacement||s.indexLabelPlacement||
|
|
533
|
-
s.indexLabelTextAlign||"left";d=b.indexLabelBackgroundColor||s.indexLabelBackgroundColor||(r?"transparent":null);e=b.indexLabelBorderColor||s.indexLabelBorderColor||(r?"transparent":null);h=l(b.indexLabelBorderThickness)?s.indexLabelBorderThickness:b.indexLabelBorderThickness;k=b.indexLabelFontColor||s.indexLabelFontColor||"#979797";n=l(b.indexLabelFontSize)?s.indexLabelFontSize:b.indexLabelFontSize;g=b.indexLabelFontStyle||s.indexLabelFontStyle||"normal";m=b.indexLabelFontFamily||
|
|
534
|
-
"arial";p=b.indexLabelFontWeight||s.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||s.options.indexLabelLineColor||a;q="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof s.indexLabelLineThickness?s.indexLabelLineThickness:2;x=b.indexLabelLineDashType||s.indexLabelLineDashType||"solid";t="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof s.indexLabelWrap?s.indexLabelWrap:!0;u=s.dataPointIds[B];y._eventManager.objectMap[u]=
|
|
535
|
-
objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:S[s.reversed?C.length-1-B:B]};"inside"===s.indexLabelPlacement&&(v[B]=B!==fa?s.reversed?S[B].x2-S[B].x1:S[B].x3-S[B].x4:S[B].x3-S[B].x6,20>v[B]&&(v[B]=B!==fa?s.reversed?S[B].x3-S[B].x4:S[B].x2-S[B].x1:S[B].x2-S[B].x1,v[B]/=2));u=b.indexLabelMaxWidth?b.indexLabelMaxWidth:s.options.indexLabelMaxWidth?s.indexLabelMaxWidth:v[B];if(u>v[B]||0>u)u=v[B];A[B]="inside"===s.indexLabelPlacement?t?Math.max(S[B].height,n):1.5*n:!1;z=
|
|
536
|
-
b);if(s.indexLabelFormatter||b.indexLabelFormatter)D={chart:y.options,dataSeries:s,dataPoint:b,total:z.total,percent:z.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(D):b.indexLabel?y.replaceKeywordsWithValue(b.indexLabel,b,s,B):s.indexLabelFormatter?s.indexLabelFormatter(D):s.indexLabel?y.replaceKeywordsWithValue(s.indexLabel,b,s,B):b.label?b.label:"";0>=q&&(q=0);1E3>u&&1E3-u<E&&(u+=1E3-u);l(s.options.indexLabelMaxWidth)&&(s.indexLabelMaxWidth=l(s.indexLabelMaxWidth)?
|
|
537
|
-
N.roundRect||za(N);c=new ka(N,{fontSize:n,fontFamily:m,fontColor:k,fontStyle:g,fontWeight:p,horizontalAlign:c,textAlign:w,backgroundColor:d,borderColor:e,borderThickness:h,maxWidth:u,maxHeight:!1===A[B]?t?4.28571429*n:1.5*n:A[B],text:b,padding:ga,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;H.push({textBlock:c,id:s.reversed?F:B,isDirty:!1,lineColor:a,lineThickness:q,lineDashType:x,height:c.height<
|
|
538
|
-
width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,d,f,e=[];f=!1;c=0;for(var h,k=P-$-U/2,k=s.options.indexLabelMaxWidth?s.indexLabelMaxWidth>k?k:s.indexLabelMaxWidth:k,n=H.length-1;0<=n;n--){h=C[H[n].id];c=H[n];d=c.textBlock;b=(a=q(n)<S.length?H[q(n)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+ga>b.y&&(f=!0);c=h.indexLabelMaxWidth||k;if(c>k||0>c)c=k;e.push(c)}if(f)for(n=H.length-1;0<=n;n--)a=S[n],H[n].textBlock.maxWidth=e[e.length-(n+1)],H[n].textBlock.measureText(),
|
|
539
|
-
H[n].textBlock.height===2*H[n].textBlock.padding?0:H[n].textBlock.height,H[n].textBlock.width=H[n].textBlock.width===2*H[n].textBlock.padding?0:H[n].textBlock.width,H[n].textBlock.x=P-k,c=H[n].textBlock.height<H[n].textBlock.maxHeight?H[n].textBlock.height:H[n].textBlock.maxHeight,f=H[n].textBlock.width<H[n].textBlock.maxWidth?H[n].textBlock.width:H[n].textBlock.maxWidth,H[n].height=c,H[n].width=f,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,H[n].textBlock.y=c-H[n].height/
|
|
540
|
-
(H[n].textBlock.y+H[n].height>V+z&&(H[n].textBlock.y=V+z-H[n].height),H[n].textBlock.y<ra-z&&(H[n].textBlock.y=ra-z)):(H[n].textBlock.y<V-z&&(H[n].textBlock.y=V-z),H[n].textBlock.y+H[n].height>ra+z&&(H[n].textBlock.y=ra+z-H[n].height))}function h(){var a,b,c,d;if("inside"!==s.indexLabelPlacement)for(var e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=s.reversed?"undefined"!==typeof a.x5?c>Da?f(c).x2+1:
|
|
541
|
-
1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<Da?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,H[e].textBlock.x=b+U,H[e].textBlock.y=c-H[e].height/2,s.reversed?(H[e].textBlock.y+H[e].height>V+z&&(H[e].textBlock.y=V+z-H[e].height),H[e].textBlock.y<ra-z&&(H[e].textBlock.y=ra-z)):(H[e].textBlock.y<V-z&&(H[e].textBlock.y=V-z),H[e].textBlock.y+H[e].height>ra+z&&(H[e].textBlock.y=ra+z-H[e].height)));else for(e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],b=a.height,c=
|
|
542
|
-
H[e].width,b>=c?(b=e!=fa?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=fa?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,H[e].textBlock.x=b,H[e].textBlock.y=c):H[e].isDirty=!0)}function g(){function a(b,c){var d;if(0>b||b>=H.length)return 0;var e,f=H[b].textBlock;if(0>c){c*=-1;e=p(b);d=x(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0<d&&(f.y-=d),d;d+=a(e,-(c-d));0<d&&(f.y-=d);return d}e=q(b);d=x(b,e);if(d>=c)return f.y+=c,c;if(b==S.length-1)return 0<d&&(f.y+=d),d;d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,
|
|
525
|
+
t.legend.verticalAlign)&&(t.legend.setLayout(),t.legend.render())}var t=this;if(!(0>=a.dataSeriesIndexes.length)){var k=this.data[a.dataSeriesIndexes[0]],m=k.dataPoints,p=10,q=this.plotArea,f=k.dataPointEOs,r=2,w,y=1.3,s=20/180*Math.PI,v=6,u={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},z=0;a=!1;for(var A=0;A<m.length;A++)z+=Math.abs(m[A].y),!a&&("undefined"!==typeof m[A].indexLabel&&null!==m[A].indexLabel&&0<m[A].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof m[A].label&&null!==m[A].label&&
|
|
526
|
+
0<m[A].label.toString().length)&&(a=!0);if(0!==z){a=a||"undefined"!==typeof k.indexLabel&&null!==k.indexLabel&&0<k.indexLabel.toString().length;var B="inside"!==k.indexLabelPlacement&&a?0.75*Math.min(q.width,q.height)/2:0.92*Math.min(q.width,q.height)/2;k.radius&&(B=Ua(k.radius,B));var G="undefined"!==typeof k.innerRadius&&null!==k.innerRadius?Ua(k.innerRadius,B):0.7*B,J=Math.min(G/B,(B-1)/B);this.pieDoughnutClickHandler=function(a){t.isAnimating||!l(this.explodeOnClick)&&!this.explodeOnClick||(a=
|
|
527
|
+
a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&t._animator.animate(0,500,function(a){c(a,!0);g();t.dispatchEvent("dataAnimationIterationEnd",{chart:t});t.dispatchEvent("dataAnimationEnd",{chart:t})}))};d();n();n();n();n();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=t.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=t.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(var b=f[0].startAngle+
|
|
528
|
+
2*Math.PI*a,c=0;c<m.length;c++){var d=0===c?f[c].startAngle:e,e=d+(f[c].endAngle-f[c].startAngle),h=!1;e>b&&(e=b,h=!0);var n=m[c].color?m[c].color:k._colorSet[c%k._colorSet.length];e>d&&X(t.plotArea.ctx,f[c].center,f[c].radius,n,k.type,d,e,k.fillOpacity,f[c].percentInnerRadius);if(h)break}g();t.dispatchEvent("dataAnimationIterationEnd",{chart:t});1<=a&&t.dispatchEvent("dataAnimationEnd",{chart:t})},function(){t.disableToolTip=!1;t._animator.animate(0,t.animatedRender?500:0,function(a){c(a,!1);g();
|
|
529
|
+
t.dispatchEvent("dataAnimationIterationEnd",{chart:t})});t.dispatchEvent("dataAnimationEnd",{chart:t})});k.radius=B;"doughnut"===k.type&&(k.innerRadius=G)}}};var pa=function(a,d,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(d.y4-d.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(d.x1),Math.round(d.y1)),a.lineTo(Math.round(d.x2),Math.round(d.y2)),a.lineTo(Math.round(d.x3),Math.round(d.y3)),a.lineTo(Math.round(d.x4),Math.round(d.y4)),"undefined"!==d.x5&&(a.lineTo(Math.round(d.x5),
|
|
530
|
+
Math.round(d.y5)),a.lineTo(Math.round(d.x6),Math.round(d.y6))),a.closePath(),a.fillStyle=b?b:d.color,a.fill(),a.globalAplha=1,a.restore())};t.prototype.renderFunnel=function(a){function d(){for(var a=0,b=[],c=0;c<C.length;c++){if("undefined"===typeof C[c].y)return-1;C[c].y="number"===typeof C[c].y?C[c].y:0;a+=Math.abs(C[c].y)}if(0===a)return-1;for(c=b[0]=0;c<C.length;c++)b.push(Math.abs(C[c].y)*G/a);return b}function c(){var a=Y,b=$,c=O,d=aa,f,e;f=R;e=T-M;d=Math.abs((e-f)*(b-a+(d-c))/2);c=aa-O;f=
|
|
531
|
+
e-f;e=c*(e-T);e=Math.abs(e);e=d+e;for(var d=[],h=0,k=0;k<C.length;k++){if("undefined"===typeof C[k].y)return-1;C[k].y="number"===typeof C[k].y?C[k].y:0;h+=Math.abs(C[k].y)}if(0===h)return-1;for(var g=d[0]=0,n=0,l,m,b=b-a,g=!1,k=0;k<C.length;k++)a=Math.abs(C[k].y)*e/h,g?l=0==Number(c.toFixed(3))?0:a/c:(m=da*da*b*b-4*Math.abs(da)*a,0>m?(m=c,g=(b+m)*(f-n)/2,a-=g,l=f-n,n+=f-n,l+=0==m?0:a/m,n+=a/m,g=!0):(l=(Math.abs(da)*b-Math.sqrt(m))/2,m=b-2*l/Math.abs(da),n+=l,n>f&&(n-=l,m=c,g=(b+m)*(f-n)/2,a-=g,l=
|
|
532
|
+
f-n,n+=f-n,l+=a/m,n+=a/m,g=!0),b=m)),d.push(l);return d}function b(){if(s&&C){for(var a,b,c,d,e,h,k,n,g,m,p,q,x,t,u,w,E,v=[],A=[],z={percent:null,total:null},D=null,B=0;B<C.length;B++)E=S[B],E="undefined"!==typeof E.x5?(E.y2+E.y4)/2:(E.y2+E.y3)/2,E=f(E).x2+1,v[B]=P-E-U;E=0.5*U;for(var B=0,F=C.length-1;B<C.length||0<=F;B++,F--){b=s.reversed?C[F]:C[B];a=b.color?b.color:s.reversed?s._colorSet[(C.length-1-B)%s._colorSet.length]:s._colorSet[B%s._colorSet.length];c=b.indexLabelPlacement||s.indexLabelPlacement||
|
|
533
|
+
"outside";w=b.indexLabelTextAlign||s.indexLabelTextAlign||"left";d=b.indexLabelBackgroundColor||s.indexLabelBackgroundColor||(r?"transparent":null);e=b.indexLabelBorderColor||s.indexLabelBorderColor||(r?"transparent":null);h=l(b.indexLabelBorderThickness)?s.indexLabelBorderThickness:b.indexLabelBorderThickness;k=b.indexLabelFontColor||s.indexLabelFontColor||"#979797";n=l(b.indexLabelFontSize)?s.indexLabelFontSize:b.indexLabelFontSize;g=b.indexLabelFontStyle||s.indexLabelFontStyle||"normal";m=b.indexLabelFontFamily||
|
|
534
|
+
s.indexLabelFontFamily||"arial";p=b.indexLabelFontWeight||s.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||s.options.indexLabelLineColor||a;q="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof s.indexLabelLineThickness?s.indexLabelLineThickness:2;x=b.indexLabelLineDashType||s.indexLabelLineDashType||"solid";t="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof s.indexLabelWrap?s.indexLabelWrap:!0;u=s.dataPointIds[B];y._eventManager.objectMap[u]=
|
|
535
|
+
{id:u,objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:S[s.reversed?C.length-1-B:B]};"inside"===s.indexLabelPlacement&&(v[B]=B!==fa?s.reversed?S[B].x2-S[B].x1:S[B].x3-S[B].x4:S[B].x3-S[B].x6,20>v[B]&&(v[B]=B!==fa?s.reversed?S[B].x3-S[B].x4:S[B].x2-S[B].x1:S[B].x2-S[B].x1,v[B]/=2));u=b.indexLabelMaxWidth?b.indexLabelMaxWidth:s.options.indexLabelMaxWidth?s.indexLabelMaxWidth:v[B];if(u>v[B]||0>u)u=v[B];A[B]="inside"===s.indexLabelPlacement?t?Math.max(S[B].height,n):1.5*n:!1;z=
|
|
536
|
+
y.getPercentAndTotal(s,b);if(s.indexLabelFormatter||b.indexLabelFormatter)D={chart:y.options,dataSeries:s,dataPoint:b,total:z.total,percent:z.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(D):b.indexLabel?y.replaceKeywordsWithValue(b.indexLabel,b,s,B):s.indexLabelFormatter?s.indexLabelFormatter(D):s.indexLabel?y.replaceKeywordsWithValue(s.indexLabel,b,s,B):b.label?b.label:"";0>=q&&(q=0);1E3>u&&1E3-u<E&&(u+=1E3-u);l(s.options.indexLabelMaxWidth)&&(s.indexLabelMaxWidth=l(s.indexLabelMaxWidth)?
|
|
537
|
+
u:Math.max(u,s.indexLabelMaxWidth));N.roundRect||za(N);c=new ka(N,{fontSize:n,fontFamily:m,fontColor:k,fontStyle:g,fontWeight:p,horizontalAlign:c,textAlign:w,backgroundColor:d,borderColor:e,borderThickness:h,maxWidth:u,maxHeight:!1===A[B]?t?4.28571429*n:1.5*n:A[B],text:b,padding:ga,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;H.push({textBlock:c,id:s.reversed?F:B,isDirty:!1,lineColor:a,lineThickness:q,lineDashType:x,height:c.height<
|
|
538
|
+
c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,d,f,e=[];f=!1;c=0;for(var h,k=P-$-U/2,k=s.options.indexLabelMaxWidth?s.indexLabelMaxWidth>k?k:s.indexLabelMaxWidth:k,n=H.length-1;0<=n;n--){h=C[H[n].id];c=H[n];d=c.textBlock;b=(a=q(n)<S.length?H[q(n)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+ga>b.y&&(f=!0);c=h.indexLabelMaxWidth||k;if(c>k||0>c)c=k;e.push(c)}if(f)for(n=H.length-1;0<=n;n--)a=S[n],H[n].textBlock.maxWidth=e[e.length-(n+1)],H[n].textBlock.measureText(),
|
|
539
|
+
H[n].textBlock.height=H[n].textBlock.height===2*H[n].textBlock.padding?0:H[n].textBlock.height,H[n].textBlock.width=H[n].textBlock.width===2*H[n].textBlock.padding?0:H[n].textBlock.width,H[n].textBlock.x=P-k,c=H[n].textBlock.height<H[n].textBlock.maxHeight?H[n].textBlock.height:H[n].textBlock.maxHeight,f=H[n].textBlock.width<H[n].textBlock.maxWidth?H[n].textBlock.width:H[n].textBlock.maxWidth,H[n].height=c,H[n].width=f,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,H[n].textBlock.y=c-H[n].height/
|
|
540
|
+
2,s.reversed?(H[n].textBlock.y+H[n].height>V+z&&(H[n].textBlock.y=V+z-H[n].height),H[n].textBlock.y<ra-z&&(H[n].textBlock.y=ra-z)):(H[n].textBlock.y<V-z&&(H[n].textBlock.y=V-z),H[n].textBlock.y+H[n].height>ra+z&&(H[n].textBlock.y=ra+z-H[n].height))}function h(){var a,b,c,d;if("inside"!==s.indexLabelPlacement)for(var e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=s.reversed?"undefined"!==typeof a.x5?c>Da?f(c).x2+1:
|
|
541
|
+
(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<Da?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,H[e].textBlock.x=b+U,H[e].textBlock.y=c-H[e].height/2,s.reversed?(H[e].textBlock.y+H[e].height>V+z&&(H[e].textBlock.y=V+z-H[e].height),H[e].textBlock.y<ra-z&&(H[e].textBlock.y=ra-z)):(H[e].textBlock.y<V-z&&(H[e].textBlock.y=V-z),H[e].textBlock.y+H[e].height>ra+z&&(H[e].textBlock.y=ra+z-H[e].height)));else for(e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],b=a.height,c=
|
|
542
|
+
H[e].height,d=H[e].width,b>=c?(b=e!=fa?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=fa?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,H[e].textBlock.x=b,H[e].textBlock.y=c):H[e].isDirty=!0)}function g(){function a(b,c){var d;if(0>b||b>=H.length)return 0;var e,f=H[b].textBlock;if(0>c){c*=-1;e=p(b);d=x(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0<d&&(f.y-=d),d;d+=a(e,-(c-d));0<d&&(f.y-=d);return d}e=q(b);d=x(b,e);if(d>=c)return f.y+=c,c;if(b==S.length-1)return 0<d&&(f.y+=d),d;d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,
|
|
543
543
|
d,e,f,h=0,n;f=(T-R+2*z)/l;n=l;for(var k,g=1;g<n;g++){e=g*f;for(var m=H.length-1;0<=m;m--)!H[m].isDirty&&(H[m].textBlock.y<e&&H[m].textBlock.y+H[m].height>e)&&(k=q(m),!(k>=H.length-1)&&H[m].textBlock.y+H[m].height+ga>H[k].textBlock.y&&(H[m].textBlock.y=H[m].textBlock.y+H[m].height-e>e-H[m].textBlock.y?e+1:e-H[m].height-1))}for(k=S.length-1;0<k;k--)if(!H[k].isDirty){e=p(k);if(0>e&&(e=0,H[e].isDirty))break;if(H[k].textBlock.y<H[e].textBlock.y+H[e].height){d=d||k;f=k;for(n=0;H[f].textBlock.y<H[e].textBlock.y+
|
|
544
544
|
H[e].height+ga;){a=a||H[f].textBlock.y+H[f].height;n+=H[f].height;n+=ga;f=e;if(0>=f){f=0;n+=H[f].height;break}e=p(f);if(0>e){f=0;n+=H[f].height;break}}if(f!=k){h=H[f].textBlock.y;a-=h;a=n-a;h=c(a,d,f);break}}}return h}function c(a,b,d){var e=[],f=0,h=0;for(a=Math.abs(a);d<=b;d++)e.push(S[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d<e.length;d++)if(b=e[d],f<a)h++,f+=H[b.id].height+ga,H[b.id].textBlock.text="",H[b.id].indexLabelText="",H[b.id].isDirty=!0,H[b.id].textBlock.measureText();
|
|
545
545
|
else break;return h}for(var d,e,f,h,n,k,l=1,m=0;m<2*l;m++){for(var s=H.length-1;0<=s&&!(0<=p(s)&&p(s),f=H[s],h=f.textBlock,k=(n=q(s)<S.length?H[q(s)]:null)?n.textBlock:null,d=+f.height.toFixed(6),e=+h.y.toFixed(6),!f.isDirty&&(n&&e+d+ga>+k.y.toFixed(6))&&(d=h.y+d+ga-k.y,e=a(s,-d),e<d&&(0<e&&(d-=e),e=a(q(s),d),e!=d)));s--);b()}}function x(a,b){return(b<S.length?H[b].textBlock.y:s.reversed?V+z:ra+z)-(0>a?s.reversed?ra-z:V-z:H[a].textBlock.y+H[a].height+ga)}function t(a,b,c){var d,e,f,n=[],g=z,l=[];
|
|
@@ -659,75 +659,76 @@ q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*h.height:1.5*q[f].titleFontSiz
|
|
|
659
659
|
b.length;f++)z.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateWidth():0)),aa+=z[f],$+=b[f]?b[f].margin:0;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));P.push(z);n=Math.round(h.x1+S+O);r=Math.round(h.x2-aa-$>m.width-p?m.width-p:h.x2-aa-$);if(a&&0<a.length)for(v=[],f=X=0;f<a.length;f++)a[f]&&(a[f].lineCoordinates={}),a[f].lineCoordinates.width=Math.abs(r-n),a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.width?a[f].titleMaxWidth:
|
|
660
660
|
a[f].lineCoordinates.width),v.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateHeight():0)),X+=v[f],e+=a[f]&&!m.isNavigator?a[f].margin:0;else v.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));Q.push(v);if(d&&0<d.length)for(u=[],f=Z=0;f<d.length;f++)d[f]&&(d[f].lineCoordinates={}),d[f].lineCoordinates.width=Math.abs(r-n),d[f].title&&(d[f]._titleTextBlock.maxWidth=0<d[f].titleMaxWidth&&d[f].titleMaxWidth<d[f].lineCoordinates.width?d[f].titleMaxWidth:d[f].lineCoordinates.width),u.push(Math.ceil(d[f]?
|
|
661
661
|
d[f].createLabelsAndCalculateHeight():0)),Z+=u[f],Y+=d[f]&&!m.isNavigator?d[f].margin:0;else u.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateHeight():0));R.push(u);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].lineCoordinates.x1=n,r=Math.round(h.x2-aa-$>m.width-p?m.width-p:h.x2-aa-$),a[f]._labels&&1<a[f]._labels.length&&(g=k=0,k=a[f]._labels[1],g="dateTime"===a[f].valueType?a[f]._labels[a[f]._labels.length-2]:a[f]._labels[a[f]._labels.length-1],y=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+
|
|
662
|
-
(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle))),!a[f]||(!a[f].labelAutoFit||l(B)||l(G)||m.isNavigator||m.stockChart)||(g=0,0<a[f].labelAngle?G+s>r&&(
|
|
663
|
-
a[f].labelAngle&&(G+s>r&&(g=G+s/2-r-aa),B-y<n&&B-y<a[f].viewportMinimum&&(I=n-O-a[f].tickLength-A-B+y/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<g?r-=g:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0>a[f].labelAngle&&0<I?n+=
|
|
664
|
-
X:m.sessionVariables.axisX.height:m.sessionVariables.axisX.height=X,g=Math.round(h.y2-X-e+F),k=Math.round(h.y2),a[f].lineCoordinates.x2=r,a[f].lineCoordinates.width=r-n,a[f].lineCoordinates.y1=g,a[f].lineCoordinates.y2=g,"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.y1=
|
|
665
|
-
a[f].lineCoordinates.y1+a[f].lineThickness/2),a[f].bounds={x1:n,y1:g,x2:r,y2:k-(X+e-v[f]-F),width:r-n},a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1),F+=v[f]+a[f].margin;if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].lineCoordinates.x1=Math.round(h.x1+S+O),d[f].lineCoordinates.x2=
|
|
666
|
-
1],y=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-
|
|
667
|
-
Math.round(h.y1),k=d[f].lineCoordinates.y1=g+Z+Y-T,d[f].lineCoordinates.y2=g,"inside"===d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.y1=d[0].lineCoordinates.y1-T-(d[f].labelEffectiveHeight||0)-5),"inside"===d[f].tickPlacement&&0<f&&(d[f].lineCoordinates.y1-=
|
|
668
|
-
0<c.length)for(f=0;f<c.length;f++)O=m.isNavigator?0:10,c[f]&&(n=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),O=c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock.height/2:p,g=Math.round(h.y1+Z+Y<Math.max(O,p)?
|
|
669
|
-
|
|
670
|
-
c[f].bounds.x1,c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),U+=("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+c[f].margin);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&
|
|
671
|
-
p)?Math.max(O,p):h.y1+Z+Y),O=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?b[f]._labels[0].textBlock.height/2:0,k=Math.round(h.y2-(X+e+O)),b[f].lineCoordinates={x1:n+V,y1:g,x2:n+V,y2:k,height:Math.abs(k-g)},"inside"===b[f].labelPlacement&&0<f&&(b[f].lineCoordinates.x1=b[0].lineCoordinates.x2+
|
|
672
|
-
b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].bounds={x1:n+V,y1:g,x2:r+(("inside"===b[f].labelPlacement&&0===f?z[f]-5:z[f])+V),y2:k,height:k-g},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?
|
|
673
|
-
a[f].calculateBreaksSizeInValues(),a[f]._labels&&1<a[f]._labels.length&&(B=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,
|
|
674
|
-
Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1:(0<n?n*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateValueToPixelConversionParameters(),d[f].calculateBreaksSizeInValues(),d[f]._labels&&
|
|
675
|
-
d[f].lineCoordinates.x1,n=d[f]._labels[d[f]._labels.length-("dateTime"===d[f].valueType?2:1)].position,n=d[f].getApparentDifference(d[f].viewportMinimum,n),G=d[f].logarithmic?(1<n?Math.log(n)/d[f].conversionParameters.lnLogarithmBase*Math.abs(d[f].conversionParameters.pixelPerUnit):
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
Math.max(n,v/2):n),0<!d.length&&(r=0<c[f].labelAngle?r-u/2:0===c[f].labelAngle?r-u/2:r)),c[f].lineCoordinates.x1=n,c[f].lineCoordinates.x2=r,c[f].lineCoordinates.width=Math.abs(r-n),c[f].title&&(c[f]._titleTextBlock.maxWidth=
|
|
680
|
-
b[f].labelAutoFit&&!l(A)&&(0<!a.length&&(n=0<b[f].labelAngle?Math.max(n,A):0===b[f].labelAngle?Math.max(n,A/2):n),0<!d.length&&(r-=z/2)),b[f].lineCoordinates.x1=n,b[f].lineCoordinates.x2=r,b[f].lineCoordinates.width=Math.abs(r-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
180*Math.abs(k.textBlock.angle)),z=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)));if(m.panEnabled)for(f=0;f<c.length;f++)p[f]=l(m.sessionVariables.axisY[f].height)?
|
|
684
|
-
c[f].chart.height?c[f].chart.height:h.y2),c[f].lineCoordinates.y1=g-(p[f]+c[f].margin+Z),c[f].lineCoordinates.y2=g-(p[f]+c[f].margin+Z),"inside"===c[f].labelPlacement&&0<f&&(c[f].lineCoordinates.y1=c[f].lineCoordinates.y1+p[f]-(c[f]._titleTextBlock?c[f]._titleTextBlock.height:0)-
|
|
685
|
-
c[f].lineCoordinates.y1+c[f].lineThickness/2),c[f].bounds={x1:n,y1:g-(p[f]+Z+c[f].margin),x2:r,y2:k-(Z+c[f].margin),width:r-n,height:p[f]},c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width),
|
|
686
|
-
|
|
687
|
-
0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),F+=B[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++){O=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;n=Math.round(h.x1+e);g=b&&
|
|
688
|
-
Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=c[O].lineCoordinates.x1,n=0>c[O].labelAngle||0===c[O].labelAngle?r-V:n);if(b&&0<b.length)for(O=0;O<b.length;O++)b[O]&&
|
|
689
|
-
(a[f]._titleTextBlock?a[f]._titleTextBlock.height:0))+a[f].tickLength+(a[f].stripLineLabelEffectiveWidth||0),a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+
|
|
690
|
-
a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();N+=I[f]+a[f].margin}if(d&&0<d.length)for(f=0;f<d.length;f++){O=d[f]._labels&&0<d[f]._labels.length?d[f]._labels[0].textBlock.fontSize/
|
|
691
|
-
c[0].lineCoordinates.y1:h.y2-U>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=0>c[O].labelAngle?Math.max(r,v):0===c[O].labelAngle?Math.max(r,v/2):r,n=
|
|
692
|
-
d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.x1=d[f].lineCoordinates.x1+(y[f]-(d[f]._titleTextBlock?d[f]._titleTextBlock.height:0)-2)-d[f].tickLength-(d[f].stripLineLabelEffectiveWidth||0),d[f].lineCoordinates.x2=d[f].lineCoordinates.x1+d[f].lineThickness/2);"inside"===d[f].tickPlacement&&
|
|
693
|
-
d[f].bounds.x2-d[f].bounds.x1;d[f].title&&(d[f]._titleTextBlock.maxWidth=0<d[f].titleMaxWidth&&d[f].titleMaxWidth<d[f].lineCoordinates.height?d[f].titleMaxWidth:d[f].lineCoordinates.height);d[f].calculateValueToPixelConversionParameters();d[f].calculateBreaksSizeInValues();P+=y[f]+
|
|
694
|
-
|
|
695
|
-
0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateStripLinesThicknessInValues(),d[f].calculateBreaksInPixels()}};A.render=function(a,d,c,b,e){e=a[0]?a[0].chart:d[0].chart;var h=
|
|
696
|
-
h.
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
if(
|
|
700
|
-
|
|
701
|
-
e.sessionVariables.crosshairShownByPixel?!0:e.sessionVariables.crosshairShownByPixel)};A.prototype.calculateStripLinesThicknessInValues=function(){for(var a=0;a<this.stripLines.length;a++)if(null!==
|
|
702
|
-
this.convertValueToPixel(c))/2);this.stripLines[a].thickness=b;this.stripLines[a]._thicknessType="value"}};A.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===
|
|
703
|
-
this.conversionParameters.minimum),b=this.scaleBreaks&&!l(this.scaleBreaks.options.spacing),e,h=0;h<d.length;h++)e=b||!l(d[h].options.spacing),d[h].spacing=
|
|
704
|
-
|
|
705
|
-
function(){var a=this,d=!1,c=0,b=0,e=1,h=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===
|
|
706
|
-
this.
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
2
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
this.tickPlacement?0:this.tickLength)-2-(
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
("inside"===this.tickPlacement?this.tickLength:0)-5:q.x
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
662
|
+
(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle))),!a[f]||(!a[f].labelAutoFit||l(B)||l(G)||m.isNavigator||m.stockChart)||(g=0,0<a[f].labelAngle?G+s>r&&(a[f].convertPixelToValue(G)>=a[f].viewportMinimum&&a[f].convertPixelToValue(G)<=a[f].viewportMaximum)&&(g+=0<a[f].labelAngle?G+s-r-aa:0):0>a[f].labelAngle?
|
|
663
|
+
B-y<n&&B-y<a[f].viewportMinimum&&(I=n-(O+a[f].tickLength+A+B-y+a[f].labelFontSize/2)):0===a[f].labelAngle&&(G+s>r&&(a[f].convertPixelToValue(G)>=a[f].viewportMinimum&&a[f].convertPixelToValue(G)<=a[f].viewportMaximum)&&(g=G+s/2-r-aa),B-y<n&&B-y<a[f].viewportMinimum&&(I=n-O-a[f].tickLength-A-B+y/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<g?r-=g:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0>a[f].labelAngle&&0<I?n+=
|
|
664
|
+
I:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0===a[f].labelAngle&&(0<I&&(n+=I),0<g&&(r-=g))),m.panEnabled?X=l(m.sessionVariables.axisX.height)||m.stockChart?m.sessionVariables.axisX.height=X:m.sessionVariables.axisX.height:m.sessionVariables.axisX.height=X,g=Math.round(h.y2-X-e+F),k=Math.round(h.y2),a[f].lineCoordinates.x2=r,a[f].lineCoordinates.width=r-n,a[f].lineCoordinates.y1=g,a[f].lineCoordinates.y2=g,"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.y1=
|
|
665
|
+
a[0].lineCoordinates.y2+F+(a[f].labelEffectiveHeight||0),a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2),"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.y1+=a[f].tickLength,a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2),a[f].bounds={x1:n,y1:g,x2:r,y2:k-(X+e-v[f]-F),width:r-n},a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1),F+=v[f]+a[f].margin;if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].lineCoordinates.x1=Math.round(h.x1+S+O),d[f].lineCoordinates.x2=
|
|
666
|
+
Math.round(h.x2-aa-$>m.width-p?m.width-p:h.x2-aa-$),d[f].lineCoordinates.width=Math.abs(r-n),d[f]._labels&&1<d[f]._labels.length&&(k=d[f]._labels[1],g="dateTime"===d[f].valueType?d[f]._labels[d[f]._labels.length-2]:d[f]._labels[d[f]._labels.length-1],y=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-
|
|
667
|
+
g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle))),m.panEnabled?Z=l(m.sessionVariables.axisX2.height)||m.stockChart?m.sessionVariables.axisX2.height=Z:m.sessionVariables.axisX2.height:m.sessionVariables.axisX2.height=Z,g=Math.round(h.y1),k=d[f].lineCoordinates.y1=g+Z+Y-T,d[f].lineCoordinates.y2=g,"inside"===d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.y1=d[0].lineCoordinates.y1-T-(d[f].labelEffectiveHeight||0)-5),"inside"===d[f].tickPlacement&&0<f&&(d[f].lineCoordinates.y1-=
|
|
668
|
+
d[f].tickLength),d[f].bounds={x1:n,y1:g+(Z+Y-("inside"===d[f].labelPlacement&&0===f?u[f]-5:u[f])-T),x2:r,y2:k,width:r-n},d[f].bounds.height=d[f].bounds.y2-d[f].bounds.y1,T+=("inside"===d[f].labelPlacement&&0===f?u[f]-5:u[f])+d[f].margin;if(c&&0<c.length)for(f=0;f<c.length;f++)O=m.isNavigator?0:10,c[f]&&(n=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),O=c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock.height/2:p,g=Math.round(h.y1+Z+Y<Math.max(O,p)?
|
|
669
|
+
Math.max(O,p):h.y1+Z+Y),r=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),O=0<a.length?0:c[f]._labels&&0<c[f]._labels.length?c[f]._labels[0].textBlock.height/2:p,k=Math.round(h.y2-X-e-O),c[f].lineCoordinates={x1:n-U,y1:g,x2:r-U,y2:k,height:Math.abs(k-g)},"inside"===c[f].labelPlacement&&0<f&&(c[f].lineCoordinates.x1=c[0].lineCoordinates.x1-U-(c[f].labelEffectiveWidth||0)-5,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&0<f&&(c[f].lineCoordinates.x1-=
|
|
670
|
+
c[f].tickLength,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),c[f].bounds={x1:n-(("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+U),y1:g,x2:r-U,y2:k,height:k-g},c[f].bounds.width=c[f].bounds.x2-c[f].bounds.x1,c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),U+=("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+c[f].margin);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&
|
|
671
|
+
(n=Math.round(a[0]?a[0].lineCoordinates.x2:d[0].lineCoordinates.x2),r=Math.round(n),O=b[f]._labels&&0<b[f]._labels.length?b[f]._labels[b[f]._labels.length-1].textBlock.height/2:0,g=Math.round(h.y1+Z+Y<Math.max(O,p)?Math.max(O,p):h.y1+Z+Y),O=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?b[f]._labels[0].textBlock.height/2:0,k=Math.round(h.y2-(X+e+O)),b[f].lineCoordinates={x1:n+V,y1:g,x2:n+V,y2:k,height:Math.abs(k-g)},"inside"===b[f].labelPlacement&&0<f&&(b[f].lineCoordinates.x1=b[0].lineCoordinates.x2+
|
|
672
|
+
V+(b[f].labelEffectiveWidth||0)+5,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),"inside"===b[f].tickPlacement&&0<f&&(b[f].lineCoordinates.x1+=b[f].tickLength,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].bounds={x1:n+V,y1:g,x2:r+(("inside"===b[f].labelPlacement&&0===f?z[f]-5:z[f])+V),y2:k,height:k-g},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?
|
|
673
|
+
b[f].titleMaxWidth:b[f].lineCoordinates.height),V+=("inside"===b[f].labelPlacement&&0===f?z[f]-5:z[f])+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].calculateValueToPixelConversionParameters(),a[f].calculateBreaksSizeInValues(),a[f]._labels&&1<a[f]._labels.length&&(B=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,
|
|
674
|
+
n=a[f]._labels[a[f]._labels.length-("dateTime"===a[f].valueType?2:1)].position,n=a[f].getApparentDifference(a[f].viewportMinimum,n),G=a[f].logarithmic?(1<n?Math.log(n)/a[f].conversionParameters.lnLogarithmBase*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1:(0<n?n*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateValueToPixelConversionParameters(),d[f].calculateBreaksSizeInValues(),d[f]._labels&&
|
|
675
|
+
1<d[f]._labels.length&&(B=(d[f].logarithmic?Math.log(d[f]._labels[1].position/d[f].viewportMinimum)/d[f].conversionParameters.lnLogarithmBase:d[f]._labels[1].position-d[f].viewportMinimum)*Math.abs(d[f].conversionParameters.pixelPerUnit)+d[f].lineCoordinates.x1,n=d[f]._labels[d[f]._labels.length-("dateTime"===d[f].valueType?2:1)].position,n=d[f].getApparentDifference(d[f].viewportMinimum,n),G=d[f].logarithmic?(1<n?Math.log(n)/d[f].conversionParameters.lnLogarithmBase*Math.abs(d[f].conversionParameters.pixelPerUnit):
|
|
676
|
+
0)+d[f].lineCoordinates.x1:(0<n?n*Math.abs(d[f].conversionParameters.pixelPerUnit):0)+d[f].lineCoordinates.x1);for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<w){if(a&&0<a.length)for(f=0;f<a.length;f++)t=Q[w-1][f]===Q[w][f]?!0:!1;else t=!0;if(d&&0<d.length)for(f=0;f<d.length;f++)J=R[w-1][f]===R[w][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)L=N[w-1][f]===N[w][f]?!0:!1;else L=!0;if(b&&0<b.length)for(f=
|
|
677
|
+
0;f<b.length;f++)M=P[w-1][f]===P[w][f]?!0:!1;else M=!0}if(t&&J&&L&&M)break;w++}if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateStripLinesThicknessInValues(),d[f].calculateBreaksInPixels();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),
|
|
678
|
+
b[f].calculateBreaksInPixels()}else{p=[];B=[];I=[];y=[];G=[];s=[];Q=[];for(R=[];4>w;){X=V=U=$=O=Y=e=P=N=F=Z=0;if(a&&0<a.length)for(I=[],f=V=0;f<a.length;f++)I.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateWidth():0)),V+=I[f],e+=a[f]&&!m.isNavigator?a[f].margin:0;else I.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));Q.push(I);if(d&&0<d.length)for(y=[],f=X=0;f<d.length;f++)y.push(Math.ceil(d[f]?d[f].createLabelsAndCalculateWidth():0)),X+=y[f],Y+=d[f]?d[f].margin:0;else y.push(Math.ceil(d[0]?
|
|
679
|
+
d[0].createLabelsAndCalculateWidth():0));R.push(y);if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].lineCoordinates={},n=Math.round(h.x1+V+e),r=Math.round(h.x2-X-Y>m.width-10?m.width-10:h.x2-X-Y),c[f].labelAutoFit&&!l(v)&&(0<!a.length&&(n=0>c[f].labelAngle?Math.max(n,v):0===c[f].labelAngle?Math.max(n,v/2):n),0<!d.length&&(r=0<c[f].labelAngle?r-u/2:0===c[f].labelAngle?r-u/2:r)),c[f].lineCoordinates.x1=n,c[f].lineCoordinates.x2=r,c[f].lineCoordinates.width=Math.abs(r-n),c[f].title&&(c[f]._titleTextBlock.maxWidth=
|
|
680
|
+
0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].lineCoordinates={},n=Math.round(h.x1+V+e),r=Math.round(h.x2-X-Y>b[f].chart.width-10?b[f].chart.width-10:h.x2-X-Y),b[f]&&b[f].labelAutoFit&&!l(A)&&(0<!a.length&&(n=0<b[f].labelAngle?Math.max(n,A):0===b[f].labelAngle?Math.max(n,A/2):n),0<!d.length&&(r-=z/2)),b[f].lineCoordinates.x1=n,b[f].lineCoordinates.x2=r,b[f].lineCoordinates.width=Math.abs(r-
|
|
681
|
+
n),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width);if(c&&0<c.length)for(p=[],f=U=0;f<c.length;f++)p.push(Math.ceil(c[f]?c[f].createLabelsAndCalculateHeight():0)),U+=p[f]+c[f].margin,O+=c[f].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));G.push(p);if(b&&0<b.length)for(B=[],f=0;f<b.length;f++)B.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateHeight():0)),$+=b[f].margin;
|
|
682
|
+
else B.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));s.push(B);if(c&&0<c.length)for(f=0;f<c.length;f++)0<c[f]._labels.length&&(k=c[f]._labels[0],g=c[f]._labels[c[f]._labels.length-1],v=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),u=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)));
|
|
683
|
+
if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&0<b[f]._labels.length&&(k=b[f]._labels[0],g=b[f]._labels[b[f]._labels.length-1],A=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),z=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)));if(m.panEnabled)for(f=0;f<c.length;f++)p[f]=l(m.sessionVariables.axisY[f].height)?
|
|
684
|
+
m.sessionVariables.axisY[f].height=p[f]:m.sessionVariables.axisY[f].height;else for(f=0;f<c.length;f++)m.sessionVariables.axisY[f].height=p[f];if(c&&0<c.length)for(f=c.length-1;0<=f;f--)g=Math.round(h.y2),k=Math.round(h.y2>c[f].chart.height?c[f].chart.height:h.y2),c[f].lineCoordinates.y1=g-(p[f]+c[f].margin+Z),c[f].lineCoordinates.y2=g-(p[f]+c[f].margin+Z),"inside"===c[f].labelPlacement&&0<f&&(c[f].lineCoordinates.y1=c[f].lineCoordinates.y1+p[f]-(c[f]._titleTextBlock?c[f]._titleTextBlock.height:0)-
|
|
685
|
+
c[f].tickLength-(c[f].stripLineLabelEffectiveHeight||0)-5,c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&0<f&&(c[f].lineCoordinates.y1+=c[f].tickLength,c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),c[f].bounds={x1:n,y1:g-(p[f]+Z+c[f].margin),x2:r,y2:k-(Z+c[f].margin),width:r-n,height:p[f]},c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width),
|
|
686
|
+
Z+=p[f]+c[f].margin;if(b&&0<b.length)for(f=b.length-1;0<=f;f--)b[f]&&(g=Math.round(h.y1),k=Math.round(h.y1+(B[f]+b[f].margin+F)),b[f].lineCoordinates.y1=k,b[f].lineCoordinates.y2=k,"inside"===b[f].labelPlacement&&0<f&&(b[f].lineCoordinates.y1=k-B[f]+(b[f]._titleTextBlock?b[f]._titleTextBlock.height:0)+b[f].tickLength+(b[f].stripLineLabelEffectiveHeight||0),b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),"inside"===b[f].tickPlacement&&0<f&&(b[f].lineCoordinates.y1-=b[f].tickLength,
|
|
687
|
+
b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),b[f].bounds={x1:n,y1:g+(b[f].margin+F),x2:r,y2:k,width:r-n},b[f].bounds.height=b[f].bounds.y2-b[f].bounds.y1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),F+=B[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++){O=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;n=Math.round(h.x1+e);g=b&&
|
|
688
|
+
0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<Math.max(O,10)?Math.max(O,10):h.y1):h.y1<Math.max(O,10)?Math.max(O,10):h.y1;r=Math.round(h.x1+V+e);k=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:h.y2-U>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=c[O].lineCoordinates.x1,n=0>c[O].labelAngle||0===c[O].labelAngle?r-V:n);if(b&&0<b.length)for(O=0;O<b.length;O++)b[O]&&
|
|
689
|
+
b[O].labelAutoFit&&(r=b[O].lineCoordinates.x1,n=r-V);a[f].lineCoordinates={x1:r-N,y1:g,x2:r-N,y2:k,height:Math.abs(k-g)};"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-(I[f]-(a[f]._titleTextBlock?a[f]._titleTextBlock.height:0))+a[f].tickLength+(a[f].stripLineLabelEffectiveWidth||0),a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+
|
|
690
|
+
a[f].lineThickness/2);a[f].bounds={x1:r-(I[f]+N),y1:g,x2:r-N,y2:k,height:k-g};a[f].bounds.width=a[f].bounds.x2-a[f].bounds.x1;a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();N+=I[f]+a[f].margin}if(d&&0<d.length)for(f=0;f<d.length;f++){O=d[f]._labels&&0<d[f]._labels.length?d[f]._labels[0].textBlock.fontSize/
|
|
691
|
+
2:0;n=Math.round(h.x1-e);g=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<Math.max(O,10)?Math.max(O,10):h.y1):h.y1<Math.max(O,10)?Math.max(O,10):h.y1;r=Math.round(h.x2-X-Y);k=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:h.y2-U>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=0>c[O].labelAngle?Math.max(r,v):0===c[O].labelAngle?Math.max(r,v/2):r,n=
|
|
692
|
+
0>c[O].labelAngle||0===c[O].labelAngle?r-X:n);if(b&&0<b.length)for(O=0;O<b.length;O++)b[O]&&b[O].labelAutoFit&&(r=b[O].lineCoordinates.x2,n=r-X);d[f].lineCoordinates={x1:r+P,y1:g,x2:r+P,y2:k,height:Math.abs(k-g)};"inside"===d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.x1=d[f].lineCoordinates.x1+(y[f]-(d[f]._titleTextBlock?d[f]._titleTextBlock.height:0)-2)-d[f].tickLength-(d[f].stripLineLabelEffectiveWidth||0),d[f].lineCoordinates.x2=d[f].lineCoordinates.x1+d[f].lineThickness/2);"inside"===d[f].tickPlacement&&
|
|
693
|
+
0<f&&(d[f].lineCoordinates.x1+=d[f].tickLength,d[f].lineCoordinates.x2=d[f].lineCoordinates.x1+d[f].lineThickness/2);d[f].bounds={x1:d[f].lineCoordinates.x1,y1:g,x2:r+y[f]+P,y2:k,width:r-n,height:k-g};d[f].bounds.width=d[f].bounds.x2-d[f].bounds.x1;d[f].title&&(d[f]._titleTextBlock.maxWidth=0<d[f].titleMaxWidth&&d[f].titleMaxWidth<d[f].lineCoordinates.height?d[f].titleMaxWidth:d[f].lineCoordinates.height);d[f].calculateValueToPixelConversionParameters();d[f].calculateBreaksSizeInValues();P+=y[f]+
|
|
694
|
+
d[f].margin}for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<w){if(a&&0<a.length)for(f=0;f<a.length;f++)t=Q[w-1][f]===Q[w][f]?!0:!1;else t=!0;if(d&&0<d.length)for(f=0;f<d.length;f++)J=R[w-1][f]===R[w][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)L=G[w-1][f]===G[w][f]?!0:!1;else L=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)M=s[w-1][f]===s[w][f]?!0:!1;else M=!0}if(t&&J&&L&&M)break;w++}if(c&&0<c.length)for(f=
|
|
695
|
+
0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels();if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateStripLinesThicknessInValues(),d[f].calculateBreaksInPixels()}};A.render=function(a,d,c,b,e){e=a[0]?a[0].chart:d[0].chart;var h=
|
|
696
|
+
e.ctx;e.alignVerticalAxes&&e.alignVerticalAxes();h.save();h.beginPath();a&&a.length&&h.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2);d&&d.length&&h.rect(2,d[d.length-1].bounds.y1,d[0].chart.width-4,d[0].bounds.y2);h.clip();if(a&&0<a.length)for(var g=0;g<a.length;g++)a[g].renderLabelsTicksAndTitle();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderLabelsTicksAndTitle();h.restore();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderLabelsTicksAndTitle();if(b&&0<b.length)for(g=
|
|
697
|
+
0;g<b.length;g++)b[g].renderLabelsTicksAndTitle();e.preparePlotArea();g=e.plotArea;h.save();h.beginPath();h.rect(g.x1,g.y1,Math.abs(g.x2-g.x1),Math.abs(g.y2-g.y1));h.clip();if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderStripLinesOfThicknessType("value");if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderStripLinesOfThicknessType("value");if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderStripLinesOfThicknessType("value");
|
|
698
|
+
if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderInterlacedColors();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderInterlacedColors();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderInterlacedColors();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderInterlacedColors();h.restore();if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderGrid(),r&&(a[g].createMask(),a[g].renderBreaksBackground());if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderGrid(),r&&(d[g].createMask(),d[g].renderBreaksBackground());
|
|
699
|
+
if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderGrid(),r&&(c[g].createMask(),c[g].renderBreaksBackground());if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderGrid(),r&&(b[g].createMask(),b[g].renderBreaksBackground());if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderAxisLine();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderAxisLine();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderAxisLine();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderAxisLine();h=!1;if(a&&0<a.length)for(g=0;g<
|
|
700
|
+
a.length;g++)a[g].renderStripLinesOfThicknessType("pixel"),a[g].crosshair&&a[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=a[g].type);if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderStripLinesOfThicknessType("pixel"),d[g].crosshair&&d[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=d[g].type);if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderStripLinesOfThicknessType("pixel"),c[g].crosshair&&c[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=c[g].type);if(b&&0<b.length)for(g=0;g<
|
|
701
|
+
b.length;g++)b[g].renderStripLinesOfThicknessType("pixel"),b[g].crosshair&&b[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=b[g].type);if(h||!h&&e.clearedOverlayedCanvas&&0<=e.clearedOverlayedCanvas.indexOf("axis"))e.resetOverlayedCanvas(),e.renderCrosshairs(null,l(e.sessionVariables.crosshairShownByPixel)||e.sessionVariables.crosshairShownByPixel?!0:e.sessionVariables.crosshairShownByPixel)};A.prototype.calculateStripLinesThicknessInValues=function(){for(var a=0;a<this.stripLines.length;a++)if(null!==
|
|
702
|
+
this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var d=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),b=this.getApparentDifference(d,c);this.stripLines[a].value=this.convertPixelToValue((this.convertValueToPixel(d)+this.convertValueToPixel(c))/2);this.stripLines[a].thickness=b;this.stripLines[a]._thicknessType="value"}};A.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===
|
|
703
|
+
this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,d=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),b=this.scaleBreaks&&!l(this.scaleBreaks.options.spacing),e,h=0;h<d.length;h++)e=b||!l(d[h].options.spacing),d[h].spacing=
|
|
704
|
+
Ua(d[h].spacing,a,8,e?0.1*a:8,e?0:3)<<0,d[h].size=0>d[h].spacing?0:Math.abs(d[h].spacing/c),this.logarithmic&&(d[h].size=Math.pow(this.logarithmBase,d[h].size))};A.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=null);for(var d=0;d<a.length&&!(a[d].startValue>this.conversionParameters.maximum);d++)a[d].endValue<
|
|
705
|
+
this.conversionParameters.minimum||(l(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=d),a[d].startValue>=this.conversionParameters.minimum&&(a[d].startPixel=this.convertValueToPixel(a[d].startValue),this.scaleBreaks.lastBreakIndex=d),a[d].endValue<=this.conversionParameters.maximum&&(a[d].endPixel=this.convertValueToPixel(a[d].endValue)))}};A.prototype.renderLabelsTicksAndTitle=function(){var a=this,d=!1,c=0,b=0,e=1,h=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===
|
|
706
|
+
typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,g,l=this.viewportMaximum,r=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length-1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(k===this._labels.length-1||g<Math.log(l/p.position)*r/e)||(c.push(p),l=p.position,g=
|
|
707
|
+
p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(g=p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),c+=g);c>this.lineCoordinates.width*e&&this.labelAutoFit&&(d=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&
|
|
708
|
+
!this.equidistantInterval&&this.labelAutoFit){for(var c=[],m,l=this.viewportMaximum,r=this.lineCoordinates.height/Math.log(this.range),k=this._labels.length-1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(k===this._labels.length-1||m<Math.log(l/p.position)*r)||(c.push(p),l=p.position,m=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=
|
|
709
|
+
0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(m=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),b+=m);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(d=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var k=0,p,q;if("bottom"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],
|
|
710
|
+
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y+this.tickLength<<0),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===this.labelPlacement?
|
|
711
|
+
q.y-(("inside"===this.tickPlacement?this.tickLength:0)+p.textBlock.height-p.textBlock.fontSize/2):q.y+("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.fontSize/2+5):0>this.labelAngle?(q.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),q.y="inside"===this.labelPlacement?q.y-("inside"===this.tickPlacement?this.tickLength:0)-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle):q.y+("inside"===this.tickPlacement?0:this.tickLength)+
|
|
712
|
+
5+Math.abs(p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))):(q.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,q.y="inside"===this.labelPlacement?q.y-("inside"===this.tickPlacement?this.tickLength:0)-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle):q.y+("inside"===this.tickPlacement?0:this.tickLength)+
|
|
713
|
+
5+Math.abs(p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();
|
|
714
|
+
a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock._lineHeight/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;k<this._labels.length;k++)p=
|
|
715
|
+
this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y-this.tickLength<<0),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===
|
|
716
|
+
this.labelPlacement?q.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock.fontSize/2)):0>this.labelAngle?(q.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,q.y="inside"===this.labelPlacement?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):
|
|
717
|
+
q.y-("inside"===this.tickPlacement?0:this.tickLength)-2-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)):(q.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),q.y="inside"===this.labelPlacement?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):q.y-("inside"===this.tickPlacement?0:this.tickLength)-2-((p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/
|
|
718
|
+
180*this.labelAngle)+p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();
|
|
719
|
+
a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],
|
|
720
|
+
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x-this.tickLength<<0,b),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=q.y,p.textBlock.x="inside"===this.labelPlacement?
|
|
721
|
+
q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?q.y:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*
|
|
722
|
+
this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y="inside"===this.labelPlacement?q.y:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-
|
|
723
|
+
p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();
|
|
724
|
+
a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],
|
|
725
|
+
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x+this.tickLength<<0,b),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=q.y,p.textBlock.x="inside"===this.labelPlacement?
|
|
726
|
+
q.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x-
|
|
727
|
+
p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5):(p.textBlock.y="inside"===this.labelPlacement?q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/
|
|
728
|
+
180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<
|
|
729
|
+
0,b);a.ctx.lineTo(q.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}h=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<
|
|
730
|
+
a._labels.length;k++)p=a._labels[k],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||d&&0!==h++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(p.position>this.viewportMaximum||d&&0!==h++%2&&this.labelAutoFit)||p.textBlock.render(!0)};A.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,d,c,b=this.chart.plotArea,e=0;d=!0;if(("bottom"===
|
|
731
|
+
this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)d?(d=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,d.x),b.y1,Math.abs(c.x-d.x),Math.abs(b.y1-b.y2)),d=!1):d=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=
|
|
731
732
|
this.interlacedColor,e=0;e<this._labels.length;e++)d?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),d=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x1,Math.min(c.y,d.y),Math.abs(b.x1-b.x2),Math.abs(d.y-c.y)),d=!1):d=!0;a.beginPath()};A.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){var d=this,c,b,e=0,h=0,g=!1;b=!1;for(var r=[],
|
|
732
733
|
t=[],k=!1,m,e=0;e<this.stripLines.length;e++){var p=this.stripLines[e];p._thicknessType===a&&("pixel"===a&&(p.value<this.viewportMinimum||p.value>this.viewportMaximum||l(p.value)||isNaN(this.range))||"value"===a&&(p.startValue<=this.viewportMinimum&&p.endValue<=this.viewportMinimum||p.startValue>=this.viewportMaximum&&p.endValue>=this.viewportMaximum||l(p.startValue)||l(p.endValue)||isNaN(this.range))||r.push(p))}for(e=0;e<this._stripLineLabels.length;e++)if(p=this.stripLines[e],c=this._stripLineLabels[e],
|
|
733
734
|
!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){p&&(this.ctx.strokeStyle=p.color,this.ctx.lineWidth="pixel"===p._thicknessType?p.thickness:this.tickThickness,l(p.opacity)||"pixel"!==p._thicknessType||(m=p.ctx.globalAlpha,p.ctx.globalAlpha=p.opacity));if("bottom"===this._position){var q=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(q,b.y<<
|
|
@@ -956,7 +957,7 @@ ja.prototype.cancelAllAnimations=function(){this.animations=[];this.animationReq
|
|
|
956
957
|
0,b.width,b.height,e-e*a,0,a*c.canvas.width/ia,c.canvas.height/ia)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ia,b.height/ia);c.restore()}},fadeInAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ia,c.canvas.height/ia);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*
|
|
957
958
|
(a/=b)*(a-2)+d},easeOutQuart:function(a,d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},aa={drawMarker:function(a,d,c,b,e,g,l,r){if(c){var t=1;c.fillStyle=g?g:"#000000";c.strokeStyle=l?l:"#000000";c.lineWidth=r?r:0;c.setLineDash&&c.setLineDash(I("solid",r));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),g&&c.fill(),r&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle=
|
|
958
959
|
"black",c.stroke(),c.globalAlpha=t))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),g&&c.fill(),r&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),g&&c.fill(),r&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t)),c.beginPath()):"cross"===b&&(c.strokeStyle=g,c.lineWidth=e/4,c.beginPath(),
|
|
959
|
-
c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];aa.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();v.version="v3.10.
|
|
960
|
+
c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];aa.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();v.version="v3.10.11 GA";window.CanvasJS&&(v&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=v)})();
|
|
960
961
|
|
|
961
962
|
/*
|
|
962
963
|
excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
|