@canvasjs/charts 3.10.0-beta.1 → 3.10.0
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 +24 -24
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.10.0
|
|
2
|
+
CanvasJS Chart - v3.10.0 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2024 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -688,7 +688,7 @@ a[f].lineThickness/2);a[f].bounds={x1:t-(H[f]+N),y1:m,x2:t-N,y2:k,height:k-m};a[
|
|
|
688
688
|
0<f&&(g[f].lineCoordinates.x1+=g[f].tickLength,g[f].lineCoordinates.x2=g[f].lineCoordinates.x1+g[f].lineThickness/2);g[f].bounds={x1:g[f].lineCoordinates.x1,y1:m,x2:t+x[f]+Q,y2:k,width:t-d,height:k-m};g[f].bounds.width=g[f].bounds.x2-g[f].bounds.x1;g[f].title&&(g[f]._titleTextBlock.maxWidth=0<g[f].titleMaxWidth&&g[f].titleMaxWidth<g[f].lineCoordinates.height?g[f].titleMaxWidth:g[f].lineCoordinates.height);g[f].calculateValueToPixelConversionParameters();g[f].calculateBreaksSizeInValues();Q+=x[f]+
|
|
689
689
|
g[f].margin}for(f=0;f<r.length;f++)"axisY"===r[f].type&&(r[f].calculateValueToPixelConversionParameters(),r[f].calculateBreaksSizeInValues());if(0<w){if(a&&0<a.length)for(f=0;f<a.length;f++)v=M[w-1][f]===M[w][f]?!0:!1;else v=!0;if(g&&0<g.length)for(f=0;f<g.length;f++)J=P[w-1][f]===P[w][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)K=G[w-1][f]===G[w][f]?!0:!1;else K=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)L=s[w-1][f]===s[w][f]?!0:!1;else L=!0}if(v&&J&&K&&L)break;w++}if(c&&0<c.length)for(f=
|
|
690
690
|
0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels();if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(g&&0<g.length)for(f=0;f<g.length;f++)g[f].calculateStripLinesThicknessInValues(),g[f].calculateBreaksInPixels()}};A.render=function(a,g,c,b,e){var h=a[0]?a[0].chart:g[0].chart;
|
|
691
|
-
e=h.ctx;h.alignVerticalAxes&&h.alignVerticalAxes();e.save();e.beginPath();a&&a.length&&e.rect(
|
|
691
|
+
e=h.ctx;h.alignVerticalAxes&&h.alignVerticalAxes();e.save();e.beginPath();a&&a.length&&e.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2);g&&g.length&&e.rect(2,g[g.length-1].bounds.y1,g[0].chart.width-4,g[0].bounds.y2);e.clip();if(a&&0<a.length)for(var d=0;d<a.length;d++)a[d].renderLabelsTicksAndTitle();if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderLabelsTicksAndTitle();e.restore();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderLabelsTicksAndTitle();if(b&&0<b.length)for(d=
|
|
692
692
|
0;d<b.length;d++)b[d].renderLabelsTicksAndTitle();h.preparePlotArea();h=h.plotArea;e.save();e.beginPath();e.rect(h.x1,h.y1,Math.abs(h.x2-h.x1),Math.abs(h.y2-h.y1));e.clip();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("value");if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderStripLinesOfThicknessType("value");if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderStripLinesOfThicknessType("value");
|
|
693
693
|
if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderInterlacedColors();if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderInterlacedColors();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderInterlacedColors();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderInterlacedColors();e.restore();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderGrid(),v&&(a[d].createMask(),a[d].renderBreaksBackground());if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderGrid(),v&&(g[d].createMask(),g[d].renderBreaksBackground());
|
|
694
694
|
if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderGrid(),v&&(c[d].createMask(),c[d].renderBreaksBackground());if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderGrid(),v&&(b[d].createMask(),b[d].renderBreaksBackground());if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderAxisLine();if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderAxisLine();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderAxisLine();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderAxisLine();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("pixel");
|
|
@@ -705,31 +705,31 @@ this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%
|
|
|
705
705
|
5):0>this.labelAngle?(r.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),r.y="inside"===this.labelPlacement?r.y-("inside"===this.tickPlacement?this.tickLength:0)-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle):r.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))):(r.x-="inside"===this.labelPlacement?
|
|
706
706
|
p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,r.y="inside"===this.labelPlacement?r.y-("inside"===this.tickPlacement?this.tickLength:0)-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle):r.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))),p.textBlock.x=r.x,p.textBlock.y=r.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",
|
|
707
707
|
function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(r=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(r.x<<0)+0.5:r.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,r.y<<0);a.ctx.lineTo(b,r.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+
|
|
708
|
-
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock.
|
|
708
|
+
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock._lineHeight/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(r=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=
|
|
709
709
|
this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(r.x<<0)+0.5:r.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,r.y<<0),this.ctx.lineTo(b,r.y-this.tickLength<<0),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===p.textBlock.angle?(r.x-=p.textBlock.width/2,r.y="inside"===this.labelPlacement?r.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:r.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock.fontSize/2)):
|
|
710
710
|
0>this.labelAngle?(r.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,r.y="inside"===this.labelPlacement?r.y+("inside"===this.tickPlacement?this.tickLength:0)+5-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):r.y-("inside"===this.tickPlacement?0:this.tickLength)-2-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)):(r.x-="inside"===this.labelPlacement?0:p.textBlock.width*
|
|
711
711
|
Math.cos(Math.PI/180*this.labelAngle),r.y="inside"===this.labelPlacement?r.y+("inside"===this.tickPlacement?this.tickLength:0)+5+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):r.y-("inside"===this.tickPlacement?0:this.tickLength)-2-((p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))),p.textBlock.x=r.x,p.textBlock.y=r.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",
|
|
712
712
|
function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(r=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(r.x<<0)+0.5:r.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,r.y<<0);a.ctx.lineTo(b,r.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+
|
|
713
|
-
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock.
|
|
714
|
-
this.tickColor,b=1===this.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0,this.ctx.beginPath(),this.ctx.moveTo(r.x<<0,b),this.ctx.lineTo(r.x-this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=r.y,p.textBlock.x="inside"===this.labelPlacement?r.x+("inside"===this.tickPlacement?this.tickLength:0)+5:r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):0>this.labelAngle?(p.textBlock.y=
|
|
715
|
-
this.labelPlacement?r.y:r.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?r.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y="inside"===this.labelPlacement?r.y:
|
|
716
|
-
Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?r.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",
|
|
717
|
-
0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(r=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(r.x<<0,b);a.ctx.lineTo(r.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+
|
|
718
|
-
2
|
|
719
|
-
b=1===this.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0,this.ctx.beginPath(),this.ctx.moveTo(r.x<<0,b),this.ctx.lineTo(r.x+this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=r.y,p.textBlock.x="inside"===this.labelPlacement?r.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:r.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?
|
|
720
|
-
180*this.labelAngle):r.y,p.textBlock.x="inside"===this.labelPlacement?r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:r.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5):(p.textBlock.y="inside"===this.labelPlacement?r.y-p.textBlock.width*Math.sin(Math.PI/
|
|
721
|
-
"inside"===this.labelPlacement?r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:r.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=
|
|
722
|
-
a.viewportMinimum||p.position>a.viewportMaximum)&&(r=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(r.x<<0,b);a.ctx.lineTo(r.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock.
|
|
723
|
-
2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}h=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)p=a._labels[k],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||g&&0!==h++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(k=0;k<
|
|
724
|
-
p.position<this.viewportMinimum||(p.position>this.viewportMaximum||g&&0!==h++%2&&this.labelAutoFit)||p.textBlock.render(!0)};A.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,g,c,b=this.chart.plotArea,e=0;g=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)g?(g=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>this._labels.length-
|
|
725
|
-
this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,g.x),b.y1,Math.abs(c.x-g.x),Math.abs(b.y1-b.y2)),g=!1):g=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)g?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),g=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+
|
|
726
|
-
Math.min(c.y,g.y),Math.abs(b.x1-b.x2),Math.abs(g.y-c.y)),g=!1):g=!0;a.beginPath()};A.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){var g=this,c,b,e=0,h=0,d=!1;b=!1;for(var m=[],t=[],k=!1,e=0;e<this.stripLines.length;e++){var l=this.stripLines[e];l._thicknessType===a&&("pixel"===a&&(l.value<this.viewportMinimum||l.value>this.viewportMaximum||n(l.value)||isNaN(this.range))||"value"===a&&(l.startValue<=this.viewportMinimum&&
|
|
727
|
-
l.startValue>=this.viewportMaximum&&l.endValue>=this.viewportMaximum||n(l.startValue)||n(l.endValue)||isNaN(this.range))||m.push(l))}for(e=0;e<this._stripLineLabels.length;e++)if(l=this.stripLines[e],c=this._stripLineLabels[e],!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){l&&(this.ctx.strokeStyle=l.color,this.ctx.lineWidth="pixel"===l._thicknessType?
|
|
728
|
-
if("bottom"===this._position){var p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(p,b.y<<0);this.ctx.lineTo(p,b.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y+=this.tickLength+c.textBlock.fontSize/2+5):(b.x-=0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y+=this.tickLength+5+(0>this.labelAngle?Math.abs(c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-
|
|
729
|
-
180*this.labelAngle)):Math.abs(c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))))}else"top"===this._position?(p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(p,b.y<<0),this.ctx.lineTo(p,b.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y-=this.tickLength+c.textBlock.height-c.textBlock.fontSize/2):(b.x-=0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):
|
|
730
|
-
(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)))):"left"===this._position?(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,p),this.ctx.lineTo(b.x-this.tickLength<<0,p),this.ctx.stroke(),0===this.labelAngle?b.x=b.x-c.textBlock.width*Math.cos(Math.PI/
|
|
731
|
-
5:(b.y-=c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),b.x-=this.tickLength+5+(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle):c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)))):"right"===this._position&&(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<
|
|
732
|
-
this.tickLength<<0,p),this.ctx.stroke(),b.x=0===this.labelAngle?b.x+this.tickLength+5:this.tickLength+5+(0<this.labelAngle?b.x+(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle):b.x-c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)));c.textBlock.x=b.x;c.textBlock.y=b.y;t.push(c)}else l._thicknessType===a&&(c.textBlock.angle=-90,"bottom"===this._position?(c.textBlock.maxWidth=this.options.stripLines[e].labelMaxWidth?this.options.stripLines[e].labelMaxWidth:
|
|
713
|
+
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(r=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,
|
|
714
|
+
this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0,this.ctx.beginPath(),this.ctx.moveTo(r.x<<0,b),this.ctx.lineTo(r.x-this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=r.y,p.textBlock.x="inside"===this.labelPlacement?r.x+("inside"===this.tickPlacement?this.tickLength:0)+5:r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):0>this.labelAngle?(p.textBlock.y=
|
|
715
|
+
"inside"===this.labelPlacement?r.y:r.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?r.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y="inside"===this.labelPlacement?r.y:
|
|
716
|
+
r.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?r.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",
|
|
717
|
+
function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(r=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(r.x<<0,b);a.ctx.lineTo(r.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+
|
|
718
|
+
this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(r=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,
|
|
719
|
+
this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0,this.ctx.beginPath(),this.ctx.moveTo(r.x<<0,b),this.ctx.lineTo(r.x+this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=r.y,p.textBlock.x="inside"===this.labelPlacement?r.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:r.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?
|
|
720
|
+
r.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):r.y,p.textBlock.x="inside"===this.labelPlacement?r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:r.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5):(p.textBlock.y="inside"===this.labelPlacement?r.y-p.textBlock.width*Math.sin(Math.PI/
|
|
721
|
+
180*this.labelAngle):r.y,p.textBlock.x="inside"===this.labelPlacement?r.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:r.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=
|
|
722
|
+
a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(r=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(r.y<<0)+0.5:r.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(r.x<<0,b);a.ctx.lineTo(r.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=
|
|
723
|
+
this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}h=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)p=a._labels[k],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||g&&0!==h++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(k=0;k<
|
|
724
|
+
this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(p.position>this.viewportMaximum||g&&0!==h++%2&&this.labelAutoFit)||p.textBlock.render(!0)};A.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,g,c,b=this.chart.plotArea,e=0;g=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)g?(g=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>this._labels.length-
|
|
725
|
+
1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,g.x),b.y1,Math.abs(c.x-g.x),Math.abs(b.y1-b.y2)),g=!1):g=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)g?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),g=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+
|
|
726
|
+
1].position),a.fillRect(b.x1,Math.min(c.y,g.y),Math.abs(b.x1-b.x2),Math.abs(g.y-c.y)),g=!1):g=!0;a.beginPath()};A.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){var g=this,c,b,e=0,h=0,d=!1;b=!1;for(var m=[],t=[],k=!1,e=0;e<this.stripLines.length;e++){var l=this.stripLines[e];l._thicknessType===a&&("pixel"===a&&(l.value<this.viewportMinimum||l.value>this.viewportMaximum||n(l.value)||isNaN(this.range))||"value"===a&&(l.startValue<=this.viewportMinimum&&
|
|
727
|
+
l.endValue<=this.viewportMinimum||l.startValue>=this.viewportMaximum&&l.endValue>=this.viewportMaximum||n(l.startValue)||n(l.endValue)||isNaN(this.range))||m.push(l))}for(e=0;e<this._stripLineLabels.length;e++)if(l=this.stripLines[e],c=this._stripLineLabels[e],!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){l&&(this.ctx.strokeStyle=l.color,this.ctx.lineWidth="pixel"===l._thicknessType?
|
|
728
|
+
l.thickness:this.tickThickness);if("bottom"===this._position){var p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(p,b.y<<0);this.ctx.lineTo(p,b.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y+=this.tickLength+c.textBlock.fontSize/2+5):(b.x-=0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y+=this.tickLength+5+(0>this.labelAngle?Math.abs(c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-
|
|
729
|
+
c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle)):Math.abs(c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))))}else"top"===this._position?(p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(p,b.y<<0),this.ctx.lineTo(p,b.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y-=this.tickLength+c.textBlock.height-c.textBlock.fontSize/2):(b.x-=0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):
|
|
730
|
+
0,b.y-=this.tickLength+2+(0<this.labelAngle?(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)))):"left"===this._position?(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,p),this.ctx.lineTo(b.x-this.tickLength<<0,p),this.ctx.stroke(),0===this.labelAngle?b.x=b.x-c.textBlock.width*Math.cos(Math.PI/
|
|
731
|
+
180*this.labelAngle)-this.tickLength-5:(b.y-=c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),b.x-=this.tickLength+5+(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle):c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)))):"right"===this._position&&(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<
|
|
732
|
+
0,p),this.ctx.lineTo(b.x+this.tickLength<<0,p),this.ctx.stroke(),b.x=0===this.labelAngle?b.x+this.tickLength+5:this.tickLength+5+(0<this.labelAngle?b.x+(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle):b.x-c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)));c.textBlock.x=b.x;c.textBlock.y=b.y;t.push(c)}else l._thicknessType===a&&(c.textBlock.angle=-90,"bottom"===this._position?(c.textBlock.maxWidth=this.options.stripLines[e].labelMaxWidth?this.options.stripLines[e].labelMaxWidth:
|
|
733
733
|
this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-l.thickness/2>this.chart.plotArea.x1?n(l.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,n(l.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===c.stripLine.labelAlign?
|
|
734
734
|
(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y1+c.textBlock.width+3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(c.textBlock.maxWidth=this.options.stripLines[e].labelMaxWidth?this.options.stripLines[e].labelMaxWidth:this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-
|
|
735
735
|
l.thickness/2>this.chart.plotArea.x1?n(l.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,n(l.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+c.textBlock.width+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/
|
|
@@ -945,7 +945,7 @@ function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestA
|
|
|
945
945
|
la,c.canvas.height/la)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/la,b.height/la);c.restore()}},fadeInAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/la,c.canvas.height/la);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*(a/=b)*(a-2)+d},easeOutQuart:function(a,
|
|
946
946
|
d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},X={drawMarker:function(a,d,c,b,e,h,m,n){if(c){var t=1;c.fillStyle=h?h:"#000000";c.strokeStyle=m?m:"#000000";c.lineWidth=n?n:0;c.setLineDash&&c.setLineDash(G("solid",n));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),h&&c.fill(),n&&(m?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):
|
|
947
947
|
"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),h&&c.fill(),n&&(m?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),h&&c.fill(),n&&(m?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t)),c.beginPath()):"cross"===b&&(c.strokeStyle=h,c.lineWidth=e/4,c.beginPath(),c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/
|
|
948
|
-
2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];X.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return m}();t.version="v3.10.0
|
|
948
|
+
2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];X.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return m}();t.version="v3.10.0 GA";window.CanvasJS&&(t&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=t)})();
|
|
949
949
|
|
|
950
950
|
/*
|
|
951
951
|
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.
|