@canvasjs/charts 3.10.9 → 3.10.10
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 +82 -82
- 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.10 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,8 +522,8 @@ 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[
|
|
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;k.radius=B;"doughnut"===k.type&&(k.innerRadius=G);var J=Math.min(G/B,(B-1)/B);this.pieDoughnutClickHandler=function(a){t.isAnimating||
|
|
527
527
|
!l(this.explodeOnClick)&&!this.explodeOnClick||(a=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,
|
|
528
528
|
q.y1,q.width,q.height);for(var b=f[0].startAngle+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,
|
|
529
529
|
t.animatedRender?500:0,function(a){c(a,!1);g();t.dispatchEvent("dataAnimationIterationEnd",{chart:t})});t.dispatchEvent("dataAnimationEnd",{chart:t})})}}};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),Math.round(d.y5)),
|
|
@@ -956,7 +956,7 @@ ja.prototype.cancelAllAnimations=function(){this.animations=[];this.animationReq
|
|
|
956
956
|
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
957
|
(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
958
|
"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.
|
|
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.10 GA";window.CanvasJS&&(v&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=v)})();
|
|
960
960
|
|
|
961
961
|
/*
|
|
962
962
|
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.
|