@canvasjs/charts 3.12.11 → 3.12.12
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 +112 -112
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.12.
|
|
2
|
+
CanvasJS Chart - v3.12.12 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2025 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -217,49 +217,49 @@ w.type?J=this.renderStackedArea(w):"stackedArea100"===w.type?J=this.renderStacke
|
|
|
217
217
|
dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0,startTimePercent:0.7});this.animatedRender&&0<this._indexLabels.length&&(d=sa(this.width,this.height).getContext("2d"),ya(d),c.push(this.renderIndexLabels(d)));var m=this;if(0<c.length)m.disableToolTip=!0,m._animator.animate(200,m.animationDuration,function(a){m.ctx.clearRect(0,0,m.width,m.height);m.ctx.drawImage(b,0,0,Math.floor(m.width*ka),Math.floor(m.height*ka),0,0,m.width,m.height);for(var d=
|
|
218
218
|
0;d<c.length;d++)J=c[d],1>a&&"undefined"!==typeof J.startTimePercent?a>=J.startTimePercent&&J.animationCallback(J.easingFunction(a-J.startTimePercent,0,1,1-J.startTimePercent),J):J.animationCallback(J.easingFunction(a,0,1,1),J);m.dispatchEvent("dataAnimationIterationEnd",{chart:m})},function(){c=[];for(var a=0;a<m.plotInfo.plotTypes.length;a++)for(var d=m.plotInfo.plotTypes[a],e=0;e<d.plotUnits.length;e++){var f=d.plotUnits[e];f.targetCanvas&&xa(f.targetCanvas);f.targetCanvas=null}b=null;m.disableToolTip=
|
|
219
219
|
!1;m.dispatchEvent("dataAnimationEnd",{chart:m})});else{if(m._breaksCanvas)if(r)m.plotArea.ctx.drawImage(m._breaksCanvas,0,0,this.width,this.height);else for(k=0;k<m._axes.length;k++)m._axes[k].createMask();0<m._indexLabels.length&&m.renderIndexLabels();m.dispatchEvent("dataAnimationIterationEnd",{chart:m});m.dispatchEvent("dataAnimationEnd",{chart:m})}this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||ua(this._zoomButton,
|
|
220
|
-
this._resetButton);l(this.toolTip._xValue)||l(this.toolTip._dataSeriesIndex)||
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
a.axisX.options
|
|
234
|
-
|
|
235
|
-
1].y,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
a.axisX.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
a.axisX.
|
|
250
|
-
|
|
251
|
-
0===l?
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
w.dataPointEOs[l].cumulativeSum
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
m.dataPoints[q].x.getTime
|
|
259
|
-
|
|
260
|
-
b.type
|
|
261
|
-
|
|
262
|
-
|
|
220
|
+
this._resetButton);l(this.toolTip._xValue)||l(this.toolTip._dataSeriesIndex)||this.toolTip.showAtX(this.toolTip._xValue,this.toolTip._dataSeriesIndex);this.toolTip._updateToolTip();this.toolTip.enabled&&this.toolTip._updatedEventParameters&&!isNaN(this.toolTip._prevX)&&!isNaN(this.toolTip._prevY)&&this.toolTip.container&&this.toolTip.container.style&&this.toolTip.dispatchEvent("none"===this.toolTip.container.style.display?"hidden":"updated",this.toolTip._updatedEventParameters,this.toolTip);this.renderCount++;
|
|
221
|
+
Ga&&(m=this,setTimeout(function(){var a=document.getElementById("ghostCanvasCopy");a&&(La(a,m.width,m.height),a.getContext("2d").drawImage(m._eventManager.ghostCanvas,0,0))},2E3));this._breaksCanvas&&(delete this._breaksCanvas,delete this._breaksCanvasCtx);for(k=0;k<this._axes.length;k++)this._axes[k].maskCanvas&&(delete this._axes[k].maskCanvas,delete this._axes[k].maskCtx)}};t.prototype.render=function(a){a&&(this.options=a);this._initialize();this.setLayout();this.renderElements();this._preRenderCanvas&&
|
|
222
|
+
xa(this._preRenderCanvas)};t.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,mousemove:this._plotAreaMouseMove,cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};t.prototype.categoriseDataSeries=function(){for(var a="",e=0;e<this.data.length;e++)if(a=this.data[e],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=t._supportedChartTypes.indexOf(a.type)){for(var c=null,
|
|
223
|
+
b=!1,d=null,f=!1,q=0;q<this.plotInfo.plotTypes.length;q++)if(this.plotInfo.plotTypes[q].type===a.type){b=!0;c=this.plotInfo.plotTypes[q];break}b||(c={type:a.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(c));for(q=0;q<c.plotUnits.length;q++)if(c.plotUnits[q].axisYType===a.axisYType&&c.plotUnits[q].axisXType===a.axisXType&&c.plotUnits[q].axisYIndex===a.axisYIndex&&c.plotUnits[q].axisXIndex===a.axisXIndex){f=!0;d=c.plotUnits[q];break}f||(d={type:a.type,previousDataSeriesCount:0,index:c.plotUnits.length,
|
|
224
|
+
plotType:c,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===a.axisYType?this.axisY[0<=a.axisYIndex&&a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],yTotals:[],yAbsTotals:[]},
|
|
225
|
+
c.plotUnits.push(d));c.totalDataSeries++;d.dataSeriesIndexes.push(e);a.plotUnit=d}for(e=0;e<this.plotInfo.plotTypes.length;e++)for(c=this.plotInfo.plotTypes[e],q=a=0;q<c.plotUnits.length;q++)c.plotUnits[q].previousDataSeriesCount=a,a+=c.plotUnits[q].dataSeriesIndexes.length};t.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var e=this.data[a];if(e.dataPoints)for(var c=e.dataPoints.length,b=0;b<c;b++)e.dataPointIds[b]=++this._eventManager.lastObjectId}};t.prototype._processData=
|
|
226
|
+
function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var e=this.plotInfo.plotTypes[a],c=0;c<e.plotUnits.length;c++){var b=e.plotUnits[c];"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type?this._processMultiseriesPlotUnit(b):"stackedColumn"===b.type||"stackedBar"===b.type||"stackedArea"===b.type?
|
|
227
|
+
this._processStackedPlotUnit(b):"stackedColumn100"===b.type||"stackedBar100"===b.type||"stackedArea100"===b.type?this._processStacked100PlotUnit(b):"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type||"boxAndWhisker"===b.type?this._processMultiYPlotUnit(b):"waterfall"===b.type&&this._processSpecificPlotUnit(b)}this.calculateAutoBreaks()};t.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&
|
|
228
|
+
!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f=!1,q=0;q<a.dataSeriesIndexes.length;q++){var w=this.data[a.dataSeriesIndexes[q]],l=0,k=!1,m=!1,n;if("normal"===w.axisPlacement||"xySwapped"===w.axisPlacement)var p=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?
|
|
229
|
+
0:-Infinity,h=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(w.dataPoints[l].x&&w.dataPoints[l].x.getTime||"dateTime"===w.xValueType)f=!0;for(l=0;l<w.dataPoints.length;l++){"undefined"===typeof w.dataPoints[l].x&&(w.dataPoints[l].x=l+(a.axisX.logarithmic?1:0));w.dataPoints[l].x.getTime?(f=!0,b=w.dataPoints[l].x.getTime()):
|
|
230
|
+
b=w.dataPoints[l].x;d=w.dataPoints[l].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);d<e.min&&"number"===typeof d&&(e.min=d);d>e.max&&"number"===typeof d&&(e.max=d);if(0<l){if(a.axisX.logarithmic){var y=b/w.dataPoints[l-1].x;1>y&&(y=1/y);c.minDiff>y&&1!==y&&(c.minDiff=y)}else y=b-w.dataPoints[l-1].x,0>y&&(y*=-1),c.minDiff>y&&0!==y&&(c.minDiff=y);null!==d&&null!==w.dataPoints[l-1].y&&(a.axisY.logarithmic?(y=d/w.dataPoints[l-1].y,1>y&&(y=1/y),e.minDiff>y&&1!==y&&(e.minDiff=y)):(y=d-w.dataPoints[l-1].y,0>y&&
|
|
231
|
+
(y*=-1),e.minDiff>y&&0!==y&&(e.minDiff=y)))}if(b<p&&!k)null!==d&&(n=b);else{if(!k&&(k=!0,0<l)){l-=2;continue}if(b>h&&!m)m=!0;else if(b>h&&m)continue;w.dataPoints[l].label&&(a.axisX.labels[b]=w.dataPoints[l].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&n<b&&(c.viewPortMin=n):(d<e.viewPortMin&&"number"===typeof d&&(e.viewPortMin=d),d>e.viewPortMax&&"number"===typeof d&&(e.viewPortMax=d))}}w.axisX.valueType=w.xValueType=f?"dateTime":"number"}};
|
|
232
|
+
t.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f=!1,q=[],w=[],J=Infinity,k=-Infinity,m={},n=0;n<a.dataSeriesIndexes.length;n++){var p=this.data[a.dataSeriesIndexes[n]],h=0,y=!1,g=!1,r;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var s=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:
|
|
233
|
+
a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:-Infinity,x=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(p.dataPoints[h].x&&p.dataPoints[h].x.getTime||"dateTime"===p.xValueType)f=!0;for(h=0;h<p.dataPoints.length;h++){"undefined"===typeof p.dataPoints[h].x&&(p.dataPoints[h].x=h+(a.axisX.logarithmic?
|
|
234
|
+
1:0));p.dataPoints[h].x.getTime?(f=!0,b=p.dataPoints[h].x.getTime()):b=p.dataPoints[h].x;d=l(p.dataPoints[h].y)?0:p.dataPoints[h].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<h){if(a.axisX.logarithmic){var v=b/p.dataPoints[h-1].x;1>v&&(v=1/v);c.minDiff>v&&1!==v&&(c.minDiff=v)}else v=b-p.dataPoints[h-1].x,0>v&&(v*=-1),c.minDiff>v&&0!==v&&(c.minDiff=v);null!==d&&null!==p.dataPoints[h-1].y&&(a.axisY.logarithmic?0<d&&(v=d/p.dataPoints[h-1].y,1>v&&(v=1/v),e.minDiff>v&&1!==v&&(e.minDiff=v)):(v=d-p.dataPoints[h-
|
|
235
|
+
1].y,0>v&&(v*=-1),e.minDiff>v&&0!==v&&(e.minDiff=v)))}if(b<s&&!y)null!==p.dataPoints[h].y&&(r=b);else{if(!y&&(y=!0,0<h)){h-=2;continue}if(b>x&&!g)g=!0;else if(b>x&&g)continue;p.dataPoints[h].label&&(a.axisX.labels[b]=p.dataPoints[h].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===p.dataPoints[h].y?c.viewPortMin===b&&r<b&&(c.viewPortMin=r):(m[b]=(m[b]||0)+p.dataPoints[h].y,p.dataPointEOs[h].cumulativeY=m[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=
|
|
236
|
+
(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?q[b]?q[b]+=d:(q[b]=d,J=Math.min(d,J)):w[b]?w[b]+=d:(w[b]=d,k=Math.max(d,k)))}}a.axisY.scaleBreaks&&(a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks)&&(e.dataPointYPositiveSums?(e.dataPointYPositiveSums.push.apply(e.dataPointYPositiveSums,q),e.dataPointYNegativeSums.push.apply(e.dataPointYPositiveSums,w)):(e.dataPointYPositiveSums=q,e.dataPointYNegativeSums=w));p.axisX.valueType=p.xValueType=f?"dateTime":"number"}for(h in q)q.hasOwnProperty(h)&&
|
|
237
|
+
!isNaN(h)&&(a=q[h],a<e.min&&(e.min=Math.min(a,J)),a>e.max&&(e.max=a),h<c.viewPortMin||h>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=Math.min(a,J)),a>e.viewPortMax&&(e.viewPortMax=a)));for(h in w)w.hasOwnProperty(h)&&!isNaN(h)&&(a=w[h],a<e.min&&(e.min=a),a>e.max&&(e.max=Math.max(a,k)),h<c.viewPortMin||h>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=a),a>e.viewPortMax&&(e.viewPortMax=Math.max(a,k))))}};t.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=
|
|
238
|
+
a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f=!1,q=!1,w=!1,J={},k=[],m=0;m<a.dataSeriesIndexes.length;m++){var n=this.data[a.dataSeriesIndexes[m]],p=0,h=!1,y=!1,g;if("normal"===n.axisPlacement||"xySwapped"===n.axisPlacement)var r=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:-Infinity,s=a.axisX.sessionVariables.newViewportMaximum?
|
|
239
|
+
a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(n.dataPoints[p].x&&n.dataPoints[p].x.getTime||"dateTime"===n.xValueType)f=!0;for(p=0;p<n.dataPoints.length;p++){"undefined"===typeof n.dataPoints[p].x&&(n.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));n.dataPoints[p].x.getTime?(f=!0,b=n.dataPoints[p].x.getTime()):b=n.dataPoints[p].x;d=l(n.dataPoints[p].y)?
|
|
240
|
+
null:n.dataPoints[p].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<p){if(a.axisX.logarithmic){var x=b/n.dataPoints[p-1].x;1>x&&(x=1/x);c.minDiff>x&&1!==x&&(c.minDiff=x)}else x=b-n.dataPoints[p-1].x,0>x&&(x*=-1),c.minDiff>x&&0!==x&&(c.minDiff=x);l(d)||null===n.dataPoints[p-1].y||(a.axisY.logarithmic?0<d&&(x=d/n.dataPoints[p-1].y,1>x&&(x=1/x),e.minDiff>x&&1!==x&&(e.minDiff=x)):(x=d-n.dataPoints[p-1].y,0>x&&(x*=-1),e.minDiff>x&&0!==x&&(e.minDiff=x)))}if(b<r&&!h)null!==d&&(g=b);else{if(!h&&(h=!0,0<p)){p-=
|
|
241
|
+
2;continue}if(b>s&&!y)y=!0;else if(b>s&&y)continue;n.dataPoints[p].label&&(a.axisX.labels[b]=n.dataPoints[p].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&g<b&&(c.viewPortMin=g):(J[b]=(J[b]||0)+n.dataPoints[p].y,n.dataPointEOs[p].cumulativeY=J[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?q=!0:0>d&&(w=!0),k[b]=k[b]?k[b]+Math.abs(d):Math.abs(d))}}n.axisX.valueType=n.xValueType=
|
|
242
|
+
f?"dateTime":"number"}a.axisY.logarithmic?(e.max=l(e.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(e.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):q&&!w?(e.max=l(e.viewPortMax)?99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):q&&w?(e.max=l(e.viewPortMax)?99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99)):!q&&w&&(e.max=l(e.viewPortMax)?-1:Math.max(e.viewPortMax,
|
|
243
|
+
-1),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99));e.viewPortMin=e.min;e.viewPortMax=e.max;a.dataPointYSums=k}};t.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f,q,w=!1,l=0;l<a.dataSeriesIndexes.length;l++){var k=this.data[a.dataSeriesIndexes[l]],m=0,n=!1,p=!1,h,y,g;if("normal"===k.axisPlacement||"xySwapped"===k.axisPlacement)var r=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:
|
|
244
|
+
a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?0:-Infinity,s=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(k.dataPoints[m].x&&k.dataPoints[m].x.getTime||"dateTime"===k.xValueType)w=!0;
|
|
245
|
+
for(m=0;m<k.dataPoints.length;m++){"undefined"===typeof k.dataPoints[m].x&&(k.dataPoints[m].x=m+(a.axisX.logarithmic?1:0));k.dataPoints[m].x.getTime?(w=!0,b=k.dataPoints[m].x.getTime()):b=k.dataPoints[m].x;if((d=k.dataPoints[m].y)&&d.length){f=Math.min.apply(null,d);q=Math.max.apply(null,d);y=!0;for(var x=0;x<d.length;x++)null===d.k&&(y=!1);y&&(n||(g=h),h=b)}b<c.min&&(c.min=b);b>c.max&&(c.max=b);f<e.min&&(e.min=f);q>e.max&&(e.max=q);0<m&&(a.axisX.logarithmic?(y=b/k.dataPoints[m-1].x,1>y&&(y=1/y),
|
|
246
|
+
c.minDiff>y&&1!==y&&(c.minDiff=y)):(y=b-k.dataPoints[m-1].x,0>y&&(y*=-1),c.minDiff>y&&0!==y&&(c.minDiff=y)),d&&(null!==d[0]&&k.dataPoints[m-1].y&&null!==k.dataPoints[m-1].y[0])&&(a.axisY.logarithmic?(y=d[0]/k.dataPoints[m-1].y[0],1>y&&(y=1/y),e.minDiff>y&&1!==y&&(e.minDiff=y)):(y=d[0]-k.dataPoints[m-1].y[0],0>y&&(y*=-1),e.minDiff>y&&0!==y&&(e.minDiff=y))));if(!(b<r)||n){if(!n&&(n=!0,0<m)){m-=2;h=g;continue}if(b>s&&!p)p=!0;else if(b>s&&p)continue;k.dataPoints[m].label&&(a.axisX.labels[b]=k.dataPoints[m].label);
|
|
247
|
+
b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&d)for(x=0;x<d.length;x++)if(null===d[x]&&h<b){c.viewPortMin=h;break}null===d?c.viewPortMin===b&&h<b&&(c.viewPortMin=h):(f<e.viewPortMin&&(e.viewPortMin=f),q>e.viewPortMax&&(e.viewPortMax=q))}}k.axisX.valueType=k.xValueType=w?"dateTime":"number"}};t.prototype._processSpecificPlotUnit=function(a){if("waterfall"===a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,
|
|
248
|
+
b,d,f=!1,q=0;q<a.dataSeriesIndexes.length;q++){var w=this.data[a.dataSeriesIndexes[q]],l=0,k=!1,m=!1,n=b=0;if("normal"===w.axisPlacement||"xySwapped"===w.axisPlacement)var p=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?0:-Infinity,h=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:
|
|
249
|
+
a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(w.dataPoints[l].x&&w.dataPoints[l].x.getTime||"dateTime"===w.xValueType)f=!0;for(l=0;l<w.dataPoints.length;l++)"undefined"!==typeof w.dataPoints[l].isCumulativeSum&&!0===w.dataPoints[l].isCumulativeSum?(w.dataPointEOs[l].cumulativeSumYStartValue=0,w.dataPointEOs[l].cumulativeSum=0===l?0:w.dataPointEOs[l-1].cumulativeSum,w.dataPoints[l].y=0===
|
|
250
|
+
l?0:w.dataPointEOs[l-1].cumulativeSum):"undefined"!==typeof w.dataPoints[l].isIntermediateSum&&!0===w.dataPoints[l].isIntermediateSum?(w.dataPointEOs[l].cumulativeSumYStartValue=n,w.dataPointEOs[l].cumulativeSum=0===l?0:w.dataPointEOs[l-1].cumulativeSum,w.dataPoints[l].y=0===l?0:b,n=0===l?0:w.dataPointEOs[l-1].cumulativeSum,b=0):(d="number"!==typeof w.dataPoints[l].y?0:w.dataPoints[l].y,w.dataPointEOs[l].cumulativeSumYStartValue=0===l?0:w.dataPointEOs[l-1].cumulativeSum,w.dataPointEOs[l].cumulativeSum=
|
|
251
|
+
0===l?d:w.dataPointEOs[l-1].cumulativeSum+d,b+=d);for(l=0;l<w.dataPoints.length;l++)if("undefined"===typeof w.dataPoints[l].x&&(w.dataPoints[l].x=l+(a.axisX.logarithmic?1:0)),w.dataPoints[l].x.getTime?(f=!0,b=w.dataPoints[l].x.getTime()):b=w.dataPoints[l].x,d=w.dataPoints[l].y,b<c.min&&(c.min=b),b>c.max&&(c.max=b),w.dataPointEOs[l].cumulativeSum<e.min&&(e.min=w.dataPointEOs[l].cumulativeSum),w.dataPointEOs[l].cumulativeSum>e.max&&(e.max=w.dataPointEOs[l].cumulativeSum),0<l&&(a.axisX.logarithmic?(n=
|
|
252
|
+
b/w.dataPoints[l-1].x,1>n&&(n=1/n),c.minDiff>n&&1!==n&&(c.minDiff=n)):(n=b-w.dataPoints[l-1].x,0>n&&(n*=-1),c.minDiff>n&&0!==n&&(c.minDiff=n)),null!==d&&null!==w.dataPoints[l-1].y&&(a.axisY.logarithmic?(d=w.dataPointEOs[l].cumulativeSum/w.dataPointEOs[l-1].cumulativeSum,1>d&&(d=1/d),e.minDiff>d&&1!==d&&(e.minDiff=d)):(d=w.dataPointEOs[l].cumulativeSum-w.dataPointEOs[l-1].cumulativeSum,0>d&&(d*=-1),e.minDiff>d&&0!==d&&(e.minDiff=d)))),!(b<p)||k){if(!k&&(k=!0,0<l)){l-=2;continue}if(b>h&&!m)m=!0;else if(b>
|
|
253
|
+
h&&m)continue;w.dataPoints[l].label&&(a.axisX.labels[b]=w.dataPoints[l].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);0<l&&(w.dataPointEOs[l-1].cumulativeSum<e.viewPortMin&&(e.viewPortMin=w.dataPointEOs[l-1].cumulativeSum),w.dataPointEOs[l-1].cumulativeSum>e.viewPortMax&&(e.viewPortMax=w.dataPointEOs[l-1].cumulativeSum));w.dataPointEOs[l].cumulativeSum<e.viewPortMin&&(e.viewPortMin=w.dataPointEOs[l].cumulativeSum);w.dataPointEOs[l].cumulativeSum>e.viewPortMax&&(e.viewPortMax=
|
|
254
|
+
w.dataPointEOs[l].cumulativeSum)}w.axisX.valueType=w.xValueType=f?"dateTime":"number"}};t.prototype.calculateAutoBreaks=function(){function a(a,b,c,d){if(d)return c=Math.pow(Math.min(c*a/b,b/a),0.2),1>=c&&(c=Math.pow(1>a?1/a:Math.min(b/a,a),0.25)),{startValue:a*c,endValue:b/c};c=0.2*Math.min(c-b+a,b-a);0>=c&&(c=0.25*(0<a?Math.min(b-a,Math.abs(a)):b-a));return{startValue:a+c,endValue:b-c}}function e(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){var b=a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&
|
|
255
|
+
1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks,c=a.axisY.scaleBreaks&&a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(b||c)for(var e=a.axisY.dataInfo,h=a.axisX.dataInfo,f,q=h.min,k=h.max,m=e.min,n=e.max,h=h._dataRanges,e=e._dataRanges,p,w=0,g=0;g<a.dataSeriesIndexes.length;g++){var J=d.data[a.dataSeriesIndexes[g]];if(!(4>J.dataPoints.length))for(w=0;w<J.dataPoints.length;w++)if(b&&(p=(k+1-q)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,
|
|
256
|
+
f=J.dataPoints[w].x.getTime?J.dataPoints[w].x.getTime():J.dataPoints[w].x,p=Math.floor((f-q)/p),f<h[p].min&&(h[p].min=f),f>h[p].max&&(h[p].max=f)),c){var r=(n+1-m)*Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold)||10,10)/100;if((f="waterfall"===a.type?J.dataPointEOs[w].cumulativeSum:J.dataPoints[w].y)&&f.length)for(var ca=0;ca<f.length;ca++)p=Math.floor((f[ca]-m)/r),f[ca]<e[p].min&&(e[p].min=f[ca]),f[ca]>e[p].max&&(e[p].max=f[ca]);else l(f)||(p=Math.floor((f-m)/r),f<e[p].min&&(e[p].min=
|
|
257
|
+
f),f>e[p].max&&(e[p].max=f))}}}}function c(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)&&a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks)for(var b=a.axisX.dataInfo,c=b.min,e=b.max,h=b._dataRanges,f,q=0,k=0;k<a.dataSeriesIndexes.length;k++){var m=d.data[a.dataSeriesIndexes[k]];if(!(4>m.dataPoints.length))for(q=0;q<m.dataPoints.length;q++)f=(e+1-c)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,b=m.dataPoints[q].x.getTime?
|
|
258
|
+
m.dataPoints[q].x.getTime():m.dataPoints[q].x,f=Math.floor((b-c)/f),b<h[f].min&&(h[f].min=b),b>h[f].max&&(h[f].max=b)}}for(var b,d=this,f=!1,q=0;q<this._axes.length;q++)if(this._axes[q].scaleBreaks&&this._axes[q].scaleBreaks.autoCalculate&&1<=this._axes[q].scaleBreaks.maxNumberOfAutoBreaks){f=!0;this._axes[q].dataInfo._dataRanges=[];for(var w=0;w<100/Math.max(parseFloat(this._axes[q].scaleBreaks.collapsibleThreshold)||10,10);w++)this._axes[q].dataInfo._dataRanges.push({min:Infinity,max:-Infinity})}if(f){for(q=
|
|
259
|
+
0;q<this.plotInfo.plotTypes.length;q++)for(f=this.plotInfo.plotTypes[q],w=0;w<f.plotUnits.length;w++)b=f.plotUnits[w],"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type||"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"waterfall"===b.type||"error"===b.type||"boxAndWhisker"===
|
|
260
|
+
b.type?e(b):0<=b.type.indexOf("stacked")&&c(b);for(q=0;q<this._axes.length;q++)if(this._axes[q].dataInfo._dataRanges){var g=this._axes[q].dataInfo.min;b=(this._axes[q].dataInfo.max+1-g)*Math.max(parseFloat(this._axes[q].scaleBreaks.collapsibleThreshold)||10,10)/100;var k=this._axes[q].dataInfo._dataRanges,m,n,f=[];if(this._axes[q].dataInfo.dataPointYPositiveSums){var p=this._axes[q].dataInfo.dataPointYPositiveSums;m=k;for(w in p)if(p.hasOwnProperty(w)&&!isNaN(w)&&(n=p[w],!l(n))){var h=Math.floor((n-
|
|
261
|
+
g)/b);n<m[h].min&&(m[h].min=n);n>m[h].max&&(m[h].max=n)}delete this._axes[q].dataInfo.dataPointYPositiveSums}if(this._axes[q].dataInfo.dataPointYNegativeSums){p=this._axes[q].dataInfo.dataPointYNegativeSums;m=k;for(w in p)p.hasOwnProperty(w)&&!isNaN(w)&&(n=-1*p[w],l(n)||(h=Math.floor((n-g)/b),n<m[h].min&&(m[h].min=n),n>m[h].max&&(m[h].max=n)));delete this._axes[q].dataInfo.dataPointYNegativeSums}for(w=0;w<k.length-1;w++)if(m=k[w].max,isFinite(m))for(;w<k.length-1;)if(g=k[w+1].min,isFinite(g)){n=g-
|
|
262
|
+
m;n>b&&f.push({diff:n,start:m,end:g});break}else w++;if(this._axes[q].scaleBreaks.customBreaks)for(w=0;w<this._axes[q].scaleBreaks.customBreaks.length;w++)for(b=0;b<f.length;b++)if(this._axes[q].scaleBreaks.customBreaks[w].startValue<=f[b].start&&f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].endValue||this._axes[q].scaleBreaks.customBreaks[w].startValue<=f[b].start&&f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].endValue||f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].startValue&&
|
|
263
263
|
this._axes[q].scaleBreaks.customBreaks[w].startValue<=f[b].end||f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].endValue&&this._axes[q].scaleBreaks.customBreaks[w].endValue<=f[b].end)f.splice(b,1),b--;f.sort(function(a,b){return b.diff-a.diff});for(w=0;w<Math.min(f.length,this._axes[q].scaleBreaks.maxNumberOfAutoBreaks);w++)b=a(f[w].start,f[w].end,this._axes[q].logarithmic?this._axes[q].dataInfo.max/this._axes[q].dataInfo.min:this._axes[q].dataInfo.max-this._axes[q].dataInfo.min,this._axes[q].logarithmic),
|
|
264
264
|
this._axes[q].scaleBreaks.autoBreaks.push(new ba(this,"autoBreaks",b,w,++this._eventManager.lastObjectId,this._axes[q].scaleBreaks)),this._axes[q].scaleBreaks._appliedBreaks.push(this._axes[q].scaleBreaks.autoBreaks[this._axes[q].scaleBreaks.autoBreaks.length-1]);this._axes[q].scaleBreaks._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue})}}};t.prototype.renderCrosshairs=function(a,e){for(var c=0;c<this.axisX.length;c++)if(this.axisX[c]!=a&&this.axisX[c].crosshair&&this.axisX[c].crosshair.enabled&&
|
|
265
265
|
!this.axisX[c].crosshair._hidden)if(e&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisX[c].crosshair.render(null,this.sessionVariables.mouseY,this.axisX[c].convertPixelToValue(this.sessionVariables.mouseY)):this.axisX[c].crosshair.render(this.sessionVariables.mouseX,null,this.axisX[c].convertPixelToValue(this.sessionVariables.mouseX));
|
|
@@ -299,54 +299,54 @@ w=f?this.dragStartPoint.y:this.plotArea.y1,l=d?a-this.dragStartPoint.x:this.plot
|
|
|
299
299
|
e),"none"!==this.plotInfo.axisPlacement){this.sessionVariables.crosshairShownByPixel=!0;if(this.axisX&&0<this.axisX.length)for(d=0;d<this.axisX.length;d++)this.axisX[d].crosshair&&this.axisX[d].crosshair.enabled&&this.axisX[d].renderCrosshair(a,e);if(this.axisX2&&0<this.axisX2.length)for(d=0;d<this.axisX2.length;d++)this.axisX2[d].crosshair&&this.axisX2[d].crosshair.enabled&&this.axisX2[d].renderCrosshair(a,e);if(this.axisY&&0<this.axisY.length)for(d=0;d<this.axisY.length;d++)this.axisY[d].crosshair&&
|
|
300
300
|
this.axisY[d].crosshair.enabled&&this.axisY[d].renderCrosshair(a,e);if(this.axisY2&&0<this.axisY2.length)for(d=0;d<this.axisY2.length;d++)this.axisY2[d].crosshair&&this.axisY2[d].crosshair.enabled&&this.axisY2[d].renderCrosshair(a,e);if(this.axisX&&0<this.axisX.length)for(d=0;d<this.axisX.length;d++)this.axisX[d].crosshair&&this.axisX[d].crosshair.enabled&&this.axisX[d].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(d=0;d<this.axisX2.length;d++)this.axisX2[d].crosshair&&this.axisX2[d].crosshair.enabled&&
|
|
301
301
|
this.axisX2[d].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(d=0;d<this.axisY.length;d++)this.axisY[d].crosshair&&this.axisY[d].crosshair.enabled&&this.axisY[d].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(d=0;d<this.axisY2.length;d++)this.axisY2[d].crosshair&&this.axisY2[d].crosshair.enabled&&this.axisY2[d].crosshair.renderLabel()}};t.prototype._zoomPanToSelectedRegion=function(a,e,c,b,d){a=this.validateRegion(a,e,c,b,d);e=a.axesWithValidRange;c=a.axesRanges;
|
|
302
|
-
if(a.isValid)for(b=0;b<e.length;b++)d=
|
|
303
|
-
this._axes[n].type&&f||"axisY"===this._axes[n].type&&q)&&k.push(this._axes[n]);for(q=0;q<k.length;q++){var n=k[q],f=!1,p=n.convertPixelToValue({x:a,y:e}),h=n.convertPixelToValue({x:c,y:b});if(p>h)var g=h,h=p,p=g;if(n.scaleBreaks)for(g=0;!f&&g<n.scaleBreaks._appliedBreaks.length;g++)f=n.scaleBreaks._appliedBreaks[g].startValue<=p&&n.scaleBreaks._appliedBreaks[g].endValue>=h;if(isFinite(n.dataInfo.minDiff))if(g=n.getApparentDifference(p,h,null,!0)
|
|
304
|
-
(n.logarithmic&&g<Math.pow(n.dataInfo.minDiff,3)||!n.logarithmic&&g<3*Math.abs(n.dataInfo.minDiff))||p<n.minimum||h>n.maximum))l.push(n),m.push({val1:p,val2:h}),w=!0;else if(!d){w=!1;break}}return{isValid:w,axesWithValidRange:l,axesRanges:m}};t.prototype.preparePlotArea=function(){var a=this.plotArea;!r&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var e=
|
|
305
|
-
if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var c=this.axisY[0];a.x1=e.x1<e.x2?e.x1:c.lineCoordinates.x1;a.y1=e.y1<c.lineCoordinates.y1?e.y1:c.lineCoordinates.y1;a.x2=e.x2>c.lineCoordinates.x2?e.x2:c.lineCoordinates.x2;a.y2=e.y1>c.lineCoordinates.y2?e.y1:c.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(c=this.axisY2[0],a.x1=e.x1<e.x2?e.x1:c.lineCoordinates.x1,
|
|
306
|
-
e.x2:c.lineCoordinates.x2,a.y2=e.y2>c.lineCoordinates.y2?e.y2:c.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else e=this.layoutManager.getFreeSpace(),a.x1=e.x1,a.x2=e.x2,a.y1=e.y1,a.y2=e.y2,a.width=e.width,a.height=e.height;r||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Da(a.x1,
|
|
307
|
-
c=this.plotArea,b=0,d=0,f=0,q=d=f=0,w=0,g=b=0,k=0;for(a=0;a<this._indexLabels.length;a++){var m=this._indexLabels[a],n=m.chartType.toLowerCase(),p,h,w=W("indexLabelFontColor",m.dataPoint,m.dataSeries),y=W("indexLabelFontSize",m.dataPoint,m.dataSeries),g=W("indexLabelFontFamily",m.dataPoint,m.dataSeries),k=W("indexLabelFontStyle",m.dataPoint,m.dataSeries);p=W("indexLabelFontWeight",m.dataPoint,m.dataSeries);var A=
|
|
308
|
-
m.dataSeries);var f=W("indexLabelBorderThickness",m.dataPoint,m.dataSeries),d=W("indexLabelMaxWidth",m.dataPoint,m.dataSeries),q=W("indexLabelWrap",m.dataPoint,m.dataSeries),z=W("indexLabelLineDashType",m.dataPoint,m.dataSeries),s=W("indexLabelLineColor",m.dataPoint,m.dataSeries),x=l(m.dataPoint.indexLabelLineThickness)?l(m.dataSeries.options.indexLabelLineThickness)?0:m.dataSeries.options.indexLabelLineThickness:
|
|
309
|
-
this.plotArea.height:this.plotArea.width)<<0):0,v=W("indexLabelPadding",m.dataPoint,m.dataSeries),t={percent:null,total:null},D=null;if(0<=m.dataSeries.type.indexOf("stacked")||"pie"===m.dataSeries.type||"doughnut"===m.dataSeries.type)t=this.getPercentAndTotal(m.dataSeries,m.dataPoint);if(m.dataSeries.indexLabelFormatter||m.dataPoint.indexLabelFormatter)D={chart:this,dataSeries:m.dataSeries,dataPoint:m.dataPoint,
|
|
310
|
-
m.dataPoint.indexLabelFormatter(D):m.dataPoint.indexLabel?this.replaceKeywordsWithValue(m.dataPoint.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):m.dataSeries.indexLabelFormatter?m.dataSeries.indexLabelFormatter(D):m.dataSeries.indexLabel?this.replaceKeywordsWithValue(m.dataSeries.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):null;if(null!==R&&""!==R){var t=W("indexLabelPlacement",m.dataPoint,
|
|
311
|
-
m.dataPoint,m.dataSeries),B=m.direction,L=m.dataSeries.axisX,N=m.dataSeries.axisY,Z=!1,A=new ja(e,{x:0,y:0,maxWidth:d?d:0.5*this.width,maxHeight:q?5*y:1.5*y,angle:"horizontal"===D?0:-90,text:R,padding:v,backgroundColor:A,borderColor:h,borderThickness:f,textAlign:u,fontSize:y,fontFamily:g,fontWeight:p,fontColor:w,fontStyle:k,textBaseline:"middle"});A.measureText();m.dataSeries.indexLabelMaxWidth=A.maxWidth;
|
|
312
|
-
1)continue}else if("rangearea"===n||"rangesplinearea"===n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<N.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>N.viewportMaximum)continue}else if(0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("bubble")||0<=n.indexOf("scatter")){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||
|
|
313
|
-
L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||(0<m.dataPoint.y.length?Math.max.apply(null,m.dataPoint.y):m.cumulativeY?m.cumulativeY:m.dataPoint.y)<N.viewportMinimum||(0<m.dataPoint.y.length?Math.min.apply(null,m.dataPoint.y):m.cumulativeY?m.cumulativeY:m.dataPoint.y)>N.viewportMaximum)continue}else if("waterfall"===n||"error"===n&&!m.axisSwapped){if(m.dataPoint.x<L.viewportMinimum||
|
|
314
|
-
n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||m.bounds.x1>c.x2||m.bounds.x2<c.x1)continue}else if("candlestick"===n||"ohlc"===n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<N.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>N.viewportMaximum)continue}else if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>
|
|
315
|
-
this.plotInfo.axisPlacement){if(0<=n.indexOf("line")||0<=n.indexOf("area"))t="auto",w=4;else if(0<=n.indexOf("stacked"))"auto"===t&&(t="inside");else if("bubble"===n||"scatter"===n)t="inside";p=m.point.x-g/2+("horizontal"===D?0:A._lineHeight/2);if("inside"!==t)d=c.y1,f=c.y2,0<B?(h=m.point.y+A._lineHeight/2-k-w-b,h<d&&(h="auto"===t?Math.max(m.point.y,d)+A._lineHeight/2+w+b:d+A._lineHeight/
|
|
316
|
-
b))):(h=m.point.y+A._lineHeight/2+w+b,h>f-k+A._lineHeight/2-w&&(h="auto"===t?Math.min(m.point.y,f)+A._lineHeight/2-k-w-b:f+A._lineHeight/2-k-w-b,Z=h-("horizontal"===D?A._lineHeight/2:k)<m.point.y,!Z||(0<=n.indexOf("line")||0<=n.indexOf("area"))||(h+=b)));else{Math.max(m.bounds.y1,c.y1);f=Math.min(m.bounds.y2,c.y2)-k+A._lineHeight/2;b=0<=n.indexOf("range")||"error"===n?0<B?Math.max(m.bounds.y1,
|
|
317
|
-
c.y2))/2-k/2+A._lineHeight/2;if(0<B){if(h=b,"bubble"===n||"scatter"===n)h=m.point.y-k/2+A._lineHeight/2,k>m.bounds.y2-m.bounds.y1&&(h-=k/2+w),0>h-A._lineHeight/2&&(h+=Math.abs(h-A._lineHeight/2)<=(m.bounds.y2-m.bounds.y1)/2+w?Math.abs(h-A._lineHeight/2):(m.bounds.y2-m.bounds.y1)/2+w)}else h=Math.min(m.point.y,b),h>f-k-w&&("bubble"===n||"scatter"===n)&&(h=Math.min(m.point.y+w,c.y2-
|
|
318
|
-
"auto"===t&&(t="inside"):"bubble"===n&&(t="inside"),h=m.point.y+A._lineHeight/2-k/2,"inside"!==t?(f=c.x1,d=c.x2,0>B?(p=m.point.x-g+("horizontal"===D?0:A._lineHeight/2)-q-b,("horizontal"===D?p:p-A._lineHeight/2)<f&&(p="auto"===t?Math.max(m.point.x,f)+("horizontal"===D?0:A._lineHeight/2)+w+b:f+("horizontal"===D?0:A._lineHeight/2)+q,(Z=p+g-("horizontal"===D?0:A._lineHeight/
|
|
319
|
-
"auto"===t?Math.min(m.point.x,d)-("horizontal"===D?g:g-A._lineHeight/2)-q-b:d-g-q+("horizontal"===D?0:A._lineHeight/2),(Z=p-("horizontal"===D?0:A._lineHeight/2)<m.point.x)&&(p+=b)))):(f=Math.max(m.bounds.x1,c.x1),Math.min(m.bounds.x2,c.x2),b=0<=n.indexOf("range")||"error"===n?0>B?Math.max(m.bounds.x1,c.x1):Math.min(m.bounds.x2,c.x2)-g-q+("horizontal"===D?0:A._lineHeight/
|
|
320
|
-
b),p=Math.max(p,f+("horizontal"===D?0:A._lineHeight/2+w)));"vertical"===D&&(h+=k-A._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(n)&&(Z=0<B?h+("horizontal"===D?k-A._lineHeight/2:0)>m.point.y:h-("horizontal"===D?A._lineHeight/2:k)<m.point.y),"bubble"===n||"scatter"===n)&&(p+=A._lineHeight/2-y/
|
|
321
|
-
!Z)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(n)&&("error"!==n||m.axisSwapped)&&m.point.y>c.y1&&m.point.y<c.y2||!Z))&&(e.lineWidth=x,e.strokeStyle=s?s:"gray",e.setLineDash&&e.setLineDash(K(z,x)),e.beginPath(),e.moveTo(m.point.x,m.point.y),0<=n.indexOf("bar")||"error"===n&&m.axisSwapped?e.lineTo(p+
|
|
322
|
-
n&&!m.axisSwapped?e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),h+("vertical"===D?h-k<m.point.y?0:-k:(h-A._lineHeight/2<m.point.y?k:0)-A._lineHeight/2)):0<=n.indexOf("waterfall")?e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),"vertical"===D?0<B&&h<m.point.y?h:0>B&&h-k>m.point.y?h-k:m.point.y:0<B&&h+k-A._lineHeight/2<m.point.y?h+k-A._lineHeight/2:0>B&&h-
|
|
323
|
-
0:-k:(h+k-A._lineHeight/2<m.point.y?k:0)-A._lineHeight/2)),e.stroke())}}e={source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)m=this._indexLabels[a],A=W("indexLabelBackgroundColor",m.dataPoint,m.dataSeries),m.dataSeries.indexLabelBackgroundColor=
|
|
324
|
-
e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var f=[],q,w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(c.setLineDash){var p=K(k.nullDataLineDashType,
|
|
325
|
-
dataSeriesIndex:l};g=T(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var z=!0,s=0,x,v;c.beginPath();if(0<m.length){for(var t=!1,s=0;s<m.length;s++)if(x=m[s].x.getTime?m[s].x.getTime():m[s].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&
|
|
326
|
-
!0;else{x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(m[s].y);var D=k.dataPointIds[s];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:x,y1:v};z||t?(!z&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||n===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(q.x,
|
|
327
|
-
b.moveTo(x,v))),t=z=!1):(c.lineTo(x,v),r&&b.lineTo(x,v),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),r&&(b.stroke(),b.beginPath(),b.moveTo(x,v))));q={x:x,y:v};s<m.length-1&&(A!==(m[s].lineColor||g)||n!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,v),A=m[s].lineColor||g,c.strokeStyle=A,c.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,
|
|
328
|
-
k.getMarkerProperties(s,x,v,c);f.push(R);D=T(D);r&&f.push({x:x,y:v,ctx:b,type:R.type,size:R.size,color:D,borderColor:D,borderThickness:R.borderThickness})}(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:m[s],dataSeries:k,point:{x:x,y:v},direction:0>m[s].y===a.axisY.reversed?
|
|
329
|
-
"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(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderStepLine=
|
|
330
|
-
function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var f=[],q,w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(c.setLineDash){var p=K(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,h=K(n,k.lineThickness);c.setLineDash(h)}var g=
|
|
331
|
-
k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=T(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var z=!0,s=0,x,v;c.beginPath();if(0<m.length){for(var t=!1,s=0;s<m.length;s++)if(x=m[s].getTime?m[s].x.getTime():m[s].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!t)))if("number"!==typeof m[s].y)0<
|
|
332
|
-
s&&!(k.connectNullData||t||z)&&(c.stroke(),r&&b.stroke()),t=!0;else{var D=v;x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(m[s].y);var R=k.dataPointIds[s];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:x,y1:v};z||t?(!z&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||n===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(q.x,q.y),n=k.nullDataLineDashType,c.setLineDash(p)),
|
|
333
|
-
c.lineTo(x,D),c.lineTo(x,v),r&&(b.lineTo(x,D),b.lineTo(x,v))):(c.beginPath(),c.moveTo(x,v),r&&(b.beginPath(),b.moveTo(x,v))),t=z=!1):(c.lineTo(x,D),r&&b.lineTo(x,D),c.lineTo(x,v),r&&b.lineTo(x,v),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),r&&(b.stroke(),b.beginPath(),b.moveTo(x,v))));q={x:x,y:v};s<m.length-1&&(A!==(m[s].lineColor||g)||n!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,v),A=m[s].lineColor||g,c.strokeStyle=A,c.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,
|
|
334
|
-
c.setLineDash(K(n,k.lineThickness))):(n=k.lineDashType,c.setLineDash(h))));0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)&&(D=k.getMarkerProperties(s,x,v,c),f.push(D),R=T(R),r&&f.push({x:x,y:v,ctx:b,type:D.type,size:D.size,color:R,borderColor:R,borderThickness:D.borderThickness}));(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:m[s],dataSeries:k,point:{x:x,y:v},direction:0>m[s].y===a.axisY.reversed?
|
|
302
|
+
if(a.isValid)for(b=0;b<e.length;b++){d=e[b];var f=c[b];d.setViewPortRange(f.val1,f.val2);this.syncCharts&&("axisX"===d.type&&"y"!=this.zoomType)&&this.syncCharts(f.val1,f.val2);this.stockChart&&(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:f.val1,maximum:f.val2})}return a.isValid};t.prototype.validateRegion=function(a,e,c,b,d){d=d||!1;for(var f=0<=this.zoomType.indexOf("x"),q=0<=this.zoomType.indexOf("y"),w=!1,l=
|
|
303
|
+
[],k=[],m=[],n=0;n<this._axes.length;n++)("axisX"===this._axes[n].type&&f||"axisY"===this._axes[n].type&&q)&&k.push(this._axes[n]);for(q=0;q<k.length;q++){var n=k[q],f=!1,p=n.convertPixelToValue({x:a,y:e}),h=n.convertPixelToValue({x:c,y:b});if(p>h)var g=h,h=p,p=g;if(n.scaleBreaks)for(g=0;!f&&g<n.scaleBreaks._appliedBreaks.length;g++)f=n.scaleBreaks._appliedBreaks[g].startValue<=p&&n.scaleBreaks._appliedBreaks[g].endValue>=h;if(isFinite(n.dataInfo.minDiff))if(g=n.getApparentDifference(p,h,null,!0),
|
|
304
|
+
!(f||!(this.panEnabled&&n.scaleBreaks&&n.scaleBreaks._appliedBreaks.length)&&(n.logarithmic&&g<Math.pow(n.dataInfo.minDiff,3)||!n.logarithmic&&g<3*Math.abs(n.dataInfo.minDiff))||p<n.minimum||h>n.maximum))l.push(n),m.push({val1:p,val2:h}),w=!0;else if(!d){w=!1;break}}return{isValid:w,axesWithValidRange:l,axesRanges:m}};t.prototype.preparePlotArea=function(){var a=this.plotArea;!r&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var e=
|
|
305
|
+
this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var c=this.axisY[0];a.x1=e.x1<e.x2?e.x1:c.lineCoordinates.x1;a.y1=e.y1<c.lineCoordinates.y1?e.y1:c.lineCoordinates.y1;a.x2=e.x2>c.lineCoordinates.x2?e.x2:c.lineCoordinates.x2;a.y2=e.y1>c.lineCoordinates.y2?e.y1:c.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(c=this.axisY2[0],a.x1=e.x1<e.x2?e.x1:c.lineCoordinates.x1,
|
|
306
|
+
a.y1=e.y1<c.lineCoordinates.y1?e.y1:c.lineCoordinates.y1,a.x2=e.x2>c.lineCoordinates.x2?e.x2:c.lineCoordinates.x2,a.y2=e.y2>c.lineCoordinates.y2?e.y2:c.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else e=this.layoutManager.getFreeSpace(),a.x1=e.x1,a.x2=e.x2,a.y1=e.y1,a.y2=e.y2,a.width=e.width,a.height=e.height;r||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Da(a.x1,
|
|
307
|
+
a.y1,a.x2,a.y2,2)};t.prototype.renderIndexLabels=function(a){var e=a||this.plotArea.ctx,c=this.plotArea,b=0,d=0,f=0,q=d=f=0,w=0,g=b=0,k=0;for(a=0;a<this._indexLabels.length;a++){var m=this._indexLabels[a],n=m.chartType.toLowerCase(),p,h,w=W("indexLabelFontColor",m.dataPoint,m.dataSeries),y=W("indexLabelFontSize",m.dataPoint,m.dataSeries),g=W("indexLabelFontFamily",m.dataPoint,m.dataSeries),k=W("indexLabelFontStyle",m.dataPoint,m.dataSeries);p=W("indexLabelFontWeight",m.dataPoint,m.dataSeries);var A=
|
|
308
|
+
W("indexLabelBackgroundColor",m.dataPoint,m.dataSeries);h=W("indexLabelBorderColor",m.dataPoint,m.dataSeries);var f=W("indexLabelBorderThickness",m.dataPoint,m.dataSeries),d=W("indexLabelMaxWidth",m.dataPoint,m.dataSeries),q=W("indexLabelWrap",m.dataPoint,m.dataSeries),z=W("indexLabelLineDashType",m.dataPoint,m.dataSeries),s=W("indexLabelLineColor",m.dataPoint,m.dataSeries),x=l(m.dataPoint.indexLabelLineThickness)?l(m.dataSeries.options.indexLabelLineThickness)?0:m.dataSeries.options.indexLabelLineThickness:
|
|
309
|
+
m.dataPoint.indexLabelLineThickness,b=0<x?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,v=W("indexLabelPadding",m.dataPoint,m.dataSeries),t={percent:null,total:null},D=null;if(0<=m.dataSeries.type.indexOf("stacked")||"pie"===m.dataSeries.type||"doughnut"===m.dataSeries.type)t=this.getPercentAndTotal(m.dataSeries,m.dataPoint);if(m.dataSeries.indexLabelFormatter||m.dataPoint.indexLabelFormatter)D={chart:this,dataSeries:m.dataSeries,dataPoint:m.dataPoint,
|
|
310
|
+
index:m.indexKeyword,total:t.total,percent:t.percent};var R=m.dataPoint.indexLabelFormatter?m.dataPoint.indexLabelFormatter(D):m.dataPoint.indexLabel?this.replaceKeywordsWithValue(m.dataPoint.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):m.dataSeries.indexLabelFormatter?m.dataSeries.indexLabelFormatter(D):m.dataSeries.indexLabel?this.replaceKeywordsWithValue(m.dataSeries.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):null;if(null!==R&&""!==R){var t=W("indexLabelPlacement",m.dataPoint,
|
|
311
|
+
m.dataSeries),D=W("indexLabelOrientation",m.dataPoint,m.dataSeries),u=W("indexLabelTextAlign",m.dataPoint,m.dataSeries),B=m.direction,L=m.dataSeries.axisX,N=m.dataSeries.axisY,Z=!1,A=new ja(e,{x:0,y:0,maxWidth:d?d:0.5*this.width,maxHeight:q?5*y:1.5*y,angle:"horizontal"===D?0:-90,text:R,padding:v,backgroundColor:A,borderColor:h,borderThickness:f,textAlign:u,fontSize:y,fontFamily:g,fontWeight:p,fontColor:w,fontStyle:k,textBaseline:"middle"});A.measureText();m.dataSeries.indexLabelMaxWidth=A.maxWidth;
|
|
312
|
+
if("stackedarea100"===n){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"===n||"rangesplinearea"===n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<N.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>N.viewportMaximum)continue}else if(0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("bubble")||0<=n.indexOf("scatter")){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||
|
|
313
|
+
m.dataPoint.y<N.viewportMinimum||m.dataPoint.y>N.viewportMaximum)continue}else if(0<=n.indexOf("column")){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||(0<m.dataPoint.y.length?Math.max.apply(null,m.dataPoint.y):m.cumulativeY?m.cumulativeY:m.dataPoint.y)<N.viewportMinimum||(0<m.dataPoint.y.length?Math.min.apply(null,m.dataPoint.y):m.cumulativeY?m.cumulativeY:m.dataPoint.y)>N.viewportMaximum)continue}else if("waterfall"===n||"error"===n&&!m.axisSwapped){if(m.dataPoint.x<L.viewportMinimum||
|
|
314
|
+
m.dataPoint.x>L.viewportMaximum||m.bounds.y1>c.y2||m.bounds.y2<c.y1)continue}else if(0<=n.indexOf("bar")||"error"===n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||m.bounds.x1>c.x2||m.bounds.x2<c.x1)continue}else if("candlestick"===n||"ohlc"===n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<N.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>N.viewportMaximum)continue}else if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>
|
|
315
|
+
L.viewportMaximum)continue;q=w=2;"horizontal"===D?(g=A.width,k=A.height):(k=A.width,g=A.height);if("normal"===this.plotInfo.axisPlacement){if(0<=n.indexOf("line")||0<=n.indexOf("area"))t="auto",w=4;else if(0<=n.indexOf("stacked"))"auto"===t&&(t="inside");else if("bubble"===n||"scatter"===n)t="inside";p=m.point.x-g/2+("horizontal"===D?0:A._lineHeight/2);if("inside"!==t)d=c.y1,f=c.y2,0<B?(h=m.point.y+A._lineHeight/2-k-w-b,h<d&&(h="auto"===t?Math.max(m.point.y,d)+A._lineHeight/2+w+b:d+A._lineHeight/
|
|
316
|
+
2+w+b,Z=h+("horizontal"===D?k-A._lineHeight/2:0)>m.point.y,!Z||(0<=n.indexOf("line")||0<=n.indexOf("area"))||(h-=b))):(h=m.point.y+A._lineHeight/2+w+b,h>f-k+A._lineHeight/2-w&&(h="auto"===t?Math.min(m.point.y,f)+A._lineHeight/2-k-w-b:f+A._lineHeight/2-k-w-b,Z=h-("horizontal"===D?A._lineHeight/2:k)<m.point.y,!Z||(0<=n.indexOf("line")||0<=n.indexOf("area"))||(h+=b)));else{Math.max(m.bounds.y1,c.y1);f=Math.min(m.bounds.y2,c.y2)-k+A._lineHeight/2;b=0<=n.indexOf("range")||"error"===n?0<B?Math.max(m.bounds.y1,
|
|
317
|
+
c.y1)+A._lineHeight/2+w:Math.min(m.bounds.y2,c.y2)+A._lineHeight/2-k-w:(Math.max(m.bounds.y1,c.y1)+Math.min(m.bounds.y2,c.y2))/2-k/2+A._lineHeight/2;if(0<B){if(h=b,"bubble"===n||"scatter"===n)h=m.point.y-k/2+A._lineHeight/2,k>m.bounds.y2-m.bounds.y1&&(h-=k/2+w),0>h-A._lineHeight/2&&(h+=Math.abs(h-A._lineHeight/2)<=(m.bounds.y2-m.bounds.y1)/2+w?Math.abs(h-A._lineHeight/2):(m.bounds.y2-m.bounds.y1)/2+w)}else h=Math.min(m.point.y,b),h>f-k-w&&("bubble"===n||"scatter"===n)&&(h=Math.min(m.point.y+w,c.y2-
|
|
318
|
+
k-w));h=Math.min(h,f)}}else 0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("scatter")?(t="auto",q=4):0<=n.indexOf("stacked")?"auto"===t&&(t="inside"):"bubble"===n&&(t="inside"),h=m.point.y+A._lineHeight/2-k/2,"inside"!==t?(f=c.x1,d=c.x2,0>B?(p=m.point.x-g+("horizontal"===D?0:A._lineHeight/2)-q-b,("horizontal"===D?p:p-A._lineHeight/2)<f&&(p="auto"===t?Math.max(m.point.x,f)+("horizontal"===D?0:A._lineHeight/2)+w+b:f+("horizontal"===D?0:A._lineHeight/2)+q,(Z=p+g-("horizontal"===D?0:A._lineHeight/
|
|
319
|
+
2)>m.point.x)&&(p-=b))):(p=m.point.x+("horizontal"===D?0:A._lineHeight/2)+q+b,("horizontal"===D?p:p-A._lineHeight/2)>d-g-q-b&&(p="auto"===t?Math.min(m.point.x,d)-("horizontal"===D?g:g-A._lineHeight/2)-q-b:d-g-q+("horizontal"===D?0:A._lineHeight/2),(Z=p-("horizontal"===D?0:A._lineHeight/2)<m.point.x)&&(p+=b)))):(f=Math.max(m.bounds.x1,c.x1),Math.min(m.bounds.x2,c.x2),b=0<=n.indexOf("range")||"error"===n?0>B?Math.max(m.bounds.x1,c.x1):Math.min(m.bounds.x2,c.x2)-g-q+("horizontal"===D?0:A._lineHeight/
|
|
320
|
+
2):(Math.max(m.bounds.x1,c.x1)+Math.min(m.bounds.x2,c.x2))/2-g/2+("horizontal"===D?0:A._lineHeight/2),p=0>B?b:Math.min(m.point.x,b),p=Math.max(p,f+("horizontal"===D?0:A._lineHeight/2+w)));"vertical"===D&&(h+=k-A._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(n)&&(Z=0<B?h+("horizontal"===D?k-A._lineHeight/2:0)>m.point.y:h-("horizontal"===D?A._lineHeight/2:k)<m.point.y),"bubble"===n||"scatter"===n)&&(p+=A._lineHeight/2-y/
|
|
321
|
+
2);A.x=p;A.y=h;A.render(!0);x&&("inside"!==t&&(0>n.indexOf("bar")&&("error"!==n||!m.axisSwapped)&&m.point.x>c.x1&&m.point.x<c.x2||!Z)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(n)&&("error"!==n||m.axisSwapped)&&m.point.y>c.y1&&m.point.y<c.y2||!Z))&&(e.lineWidth=x,e.strokeStyle=s?s:"gray",e.setLineDash&&e.setLineDash(K(z,x)),e.beginPath(),e.moveTo(m.point.x,m.point.y),0<=n.indexOf("bar")||"error"===n&&m.axisSwapped?e.lineTo(p+
|
|
322
|
+
(0<m.direction?0:g)+("vertical"===D?-A._lineHeight/2:0),h+("vertical"===D?-k/2:k/2-A._lineHeight/2)):0<=n.indexOf("column")||"error"===n&&!m.axisSwapped?e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),h+("vertical"===D?h-k<m.point.y?0:-k:(h-A._lineHeight/2<m.point.y?k:0)-A._lineHeight/2)):0<=n.indexOf("waterfall")?e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),"vertical"===D?0<B&&h<m.point.y?h:0>B&&h-k>m.point.y?h-k:m.point.y:0<B&&h+k-A._lineHeight/2<m.point.y?h+k-A._lineHeight/2:0>B&&h-
|
|
323
|
+
A._lineHeight/2>m.point.y?h-A._lineHeight/2:m.point.y):e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),h+("vertical"===D?h-k<m.point.y?0:-k:(h+k-A._lineHeight/2<m.point.y?k:0)-A._lineHeight/2)),e.stroke())}}e={source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)m=this._indexLabels[a],A=W("indexLabelBackgroundColor",m.dataPoint,m.dataSeries),m.dataSeries.indexLabelBackgroundColor=
|
|
324
|
+
l(A)?r?"transparent":null:A;return e};t.prototype.renderLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var f=[],q,w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(c.setLineDash){var p=K(k.nullDataLineDashType,
|
|
325
|
+
k.lineThickness),n=k.lineDashType,h=K(n,k.lineThickness);c.setLineDash(h)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=T(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var z=!0,s=0,x,v;c.beginPath();if(0<m.length){for(var t=!1,s=0;s<m.length;s++)if(x=m[s].x.getTime?m[s].x.getTime():m[s].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&
|
|
326
|
+
(!k.connectNullData||!t)))if("number"!==typeof m[s].y)0<s&&!(k.connectNullData||t||z)&&(c.stroke(),r&&b.stroke()),t=!0;else{x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(m[s].y);var D=k.dataPointIds[s];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:x,y1:v};z||t?(!z&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||n===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(q.x,
|
|
327
|
+
q.y),n=k.nullDataLineDashType,c.setLineDash(p)),c.lineTo(x,v),r&&b.lineTo(x,v)):(c.beginPath(),c.moveTo(x,v),r&&(b.beginPath(),b.moveTo(x,v))),t=z=!1):(c.lineTo(x,v),r&&b.lineTo(x,v),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),r&&(b.stroke(),b.beginPath(),b.moveTo(x,v))));q={x:x,y:v};s<m.length-1&&(A!==(m[s].lineColor||g)||n!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,v),A=m[s].lineColor||g,c.strokeStyle=A,c.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,
|
|
328
|
+
c.setLineDash(K(n,k.lineThickness))):(n=k.lineDashType,c.setLineDash(h))));if(0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)){var R=k.getMarkerProperties(s,x,v,c);f.push(R);D=T(D);r&&f.push({x:x,y:v,ctx:b,type:R.type,size:R.size,color:D,borderColor:D,borderThickness:R.borderThickness})}(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:m[s],dataSeries:k,point:{x:x,y:v},direction:0>m[s].y===a.axisY.reversed?
|
|
335
329
|
1:-1,color:g})}c.stroke();r&&b.stroke()}}X.drawMarkers(f);r&&(e.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(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();
|
|
336
|
-
return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
this.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
330
|
+
return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderStepLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var f=[],q,w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];c.lineWidth=k.lineThickness;
|
|
331
|
+
var m=k.dataPoints,n="solid";if(c.setLineDash){var p=K(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,h=K(n,k.lineThickness);c.setLineDash(h)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=T(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var z=!0,s=0,x,v;c.beginPath();if(0<m.length){for(var t=!1,s=0;s<m.length;s++)if(x=m[s].getTime?
|
|
332
|
+
m[s].x.getTime():m[s].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!t)))if("number"!==typeof m[s].y)0<s&&!(k.connectNullData||t||z)&&(c.stroke(),r&&b.stroke()),t=!0;else{var D=v;x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(m[s].y);var R=k.dataPointIds[s];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:x,y1:v};z||t?(!z&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||
|
|
333
|
+
n===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(q.x,q.y),n=k.nullDataLineDashType,c.setLineDash(p)),c.lineTo(x,D),c.lineTo(x,v),r&&(b.lineTo(x,D),b.lineTo(x,v))):(c.beginPath(),c.moveTo(x,v),r&&(b.beginPath(),b.moveTo(x,v))),t=z=!1):(c.lineTo(x,D),r&&b.lineTo(x,D),c.lineTo(x,v),r&&b.lineTo(x,v),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),r&&(b.stroke(),b.beginPath(),b.moveTo(x,v))));q={x:x,y:v};s<m.length-1&&(A!==(m[s].lineColor||g)||n!==(m[s].lineDashType||
|
|
334
|
+
k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,v),A=m[s].lineColor||g,c.strokeStyle=A,c.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,c.setLineDash(K(n,k.lineThickness))):(n=k.lineDashType,c.setLineDash(h))));0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)&&(D=k.getMarkerProperties(s,x,v,c),f.push(D),R=T(R),r&&f.push({x:x,y:v,ctx:b,type:D.type,size:D.size,color:R,borderColor:R,borderThickness:D.borderThickness}));(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&
|
|
335
|
+
this._indexLabels.push({chartType:"stepLine",dataPoint:m[s],dataSeries:k,point:{x:x,y:v},direction:0>m[s].y===a.axisY.reversed?1:-1,color:g})}c.stroke();r&&b.stroke()}}X.drawMarkers(f);r&&(e.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,
|
|
336
|
+
0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderSpline=function(a){function e(a){a=u(a,2);if(0<a.length){b.beginPath();r&&d.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);r&&d.moveTo(a[0].x,a[0].y);
|
|
337
|
+
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&&d.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),r&&(d.stroke(),d.beginPath(),d.moveTo(a[c+3].x,a[c+3].y));b.stroke();r&&d.stroke()}}
|
|
338
|
+
var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx;b.save();var f=this.plotArea;b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();for(var q=[],w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];b.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(b.setLineDash){var p=K(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,h=K(n,k.lineThickness);b.setLineDash(h)}var g=
|
|
339
|
+
k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=T(g);d.strokeStyle=g;d.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];b.strokeStyle=g;var z=0,s,x,v=[];b.beginPath();if(0<m.length)for(x=!1,z=0;z<m.length;z++)if(s=m[z].getTime?m[z].x.getTime():m[z].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!x)))if("number"!==typeof m[z].y)0<z&&!x&&
|
|
340
|
+
(k.connectNullData?b.setLineDash&&(0<v.length&&(k.options.nullDataLineDashType||!m[z-1].lineDashType))&&(v[v.length-1].newLineDashArray=p,n=k.nullDataLineDashType):(e(v),v=[])),x=!0;else{s=a.axisX.convertValueToPixel(s);x=a.axisY.convertValueToPixel(m[z].y);var t=k.dataPointIds[z];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:z,x1:s,y1:x};v[v.length]={x:s,y:x};z<m.length-1&&(A!==(m[z].lineColor||g)||n!==(m[z].lineDashType||k.lineDashType))&&(A=m[z].lineColor||
|
|
341
|
+
g,v[v.length-1].newStrokeStyle=A,b.setLineDash&&(m[z].lineDashType?(n=m[z].lineDashType,v[v.length-1].newLineDashArray=K(n,k.lineThickness)):(n=k.lineDashType,v[v.length-1].newLineDashArray=h)));if(0!==m[z].markerSize&&(0<m[z].markerSize||0<k.markerSize)){var D=k.getMarkerProperties(z,s,x,b);q.push(D);t=T(t);r&&q.push({x:s,y:x,ctx:d,type:D.type,size:D.size,color:t,borderColor:t,borderThickness:D.borderThickness})}(m[z].indexLabel||k.indexLabel||m[z].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",
|
|
342
|
+
dataPoint:m[z],dataSeries:k,point:{x:s,y:x},direction:0>m[z].y===a.axisY.reversed?1:-1,color:g});x=!1}e(v)}X.drawMarkers(q);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&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(f.x1,
|
|
343
|
+
f.y1,f.width,f.height),d.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=0,q,w,l,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?
|
|
344
|
+
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,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&
|
|
345
|
+
f>m&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<f)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>m&&(n=m);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(m=0;m<a.dataSeriesIndexes.length;m++){var p=
|
|
346
|
+
a.dataSeriesIndexes[m],h=this.data[p],g=h.dataPoints;if(0<g.length)for(var A=5<n&&h.bevelEnabled?!0:!1,f=0;f<g.length;f++)if(g[f].getTime?l=g[f].x.getTime():l=g[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof g[f].y){q=a.axisX.convertValueToPixel(l);w=a.axisY.convertValueToPixel(g[f].y);q=a.axisX.reversed?q+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+m)*n<<0:q-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+m)*n<<0;var z=a.axisX.reversed?
|
|
347
|
+
q-n<<0:q+n<<0,s;0<=g[f].y?s=k:(s=w,w=k);w>s&&(b=w,w=s,s=b);b=g[f].color?g[f].color:h._colorSet[f%h._colorSet.length];Y(c,a.axisX.reversed?z:q,w,a.axisX.reversed?q:z,s,b,0,null,A&&(a.axisY.reversed?0>g[f].y:0<=g[f].y),(a.axisY.reversed?0<=g[f].y:0>g[f].y)&&A,!1,!1,h.fillOpacity);b=h.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:f,x1:q,y1:w,x2:z,y2:s};b=T(b);r&&Y(this._eventManager.ghostCtx,a.axisX.reversed?z:q,w,a.axisX.reversed?q:z,s,
|
|
348
|
+
b,0,null,!1,!1,!1,!1);(g[f].indexLabel||h.indexLabel||g[f].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:g[f],dataSeries:h,point:{x:q+(z-q)/2,y:0>g[f].y===a.axisY.reversed?w:s},direction:0>g[f].y===a.axisY.reversed?1:-1,bounds:{x1:q,y1:Math.min(w,s),x2:z,y2:Math.max(w,s)},color:b})}}r&&(e.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,
|
|
349
|
+
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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.yScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:k<a.axisY.bounds.y1?a.axisY.bounds.y1:k>a.axisY.bounds.y2?a.axisY.bounds.y2:k}}};t.prototype.renderStackedColumn=
|
|
350
350
|
function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=[],q=[],l=[],g=[],k=0,m,n,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,y=a.axisX.dataInfo.minDiff;
|
|
351
351
|
isFinite(y)||(y=0.3*Math.abs(a.axisX.range));y=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(y)/Math.log(a.axisX.range):Math.abs(y)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>h&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<k)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));y<k&&(y=k);y>h&&(y=h);c.save();r&&this._eventManager.ghostCtx.save();
|
|
352
352
|
c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var A=a.dataSeriesIndexes[h],z=this.data[A],s=z.dataPoints;if(0<s.length){var x=5<y&&z.bevelEnabled?!0:!1;c.strokeStyle="#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)&&
|
|
@@ -512,8 +512,8 @@ Math.PI/2-s&&g.midAngle<Math.PI/2+s)&&(f<=a/2&&!n?(g.hemisphere="right",f++):(g.
|
|
|
512
512
|
0.07*C*Math.cos(h[c].midAngle),q=0.07*C*Math.sin(h[c].midAngle),g=!1;if(m[c].exploded){if(1E-9<Math.abs(h[c].center.x-(v.x+f))||1E-9<Math.abs(h[c].center.y-(v.y+q)))h[c].center.x=v.x+f*a,h[c].center.y=v.y+q*a,g=!0}else if(0<Math.abs(h[c].center.x-v.x)||0<Math.abs(h[c].center.y-v.y))h[c].center.x=v.x+f*(1-a),h[c].center.y=v.y+q*(1-a),g=!0;g&&b&&(f={},f.dataSeries=k,f.dataPoint=k.dataPoints[c],f.index=c,t.toolTip.highlightObjects([f]));pa(t.plotArea.ctx,h[c].center,h[c].radius,m[c].color?m[c].color:
|
|
513
513
|
k._colorSet[c%k._colorSet.length],k.type,e,d,k.fillOpacity,h[c].percentInnerRadius)}}c=t.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(e=e=0;e<m.length;e++)d=h[e],d.indexLabelText&&(d.indexLabelTextBlock.y-=d.indexLabelTextBlock.height/2-d.indexLabelTextBlock._lineHeight/2,f=0,f="left"===d.hemisphere?"inside"!==k.indexLabelPlacement?-(d.indexLabelTextBlock.width+n):-d.indexLabelTextBlock.width/2:"inside"!==k.indexLabelPlacement?n:-d.indexLabelTextBlock.width/
|
|
514
514
|
2,d.indexLabelTextBlock.x+=f,d.indexLabelTextBlock.render(!0),d.indexLabelTextBlock.x-=f,d.indexLabelTextBlock.y+=d.indexLabelTextBlock.height/2-d.indexLabelTextBlock._lineHeight/2,"inside"!==d.indexLabelPlacement&&0<d.indexLabelLineThickness&&(f=d.center.x+C*Math.cos(d.midAngle),q=d.center.y+C*Math.sin(d.midAngle),c.strokeStyle=d.indexLabelLineColor,c.lineWidth=d.indexLabelLineThickness,c.setLineDash&&c.setLineDash(K(d.indexLabelLineDashType,d.indexLabelLineThickness)),c.beginPath(),c.moveTo(f,q),
|
|
515
|
-
c.lineTo(d.indexLabelTextBlock.x,d.indexLabelTextBlock.y),c.lineTo(d.indexLabelTextBlock.x+("left"===d.hemisphere?-n:n),d.indexLabelTextBlock.y),c.stroke()),c.lineJoin="miter");c.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,d=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,
|
|
516
|
-
|
|
515
|
+
c.lineTo(d.indexLabelTextBlock.x,d.indexLabelTextBlock.y),c.lineTo(d.indexLabelTextBlock.x+("left"===d.hemisphere?-n:n),d.indexLabelTextBlock.y),c.stroke()),c.lineJoin="miter");c.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,d=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,f=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-d:c-
|
|
516
|
+
f}function d(a){for(var c=null,d=1;d<m.length;d++)if(c=(a+d+h.length)%h.length,h[c].hemisphere!==h[a].hemisphere){c=null;break}else if(h[c].indexLabelText&&c!==a&&(0>b(h[c],h[a])||("right"===h[a].hemisphere?h[c].indexLabelTextBlock.y>=h[a].indexLabelTextBlock.y:h[c].indexLabelTextBlock.y<=h[a].indexLabelTextBlock.y)))break;else c=null;return c}function f(a,c,e){e=(e||0)+1;if(1E3<e)return 0;c=c||0;var q=0,k=v.y-1*r,g=v.y+1*r;if(0<=a&&a<m.length){var l=h[a];if(0>c&&l.indexLabelTextBlock.y<k||0<c&&l.indexLabelTextBlock.y>
|
|
517
517
|
g)return 0;var n=0,p=0,p=n=n=0;0>c?l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2>k&&l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+c<k&&(c=-(k-(l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+c))):l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2<k&&l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+c>g&&(c=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+c-g);c=l.indexLabelTextBlock.y+c;k=0;k="right"===l.hemisphere?v.x+Math.sqrt(Math.pow(r,2)-Math.pow(c-v.y,
|
|
518
518
|
2)):v.x-Math.sqrt(Math.pow(r,2)-Math.pow(c-v.y,2));p=v.x+C*Math.cos(l.midAngle);n=v.y+C*Math.sin(l.midAngle);n=Math.sqrt(Math.pow(k-p,2)+Math.pow(c-n,2));p=Math.acos(C/r);n=Math.acos((r*r+C*C-n*n)/(2*C*r));c=n<p?c-l.indexLabelTextBlock.y:0;k=null;for(g=1;g<m.length;g++)if(k=(a-g+h.length)%h.length,h[k].hemisphere!==h[a].hemisphere){k=null;break}else if(h[k].indexLabelText&&h[k].hemisphere===h[a].hemisphere&&k!==a&&(0>b(h[k],h[a])||("right"===h[a].hemisphere?h[k].indexLabelTextBlock.y<=h[a].indexLabelTextBlock.y:
|
|
519
519
|
h[k].indexLabelTextBlock.y>=h[a].indexLabelTextBlock.y)))break;else k=null;p=k;n=d(a);g=k=0;0>c?(g="right"===l.hemisphere?p:n,q=c,null!==g&&(p=-c,c=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2-(h[g].indexLabelTextBlock.y+h[g].indexLabelTextBlock.height/2),c-p<y&&(k=-p,g=f(g,k,e+1),+g.toFixed(x)>+k.toFixed(x)&&(q=c>y?-(c-y):-(p-(g-k)))))):0<c&&(g="right"===l.hemisphere?n:p,q=c,null!==g&&(p=c,c=h[g].indexLabelTextBlock.y-h[g].indexLabelTextBlock.height/2-(l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/
|
|
@@ -918,15 +918,15 @@ this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fo
|
|
|
918
918
|
"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0,a-=10);0>a&&(a=Math.max(0,a+this.container.clientWidth+20));a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));e=1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&
|
|
919
919
|
"stepLine"!==f[0].dataSeries.type&&"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&&"stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):e:f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);e=-e+10;0<e+this.container.clientHeight+5&&(e-=e+this.container.clientHeight+
|
|
920
920
|
5-0);this.fixMozTransitionDelay(a,e);!this.animationEnabled||g?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.positionLeft=a;this.positionBottom=e;this.container.style.left=a+"px";this.container.style.bottom=e+"px"}else this.hide(!1),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);e=[];for(b=0;b<f.length;b++)e.push({xValue:f[b].dataPoint.x,dataPoint:f[b].dataPoint,dataSeries:f[b].dataSeries,dataPointIndex:f[b].index,
|
|
921
|
-
dataSeriesIndex:f[b].dataSeries._index});this._updatedEventParameters={chart:this.chart,toolTip:this.options,content:c,entries:e};this._entries=f}}else this.hide(),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);this._dataSeriesIndex=this._xValue=null}};la.prototype.highlightObjects=function(a){var e=this.chart.overlaidCanvasCtx;
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
921
|
+
dataSeriesIndex:f[b].dataSeries._index});this._updatedEventParameters={chart:this.chart,toolTip:this.options,content:c,entries:e};this._entries=f}}else this.hide(),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);this._dataSeriesIndex=this._xValue=null}};la.prototype.highlightObjects=function(a){var e=this.chart.overlaidCanvasCtx;l(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas?(this.chart.resetOverlayedCanvas(),e.clearRect(0,0,this.chart.width,
|
|
922
|
+
this.chart.height),this.chart.clearedOverlayedCanvas="toolTip"):this.chart.clearedOverlayedCanvas=null;e.save();var c=this.chart.plotArea,b=0;e.beginPath();e.rect(c.x1,c.y1,c.x2-c.x1,c.y2-c.y1);e.clip();for(c=0;c<a.length;c++){var d=a[c];if((d=this.chart._eventManager.objectMap[d.dataSeries.dataPointIds[d.index]])&&d.objectType&&"dataPoint"===d.objectType){var b=this.chart.data[d.dataSeriesIndex],f=b.dataPoints[d.dataPointIndex],g=d.dataPointIndex;!1===f.highlightEnabled||!0!==b.highlightEnabled&&
|
|
923
|
+
!0!==f.highlightEnabled||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"scatter"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type?(f=b.getMarkerProperties(g,d.x1,d.y1,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||Math.ceil(0.1*f.size),X.drawMarkers([f]),"undefined"!==typeof d.y2&&
|
|
924
|
+
(f=b.getMarkerProperties(g,d.x1,d.y2,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||Math.ceil(0.1*f.size),X.drawMarkers([f]))):"bubble"===b.type?(f=b.getMarkerProperties(g,d.x1,d.y1,this.chart.overlaidCanvasCtx),f.size=d.size,f.color="white",f.borderColor="white",e.globalAlpha=0.3,X.drawMarkers([f]),e.globalAlpha=1):"column"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"bar"===b.type||
|
|
925
|
+
"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?Y(e,d.x1,d.y1,d.x2,d.y2,"white",0,null,!1,!1,!1,!1,0.3):"pie"===b.type||"doughnut"===b.type?pa(e,d.center,d.radius,"white",b.type,d.startAngle,d.endAngle,0.3,d.percentInnerRadius):"funnel"===b.type||"pyramid"===b.type?qa(e,d.funnelSection,0.3,"white"):"candlestick"===b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=2*d.borderThickness,b=0===e.lineWidth%2?0:0.5,e.beginPath(),
|
|
926
|
+
e.moveTo(d.x3-b,Math.min(d.y2,d.y3)),e.lineTo(d.x3-b,Math.min(d.y1,d.y4)),e.stroke(),e.beginPath(),e.moveTo(d.x3-b,Math.max(d.y1,d.y4)),e.lineTo(d.x3-b,Math.max(d.y2,d.y3)),e.stroke(),Y(e,d.x1,Math.min(d.y1,d.y4),d.x2,Math.max(d.y1,d.y4),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1):"ohlc"===b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=2*d.borderThickness,b=0===e.lineWidth%2?0:0.5,e.beginPath(),e.moveTo(d.x3-b,d.y2),e.lineTo(d.x3-b,d.y3),e.stroke(),e.beginPath(),
|
|
927
|
+
e.moveTo(d.x3,d.y1),e.lineTo(d.x1,d.y1),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4),e.lineTo(d.x2,d.y4),e.stroke(),e.globalAlpha=1):"boxAndWhisker"===b.type?(e.save(),e.globalAlpha=1,e.strokeStyle=d.stemColor,e.lineWidth=2*d.stemThickness,0<d.stemThickness&&(e.beginPath(),e.moveTo(d.x3,d.y2+d.borderThickness/2),e.lineTo(d.x3,d.y1+d.whiskerThickness/2),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4-d.whiskerThickness/2),e.lineTo(d.x3,d.y3-d.borderThickness/2),e.stroke()),e.beginPath(),Y(e,d.x1,Math.max(d.y2,
|
|
928
|
+
d.y3),d.x2,Math.min(d.y2,d.y3),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1,e.strokeStyle=d.whiskerColor,e.lineWidth=2*d.whiskerThickness,0<d.whiskerThickness&&(e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y4),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y4),e.stroke(),e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y1),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y1),e.stroke()),e.globalAlpha=1,e.strokeStyle=d.lineColor,e.lineWidth=2*d.lineThickness,
|
|
929
|
+
0<d.lineThickness&&(e.beginPath(),e.moveTo(d.x1,d.y5),e.lineTo(d.x2,d.y5),e.stroke()),e.restore(),e.globalAlpha=1):"error"===b.type&&C(e,d.x1,d.y1,d.x2,d.y2,"white",d.whiskerProperties,d.stemProperties,d.isXYSwapped,0.3))}}e.restore();e.globalAlpha=1;e.beginPath()};la.prototype.getToolTipInnerHTML=function(a){a=a.entries;var e=null,c=null,b=null,d=0,f="";this.isToolTipDefinedInData=!0;for(var g=0;g<a.length;g++)if(a[g].dataSeries.toolTipContent||a[g].dataPoint.toolTipContent){this.isToolTipDefinedInData=
|
|
930
930
|
!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))a={chart:this.chart,toolTip:this.options,entries:a},e=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var l=null,r="",g=0;g<a.length;g++){c=a[g].dataSeries;b=a[g].dataPoint;d=a[g].index;f="";if(0===g&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?r+="undefined"!==
|
|
931
931
|
typeof this.chart.axisX[0].labels[b.x]?this.chart.axisX[0].labels[b.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(r+="undefined"!==typeof this.chart.axisX2[0].labels[b.x]?this.chart.axisX2[0].labels[b.x]:"{x}");r+="</br>";if(!c.visible)continue;r=this.chart.replaceKeywordsWithValue(r,b,c,d)}null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent||("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===
|
|
932
932
|
c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=l!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+
|
|
@@ -944,15 +944,15 @@ b,c,d)}return e};la.prototype.enableAnimation=function(){if(!this.container.styl
|
|
|
944
944
|
this.container.style.MsTransition="",this.container.style.transition="")};la.prototype.hide=function(a){this.container&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._entries=this._dataSeriesIndex=this._xValue=null,this._prevY=this._prevX=NaN,this._updatedEventParameters=null,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};la.prototype.show=function(a,e,c){this._updateToolTip(a,e,"undefined"===typeof c?!1:c)};la.prototype.showAtIndex=function(a,e){};la.prototype.showAtX=
|
|
945
945
|
function(a,e){if(!this.enabled)return!1;!l(this.chart.clearedOverlayedCanvas)&&this.chart.clearedOverlayedCanvas.indexOf("axis")&&(this.chart.clearedOverlayedCanvas=null);this._updateOptions();var c,b,d,f=[];d=!1;e=!l(e)&&0<=e&&e<this.chart.data.length?e:0;if(this.shared)for(var g=0;g<this.chart.data.length;g++)c=this.chart.data[g],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!l(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,this.chart.data[e].axisX.convertValueToPixel(a)===c.axisX.convertValueToPixel(b.dataPoint.x)&&
|
|
946
946
|
f.push(b));else c=this.chart.data[e],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!l(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,f.push(b));if(0<f.length){for(g=0;g<f.length;g++)if(b=f[g],(this.shared||0<=b.dataSeries.type.indexOf("100"))&&b.dataSeries.axisX&&b.dataPoint.x>=b.dataSeries.axisX.viewportMinimum&&b.dataPoint.x<=b.dataSeries.axisX.viewportMaximum){d=!1;break}else if(b.dataSeries.axisX&&b.dataSeries.axisY&&(b.dataPoint.x<b.dataSeries.axisX.viewportMinimum||b.dataPoint.x>b.dataSeries.axisX.viewportMaximum||
|
|
947
|
-
b.dataPoint.y<b.dataSeries.axisY.viewportMinimum||b.dataPoint.y>b.dataSeries.axisY.viewportMaximum))d=!0;else{d=!1;break}if(d)return this.hide(),!1;this._entries=f;g="";g=this.getToolTipInnerHTML({entries:f});if(null!==g){this.contentDiv.innerHTML=g;if(this.isToolTipDefinedInData&&l(this.options.content)&&l(this.options.contentFormatter))for(b=this.contentDiv.getElementsByTagName("span"),g=0;g<b.length;g++)b[g]&&
|
|
948
|
-
(g=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:r?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:
|
|
949
|
-
f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[c.index%f[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?
|
|
950
|
-
f[0].dataSeries.color:f[0].dataSeries._colorSet[f[0].index%f[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||
|
|
951
|
-
this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:r?"italic":"normal"}catch(t){}"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type?c=f[0].dataSeries.dataPointEOs[f[0].index].center.x+f[0].dataSeries.radius*
|
|
952
|
-
0:this.container.clientWidth):"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].index].sectionsofFunnel,c=(b.x1+b.x2-this.container.clientWidth)/2):(c="bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y.length?
|
|
953
|
-
0:f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0,c-=10);0>c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&
|
|
954
|
-
f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].index].center.y+f[0].dataSeries.radius*Math.sin(f[0].dataSeries.dataPointEOs[f[0].index].midAngle),b<f[0].dataSeries.dataPointEOs[f[0].index].center.y&&(b+=this.container.clientHeight)):"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].dataSeries.reversed?
|
|
955
|
-
1-f[0].index:f[0].index].sectionsofFunnel,b="undefined"!==typeof b.x5?(b.y2+b.y4)/2:(b.y2+b.y3)/2+this.container.clientHeight/2):b="bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y.length?f[0].dataPoint.y[f[0].dataPoint.y.length-1]:f[0].dataPoint.y):b=f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);
|
|
947
|
+
b.dataPoint.y<b.dataSeries.axisY.viewportMinimum||b.dataPoint.y>b.dataSeries.axisY.viewportMaximum))d=!0;else{d=!1;break}if(d)return this.hide(),!1;this.highlightObjects(f);"toolTip"===this.chart.clearedOverlayedCanvas&&this.chart.renderCrosshairs();this._entries=f;g="";g=this.getToolTipInnerHTML({entries:f});if(null!==g){this.contentDiv.innerHTML=g;if(this.isToolTipDefinedInData&&l(this.options.content)&&l(this.options.contentFormatter))for(b=this.contentDiv.getElementsByTagName("span"),g=0;g<b.length;g++)b[g]&&
|
|
948
|
+
(b[g].style.color=b[g].getAttribute("data-color"));g=!1;"none"===this.container.style.display&&(g=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:r?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:
|
|
949
|
+
0<f[0].dataPoint.y?f[0].dataSeries.risingColor:f[0].dataSeries.fallingColor:"error"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[c.index%f[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?
|
|
950
|
+
this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[f[0].index%f[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||
|
|
951
|
+
0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:r?"italic":"normal"}catch(t){}"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type?c=f[0].dataSeries.dataPointEOs[f[0].index].center.x+f[0].dataSeries.radius*
|
|
952
|
+
Math.cos(f[0].dataSeries.dataPointEOs[f[0].index].midAngle)+-("left"===f[0].dataSeries.dataPointEOs[f[0].index].hemisphere?0:this.container.clientWidth):"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].index].sectionsofFunnel,c=(b.x1+b.x2-this.container.clientWidth)/2):(c="bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y.length?
|
|
953
|
+
f[0].dataPoint.y[f[0].dataPoint.y.length-1]:f[0].dataPoint.y)-this.container.clientWidth<<0:f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0,c-=10);0>c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&
|
|
954
|
+
"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&&"stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].index].center.y+f[0].dataSeries.radius*Math.sin(f[0].dataSeries.dataPointEOs[f[0].index].midAngle),b<f[0].dataSeries.dataPointEOs[f[0].index].center.y&&(b+=this.container.clientHeight)):"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].dataSeries.reversed?
|
|
955
|
+
f[0].dataSeries.dataPointEOs.length-1-f[0].index:f[0].index].sectionsofFunnel,b="undefined"!==typeof b.x5?(b.y2+b.y4)/2:(b.y2+b.y3)/2+this.container.clientHeight/2):b="bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y.length?f[0].dataPoint.y[f[0].dataPoint.y.length-1]:f[0].dataPoint.y):b=f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);
|
|
956
956
|
b=-b+10;0<b+this.container.clientHeight+5&&(b-=b+this.container.clientHeight+5-0);this.fixMozTransitionDelay(c,b);!this.animationEnabled||g?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.container.style.left=c+"px";this.container.style.bottom=b+"px"}else return this.hide(!1),!1}else return this.hide(),!1;this._xValue=a;this._dataSeriesIndex=e;this._prevY=this._prevX=NaN;return!0};la.prototype.fixMozTransitionDelay=function(a,e){if(20<
|
|
957
957
|
this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var c=parseFloat(this.container.style.left),c=isNaN(c)?0:c,b=parseFloat(this.container.style.bottom),b=isNaN(b)?0:b;10<Math.sqrt(Math.pow(c-a,2)+Math.pow(b-e,2))?this.mozContainerTransition=this.getContainerTransition(0.1):this.mozContainerTransition=this.getContainerTransition(0)}};la.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ha.prototype.reset=
|
|
958
958
|
function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];r&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ha.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};ha.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var e=[],c=Oa(a),b=null;if((b=this.chart.getObjectAtXY(c.x,c.y,!1))&&"undefined"!==typeof this.objectMap[b])if(b=
|
|
@@ -966,7 +966,7 @@ function(){f.animate.call(f)}):this.chart.isAnimating=!1};ia.prototype.cancelAll
|
|
|
966
966
|
b=e.source.canvas,d=e.animationBase;c.drawImage(b,0,0,b.width,b.height,d-d*a,0,a*c.canvas.width/ka,c.canvas.height/ka)}},xClipAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ka,b.height/ka);c.restore()}},fadeInAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ka,c.canvas.height/ka);c.restore()}},easing:{linear:function(a,e,
|
|
967
967
|
c,b){return c*a/b+e},easeOutQuad:function(a,e,c,b){return-c*(a/=b)*(a-2)+e},easeOutQuart:function(a,e,c,b){return-c*((a=a/b-1)*a*a*a-1)+e},easeInQuad:function(a,e,c,b){return c*(a/=b)*a+e},easeInQuart:function(a,e,c,b){return c*(a/=b)*a*a*a+e}}},X={drawMarker:function(a,e,c,b,d,f,g,l){if(c){var r=1;c.fillStyle=f?f:"#000000";c.strokeStyle=g?g:"#000000";c.lineWidth=l?l:0;c.setLineDash&&c.setLineDash(K("solid",l));"circle"===b?(c.moveTo(a,e),c.beginPath(),c.arc(a,e,d/2,0,2*Math.PI,!1),f&&c.fill(),l&&
|
|
968
968
|
(g?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"square"===b?(c.beginPath(),c.rect(a-d/2,e-d/2,d,d),f&&c.fill(),l&&(g?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"triangle"===b?(c.beginPath(),c.moveTo(a-d/2,e+d/2),c.lineTo(a+d/2,e+d/2),c.lineTo(a,e-d/2),c.closePath(),f&&c.fill(),l&&(g?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r)),c.beginPath()):
|
|
969
|
-
"cross"===b&&(c.strokeStyle=f,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];X.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();u.version="v3.12.
|
|
969
|
+
"cross"===b&&(c.strokeStyle=f,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];X.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();u.version="v3.12.12 GA";window.CanvasJS&&(u&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=u)})();
|
|
970
970
|
|
|
971
971
|
/*
|
|
972
972
|
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.
|