Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-svg-base

Package Overview
Dependencies
Maintainers
4
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-svg-base - npm Package Compare versions

Comparing version 17.1.48 to 17.2.28-beta

11

CHANGELOG.md

@@ -9,10 +9,3 @@ # Changelog

- #236117 - Axis labels aligned not properly when using some special characters issue fixed.
## 17.1.41 (2019-04-16)
### Chart
#### Bug Fixes
- #143802 - The scrollbar occurs when the mouse move on the zooming toolkit issue fixed
- #238440 - Synchronized Charts tooltip not working properly issue fixed.
- #238974 - `<br>` tag in axis labels pushes the chart to the right side issue fixed.

4

dist/ej2-svg-base.umd.min.js
/*!
* filename: ej2-svg-base.umd.min.js
* version : 17.1.48
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],e):e(t.ej={},t.ej2Base)}(this,function(t,e){"use strict";function i(t){var e;switch(t){case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=document.getElementById("chartmeasuretext");if(null===r&&(r=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(r)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var o=t.split(" "),n=0;n<o.length;n++)-1===o[n].indexOf("<br/>")&&(o[n]=o[n].replace(/[<>]/g,"&"));t=o.join(" ")}return r.innerHTML=t,r.style.position="fixed",r.style.fontSize=i.size,r.style.fontWeight=i.fontWeight,r.style.fontStyle=i.fontStyle,r.style.fontFamily=i.fontFamily,r.style.visibility="hidden",r.style.top="-100",r.style.left="0",r.style.whiteSpace="nowrap",r.style.lineHeight="normal",new u(r.clientWidth,r.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var c="",p=i.x,u=i.y,y=i.x+i.width,f=i.y+i.height;return d=d||0,n?(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f),0!==o&&(c=(c=c.concat(" L "+(r.x+o/2)+" "+f)).concat(" L "+(h+d)+" "+(f+o-d)),c+=" Q "+h+" "+(f+o)+" "+(h-d)+" "+(f+o-d)),c=r.x-o/2>p?c.concat(" L "+(r.x-o/2)+" "+f+" L "+(p+t)+" "+f+" Q "+p+" "+f+" "+p+" "+(f-e)+" z"):0===o?c.concat(" L "+(p+t)+" "+f+" Q "+p+" "+f+" "+p+" "+(f-e)+" z"):c.concat(" L "+p+" "+(f+e)+" z")):s?(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),c=(c=(c+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f+" L "+(p+t)+" "+f+" Q "+p+" "+f+" "+p+" "+(f-e)+" z")):a?(c=(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),c=(c=(c+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f)).concat(" L "+(p+t)+" "+f+" Q "+p+" "+f+" "+p+" "+(f-e)+" z")):(c=(c=c.concat("M "+(p+t)+" "+u+" Q "+p+" "+u+" "+p+" "+(u+e)+" L "+p+" "+(r.y-o/2))).concat(" L "+(p-o+d)+" "+(l-d)),c=(c=(c+=" Q "+(p-o)+" "+l+" "+(p-o+d)+" "+(l+d)).concat(" L "+p+" "+(r.y+o/2)+" L "+p+" "+(f-e)+" Q "+p+" "+f+" "+(p+t)+" "+f)).concat(" L "+(y-t)+" "+f+" Q "+y+" "+f+" "+y+" "+(f-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),c}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,c=t.y,p=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:c});break;case"Cross":s="M "+p+" "+c+" L "+(d+h/2)+" "+c+" M "+d+" "+(c+l/2)+" L "+d+" "+(c+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+p+" "+c+" L "+(d+h/2)+" "+c,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(c+l/2)+" L "+d+" "+(c+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+p+" "+c+" L "+d+" "+(c+-l/2)+" L "+(d+h/2)+" "+c+" L "+d+" "+(c+l/2)+" L "+p+" "+c+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+p+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" L "+p+" "+(c+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+p+" "+(c+l/2)+" L "+d+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(c-l/2)+" L "+d+" "+(c+l/2)+" L "+(d-h/2)+" "+(c-l/2)+" L "+(d+h/2)+" "+(c-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,f=void 0,g=0;g<=5;g++)y=h/2*Math.cos(Math.PI/180*(72*g)),f=l/2*Math.sin(Math.PI/180*(72*g)),s=0===g?"M "+(d+y)+" "+(c+f)+" ":s.concat("L "+(d+y)+" "+(c+f)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:p,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"path")),e=this.setElementAttributes(t,e)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"rect")),e=this.setElementAttributes(t,e)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i){var r=document.createElementNS(this.svgLink,"text");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,e,i){var r=this.createDefs(),o=document.createElementNS(this.svgLink,t);o=this.setElementAttributes(e,o);for(var n=0;n<i.length;n++){var s=document.createElementNS(this.svgLink,"stop");s.setAttribute("offset",i[n].colorStop),s.setAttribute("stop-color",i[n].color),s.setAttribute("stop-opacity","1"),o.appendChild(s)}return r.appendChild(o),r},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t}(),c=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawRectangle=function(t){var e=this.ctx,i=t.rx;this.ctx.save(),this.ctx.beginPath(),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==i&&i>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=e,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"C":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]),c=parseFloat(i[s+5]),p=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,l,d,c,p),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":this.ctx.closePath()}}"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawText=function(t,i){var r=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(r)||"regular"!==r.toLowerCase()||(r="normal");var o=this.getOptionValue(t,"font-size"),n=this.getOptionValue(t,"font-family"),s=this.getOptionValue(t,"font-style").toLowerCase()+" "+r+" "+o+" "+n,a=this.getOptionValue(t,"text-anchor"),h=void 0!==t.opacity?t.opacity:1;"middle"===a&&(a="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=s,this.ctx.textAlign=a,this.ctx.globalAlpha=h,t.baseline&&(this.ctx.textBaseline=t.baseline);this.ctx.translate(t.x+0,t.y),this.ctx.rotate(t.labelRotation*Math.PI/180),this.ctx.fillText(i,0,0),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawCircle=function(t){var e=this.ctx;this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=e,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawEllipse=function(t){var e=this.ctx,i=Math.max(t.rx,t.ry),r=t.rx/i,o=t.ry/i;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),this.ctx.save(),this.ctx.scale(r,o),this.ctx.arc(0,0,i,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=e,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.createLinearGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return this.dataUrl=this.canvasObj.toDataURL(),r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return e},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t}(),p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){return function(t,e){this.width=t,this.height=e}}(),y=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),f=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),g=function(){return function(t){this.id=t}}(),m=function(t){function e(e,i,r,o,n,s,a){void 0===s&&(s="");var h=t.call(this,e)||this;return h.transform="",h.baseLine="auto",h.x=i,h.y=r,h.anchor=o,h.text=n,h.transform=s,h.baseLine=a,h}return p(e,t),e}(g),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return p(e,t),e}(g),v=function(){return function(t,e){this.x=t,this.y=e}}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),A=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.initPrivateVariable(),this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r)},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=this.renderer.createGroup({id:this.element.id+"_group"});t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,c=this.shapes;d<c.length;d++){var p=c[d];r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),p,new u(i,i),"",r,null)),o++}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),c=n(this.element.id+"_group"),p=n(this.element.id+"_path"),u=!1,g=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(g=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0),S="M "+(3*this.marginX+(g||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(g||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,L=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});c.appendChild(L)}var P=this.border.width/2,O=new y(P+x,P+b,s.width-P,s.height-P);if(c.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)).toString()),d.setAttribute("opacity","1"),p.setAttribute("d",o(this.rx,this.ry,O,h,this.arrowPadding,u,m,g,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var A=this.element.id+"_shadow";p.setAttribute("filter",e.Browser.isIE?"":"url(#"+A+")");var k='<filter id="'+A+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';k+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',k+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var C=this.renderer.createDefs();C.setAttribute("id","SVG_tooltip_definition"),c.appendChild(C),C.innerHTML=k}return p.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!g&&!u&&!m,s),new f(m,!g&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d=0,c=0,p=0,y=e.extend({},this.textStyle,null,!0).properties,f=n(this.element.id+"_group"),g="";this.findFormattedText();var x=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),v=""!==x?this.marginY:0,b=!0,w=!0;this.markerPoint=[];var S=this.shapes.length>0?10:0,L=this.shapes.length>0?5:0,P="Normal",O=this.themeStyle.tooltipLightLabel,A=22/parseFloat("13px")*parseFloat(y.size);t||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s("SVG_tooltip_definition"));for(var k=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),"start",""),C=l(k,y,null,f),E=0,N=this.formattedText.length;E<N;E++){var T=this.formattedText[E].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g);if(""!==T[0]){r(this.formattedText[E],y),0===E&&""!==x||this.markerPoint.push((""!==x?this.marginY:0)+k.y+d);for(var _=0,R=T.length;_<R;_++){p=0,w=!0,d+=A;for(var I=0,B=(i=T[_].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>‎:<br>").split("<br>")).length;I<B;I++)a=i[I],/\S/.test(a)||""===a||(a=" "),(!w&&" "===a||""!==a.replace(/<b>/g,"").replace(/<\/b>/g,"").trim())&&(p+=" "!==a?4:0,w&&!b?(h={x:2*this.marginX+(S+L),dy:A+(w?v:0),fill:""},v=null):h=b&&w?{x:""===x?2*this.marginX+(S+L):2*this.marginX}:{},w=!1,o=this.renderer.createTSpan(h,""),C.appendChild(o),a.indexOf("<b>")>-1?(P="bold",O=this.themeStyle.tooltipBoldLabel,g="font-weight:"+P,y.fontWeight=P,o.setAttribute("fill",this.textStyle.color||O)):(g="bold"===P?"font-weight:"+P:"",y.fontWeight=P,o.setAttribute("fill",this.textStyle.color||O)),a.indexOf("</b>")>-1&&(P="Normal",O=this.themeStyle.tooltipLightLabel),o.textContent=a=a.replace(/<[a-zA-Z\/](.|\n)*?>/g,""),p+=r(a,y).width,""!==g&&o.setAttribute("style",g),b=!1);p-=4,c=Math.max(c,p)}}}this.elementSize=new u(c+(c>0?2*this.marginX:0),d),this.elementSize.width+=S+L;var j=C.childNodes[0];if(""!==x&&j){y.fontWeight="bold";var U=(this.elementSize.width+2*this.padding)/2-r(x,y).width/2;j.setAttribute("x",U.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id),s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=this.templateFn(this.data),h=e.createElement("div",{id:this.element.id+"parent_template"});a&&a.length>0;)h.appendChild(a[0]);o.appendChild(h);var l=this.element.getBoundingClientRect();this.padding=0,this.elementSize=new u(l.width,l.height);var d=this.tooltipLocation(t,i,new v(0,0),new v(0,0));!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(this.element,d.x,d.y):this.animateTooltipDiv(this.element,d)}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.tooltipLocation=function(t,e,i,r){var o=new v(e.x,e.y),n=this.elementSize.width+2*this.marginX,s=this.elementSize.height+2*this.marginY,a=this.offset,h=this.clipBounds.x,l=this.clipBounds.y,d=t.x,c=t.y;return this.inverted?(o=new v(o.x+h+a,o.y+l-this.elementSize.height/2-this.padding),i.y=r.y=s/2,(o.x+n+this.arrowPadding>d+t.width||this.isNegative)&&(o.x=(e.x>t.width?t.width:e.x)+h-a-(n+this.arrowPadding)),o.x<d&&(o.x=(e.x<0?0:e.x)+h+a),o.y<=c&&(i.y-=c-o.y,r.y-=c-o.y,o.y=c),o.y+s>=c+t.height&&(i.y+=o.y+s-(c+t.height),r.y+=o.y+s-(c+t.height),o.y-=o.y+s-(c+t.height)),i.y+this.arrowPadding/2>s-this.ry&&(i.y=s-this.ry-this.arrowPadding/2,r.y=s,this.tipRadius=0),i.y-this.arrowPadding/2<this.ry&&(i.y=this.ry+this.arrowPadding/2,r.y=0,this.tipRadius=0)):(o=new v(o.x+h-this.elementSize.width/2-this.padding,o.y+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=n/2,(o.y<c||this.isNegative)&&(o.y=(e.y<0?0:e.y)+l+a),o.y+s+this.arrowPadding>c+t.height&&(o.y=(e.y>t.height?t.height:e.y)+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),r.x=n/2,o.x<d&&(i.x-=d-o.x,r.x-=d-o.x,o.x=d),o.x+n>d+t.width&&(i.x+=o.x+n-(d+t.width),r.x+=o.x+n-(d+t.width),o.x-=o.x+n-(d+t.width)),i.x+this.arrowPadding/2>n-this.rx&&(i.x=n-this.rx-this.arrowPadding/2,r.x=n,this.tipRadius=0),i.x-this.arrowPadding/2<this.rx&&(i.x=this.rx+this.arrowPadding/2,r.x=0,this.tipRadius=0)),new y(o.x,o.y,n,s)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:300,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=n(this.element.id);if(i){var r=i.firstChild,o=parseFloat(r.getAttribute("opacity"))||1;new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&!this.shared&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){return this.addOnPersist([])},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,e){this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},L)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},P)],h.prototype,"areaBounds",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);t.TextStyle=S,t.TooltipBorder=L,t.AreaBounds=P,t.ToolLocation=O,t.Tooltip=A,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=f,t.CustomizeOption=g,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=c,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],e):e(t.ej={},t.ej2Base)}(this,function(t,e){"use strict";function i(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=t||"",o=document.getElementById("chartmeasuretext");if(null===o&&(o=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(o)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),s=0;s<n.length;s++)-1===n[s].indexOf("<br/>")&&(n[s]=n[s].replace(/[<>]/g,"&"));t=n.join(" ")}return o.innerHTML=r.indexOf("<br>")>-1?r:t,o.style.position="fixed",o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new u(o.clientWidth,o.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var p="",c=i.x,u=i.y,y=i.x+i.width,f=i.y+i.height;return d=d||0,n?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f),0!==o&&(p=(p=p.concat(" L "+(r.x+o/2)+" "+f)).concat(" L "+(h+d)+" "+(f+o-d)),p+=" Q "+h+" "+(f+o)+" "+(h-d)+" "+(f+o-d)),p=r.x-o/2>c?p.concat(" L "+(r.x-o/2)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):0===o?p.concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):p.concat(" L "+c+" "+(f+e)+" z")):s?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),p=(p=(p+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):a?(p=(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),p=(p=(p+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f)).concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):(p=(p=p.concat("M "+(c+t)+" "+u+" Q "+c+" "+u+" "+c+" "+(u+e)+" L "+c+" "+(r.y-o/2))).concat(" L "+(c-o+d)+" "+(l-d)),p=(p=(p+=" Q "+(c-o)+" "+l+" "+(c-o+d)+" "+(l+d)).concat(" L "+c+" "+(r.y+o/2)+" L "+c+" "+(f-e)+" Q "+c+" "+f+" "+(c+t)+" "+f)).concat(" L "+(y-t)+" "+f+" Q "+y+" "+f+" "+y+" "+(f-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),p}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,p=t.y,c=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:p});break;case"Cross":s="M "+c+" "+p+" L "+(d+h/2)+" "+p+" M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+c+" "+p+" L "+(d+h/2)+" "+p,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+c+" "+p+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+p+" L "+d+" "+(p+l/2)+" L "+c+" "+p+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+c+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" L "+c+" "+(p+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+c+" "+(p+l/2)+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(p-l/2)+" L "+d+" "+(p+l/2)+" L "+(d-h/2)+" "+(p-l/2)+" L "+(d+h/2)+" "+(p-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,f=void 0,g=0;g<=5;g++)y=h/2*Math.cos(Math.PI/180*(72*g)),f=l/2*Math.sin(Math.PI/180*(72*g)),s=0===g?"M "+(d+y)+" "+(p+f)+" ":s.concat("L "+(d+y)+" "+(p+f)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:c,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"path")),i=this.setElementAttributes(t,i)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"rect")),i=this.setElementAttributes(t,i)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i,r,o){var n=document.createElementNS(this.svgLink,"text");return n=this.setElementAttributes(t,n),e.isNullOrUndefined(i)||(n.textContent=i),n},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,e,i){var r=this.createDefs(),o=document.createElementNS(this.svgLink,t);o=this.setElementAttributes(e,o);for(var n=0;n<i.length;n++){var s=document.createElementNS(this.svgLink,"stop");s.setAttribute("offset",i[n].colorStop),s.setAttribute("stop-color",i[n].color),s.setAttribute("stop-opacity","1"),o.appendChild(s)}return r.appendChild(o),r},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(t){return null},t}(),p=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore()},t.prototype.drawRectangle=function(t,e){var i=this.ctx,r=t.rx;return this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==r&&r>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"Q":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]);this.ctx.quadraticCurveTo(a,h,l,d),s+=2;break;case"C":var p=parseFloat(i[s+3]),c=parseFloat(i[s+4]),u=parseFloat(i[s+5]),y=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,p,c,u,y),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":case"Z":this.ctx.closePath(),s-=2}}return"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.canvasObj},t.prototype.createText=function(t,i,r,o){var n=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(n)||"regular"!==n.toLowerCase()||(n="normal");var s=this.getOptionValue(t,"font-size"),a=this.getOptionValue(t,"font-family"),h=this.getOptionValue(t,"font-style").toLowerCase()+" "+n+" "+s+" "+a,l=this.getOptionValue(t,"text-anchor"),d=void 0!==t.opacity?t.opacity:1;"middle"===l&&(l="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=h,this.ctx.textAlign=l,this.ctx.globalAlpha=d,t.baseline&&(this.ctx.textBaseline=t.baseline);return this.ctx.translate(t.x+0+(r||0),t.y+(o||0)),this.ctx.rotate(t.labelRotation*Math.PI/180),this.ctx.fillText(i,0,0),this.ctx.restore(),this.canvasObj},t.prototype.drawCircle=function(t,e){var i=this.ctx;return this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),e&&this.ctx.translate(e[0],e[1]),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore()},t.prototype.drawEllipse=function(t,e){var i=this.ctx,r=Math.max(t.rx,t.ry),o=t.rx/r,n=t.ry/r;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),e&&this.ctx.translate(e[0],e[1]),this.ctx.save(),this.ctx.scale(o,n),this.ctx.arc(0,0,r,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=i},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore()},t.prototype.createLinearGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return null},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t.prototype.clearRect=function(t){this.ctx.restore(),this.ctx.clearRect(t.x,t.y,t.width,t.height)},t.prototype.createGroup=function(t){return null},t.prototype.drawClipPath=function(t){return null},t.prototype.canvasClip=function(t){this.ctx.save(),this.ctx.fillStyle="transparent",this.ctx.rect(t.x,t.y,t.width,t.height),this.ctx.fill(),this.ctx.clip()},t.prototype.canvasRestore=function(){this.ctx.restore()},t.prototype.drawPolygon=function(t){return null},t.prototype.createDefs=function(){return null},t.prototype.createClipPath=function(t){return null},t.prototype.createSvg=function(t){return null},t}(),c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){return function(t,e){this.width=t,this.height=e}}(),y=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),f=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),g=function(){return function(t){this.id=t}}(),m=function(t){function e(e,i,r,o,n,s,a,h){void 0===s&&(s="");var l=t.call(this,e)||this;return l.transform="",l.baseLine="auto",l.labelRotation=0,l.x=i,l.y=r,l.anchor=o,l.text=n,l.transform=s,l.baseLine=a,l.labelRotation=h,l}return c(e,t),e}(g),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return c(e,t),e}(g),v=function(){return function(t,e){this.x=t,this.y=e}}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),A=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r)},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,p=this.shapes;d<p.length;d++){var c=p[d];r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),c,new u(i,i),"",r,null)),o++}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),p=n(this.element.id+"_group"),c=n(this.element.id+"_path"),u=!1,g=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(g=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0),S="M "+(3*this.marginX+(g||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(g||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,P=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});p.appendChild(P)}var L=this.border.width/2,O=new y(L+x,L+b,s.width-L,s.height-L);if(p.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)).toString()),d.setAttribute("opacity","1"),c.setAttribute("d",o(this.rx,this.ry,O,h,this.arrowPadding,u,m,g,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var A=this.element.id+"_shadow";c.setAttribute("filter",e.Browser.isIE?"":"url(#"+A+")");var k='<filter id="'+A+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';k+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',k+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var C=this.renderer.createDefs();C.setAttribute("id",this.element.id+"SVG_tooltip_definition"),p.appendChild(C),C.innerHTML=k}return c.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!g&&!u&&!m,s),new f(m,!g&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d=0,p=0,c=0,y=e.extend({},this.textStyle,null,!0).properties,f=n(this.element.id+"_group"),g="";this.findFormattedText();var x=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),v=""!==x?this.marginY:0,b=!0,w=!0;this.markerPoint=[];var S=this.shapes.length>0?10:0,P=this.shapes.length>0?5:0,L="Normal",O=this.themeStyle.tooltipLightLabel,A=22/parseFloat("13px")*parseFloat(y.size);t&&!this.isCanvas||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s(this.element.id+"SVG_tooltip_definition"));for(var k=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),"start",""),C=l(k,y,null,f),E=0,N=this.formattedText.length;E<N;E++){var T=this.formattedText[E].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g);if(""!==T[0]){r(this.formattedText[E],y),0===E&&""!==x||this.markerPoint.push((""!==x?this.marginY:0)+k.y+d);for(var _=0,I=T.length;_<I;_++){c=0,w=!0,d+=A;for(var B=0,R=(i=T[_].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>‎:<br>").split("<br>")).length;B<R;B++)a=i[B],/\S/.test(a)||""===a||(a=" "),(!w&&" "===a||""!==a.replace(/<b>/g,"").replace(/<\/b>/g,"").trim())&&(c+=" "!==a?4:0,w&&!b?(h={x:2*this.marginX+(S+P),dy:A+(w?v:0),fill:""},v=null):h=b&&w?{x:""===x?2*this.marginX+(S+P):2*this.marginX}:{},w=!1,o=this.renderer.createTSpan(h,""),C.appendChild(o),a.indexOf("<b>")>-1?(L="bold",O=this.themeStyle.tooltipBoldLabel,g="font-weight:"+L,y.fontWeight=L,o.setAttribute("fill",this.textStyle.color||O)):(g="bold"===L?"font-weight:"+L:"",y.fontWeight=L,o.setAttribute("fill",this.textStyle.color||O)),a.indexOf("</b>")>-1&&(L="Normal",O=this.themeStyle.tooltipLightLabel),o.textContent=a=a.replace(/<[a-zA-Z\/](.|\n)*?>/g,""),c+=r(a,y).width,""!==g&&o.setAttribute("style",g),b=!1);c-=4,p=Math.max(p,c)}}}this.elementSize=new u(p+(p>0?2*this.marginX:0),d),this.elementSize.width+=S+P;var z=C.childNodes[0];if(""!==x&&z){y.fontWeight="bold";var F=(this.elementSize.width+2*this.padding)/2-r(x,y).width/2;z.setAttribute("x",F.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=this.templateFn(this.data),h=e.createElement("div",{id:this.element.id+"parent_template"});a&&a.length>0;)h.appendChild(a[0]);o.appendChild(h);var l=this.isCanvas?h:this.element,d=l.getBoundingClientRect();this.padding=0,this.elementSize=new u(d.width,d.height);var p=this.tooltipLocation(t,i,new v(0,0),new v(0,0));!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(l,p.x,p.y):this.animateTooltipDiv(this.element,p)}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.tooltipLocation=function(t,e,i,r){var o=new v(e.x,e.y),n=this.elementSize.width+2*this.marginX,s=this.elementSize.height+2*this.marginY,a=this.offset,h=this.clipBounds.x,l=this.clipBounds.y,d=t.x,p=t.y;return this.inverted?(o=new v(o.x+h+a,o.y+l-this.elementSize.height/2-this.padding),i.y=r.y=s/2,(o.x+n+this.arrowPadding>d+t.width||this.isNegative)&&(o.x=(e.x>t.width?t.width:e.x)+h-a-(n+this.arrowPadding)),o.x<d&&(o.x=(e.x<0?0:e.x)+h+a),o.y<=p&&(i.y-=p-o.y,r.y-=p-o.y,o.y=p),o.y+s>=p+t.height&&(i.y+=o.y+s-(p+t.height),r.y+=o.y+s-(p+t.height),o.y-=o.y+s-(p+t.height)),i.y+this.arrowPadding/2>s-this.ry&&(i.y=s-this.ry-this.arrowPadding/2,r.y=s,this.tipRadius=0),i.y-this.arrowPadding/2<this.ry&&(i.y=this.ry+this.arrowPadding/2,r.y=0,this.tipRadius=0)):(o=new v(o.x+h-this.elementSize.width/2-this.padding,o.y+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=n/2,(o.y<p||this.isNegative)&&(o.y=(e.y<0?0:e.y)+l+a),o.y+s+this.arrowPadding>p+t.height&&(o.y=(e.y>t.height?t.height:e.y)+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),r.x=n/2,o.x<d&&(i.x-=d-o.x,r.x-=d-o.x,o.x=d),o.x+n>d+t.width&&(i.x+=o.x+n-(d+t.width),r.x+=o.x+n-(d+t.width),o.x-=o.x+n-(d+t.width)),i.x+this.arrowPadding/2>n-this.rx&&(i.x=n-this.rx-this.arrowPadding/2,r.x=n,this.tipRadius=0),i.x-this.arrowPadding/2<this.rx&&(i.x=this.rx+this.arrowPadding/2,r.x=0,this.tipRadius=0)),new y(o.x,o.y,n,s)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:300,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=this.isCanvas&&!this.template?n(this.element.id+"_svg"):n(this.element.id);if(i){var r=i.firstChild;this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r);var o;r&&(o=parseFloat(r.getAttribute("opacity"))||1),new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&!this.shared&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){return this.addOnPersist([])},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,e){this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},P)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},L)],h.prototype,"areaBounds",void 0),w([e.Property(null)],h.prototype,"availableSize",void 0),w([e.Property(!1)],h.prototype,"isCanvas",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);t.TextStyle=S,t.TooltipBorder=P,t.AreaBounds=L,t.ToolLocation=O,t.Tooltip=A,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=f,t.CustomizeOption=g,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=p,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-svg-base.umd.min.js.map
/*!
* filename: ej2-svg-base.min.js
* version : 17.1.48
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.svgbase=function(t,e){"use strict";function i(t){var e;switch(t){case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=document.getElementById("chartmeasuretext");if(null===r&&(r=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(r)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var o=t.split(" "),n=0;n<o.length;n++)-1===o[n].indexOf("<br/>")&&(o[n]=o[n].replace(/[<>]/g,"&"));t=o.join(" ")}return r.innerHTML=t,r.style.position="fixed",r.style.fontSize=i.size,r.style.fontWeight=i.fontWeight,r.style.fontStyle=i.fontStyle,r.style.fontFamily=i.fontFamily,r.style.visibility="hidden",r.style.top="-100",r.style.left="0",r.style.whiteSpace="nowrap",r.style.lineHeight="normal",new u(r.clientWidth,r.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var c="",p=i.x,u=i.y,y=i.x+i.width,g=i.y+i.height;return d=d||0,n?(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(g-e)+" Q "+y+" "+g+" "+(y-t)+" "+g),0!==o&&(c=(c=c.concat(" L "+(r.x+o/2)+" "+g)).concat(" L "+(h+d)+" "+(g+o-d)),c+=" Q "+h+" "+(g+o)+" "+(h-d)+" "+(g+o-d)),c=r.x-o/2>p?c.concat(" L "+(r.x-o/2)+" "+g+" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):0===o?c.concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):c.concat(" L "+p+" "+(g+e)+" z")):s?(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),c=(c=(c+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(g-e)+" Q "+y+" "+g+" "+(y-t)+" "+g+" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):a?(c=(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),c=(c=(c+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(g-e)+" Q "+y+" "+g+" "+(y-t)+" "+g)).concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):(c=(c=c.concat("M "+(p+t)+" "+u+" Q "+p+" "+u+" "+p+" "+(u+e)+" L "+p+" "+(r.y-o/2))).concat(" L "+(p-o+d)+" "+(l-d)),c=(c=(c+=" Q "+(p-o)+" "+l+" "+(p-o+d)+" "+(l+d)).concat(" L "+p+" "+(r.y+o/2)+" L "+p+" "+(g-e)+" Q "+p+" "+g+" "+(p+t)+" "+g)).concat(" L "+(y-t)+" "+g+" Q "+y+" "+g+" "+y+" "+(g-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),c}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,c=t.y,p=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:c});break;case"Cross":s="M "+p+" "+c+" L "+(d+h/2)+" "+c+" M "+d+" "+(c+l/2)+" L "+d+" "+(c+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+p+" "+c+" L "+(d+h/2)+" "+c,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(c+l/2)+" L "+d+" "+(c+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+p+" "+c+" L "+d+" "+(c+-l/2)+" L "+(d+h/2)+" "+c+" L "+d+" "+(c+l/2)+" L "+p+" "+c+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+p+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" L "+p+" "+(c+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+p+" "+(c+l/2)+" L "+d+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(c-l/2)+" L "+d+" "+(c+l/2)+" L "+(d-h/2)+" "+(c-l/2)+" L "+(d+h/2)+" "+(c-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,g=void 0,f=0;f<=5;f++)y=h/2*Math.cos(Math.PI/180*(72*f)),g=l/2*Math.sin(Math.PI/180*(72*f)),s=0===f?"M "+(d+y)+" "+(c+g)+" ":s.concat("L "+(d+y)+" "+(c+g)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:p,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"path")),e=this.setElementAttributes(t,e)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"rect")),e=this.setElementAttributes(t,e)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i){var r=document.createElementNS(this.svgLink,"text");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,e,i){var r=this.createDefs(),o=document.createElementNS(this.svgLink,t);o=this.setElementAttributes(e,o);for(var n=0;n<i.length;n++){var s=document.createElementNS(this.svgLink,"stop");s.setAttribute("offset",i[n].colorStop),s.setAttribute("stop-color",i[n].color),s.setAttribute("stop-opacity","1"),o.appendChild(s)}return r.appendChild(o),r},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t}(),c=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawRectangle=function(t){var e=this.ctx,i=t.rx;this.ctx.save(),this.ctx.beginPath(),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==i&&i>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=e,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"C":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]),c=parseFloat(i[s+5]),p=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,l,d,c,p),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":this.ctx.closePath()}}"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawText=function(t,i){var r=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(r)||"regular"!==r.toLowerCase()||(r="normal");var o=this.getOptionValue(t,"font-size"),n=this.getOptionValue(t,"font-family"),s=this.getOptionValue(t,"font-style").toLowerCase()+" "+r+" "+o+" "+n,a=this.getOptionValue(t,"text-anchor"),h=void 0!==t.opacity?t.opacity:1;"middle"===a&&(a="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=s,this.ctx.textAlign=a,this.ctx.globalAlpha=h,t.baseline&&(this.ctx.textBaseline=t.baseline);this.ctx.translate(t.x+0,t.y),this.ctx.rotate(t.labelRotation*Math.PI/180),this.ctx.fillText(i,0,0),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawCircle=function(t){var e=this.ctx;this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=e,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawEllipse=function(t){var e=this.ctx,i=Math.max(t.rx,t.ry),r=t.rx/i,o=t.ry/i;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),this.ctx.save(),this.ctx.scale(r,o),this.ctx.arc(0,0,i,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=e,this.dataUrl=this.canvasObj.toDataURL()},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore(),this.dataUrl=this.canvasObj.toDataURL()},t.prototype.createLinearGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return this.dataUrl=this.canvasObj.toDataURL(),r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return e},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t}(),p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){function t(t,e){this.width=t,this.height=e}return t}(),y=function(){function t(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}return t}(),g=function(){function t(t,e){this.isRight=e,this.isBottom=t}return t}(),f=function(){function t(t){this.id=t}return t}(),m=function(t){function e(e,i,r,o,n,s,a){void 0===s&&(s="");var h=t.call(this,e)||this;return h.transform="",h.baseLine="auto",h.x=i,h.y=r,h.anchor=o,h.text=n,h.transform=s,h.baseLine=a,h}return p(e,t),e}(f),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return p(e,t),e}(f),v=function(){function t(t,e){this.x=t,this.y=e}return t}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),A=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.initPrivateVariable(),this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r)},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=this.renderer.createGroup({id:this.element.id+"_group"});t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,c=this.shapes;d<c.length;d++){var p=c[d];r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),p,new u(i,i),"",r,null)),o++}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),c=n(this.element.id+"_group"),p=n(this.element.id+"_path"),u=!1,f=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(f=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0),S="M "+(3*this.marginX+(f||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(f||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,L=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});c.appendChild(L)}var P=this.border.width/2,O=new y(P+x,P+b,s.width-P,s.height-P);if(c.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)).toString()),d.setAttribute("opacity","1"),p.setAttribute("d",o(this.rx,this.ry,O,h,this.arrowPadding,u,m,f,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var A=this.element.id+"_shadow";p.setAttribute("filter",e.Browser.isIE?"":"url(#"+A+")");var k='<filter id="'+A+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';k+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',k+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var C=this.renderer.createDefs();C.setAttribute("id","SVG_tooltip_definition"),c.appendChild(C),C.innerHTML=k}return p.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!f&&!u&&!m,s),new g(m,!f&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d=0,c=0,p=0,y=e.extend({},this.textStyle,null,!0).properties,g=n(this.element.id+"_group"),f="";this.findFormattedText();var x=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),v=""!==x?this.marginY:0,b=!0,w=!0;this.markerPoint=[];var S=this.shapes.length>0?10:0,L=this.shapes.length>0?5:0,P="Normal",O=this.themeStyle.tooltipLightLabel,A=22/parseFloat("13px")*parseFloat(y.size);t||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s("SVG_tooltip_definition"));for(var k=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),"start",""),C=l(k,y,null,g),E=0,N=this.formattedText.length;E<N;E++){var T=this.formattedText[E].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g);if(""!==T[0]){r(this.formattedText[E],y),0===E&&""!==x||this.markerPoint.push((""!==x?this.marginY:0)+k.y+d);for(var _=0,R=T.length;_<R;_++){p=0,w=!0,d+=A;for(var I=0,B=(i=T[_].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>‎:<br>").split("<br>")).length;I<B;I++)a=i[I],/\S/.test(a)||""===a||(a=" "),(!w&&" "===a||""!==a.replace(/<b>/g,"").replace(/<\/b>/g,"").trim())&&(p+=" "!==a?4:0,w&&!b?(h={x:2*this.marginX+(S+L),dy:A+(w?v:0),fill:""},v=null):h=b&&w?{x:""===x?2*this.marginX+(S+L):2*this.marginX}:{},w=!1,o=this.renderer.createTSpan(h,""),C.appendChild(o),a.indexOf("<b>")>-1?(P="bold",O=this.themeStyle.tooltipBoldLabel,f="font-weight:"+P,y.fontWeight=P,o.setAttribute("fill",this.textStyle.color||O)):(f="bold"===P?"font-weight:"+P:"",y.fontWeight=P,o.setAttribute("fill",this.textStyle.color||O)),a.indexOf("</b>")>-1&&(P="Normal",O=this.themeStyle.tooltipLightLabel),o.textContent=a=a.replace(/<[a-zA-Z\/](.|\n)*?>/g,""),p+=r(a,y).width,""!==f&&o.setAttribute("style",f),b=!1);p-=4,c=Math.max(c,p)}}}this.elementSize=new u(c+(c>0?2*this.marginX:0),d),this.elementSize.width+=S+L;var j=C.childNodes[0];if(""!==x&&j){y.fontWeight="bold";var U=(this.elementSize.width+2*this.padding)/2-r(x,y).width/2;j.setAttribute("x",U.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id),s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=this.templateFn(this.data),h=e.createElement("div",{id:this.element.id+"parent_template"});a&&a.length>0;)h.appendChild(a[0]);o.appendChild(h);var l=this.element.getBoundingClientRect();this.padding=0,this.elementSize=new u(l.width,l.height);var d=this.tooltipLocation(t,i,new v(0,0),new v(0,0));!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(this.element,d.x,d.y):this.animateTooltipDiv(this.element,d)}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.tooltipLocation=function(t,e,i,r){var o=new v(e.x,e.y),n=this.elementSize.width+2*this.marginX,s=this.elementSize.height+2*this.marginY,a=this.offset,h=this.clipBounds.x,l=this.clipBounds.y,d=t.x,c=t.y;return this.inverted?(o=new v(o.x+h+a,o.y+l-this.elementSize.height/2-this.padding),i.y=r.y=s/2,(o.x+n+this.arrowPadding>d+t.width||this.isNegative)&&(o.x=(e.x>t.width?t.width:e.x)+h-a-(n+this.arrowPadding)),o.x<d&&(o.x=(e.x<0?0:e.x)+h+a),o.y<=c&&(i.y-=c-o.y,r.y-=c-o.y,o.y=c),o.y+s>=c+t.height&&(i.y+=o.y+s-(c+t.height),r.y+=o.y+s-(c+t.height),o.y-=o.y+s-(c+t.height)),i.y+this.arrowPadding/2>s-this.ry&&(i.y=s-this.ry-this.arrowPadding/2,r.y=s,this.tipRadius=0),i.y-this.arrowPadding/2<this.ry&&(i.y=this.ry+this.arrowPadding/2,r.y=0,this.tipRadius=0)):(o=new v(o.x+h-this.elementSize.width/2-this.padding,o.y+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=n/2,(o.y<c||this.isNegative)&&(o.y=(e.y<0?0:e.y)+l+a),o.y+s+this.arrowPadding>c+t.height&&(o.y=(e.y>t.height?t.height:e.y)+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),r.x=n/2,o.x<d&&(i.x-=d-o.x,r.x-=d-o.x,o.x=d),o.x+n>d+t.width&&(i.x+=o.x+n-(d+t.width),r.x+=o.x+n-(d+t.width),o.x-=o.x+n-(d+t.width)),i.x+this.arrowPadding/2>n-this.rx&&(i.x=n-this.rx-this.arrowPadding/2,r.x=n,this.tipRadius=0),i.x-this.arrowPadding/2<this.rx&&(i.x=this.rx+this.arrowPadding/2,r.x=0,this.tipRadius=0)),new y(o.x,o.y,n,s)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:300,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=n(this.element.id);if(i){var r=i.firstChild,o=parseFloat(r.getAttribute("opacity"))||1;new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&!this.shared&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){var t=[];return this.addOnPersist(t)},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,e){this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},L)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},P)],h.prototype,"areaBounds",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);return t.TextStyle=S,t.TooltipBorder=L,t.AreaBounds=P,t.ToolLocation=O,t.Tooltip=A,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=g,t.CustomizeOption=f,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=c,t}({},ej.base),this.ejs=ej;
this.ej=this.ej||{},this.ej.svgbase=function(t,e){"use strict";function i(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=t||"",o=document.getElementById("chartmeasuretext");if(null===o&&(o=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(o)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),s=0;s<n.length;s++)-1===n[s].indexOf("<br/>")&&(n[s]=n[s].replace(/[<>]/g,"&"));t=n.join(" ")}return o.innerHTML=r.indexOf("<br>")>-1?r:t,o.style.position="fixed",o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new u(o.clientWidth,o.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var c="",p=i.x,u=i.y,y=i.x+i.width,g=i.y+i.height;return d=d||0,n?(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(g-e)+" Q "+y+" "+g+" "+(y-t)+" "+g),0!==o&&(c=(c=c.concat(" L "+(r.x+o/2)+" "+g)).concat(" L "+(h+d)+" "+(g+o-d)),c+=" Q "+h+" "+(g+o)+" "+(h-d)+" "+(g+o-d)),c=r.x-o/2>p?c.concat(" L "+(r.x-o/2)+" "+g+" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):0===o?c.concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):c.concat(" L "+p+" "+(g+e)+" z")):s?(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),c=(c=(c+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(g-e)+" Q "+y+" "+g+" "+(y-t)+" "+g+" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):a?(c=(c=(c=c.concat("M "+p+" "+(u+e)+" Q "+p+" "+u+" "+(p+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),c=(c=(c+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(g-e)+" Q "+y+" "+g+" "+(y-t)+" "+g)).concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):(c=(c=c.concat("M "+(p+t)+" "+u+" Q "+p+" "+u+" "+p+" "+(u+e)+" L "+p+" "+(r.y-o/2))).concat(" L "+(p-o+d)+" "+(l-d)),c=(c=(c+=" Q "+(p-o)+" "+l+" "+(p-o+d)+" "+(l+d)).concat(" L "+p+" "+(r.y+o/2)+" L "+p+" "+(g-e)+" Q "+p+" "+g+" "+(p+t)+" "+g)).concat(" L "+(y-t)+" "+g+" Q "+y+" "+g+" "+y+" "+(g-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),c}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,c=t.y,p=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:c});break;case"Cross":s="M "+p+" "+c+" L "+(d+h/2)+" "+c+" M "+d+" "+(c+l/2)+" L "+d+" "+(c+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+p+" "+c+" L "+(d+h/2)+" "+c,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(c+l/2)+" L "+d+" "+(c+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+p+" "+c+" L "+d+" "+(c+-l/2)+" L "+(d+h/2)+" "+c+" L "+d+" "+(c+l/2)+" L "+p+" "+c+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+p+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" L "+p+" "+(c+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+p+" "+(c+l/2)+" L "+d+" "+(c+-l/2)+" L "+(d+h/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(c-l/2)+" L "+d+" "+(c+l/2)+" L "+(d-h/2)+" "+(c-l/2)+" L "+(d+h/2)+" "+(c-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,g=void 0,f=0;f<=5;f++)y=h/2*Math.cos(Math.PI/180*(72*f)),g=l/2*Math.sin(Math.PI/180*(72*f)),s=0===f?"M "+(d+y)+" "+(c+g)+" ":s.concat("L "+(d+y)+" "+(c+g)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:p,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"path")),i=this.setElementAttributes(t,i)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"rect")),i=this.setElementAttributes(t,i)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i,r,o){var n=document.createElementNS(this.svgLink,"text");return n=this.setElementAttributes(t,n),e.isNullOrUndefined(i)||(n.textContent=i),n},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,e,i){var r=this.createDefs(),o=document.createElementNS(this.svgLink,t);o=this.setElementAttributes(e,o);for(var n=0;n<i.length;n++){var s=document.createElementNS(this.svgLink,"stop");s.setAttribute("offset",i[n].colorStop),s.setAttribute("stop-color",i[n].color),s.setAttribute("stop-opacity","1"),o.appendChild(s)}return r.appendChild(o),r},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(t){return null},t}(),c=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore()},t.prototype.drawRectangle=function(t,e){var i=this.ctx,r=t.rx;return this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==r&&r>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"Q":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]);this.ctx.quadraticCurveTo(a,h,l,d),s+=2;break;case"C":var c=parseFloat(i[s+3]),p=parseFloat(i[s+4]),u=parseFloat(i[s+5]),y=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,c,p,u,y),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":case"Z":this.ctx.closePath(),s-=2}}return"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.canvasObj},t.prototype.createText=function(t,i,r,o){var n=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(n)||"regular"!==n.toLowerCase()||(n="normal");var s=this.getOptionValue(t,"font-size"),a=this.getOptionValue(t,"font-family"),h=this.getOptionValue(t,"font-style").toLowerCase()+" "+n+" "+s+" "+a,l=this.getOptionValue(t,"text-anchor"),d=void 0!==t.opacity?t.opacity:1;"middle"===l&&(l="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=h,this.ctx.textAlign=l,this.ctx.globalAlpha=d,t.baseline&&(this.ctx.textBaseline=t.baseline);return this.ctx.translate(t.x+0+(r||0),t.y+(o||0)),this.ctx.rotate(t.labelRotation*Math.PI/180),this.ctx.fillText(i,0,0),this.ctx.restore(),this.canvasObj},t.prototype.drawCircle=function(t,e){var i=this.ctx;return this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),e&&this.ctx.translate(e[0],e[1]),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore()},t.prototype.drawEllipse=function(t,e){var i=this.ctx,r=Math.max(t.rx,t.ry),o=t.rx/r,n=t.ry/r;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),e&&this.ctx.translate(e[0],e[1]),this.ctx.save(),this.ctx.scale(o,n),this.ctx.arc(0,0,r,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=i},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore()},t.prototype.createLinearGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return null},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t.prototype.clearRect=function(t){this.ctx.restore(),this.ctx.clearRect(t.x,t.y,t.width,t.height)},t.prototype.createGroup=function(t){return null},t.prototype.drawClipPath=function(t){return null},t.prototype.canvasClip=function(t){this.ctx.save(),this.ctx.fillStyle="transparent",this.ctx.rect(t.x,t.y,t.width,t.height),this.ctx.fill(),this.ctx.clip()},t.prototype.canvasRestore=function(){this.ctx.restore()},t.prototype.drawPolygon=function(t){return null},t.prototype.createDefs=function(){return null},t.prototype.createClipPath=function(t){return null},t.prototype.createSvg=function(t){return null},t}(),p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){function t(t,e){this.width=t,this.height=e}return t}(),y=function(){function t(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}return t}(),g=function(){function t(t,e){this.isRight=e,this.isBottom=t}return t}(),f=function(){function t(t){this.id=t}return t}(),m=function(t){function e(e,i,r,o,n,s,a,h){void 0===s&&(s="");var l=t.call(this,e)||this;return l.transform="",l.baseLine="auto",l.labelRotation=0,l.x=i,l.y=r,l.anchor=o,l.text=n,l.transform=s,l.baseLine=a,l.labelRotation=h,l}return p(e,t),e}(f),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return p(e,t),e}(f),v=function(){function t(t,e){this.x=t,this.y=e}return t}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),A=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),O=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r)},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,c=this.shapes;d<c.length;d++){var p=c[d];r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),p,new u(i,i),"",r,null)),o++}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),c=n(this.element.id+"_group"),p=n(this.element.id+"_path"),u=!1,f=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(f=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0),S="M "+(3*this.marginX+(f||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(f||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,P=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});c.appendChild(P)}var L=this.border.width/2,A=new y(L+x,L+b,s.width-L,s.height-L);if(c.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)).toString()),d.setAttribute("opacity","1"),p.setAttribute("d",o(this.rx,this.ry,A,h,this.arrowPadding,u,m,f,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var O=this.element.id+"_shadow";p.setAttribute("filter",e.Browser.isIE?"":"url(#"+O+")");var k='<filter id="'+O+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';k+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',k+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var C=this.renderer.createDefs();C.setAttribute("id",this.element.id+"SVG_tooltip_definition"),c.appendChild(C),C.innerHTML=k}return p.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!f&&!u&&!m,s),new g(m,!f&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d=0,c=0,p=0,y=e.extend({},this.textStyle,null,!0).properties,g=n(this.element.id+"_group"),f="";this.findFormattedText();var x=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),v=""!==x?this.marginY:0,b=!0,w=!0;this.markerPoint=[];var S=this.shapes.length>0?10:0,P=this.shapes.length>0?5:0,L="Normal",A=this.themeStyle.tooltipLightLabel,O=22/parseFloat("13px")*parseFloat(y.size);t&&!this.isCanvas||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s(this.element.id+"SVG_tooltip_definition"));for(var k=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),"start",""),C=l(k,y,null,g),E=0,N=this.formattedText.length;E<N;E++){var T=this.formattedText[E].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g);if(""!==T[0]){r(this.formattedText[E],y),0===E&&""!==x||this.markerPoint.push((""!==x?this.marginY:0)+k.y+d);for(var _=0,I=T.length;_<I;_++){p=0,w=!0,d+=O;for(var B=0,R=(i=T[_].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>‎:<br>").split("<br>")).length;B<R;B++)a=i[B],/\S/.test(a)||""===a||(a=" "),(!w&&" "===a||""!==a.replace(/<b>/g,"").replace(/<\/b>/g,"").trim())&&(p+=" "!==a?4:0,w&&!b?(h={x:2*this.marginX+(S+P),dy:O+(w?v:0),fill:""},v=null):h=b&&w?{x:""===x?2*this.marginX+(S+P):2*this.marginX}:{},w=!1,o=this.renderer.createTSpan(h,""),C.appendChild(o),a.indexOf("<b>")>-1?(L="bold",A=this.themeStyle.tooltipBoldLabel,f="font-weight:"+L,y.fontWeight=L,o.setAttribute("fill",this.textStyle.color||A)):(f="bold"===L?"font-weight:"+L:"",y.fontWeight=L,o.setAttribute("fill",this.textStyle.color||A)),a.indexOf("</b>")>-1&&(L="Normal",A=this.themeStyle.tooltipLightLabel),o.textContent=a=a.replace(/<[a-zA-Z\/](.|\n)*?>/g,""),p+=r(a,y).width,""!==f&&o.setAttribute("style",f),b=!1);p-=4,c=Math.max(c,p)}}}this.elementSize=new u(c+(c>0?2*this.marginX:0),d),this.elementSize.width+=S+P;var z=C.childNodes[0];if(""!==x&&z){y.fontWeight="bold";var F=(this.elementSize.width+2*this.padding)/2-r(x,y).width/2;z.setAttribute("x",F.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=this.templateFn(this.data),h=e.createElement("div",{id:this.element.id+"parent_template"});a&&a.length>0;)h.appendChild(a[0]);o.appendChild(h);var l=this.isCanvas?h:this.element,d=l.getBoundingClientRect();this.padding=0,this.elementSize=new u(d.width,d.height);var c=this.tooltipLocation(t,i,new v(0,0),new v(0,0));!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(l,c.x,c.y):this.animateTooltipDiv(this.element,c)}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.tooltipLocation=function(t,e,i,r){var o=new v(e.x,e.y),n=this.elementSize.width+2*this.marginX,s=this.elementSize.height+2*this.marginY,a=this.offset,h=this.clipBounds.x,l=this.clipBounds.y,d=t.x,c=t.y;return this.inverted?(o=new v(o.x+h+a,o.y+l-this.elementSize.height/2-this.padding),i.y=r.y=s/2,(o.x+n+this.arrowPadding>d+t.width||this.isNegative)&&(o.x=(e.x>t.width?t.width:e.x)+h-a-(n+this.arrowPadding)),o.x<d&&(o.x=(e.x<0?0:e.x)+h+a),o.y<=c&&(i.y-=c-o.y,r.y-=c-o.y,o.y=c),o.y+s>=c+t.height&&(i.y+=o.y+s-(c+t.height),r.y+=o.y+s-(c+t.height),o.y-=o.y+s-(c+t.height)),i.y+this.arrowPadding/2>s-this.ry&&(i.y=s-this.ry-this.arrowPadding/2,r.y=s,this.tipRadius=0),i.y-this.arrowPadding/2<this.ry&&(i.y=this.ry+this.arrowPadding/2,r.y=0,this.tipRadius=0)):(o=new v(o.x+h-this.elementSize.width/2-this.padding,o.y+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=n/2,(o.y<c||this.isNegative)&&(o.y=(e.y<0?0:e.y)+l+a),o.y+s+this.arrowPadding>c+t.height&&(o.y=(e.y>t.height?t.height:e.y)+l-this.elementSize.height-2*this.padding-this.arrowPadding-a),r.x=n/2,o.x<d&&(i.x-=d-o.x,r.x-=d-o.x,o.x=d),o.x+n>d+t.width&&(i.x+=o.x+n-(d+t.width),r.x+=o.x+n-(d+t.width),o.x-=o.x+n-(d+t.width)),i.x+this.arrowPadding/2>n-this.rx&&(i.x=n-this.rx-this.arrowPadding/2,r.x=n,this.tipRadius=0),i.x-this.arrowPadding/2<this.rx&&(i.x=this.rx+this.arrowPadding/2,r.x=0,this.tipRadius=0)),new y(o.x,o.y,n,s)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:300,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=n(this.isCanvas&&!this.template?this.element.id+"_svg":this.element.id);if(i){var r=i.firstChild;this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r);var o;r&&(o=parseFloat(r.getAttribute("opacity"))||1),new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&!this.shared&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){var t=[];return this.addOnPersist(t)},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,e){this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},P)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},A)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},A)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},L)],h.prototype,"areaBounds",void 0),w([e.Property(null)],h.prototype,"availableSize",void 0),w([e.Property(!1)],h.prototype,"isCanvas",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);return t.TextStyle=S,t.TooltipBorder=P,t.AreaBounds=L,t.ToolLocation=A,t.Tooltip=O,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=g,t.CustomizeOption=f,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=c,t}({},ej.base),this.ejs=ej;
//# sourceMappingURL=ej2-svg-base.min.js.map
/*!
* filename: index.d.ts
* version : 17.1.48
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-svg-base",
"version": "17.1.48",
"description": "Essential JS 2 SVG Base Components",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"_from": "@syncfusion/ej2-svg-base@*",
"_id": "@syncfusion/ej2-svg-base@17.1.1",
"_inBundle": false,
"_integrity": "sha512-5JbnEbLkOcL6xZKHb0vZViixJ3Eds908C8eb/9um7nQ3nj2K+AEc8kKKW8zTGAuXLrwCoinSZWz2fjzikMG3qQ==",
"_location": "/@syncfusion/ej2-svg-base",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@syncfusion/ej2-svg-base@*",
"name": "@syncfusion/ej2-svg-base",
"escapedName": "@syncfusion%2fej2-svg-base",
"scope": "@syncfusion",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/",
"/@syncfusion/ej2",
"/@syncfusion/ej2-charts",
"/@syncfusion/ej2-circulargauge",
"/@syncfusion/ej2-heatmap",
"/@syncfusion/ej2-lineargauge",
"/@syncfusion/ej2-maps",
"/@syncfusion/ej2-pivotview",
"/@syncfusion/ej2-treemap"
],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-svg-base/-/ej2-svg-base-17.1.1.tgz",
"_shasum": "95c4378b57cd492fc7fa61517998398fc3b77c40",
"_spec": "@syncfusion/ej2-svg-base@*",
"_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included",
"author": {
"name": "Syncfusion Inc."
},
"bugs": {
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/issues"
},
"bundleDependencies": false,
"dependencies": {
"@syncfusion/ej2-base": "~17.1.48"
"@syncfusion/ej2-base": "~17.2.28-beta"
},
"deprecated": false,
"description": "Essential JS 2 SVG Base Components",
"devDependencies": {},
"es2015": "./dist/es6/ej2-svg-base.es2015.js",
"homepage": "https://github.com/syncfusion/ej2-javascript-ui-controls#readme",
"keywords": [

@@ -16,10 +54,12 @@ "ej2",

],
"license": "SEE LICENSE IN license",
"main": "./dist/ej2-svg-base.umd.min.js",
"module": "./index.js",
"name": "@syncfusion/ej2-svg-base",
"repository": {
"type": "git",
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls.git"
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
},
"main": "./dist/ej2-svg-base.umd.min.js",
"module": "./index.js",
"es2015": "./dist/es6/ej2-svg-base.es2015.js",
"version": "17.2.28-beta",
"sideEffects": true
}

@@ -1,2 +0,3 @@

import { LineAttributes, PathAttributes, CircleAttributes, RectAttributes, EllipseAttributes, PolylineAttributes, BaseAttibutes, TextAttributes, ImageAttributes, SVGCanvasAttributes, GradientColor } from './svg-canvas-interface';
import { LineAttributes, PathAttributes, CircleAttributes, RectAttributes, EllipseAttributes, PolylineAttributes, BaseAttibutes, TextAttributes, ImageAttributes, SVGCanvasAttributes, GradientColor, SVGAttributes } from './svg-canvas-interface';
import { Rect } from '../tooltip';
/**

@@ -59,3 +60,3 @@ * @private

*/
drawRectangle(options: RectAttributes): void;
drawRectangle(options: RectAttributes, canvasTranslate?: Int32Array): Element;
private drawCornerRadius;

@@ -68,3 +69,3 @@ /**

*/
drawPath(options: PathAttributes, canvasTranslate: Int32Array): void;
drawPath(options: PathAttributes, canvasTranslate?: Int32Array): Element;
/**

@@ -76,3 +77,3 @@ * To draw a text

*/
drawText(options: TextAttributes, label: string): void;
createText(options: TextAttributes, label: string, transX?: number, transY?: number): Element;
/**

@@ -83,3 +84,3 @@ * To draw circle on the canvas

*/
drawCircle(options: CircleAttributes): void;
drawCircle(options: CircleAttributes, canvasTranslate?: Int32Array): Element;
/**

@@ -96,3 +97,3 @@ * To draw polyline

*/
drawEllipse(options: EllipseAttributes): void;
drawEllipse(options: EllipseAttributes, canvasTranslate?: Int32Array): void;
/**

@@ -123,3 +124,3 @@ * To draw an image

*/
setElementAttributes(options: SVGCanvasAttributes, element: HTMLElement): HTMLElement;
setElementAttributes(options: SVGCanvasAttributes, element: HTMLElement | Element): HTMLElement | Element;
/**

@@ -131,2 +132,58 @@ * To update the values of the canvas element attributes

updateCanvasAttributes(options: SVGCanvasAttributes): void;
/**
* This method clears the given rectangle region
* @param options
*/
clearRect(rect: Rect): void;
/**
* For canvas rendering in chart
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options needed to create group
* @return {Element}
*/
createGroup(options: BaseAttibutes): Element;
/**
* To render a clip path
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options required to render a clip path
* @return {Element}
*/
drawClipPath(options: BaseAttibutes): Element;
/**
* Clip method to perform clip in canvas mode
* @param options
*/
canvasClip(options: BaseAttibutes): void;
/**
* Tp restore the canvas
* @param options
*/
canvasRestore(): void;
/**
* To draw a polygon
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {PolylineAttributes} options - Options needed to draw a polygon in SVG
* @return {Element}
*/
drawPolygon(options: PolylineAttributes): Element;
/**
* To create defs element in SVG
* Dummy method for using canvas/svg render in the same variable name in chart control
* @return {Element}
*/
createDefs(): Element;
/**
* To create clip path in SVG
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options needed to create clip path
* @return {Element}
*/
createClipPath(options: BaseAttibutes): Element;
/**
* To create a Html5 SVG element
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {SVGAttributes} options - Options to create SVG
* @return {Element}
*/
createSvg(options: SVGAttributes): Element;
}

@@ -78,3 +78,2 @@ /**

this.ctx.restore();
this.dataUrl = this.canvasObj.toDataURL();
};

@@ -86,3 +85,3 @@ /**

*/
CanvasRenderer.prototype.drawRectangle = function (options) {
CanvasRenderer.prototype.drawRectangle = function (options, canvasTranslate) {
var canvasCtx = this.ctx;

@@ -92,2 +91,5 @@ var cornerRadius = options.rx;

this.ctx.beginPath();
if (canvasTranslate) {
this.ctx.translate(canvasTranslate[0], canvasTranslate[1]);
}
this.ctx.globalAlpha = this.getOptionValue(options, 'opacity');

@@ -109,3 +111,3 @@ this.setAttributes(options);

this.ctx = canvasCtx;
this.dataUrl = this.canvasObj.toDataURL();
return (this.canvasObj);
};

@@ -138,3 +140,2 @@ // To draw the corner of a rectangle

this.ctx.stroke();
this.dataUrl = this.canvasObj.toDataURL();
};

@@ -174,2 +175,8 @@ /**

break;
case 'Q':
var q1 = parseFloat(dataSplit[i + 3]);
var q2 = parseFloat(dataSplit[i + 4]);
this.ctx.quadraticCurveTo(x1, y1, q1, q2);
i = i + 2;
break;
case 'C':

@@ -202,3 +209,6 @@ var c1 = parseFloat(dataSplit[i + 3]);

case 'z':
case 'Z':
this.ctx.closePath();
//since for loop is incremented by 3, to get next value after 'z' i is decremented for 2.
i = i - 2;
break;

@@ -216,3 +226,3 @@ }

this.ctx = canvasCtx;
this.dataUrl = this.canvasObj.toDataURL();
return this.canvasObj;
};

@@ -225,3 +235,3 @@ /**

*/
CanvasRenderer.prototype.drawText = function (options, label) {
CanvasRenderer.prototype.createText = function (options, label, transX, transY) {
var fontWeight = this.getOptionValue(options, 'font-weight');

@@ -249,7 +259,7 @@ if (!isNullOrUndefined(fontWeight) && fontWeight.toLowerCase() === 'regular') {

var txtlngth = 0;
this.ctx.translate(options.x + (txtlngth / 2), options.y);
this.ctx.translate(options.x + (txtlngth / 2) + (transX ? transX : 0), options.y + (transY ? transY : 0));
this.ctx.rotate(options.labelRotation * Math.PI / 180);
this.ctx.fillText(label, 0, 0);
this.ctx.restore();
this.dataUrl = this.canvasObj.toDataURL();
return this.canvasObj;
};

@@ -261,3 +271,3 @@ /**

*/
CanvasRenderer.prototype.drawCircle = function (options) {
CanvasRenderer.prototype.drawCircle = function (options, canvasTranslate) {
var canvasCtx = this.ctx;

@@ -270,2 +280,5 @@ this.ctx.save();

this.ctx.fill();
if (canvasTranslate) {
this.ctx.translate(canvasTranslate[0], canvasTranslate[1]);
}
this.setAttributes(options);

@@ -275,3 +288,3 @@ this.ctx.stroke();

this.ctx = canvasCtx;
this.dataUrl = this.canvasObj.toDataURL();
return this.canvasObj;
};

@@ -302,3 +315,2 @@ /**

this.ctx.restore();
this.dataUrl = this.canvasObj.toDataURL();
};

@@ -310,3 +322,3 @@ /**

*/
CanvasRenderer.prototype.drawEllipse = function (options) {
CanvasRenderer.prototype.drawEllipse = function (options, canvasTranslate) {
var canvasCtx = this.ctx;

@@ -319,2 +331,5 @@ var circumference = Math.max(options.rx, options.ry);

this.ctx.translate(options.cx, options.cy);
if (canvasTranslate) {
this.ctx.translate(canvasTranslate[0], canvasTranslate[1]);
}
this.ctx.save();

@@ -331,3 +346,2 @@ this.ctx.scale(scaleX, scaleY);

this.ctx = canvasCtx;
this.dataUrl = this.canvasObj.toDataURL();
};

@@ -347,3 +361,2 @@ /**

this.ctx.restore();
this.dataUrl = this.canvasObj.toDataURL();
};

@@ -391,3 +404,2 @@ /**

}
this.dataUrl = this.canvasObj.toDataURL();
return colorName;

@@ -407,3 +419,3 @@ };

}
return element;
return null;
};

@@ -426,4 +438,84 @@ /**

};
/**
* This method clears the given rectangle region
* @param options
*/
CanvasRenderer.prototype.clearRect = function (rect) {
this.ctx.restore();
this.ctx.clearRect(rect.x, rect.y, rect.width, rect.height);
};
;
/**
* For canvas rendering in chart
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options needed to create group
* @return {Element}
*/
CanvasRenderer.prototype.createGroup = function (options) {
return null;
};
/**
* To render a clip path
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options required to render a clip path
* @return {Element}
*/
CanvasRenderer.prototype.drawClipPath = function (options) {
return null;
};
/**
* Clip method to perform clip in canvas mode
* @param options
*/
CanvasRenderer.prototype.canvasClip = function (options) {
this.ctx.save();
this.ctx.fillStyle = 'transparent';
this.ctx.rect(options.x, options.y, options.width, options.height);
this.ctx.fill();
this.ctx.clip();
};
/**
* Tp restore the canvas
* @param options
*/
CanvasRenderer.prototype.canvasRestore = function () {
this.ctx.restore();
};
/**
* To draw a polygon
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {PolylineAttributes} options - Options needed to draw a polygon in SVG
* @return {Element}
*/
CanvasRenderer.prototype.drawPolygon = function (options) {
return null;
};
/**
* To create defs element in SVG
* Dummy method for using canvas/svg render in the same variable name in chart control
* @return {Element}
*/
CanvasRenderer.prototype.createDefs = function () {
return null;
};
/**
* To create clip path in SVG
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options needed to create clip path
* @return {Element}
*/
CanvasRenderer.prototype.createClipPath = function (options) {
return null;
};
/**
* To create a Html5 SVG element
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {SVGAttributes} options - Options to create SVG
* @return {Element}
*/
CanvasRenderer.prototype.createSvg = function (options) {
return null;
};
return CanvasRenderer;
}());
export { CanvasRenderer };

@@ -28,5 +28,6 @@ import { LineAttributes, PathAttributes, CircleAttributes, SVGAttributes, EllipseAttributes, PolylineAttributes, BaseAttibutes, TextAttributes, ImageAttributes, SVGCanvasAttributes, PatternAttributes, LinearGradient, RadialGradient, RectAttributes, GradientColor } from './svg-canvas-interface';

* @param {PathAttributes} options - Options to draw a path in SVG
* @param {Int32Array} canvasTranslate - Used as dummy variable for canvas rendering
* @return {Element}
*/
drawPath(options: PathAttributes): Element;
drawPath(options: PathAttributes, canvasTranslate?: Int32Array): Element;
/**

@@ -43,3 +44,3 @@ * To draw a line

*/
drawRectangle(options: RectAttributes): Element;
drawRectangle(options: RectAttributes, canvasTranslate?: Int32Array): Element;
/**

@@ -80,3 +81,3 @@ * To draw a circle

*/
createText(options: TextAttributes, label: string): Element;
createText(options: TextAttributes, label: string, transX?: number, transY?: number): Element;
/**

@@ -170,3 +171,10 @@ * To create a tSpan

*/
setElementAttributes(options: SVGCanvasAttributes, element: Element): Element;
setElementAttributes(options: SVGCanvasAttributes, element: Element | HTMLElement): Element | HTMLElement;
/**
* To create a Html5 canvas element
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options to create canvas
* @return {HTMLCanvasElement}
*/
createCanvas(options: BaseAttibutes): HTMLCanvasElement;
}

@@ -54,5 +54,6 @@ /**

* @param {PathAttributes} options - Options to draw a path in SVG
* @param {Int32Array} canvasTranslate - Used as dummy variable for canvas rendering
* @return {Element}
*/
SvgRenderer.prototype.drawPath = function (options) {
SvgRenderer.prototype.drawPath = function (options, canvasTranslate) {
var path = document.getElementById(options.id);

@@ -83,3 +84,3 @@ if (path === null) {

*/
SvgRenderer.prototype.drawRectangle = function (options) {
SvgRenderer.prototype.drawRectangle = function (options, canvasTranslate) {
var rectangle = document.getElementById(options.id);

@@ -171,3 +172,3 @@ if (rectangle === null) {

*/
SvgRenderer.prototype.createText = function (options, label) {
SvgRenderer.prototype.createText = function (options, label, transX, transY) {
var text = document.createElementNS(this.svgLink, 'text');

@@ -369,4 +370,13 @@ text = this.setElementAttributes(options, text);

};
/**
* To create a Html5 canvas element
* Dummy method for using canvas/svg render in the same variable name in chart control
* @param {BaseAttibutes} options - Options to create canvas
* @return {HTMLCanvasElement}
*/
SvgRenderer.prototype.createCanvas = function (options) {
return null;
};
return SvgRenderer;
}());
export { SvgRenderer };

@@ -45,3 +45,4 @@ import { TextStyleModel } from './tooltip-model';

baseLine: string;
constructor(id?: string, x?: number, y?: number, anchor?: string, text?: string | string[], transform?: string, baseLine?: string);
labelRotation: number;
constructor(id?: string, x?: number, y?: number, anchor?: string, text?: string | string[], transform?: string, baseLine?: string, labelRotation?: number);
}

@@ -48,0 +49,0 @@ /** @private */

@@ -25,2 +25,3 @@ var __extends = (this && this.__extends) || (function () {

export function measureText(text, font) {
var breakText = text || ''; // For avoid NuLL value
var htmlObject = document.getElementById('chartmeasuretext');

@@ -40,3 +41,3 @@ if (htmlObject === null) {

}
htmlObject.innerHTML = text;
htmlObject.innerHTML = (breakText.indexOf('<br>') > -1) ? breakText : text;
htmlObject.style.position = 'fixed';

@@ -169,3 +170,3 @@ htmlObject.style.fontSize = font.size;

__extends(TextOption, _super);
function TextOption(id, x, y, anchor, text, transform, baseLine) {
function TextOption(id, x, y, anchor, text, transform, baseLine, labelRotation) {
if (transform === void 0) { transform = ''; }

@@ -175,2 +176,3 @@ var _this = _super.call(this, id) || this;

_this.baseLine = 'auto';
_this.labelRotation = 0;
_this.x = x;

@@ -182,2 +184,3 @@ _this.y = y;

_this.baseLine = baseLine;
_this.labelRotation = labelRotation;
return _this;

@@ -184,0 +187,0 @@ }

@@ -5,2 +5,3 @@ /** @private */

switch (theme) {
case 'Highcontrast':
case 'HighContrast':

@@ -7,0 +8,0 @@ style = {

@@ -148,3 +148,3 @@ import { NotifyPropertyChanges, Property, Event, Complex, INotifyPropertyChanged} from '@syncfusion/ej2-base';import { extend, compile as templateComplier, Component} from '@syncfusion/ej2-base';import { SvgRenderer } from '../svg-render/index';import { ChildProperty, createElement, EmitType, remove, Browser, AnimationOptions, Animation} from '@syncfusion/ej2-base';import { ITooltipThemeStyle, ITooltipRenderingEventArgs, ITooltipAnimationCompleteArgs} from './interface';import { ITooltipLoadedEventArgs, getTooltipThemeColor } from './interface';import { Size, Rect, Side, measureText, getElement, findDirection, drawSymbol, textElement } from './helper';import { removeElement, TextOption, TooltipLocation, PathOption } from './helper';import { TooltipShape, TooltipTheme } from './enum';

/**
* The fill color of the tooltip that accepts value in hex and rgba as a valid CSS color string.
* The fill color of the tooltip that accepts value in hex and rgba as a valid CSS color string.
* @private.

@@ -156,3 +156,3 @@ */

/**
* Header for tooltip.
* Header for tooltip.
* @private.

@@ -164,3 +164,3 @@ */

/**
* The fill color of the tooltip that accepts value in hex and rgba as a valid CSS color string.
* The fill color of the tooltip that accepts value in hex and rgba as a valid CSS color string.
* @private.

@@ -305,2 +305,16 @@ */

/**
* Bounds for chart.
* @private.
*/
availableSize?: Size;
/**
* To check chart is canvas.
* @default false.
* @private.
*/
isCanvas?: boolean;
/**
* Triggers before each axis range is rendered.

@@ -307,0 +321,0 @@ * @event

@@ -7,2 +7,3 @@ import { INotifyPropertyChanged } from '@syncfusion/ej2-base';

import { ITooltipLoadedEventArgs } from './interface';
import { Size } from './helper';
import { TooltipShape, TooltipTheme } from './enum';

@@ -258,2 +259,13 @@ /**

/**
* Bounds for chart.
* @private.
*/
availableSize: Size;
/**
* To check chart is canvas.
* @default false.
* @private.
*/
isCanvas: boolean;
/**
* Triggers before each axis range is rendered.

@@ -260,0 +272,0 @@ * @event

@@ -143,3 +143,5 @@ var __extends = (this && this.__extends) || (function () {

this.initPrivateVariable();
this.removeSVG();
if (!this.isCanvas) {
this.removeSVG();
}
this.createTooltipElement();

@@ -196,3 +198,7 @@ };

// Group to hold text and path.
var groupElement = this.renderer.createGroup({ id: this.element.id + '_group' });
var groupElement = document.getElementById(this.element.id + '_group');
if (!groupElement) {
groupElement = this.renderer.createGroup({ id: this.element.id + '_group' });
groupElement.setAttribute('transform', 'translate(0,0)');
}
svgObject.appendChild(groupElement);

@@ -294,3 +300,3 @@ var pathElement = this.renderer.drawPath({

var defElement = this.renderer.createDefs();
defElement.setAttribute('id', 'SVG_tooltip_definition');
defElement.setAttribute('id', this.element.id + 'SVG_tooltip_definition');
groupElement.appendChild(defElement);

@@ -345,7 +351,7 @@ defElement.innerHTML = shadow;

var dy = (22 / parseFloat(fontSize)) * (parseFloat(font.size));
if (!isRender) {
if (!isRender || this.isCanvas) {
removeElement(this.element.id + '_text');
removeElement(this.element.id + '_header_path');
removeElement(this.element.id + '_trackball_group');
removeElement('SVG_tooltip_definition');
removeElement(this.element.id + 'SVG_tooltip_definition');
}

@@ -436,2 +442,5 @@ var options = new TextOption(this.element.id + '_text', this.marginX * 2, (this.marginY * 2 + this.padding * 2 + (this.marginY === 2 ? 3 : 0)), 'start', '');

var parent = document.getElementById(this.element.id);
if (this.isCanvas) {
this.removeSVG();
}
var firstElement = parent.firstElementChild;

@@ -448,3 +457,4 @@ if (firstElement) {

parent.appendChild(elem);
var rect = this.element.getBoundingClientRect();
var element = this.isCanvas ? elem : this.element;
var rect = element.getBoundingClientRect();
this.padding = 0;

@@ -457,3 +467,3 @@ this.elementSize = new Size(rect.width, rect.height);

else {
this.updateDiv(this.element, tooltipRect.x, tooltipRect.y);
this.updateDiv(element, tooltipRect.x, tooltipRect.y);
}

@@ -590,6 +600,14 @@ }

var _this = this;
var tooltipElement = getElement(this.element.id);
var tooltipElement = (this.isCanvas && !this.template) ? getElement(this.element.id + '_svg') :
getElement(this.element.id);
if (tooltipElement) {
var tooltipGroup_1 = tooltipElement.firstChild;
var opacity_1 = parseFloat(tooltipGroup_1.getAttribute('opacity')) || 1;
if (this.isCanvas && !this.template) {
tooltipGroup_1 = document.getElementById(this.element.id + '_group') ? document.getElementById(this.element.id + '_group') :
tooltipGroup_1;
}
var opacity_1;
if (tooltipGroup_1) {
opacity_1 = parseFloat(tooltipGroup_1.getAttribute('opacity')) || 1;
}
new Animation({}).animate(tooltipGroup_1, {

@@ -736,2 +754,8 @@ duration: 200,

__decorate([
Property(null)
], Tooltip.prototype, "availableSize", void 0);
__decorate([
Property(false)
], Tooltip.prototype, "isCanvas", void 0);
__decorate([
Event()

@@ -738,0 +762,0 @@ ], Tooltip.prototype, "tooltipRender", void 0);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc