@syncfusion/ej2-heatmap
Version:
Feature rich data visulization control used to visualize the matrix data where the individual values are represented as colors
10 lines • 220 kB
JavaScript
/*!
* filename: ej2-heatmap.umd.min.js
* version : 31.1.17
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-data","@syncfusion/ej2-pdf-export"],t):t((e=e||self).ej={},e.ej2Base,e.ej2SvgBase,e.ej2Data,e.ej2PdfExport)}(this,function(e,P,O,_,B){"use strict";var t;(i=t=t||{}).heatMapTitleFont={size:"15px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},i.titleFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI",textOverflow:"None"},i.axisTitleFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},i.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI",textOverflow:"None"},i.legendLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI",textOverflow:"None"},i.rectLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI",textOverflow:"None"},i.tooltipFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI",textOverflow:"None"};N=function(e,t){return(N=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var N,H,i=function(e,t){function i(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},l=function(e,t,i,l){var a,n=arguments.length,o=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,l);else for(var s=e.length-1;0<=s;s--)(a=e[s])&&(o=(n<3?a(o):3<n?a(t,i,o):a(t,i))||o);return 3<n&&o&&Object.defineProperty(t,i,o),o},k=(H=P.ChildProperty,i(a,H),l([P.Property("16px")],a.prototype,"size",void 0),l([P.Property("")],a.prototype,"color",void 0),l([P.Property("Segoe UI")],a.prototype,"fontFamily",void 0),l([P.Property("Normal")],a.prototype,"fontWeight",void 0),l([P.Property("Normal")],a.prototype,"fontStyle",void 0),l([P.Property("Center")],a.prototype,"textAlignment",void 0),l([P.Property("Trim")],a.prototype,"textOverflow",void 0),a);function a(){return null!==H&&H.apply(this,arguments)||this}G=P.ChildProperty,i(W,G),l([P.Property(10)],W.prototype,"left",void 0),l([P.Property(10)],W.prototype,"right",void 0),l([P.Property(10)],W.prototype,"top",void 0),l([P.Property(10)],W.prototype,"bottom",void 0);var G,U=W;function W(){return null!==G&&G.apply(this,arguments)||this}j=P.ChildProperty,i(X,j),l([P.Property("")],X.prototype,"color",void 0),l([P.Property(1)],X.prototype,"width",void 0),l([P.Property("")],X.prototype,"radius",void 0);var j,Y=X;function X(){return null!==j&&j.apply(this,arguments)||this}J=P.ChildProperty,i(q,J),l([P.Property("")],q.prototype,"color",void 0),l([P.Property(0)],q.prototype,"width",void 0);var J,K=q;function q(){return null!==J&&J.apply(this,arguments)||this}Z=P.ChildProperty,i(Q,Z),l([P.Property(null)],Q.prototype,"size",void 0),l([P.Property(null)],Q.prototype,"color",void 0);var Z,$=Q;function Q(){return null!==Z&&Z.apply(this,arguments)||this}ee=P.ChildProperty,i(ie,ee),l([P.Property("")],ie.prototype,"text",void 0),l([P.Complex({},k)],ie.prototype,"textStyle",void 0);var ee,te=ie;function ie(){return null!==ee&&ee.apply(this,arguments)||this}le=P.ChildProperty,i(ne,le),l([P.Property("#eeeeee")],ne.prototype,"minColor",void 0),l([P.Property("#eeeeee")],ne.prototype,"maxColor",void 0);var le,ae=ne;function ne(){return null!==le&&le.apply(this,arguments)||this}oe=P.ChildProperty,i(n,oe),l([P.Property(null)],n.prototype,"value",void 0),l([P.Property(null)],n.prototype,"color",void 0),l([P.Property(null)],n.prototype,"label",void 0),l([P.Property(null)],n.prototype,"startValue",void 0),l([P.Property(null)],n.prototype,"endValue",void 0),l([P.Property(null)],n.prototype,"minColor",void 0),l([P.Property(null)],n.prototype,"maxColor",void 0);var oe,se=n;function n(){return null!==oe&&oe.apply(this,arguments)||this}re=P.ChildProperty,i(de,re),l([P.Property("#b5b5b5")],de.prototype,"color",void 0),l([P.Property(1)],de.prototype,"width",void 0),l([P.Property("Rectangle")],de.prototype,"type",void 0);var re,he=de;function de(){return null!==re&&re.apply(this,arguments)||this}pe=P.ChildProperty,i(ce,pe),l([P.Property("0%")],ce.prototype,"minimum",void 0),l([P.Property("100%")],ce.prototype,"maximum",void 0);var pe,ge=ce;function ce(){return null!==pe&&pe.apply(this,arguments)||this}ue=P.ChildProperty,i(ye,ue),l([P.Property(null)],ye.prototype,"start",void 0),l([P.Property(null)],ye.prototype,"end",void 0),l([P.Property("")],ye.prototype,"text",void 0),l([P.Property(null)],ye.prototype,"maximumTextWidth",void 0);var ue,me=ye;function ye(){return null!==ue&&ue.apply(this,arguments)||this}xe=P.ChildProperty,i(be,xe),l([P.Property("Center")],be.prototype,"alignment",void 0),l([P.Property("Wrap")],be.prototype,"overflow",void 0),l([P.Complex(t.axisLabelFont,k)],be.prototype,"textStyle",void 0),l([P.Complex({color:"#b5b5b5",width:1,type:"Rectangle"},he)],be.prototype,"border",void 0),l([P.Collection([],me)],be.prototype,"categories",void 0);var xe,i=be;function be(){return null!==xe&&xe.apply(this,arguments)||this}var ve,Se,Ce=function(e,t,i,l,a,n,o){this.value=e,this.color=t,this.label=i,this.startValue=l,this.endValue=a,this.minColor=n,this.maxColor=o},fe=function(e,t,i){this.mappingName=e,this.bubbleData=t,this.valueType=i},Me=function(e,t,i,l,a,n,o,s){this.value=e,this.color=t,this.label=i,this.startValue=l,this.endValue=a,this.minColor=n,this.maxColor=o,this.isHidden=s},we=function(e,t,i,l,a){this.index=1,this.row=1,this.start=e,this.end=t,this.index=i,this.label=l,this.row=a},l=(ve=function(e,t){return(ve=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}ve(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=function(e,t,i,l){var a,n=arguments.length,o=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,l);else for(var s=e.length-1;0<=s;s--)(a=e[s])&&(o=(n<3?a(o):3<n?a(t,i,o):a(t,i))||o);return 3<n&&o&&Object.defineProperty(t,i,o),o},l=(Se=P.ChildProperty,l(Le,Se),o([P.Collection([{}],se)],Le.prototype,"palette",void 0),o([P.Property("Gradient")],Le.prototype,"type",void 0),o([P.Property("")],Le.prototype,"emptyPointColor",void 0),o([P.Property("Table")],Le.prototype,"colorGradientMode",void 0),o([P.Complex({},ae)],Le.prototype,"fillColor",void 0),Le);function Le(){return null!==Se&&Se.apply(this,arguments)||this}var Te=function(e,t,i){this.R=e,this.G=t,this.B=i},Re=(s.prototype.convertToRGB=function(e,t){var i,l,a,n=this.heatMap.isColorRange?t[0].startValue:t[0].value,o=0,s=0;if(this.heatMap.isColorRange&&"Gradient"===this.heatMap.paletteSettings.type)for(s=0;s<t.length;s++)if(e<=(a=Number(t[s].endValue))&&e>=Number(t[s].startValue))o=a,i=this.heatMap.colorCollection[s].minColor,l=this.heatMap.colorCollection[s].maxColor;else{if(t[0].startValue!==this.heatMap.dataSourceMinValue&&e<t[0].startValue){o=t[0].startValue,n=this.heatMap.dataSourceMinValue,i=this.heatMap.paletteSettings.fillColor.minColor,l=this.heatMap.paletteSettings.fillColor.maxColor;break}if(a<e&&e<=(s===t.length-1?this.heatMap.dataSourceMaxValue:t[s+1].startValue)){o=s===t.length-1?this.heatMap.dataSourceMaxValue:t[s+1].startValue,n=a,i=this.heatMap.paletteSettings.fillColor.minColor,l=this.heatMap.paletteSettings.fillColor.maxColor;break}n=o=a}else for(s=1;s<t.length;s++){if(e<=(a=Number(t[s].value))){o=a,i=this.getEqualColor(t,n),l=this.getEqualColor(t,o);break}n=o=a}var r=(e-n)/(o-n);return r=isNaN(r)||!isFinite(r)?0:r,this.getPercentageColor(r,i,l)},s.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},s.prototype.componentToHex=function(e){e=e.toString(16);return 1===e.length?"0"+e:e},s.prototype.getEqualColor=function(e,t){for(var i,l=0;l<e.length;l++)if(Number(e[l].value)===t)return i=e[l].color,P.isNullOrUndefined(i)?i="#FFFFFF":-1!==i.indexOf("rgb")?i=this.convertToHex(i):-1===i.indexOf("#")&&(i="#FFFFFF"),i;return"#00000"},s.prototype.convertToHex=function(e){var e=e.substr(3),t=(e=e.split("(")[1].split(")")[0]).split(",");return e=this.rgbToHex(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))},s.prototype.getPercentageColor=function(e,t,i){var i=i.split("#")[1],t=t.split("#")[1],l=this.getPercentage(e,parseInt(t.substr(0,2),16),parseInt(i.substr(0,2),16)),a=this.getPercentage(e,parseInt(t.substr(2,2),16),parseInt(i.substr(2,2),16)),e=this.getPercentage(e,parseInt(t.substr(4,2),16),parseInt(i.substr(4,2),16));return new Te(l,a,e)},s.prototype.getPercentage=function(e,t,i){return Math.round(t+(i-t)*e)},s.prototype.getColorCollection=function(){var e,t=this.heatMap;t.colorCollection=[],t.legendColorCollection=[];for(var i=0;i<this.heatMap.paletteSettings.palette.length;i++){if(null===this.heatMap.paletteSettings.palette[i].startValue||null===this.heatMap.paletteSettings.palette[i].endValue){this.heatMap.isColorRange=!1;break}this.heatMap.isColorRange=!0}var l=t.bubbleSizeWithColor?t.minColorValue:t.dataSourceMinValue,a=t.bubbleSizeWithColor?t.maxColorValue:t.dataSourceMaxValue,n=(t.emptyPointColor=t.paletteSettings.emptyPointColor||t.themeStyle.emptyCellColor,this.orderbyOffset((this.heatMap.isColorRange||t.paletteSettings.palette&&1<t.paletteSettings.palette.length?t.paletteSettings:t.themeStyle).palette));if(n.isCompact)t.colorCollection=n.offsets,t.legendColorCollection=P.extend([],n.offsets,null,!0);else if(e="Gradient"===t.paletteSettings.type?(a-l)/(n.offsets.length-1):(a-l)/n.offsets.length,2<=n.offsets.length)for(var o=0;o<n.offsets.length;o++)t.colorCollection.push(new Ce(Math.round(100*(l+o*e))/100,n.offsets[o].color,n.offsets[o].label,n.offsets[o].startValue,n.offsets[o].endValue,n.offsets[o].minColor,n.offsets[o].maxColor)),t.legendColorCollection.push(new Me(Math.round(100*(l+o*e))/100,n.offsets[o].color,n.offsets[o].label,n.offsets[o].startValue,n.offsets[o].endValue,n.offsets[o].minColor,n.offsets[o].maxColor,!1));this.heatMap.isColorRange||this.updateLegendColorCollection(l,a,n)},s.prototype.updateLegendColorCollection=function(e,t,i){"Fixed"===this.heatMap.paletteSettings.type&&(i.isCompact||i.isLabel)||(Math.round(100*e)/100<this.heatMap.legendColorCollection[0].value&&this.heatMap.legendColorCollection.unshift(new Me(Math.round(100*e)/100,this.heatMap.legendColorCollection[0].color,this.heatMap.legendColorCollection[0].label,this.heatMap.legendColorCollection[0].startValue,this.heatMap.legendColorCollection[0].endValue,this.heatMap.legendColorCollection[0].minColor,this.heatMap.legendColorCollection[0].maxColor,!0)),Math.round(100*t)/100>this.heatMap.legendColorCollection[this.heatMap.legendColorCollection.length-1].value&&this.heatMap.legendColorCollection.push(new Me(Math.round(100*t)/100,this.heatMap.legendColorCollection[this.heatMap.legendColorCollection.length-1].color,this.heatMap.legendColorCollection[this.heatMap.legendColorCollection.length-1].label,this.heatMap.legendColorCollection[this.heatMap.legendColorCollection.length-1].startValue,this.heatMap.legendColorCollection[this.heatMap.legendColorCollection.length-1].endValue,this.heatMap.legendColorCollection[this.heatMap.legendColorCollection.length-1].minColor,this.heatMap.legendColorCollection[this.heatMap.legendColorCollection.length-1].maxColor,!0)))},s.prototype.orderbyOffset=function(e){var i=new mt,l=this.heatMap.isColorRange?"to":"value";return i.isCompact=!0,i.isLabel=!0,i.offsets=e.sort(function(e,t){return P.isNullOrUndefined(e.label)&&P.isNullOrUndefined(t.label)&&(i.isLabel=!1),P.isNullOrUndefined(e[l])||P.isNullOrUndefined(t[l])?(i.isCompact=!1,e):e[l]-t[l]}),i.isCompact||(i.offsets=(this.heatMap.paletteSettings.palette&&1<this.heatMap.paletteSettings.palette.length?this.heatMap.paletteSettings:this.heatMap.themeStyle).palette),i},s.prototype.getColorByValue=function(e){var t,i="";if(""!==e.toString())if("Bubble"!==this.heatMap.cellSettings.tileType||"Size"!==this.heatMap.cellSettings.bubbleType&&"Sector"!==this.heatMap.cellSettings.bubbleType)if("Fixed"===this.heatMap.paletteSettings.type)for(var l=0;l<this.heatMap.colorCollection.length;l++){var a=this.heatMap.isColorRange?this.heatMap.paletteSettings.palette[l].startValue:(this.heatMap.colorCollection[l+1]||this.heatMap.colorCollection[l]).value,n=this.heatMap.dataSourceMinValue===this.heatMap.dataSourceMaxValue;if(this.heatMap.isColorRange){var o=void 0;e<=this.heatMap.colorCollection[l].endValue&&e>=this.heatMap.colorCollection[l].startValue?(this.heatMap.legendVisibilityByCellType&&(o=this.heatMap.legendModule.legendRange),i=this.heatMap.legendVisibilityByCellType&&o[l]&&!o[l].visible?this.heatMap.themeStyle.toggledColor:this.heatMap.colorCollection[l].minColor):""===i&&(i=this.heatMap.paletteSettings.fillColor.minColor)}else if(e<=a&&n&&0===l||e<a||a<=e&&l===this.heatMap.colorCollection.length-1){o=void 0;this.heatMap.legendVisibilityByCellType&&(o=this.heatMap.legendModule.legendRange),i=this.heatMap.legendVisibilityByCellType&&o[l]&&!o[l].visible?this.heatMap.themeStyle.toggledColor:this.heatMap.colorCollection[l].color;break}}else"Table"!==this.heatMap.paletteSettings.colorGradientMode&&this.getColorCollection(),i=e<this.heatMap.colorCollection[0].value&&!this.heatMap.isColorRange?this.heatMap.colorCollection[0].color:e>this.heatMap.colorCollection[this.heatMap.colorCollection.length-1].value&&!this.heatMap.isColorRange?this.heatMap.colorCollection[this.heatMap.colorCollection.length-1].color:(t=this.convertToRGB(e,this.heatMap.colorCollection),this.rgbToHex(t.R,t.G,t.B));else i=this.heatMap.isColorRange?this.heatMap.colorCollection[0].minColor:this.heatMap.colorCollection[0].color;else i=this.heatMap.emptyPointColor;return i},s.prototype.destroy=function(){this.heatMap=null},s);function s(e){this.heatMap=e}Oe=function(e,t){return(Oe=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Oe,o=function(e,t){function i(){this.constructor=e}Oe(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};function p(e,t){return null!=e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function D(e,t){var i=e||"",l=document.getElementById("heatmapmeasuretext");if(null===l&&(l=P.createElement("text",{id:"heatmapmeasuretext"}),document.body.appendChild(l)),"string"==typeof e&&(-1<e.indexOf("<")||-1<e.indexOf(">"))){for(var a=e.split(" "),n=0;n<a.length;n++)-1===a[n].indexOf("<br/>")&&(a[n]=a[n].replace(/[<>]/g,"&"));e=a.join(" ")}return l.innerText=-1<i.indexOf("<br>")||-1<i.indexOf("<br/>")?i:e,l.style.position="absolute",l.style.visibility="hidden",l.style.fontSize=-1!==t.size.indexOf("px")?t.size:t.size+"px",l.style.fontWeight=t.fontWeight,l.style.fontStyle=t.fontStyle,l.style.fontFamily=t.fontFamily,l.style.top="-100",l.style.left="0",l.style.whiteSpace="nowrap",l.style.lineHeight="normal",new A(l.clientWidth,l.clientHeight)}function ze(e,t){this["font-size"]=e.size,this["font-style"]=e.fontStyle.toLowerCase(),this["font-family"]=e.fontFamily,this["font-weight"]=e.fontWeight.toLowerCase(),this.fill=t||""}function Pe(e,t,i,l){l="Near"===l.textAlignment?t:"Center"===l.textAlignment?t+e/2:e+t;return l}function De(e){this.id=e}var Ae,A=function(e,t){this.width=e,this.height=t},g=(o(Fe,Ae=De),Fe);function Fe(e,t,i,l,a,n,o){e=Ae.call(this,e)||this;return e.opacity=a,e.fill=t,e.stroke=l||"",e["stroke-width"]=parseFloat(i.toString()),e["stroke-dasharray"]=n,e.d=o,e}function Ve(e,i,t,l,a,n,o){var s,r,e=Ie(e=i.enableHtmlSanitizer&&"string"==typeof e?P.SanitizeHtmlHelper.sanitize(e):e,i),h=null,d=i.dataSource;if(!i.dataSourceSettings.isJsonData||"Cell"!==i.dataSourceSettings.adaptorType&&"Table"!==i.dataSourceSettings.adaptorType?h={value:l.value,xLabel:a[l.xIndex],yLabel:n[l.yIndex]}:(s="Numeric"===i.yAxis.valueType?i.yAxis.labels:n,r="Numeric"===i.xAxis.valueType?i.xAxis.labels:a,d.forEach(function(t){var e="Cell"===i.dataSourceSettings.adaptorType?Object.keys(t).some(function(e){return t[e]===s[l.yIndex]}):Object.prototype.hasOwnProperty.call(t,s[l.yIndex]);Object.keys(t).some(function(e){return t[e]===r[l.xIndex]})&&e&&(h=t)})),!P.isNullOrUndefined(e)){var p=Ee(e(h,i,e,i.element.id+"_Template"+o,!1),i.element.id+"_LabelTemplate_"+o);p.style.cssText="opacity: 1; display: flex; align-items: center; justify-content: center; z-index: 2; position: absolute;top:"+l.y+"px;left:"+l.x+"px;height:"+l.height+"px;width:"+l.width+"px;";for(var g=0;g<p.children.length;g++)p.children[g].style.pointerEvents="none";t.appendChild(p)}return t}function Ie(t,e){var i=null;try{"function"!=typeof t&&document.querySelectorAll(t).length?i=P.compile(document.querySelector(t).innerHTML.trim()):(e.isVue||e.isVue3||"function"==typeof t)&&(i=P.compile(t))}catch(e){i=P.compile(t)}return i}function Ee(e,t){for(var i=P.createElement("div",{id:t}),l=(i.style.cssText="position: absolute;pointer-events: auto;",e.length);0<l;)i.appendChild(e[0]),l--;return i}var _e,Be=function(e,t,i,l,a,n,o,s,r,h,d,p,g,c){this.x=e,this.y=t,this.width=i,this.height=l,this.value=a,this.id=n,this.xIndex=o,this.yIndex=s,this.xValue=r,this.yValue=h,this.visible=d,this.displayText=p,this.textId=g,this.allowCollection=c},Ne=function(e,t,i,l,a,n,o,s,r,h,d,p){this.value=e,this.xLabel=t,this.yLabel=i,this.xValue=l,this.yValue=a,this.cellElement=n,this.xPosition=o,this.yPosition=s,this.width=r,this.height=h,this.x=d,this.y=p},b=(o(He,_e=g),He);function He(e,t,i,l,a,n,o,s,r,h){e=_e.call(this,e,t,i.width,n,l,h)||this;return e.y=a.y,e.x=a.x,e.height=0<a.height?a.height:0,e.width=0<a.width?a.width:0,e.rx=o||0,e.ry=s||0,e.transform=r||"",e}o(Ue,ke=g);var ke,Ge=Ue;function Ue(e,t,i,l,a,n,o,s){e=ke.call(this,e,t,i.width,a,l)||this;return e.cx=n||0,e.cy=o||0,e.r=s||0,e}var We,z=function(e,t,i,l){this.x=e,this.y=t,this.width=i,this.height=l},F=(o(je,We=ze),je);function je(e,t,i,l){i=We.call(this,i,l)||this;return i.transform="",i["dominant-baseline"]="auto",i.role="region",i.labelRotation=0,i.baseline="auto",i.id=e,i.x=t.x,i.y=t.y,i["text-anchor"]=t["text-anchor"],i.text=t.text,i["aria-label"]=t.text,i.transform=t.transform,i.labelRotation=t.labelRotation,i["dominant-baseline"]=t["dominant-baseline"],i.baseline=t.baseline,i.dy=t.dy,i}var Ye,V=function(e,t,i,l,a,n,o,s){this.transform="",this["dominant-baseline"]="auto",this.labelRotation=0,this.baseline="auto",this.x=e||0,this.y=t||0,this["text-anchor"]=i||"start",this.text=l||"",this["aria-label"]=l,this.transform=n||"",this.labelRotation=a,this["dominant-baseline"]=o||"auto",this.baseline=o||"",this.dy=s||""},Xe=function(e,t,i,l){this.x1=e,this.y1=t,this.x2=i,this.y2=l},Je=(o(Ke,Ye=g),Ke);function Ke(e,t,i,l,a,n){e=Ye.call(this,e,null,l,i,a,n,null)||this;return e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e}o($e,qe=g);var qe,Ze=$e;function $e(e,t,i,l,a,n,o){e=qe.call(this,e,i,a,o,n,null)||this;return e.d=t.d,e.x=t.x,e.y=t.y,e}var Qe=function(e,t,i,l,a,n,o,s,r,h,d,p){this.d=e,this.innerR=t,this.cx=o,this.cy=s,this.x=i,this.y=l,this.x1=a,this.y1=n,this.start=r,this.end=h,this.radius=d,this.counterClockWise=p};function c(e){for(var t=0,i=0,l=e;i<l.length;i++)t+=l[i];return t}function et(e,t,i,l){i="Near"===l.textAlignment?e.height-i:"Center"===l.textAlignment?e.height/2:t;return i}function tt(e,t,i){var l,a,n=new O.SvgRenderer("heatmapMeasureRotateText"),o=n.createSvg({id:"heatmapMeasureRotateText_svg",width:100,height:100}),i={"font-size":e.size,"font-style":e.fontStyle.toLowerCase(),"font-family":e.fontFamily,"font-weight":e.fontWeight.toLowerCase(),transform:"rotate("+i+", 0, 0)","text-anchor":"middle"},s=n.createText(i,t[0]);if("string"!=typeof t&&1<t.length)for(var r=1,h=t.length;r<h;r++)a=D(t[r],e).height,l=t[r],a=n.createTSpan({x:0,id:"heatmapMeasureRotateText_"+r,y:0+r*a},l),s.appendChild(a);o.appendChild(s),document.body.appendChild(o);i=s.getBoundingClientRect();return P.remove(o),new A(i.right-i.left,i.bottom-i.top)}r.prototype.drawRectangle=function(e,t,i){this.heatMap.enableCanvasRendering?this.drawCanvasRectangle(this.heatMap.canvasRenderer,e,i):(delete e.d,-1===(i=t.appendChild(this.heatMap.renderer.drawRectangle(e))).id.indexOf("Rect")?(i.setAttribute("title","Rect Element"),i.setAttribute("role","img"),i.setAttribute("aria-hidden","false")):(t=this.heatMap.cellSettings.enableCellHighlighting||this.heatMap.allowSelection?0:-1,i.setAttribute("tabindex",t.toString()),i.style.outline="none"))},r.prototype.drawCircle=function(e,t){this.heatMap.enableCanvasRendering?this.drawCanvasCircle(this.heatMap.canvasRenderer,e):(delete e.d,t=t.appendChild(this.heatMap.renderer.drawCircle(e)),e=this.heatMap.cellSettings.enableCellHighlighting?0:-1,t.setAttribute("tabindex",e.toString()),t.style.outline="none")},r.prototype.drawPath=function(e,t,i){this.heatMap.enableCanvasRendering?this.drawCanvasPath(this.heatMap.canvasRenderer,e,t):(delete e.x,delete e.y,i.appendChild(this.heatMap.renderer.drawPath(e)))},r.prototype.createText=function(e,t,i){this.heatMap.enableCanvasRendering?this.canvasDrawText(e,i):(delete e.labelRotation,delete e.baseline,delete e.text,t.appendChild(this.heatMap.renderer.createText(e,i)),e.text=i)},r.prototype.createWrapText=function(e,t,i){var l,a,n={id:e.id,x:e.x,y:e.y,fill:e.fill,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight.toLowerCase(),"text-anchor":e["text-anchor"],transform:e.transform,"dominant-baseline":e["dominant-baseline"],"aria-label":e.text[0]},o=e.text[0];if(this.heatMap.enableCanvasRendering?this.heatMap.canvasRenderer.createText(e,o):l=this.heatMap.renderer.createText(n,o),"string"!=typeof e.text&&1<e.text.length)for(var s=1,r=e.text.length;s<r;s++)a=D(e.text[s],t).height,this.heatMap.enableCanvasRendering?(e.id=e.id+s,e.y+=a,this.heatMap.canvasRenderer.createText(e,e.text[s])):(a=this.heatMap.renderer.createTSpan({x:e.x,id:e.id+s,y:e.y+s*a},e.text[s]),l.appendChild(a));this.heatMap.enableCanvasRendering||i.appendChild(l)},r.prototype.drawLine=function(e,t){this.heatMap.enableCanvasRendering?this.heatMap.canvasRenderer.drawLine(e):(delete e.d,t.appendChild(this.heatMap.renderer.drawLine(e)))},r.prototype.canvasDrawText=function(e,t,i,l,a,n,o){var s=this.heatMap.canvasRenderer.ctx,r=(i=i||e.x,l=l||e.y,this.getOptionValue(e,"font-weight")),h=(P.isNullOrUndefined(r)||"regular"!==r.toLowerCase()||(r="normal"),this.getOptionValue(e,"font-family")),d=-1===e["font-size"].toString().indexOf("px")?e["font-size"]+"px":e["font-size"],p=this.getOptionValue(e,"text-anchor"),r=this.getOptionValue(e,"font-style").toLowerCase()+" "+r+" "+d+" "+h;if("middle"===p&&(p="center"),s.save(),s.fillStyle=e.fill,s.font=r,s.textAlign=p,e.baseline&&(s.textBaseline=e.baseline),s.translate(i,l),s.rotate(e.labelRotation*Math.PI/180),o)for(var g=0;g<a.length;g++)e.y=0!==g?e.y+n:e.y,s.fillText(a[g],e.x-i,e.y-l);else s.fillText(t,e.x-i,e.y-l);s.restore()},r.prototype.getOptionValue=function(e,t){return e[t]},r.prototype.setAttributes=function(e,t){e.ctx.lineWidth=t["stroke-width"];var i=t["stroke-dasharray"];P.isNullOrUndefined(i)||(i=i.split(","),e.ctx.setLineDash([parseInt(i[0],10),parseInt(i[1],10)])),e.ctx.strokeStyle=t.stroke},r.prototype.drawCanvasRectangle=function(e,t,i){var l=e.ctx;e.ctx.save(),e.ctx.beginPath(),e.ctx.globalAlpha=t.opacity,this.setAttributes(e,t),this.drawCornerRadius(e,t),(t["stroke-width"]&&0!==t["stroke-width"]||i)&&e.ctx.stroke(),e.ctx.restore(),e.ctx=l},r.prototype.drawCornerRadius=function(e,t){var i=t.rx,l=t.x,a=t.y,n=t.width,o=t.height;"none"===t.fill&&(t.fill="transparent"),e.ctx.fillStyle=t.fill,o<2*(i=n<2*i?n/2:i)&&(i=o/2),e.ctx.beginPath(),e.ctx.moveTo(l+n-i,a),e.ctx.arcTo(l+n,a,l+n,a+o,i),e.ctx.arcTo(l+n,a+o,l,a+o,i),e.ctx.arcTo(l,a+o,l,a,i),e.ctx.arcTo(l,a,l+n,a,i),e.ctx.closePath(),e.ctx.fill()},r.prototype.drawCanvasCircle=function(e,t){e.ctx.save(),e.ctx.beginPath(),e.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),e.ctx.fillStyle=t.fill,e.ctx.globalAlpha=t.opacity,e.ctx.fill(),this.setAttributes(e,t),t["stroke-width"]&&0!==t["stroke-width"]&&e.ctx.stroke(),e.ctx.restore()},r.prototype.drawCanvasPath=function(e,t,i){var l=t.d.split(" ");e.ctx.save(),e.ctx.beginPath(),e.ctx.globalAlpha=t.opacity,e.ctx.fillStyle=t.fill,this.setAttributes(e,t);for(var a=0;a<l.length;a+=3){var n=parseFloat(l[a+1]),o=parseFloat(l[a+2]);switch(l[a]){case"M":e.ctx.moveTo(n,o);break;case"L":e.ctx.lineTo(n,o);break;case"A":case"a":e.ctx.arc(i.x,i.y,i.radius,.0174533*i.start,.0174533*i.end,!1),a="a"===l[a]?a+13:a+5;break;case"Z":e.ctx.closePath()}}e.ctx.fill(),t["stroke-width"]&&0!==t["stroke-width"]&&e.ctx.stroke(),e.ctx.restore()};var it=r;function r(e){this.heatMap=e}function lt(e,t,i){var l=[];switch(t.textOverflow){case"Wrap":l=ot(e,i,t);break;case"Trim":l.push(I(i,e,t));break;default:l.push(st(i,e,t))}return l}function at(e,t){if(t)for(var i=0;i<e.length;i++)e[i]=P.SanitizeHtmlHelper.sanitize(e[i]);return e}function nt(e){for(var t=!1,i=0;i<e.length;i++)if(-1!==e[i].indexOf("<br>")||-1!==e[i].indexOf("<br/>")){t=!0;break}return t}function ot(e,t,i,l){for(var a,n=e.split(" "),o="",s=[],r=0,h=n.length;r<h;r++)a=n[r],D(o.concat(a),i).width<t?o=o.concat((""===o?"":" ")+a):""!==o?(o=l?o.concat((""===o?"":" ")+a):o,s.push(I(t,o,i)),o=l?"":a):s.push(I(t,a,i)),o&&r===h-1&&s.push(I(t,o,i));return s}function I(e,t,i){var l=t;if(e<D(t,i).width)for(var a=t.length-1;0<=a;--a)if(D(l=t.substring(0,a)+"...",i).width<=e)return l;return l}function st(e,t,i){var l=t;if(e<D(t,i).width)for(var a=t.length-1;0<=a;--a)if(D(l=t.substring(0,a),i).width<=e)return l;return l}var rt=function(e,t,i,l,a){this.id=e,this.x1=t,this.x2=i,this.y1=l,this.y2=a},ht=function(e,t){this.color=e,this.colorStop=t};function dt(e,t,i,l,a,n,o,s){var r=document.getElementById(a),h=D(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}),d=h.width+5;t=(t=l<t+d?t-d:t)<0?5:t,r?(r.innerText=e,r.style.top=(i+15).toString()+"px",r.style.left=(t+15).toString()+"px"):((r=P.createElement("div",{id:a})).style.cssText="top:"+(i+15).toString()+"px;left:"+(t+15).toString()+"px;background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(112, 112, 112); padding-left : 3px; padding-right : 2px;padding-bottom : 2px; padding-top : 2px; font-size:12px; font-family: Segoe UI",r.innerText=e,n.appendChild(r)),e===s.titleSettings.text?r.style.width=t+15+h.width+7>s.availableSize.width?(s.availableSize.width-(t+15)).toString()+"px":"":(r.style.left=t+15+h.width+7>s.availableSize.width?(s.availableSize.width-(h.width+7)).toString()+"px":t.toString()+"px",r.style.top=i+15+h.height+6>s.availableSize.height?(i-(h.height+6)-10).toString()+"px":r.style.top),o&&(P.isNullOrUndefined(s.tooltipTimer)||window.clearTimeout(s.tooltipTimer),s.tooltipTimer=setTimeout(function(){C(a)},1500))}function C(e){e=gt(e);e&&(P.remove(e),pt())}function pt(){C("heatmapmeasuretext")}function gt(e){return document.getElementById(e)}function ct(e,t,i,l){var a=new Date(e);switch(t=Math.ceil(t*l),i){case"Years":a.setFullYear(a.getFullYear()+t);break;case"Months":a.setMonth(a.getMonth()+t);break;case"Days":a.setDate(a.getDate()+t);break;case"Hours":a.setHours(a.getHours()+t);break;case"Minutes":a.setMinutes(a.getMinutes()+t)}return a}var E=function(e,t){this.region=new z(0,0,0,0),this.text=e,this.region=t};function ut(e,t,i){for(var l,a,n,o=e.length,s=0;s<o;s++)if(t>=(a=(l=e[s]).region).x&&t<=a.x+a.width&&i>=a.y&&i<=a.y+a.height){n=l.text;break}return n}var mt=function(){},yt=function(e,t,i,l,a,n){this.pathX1=e,this.pathY1=t,this.pathX2=i,this.pathY2=l,this.pathX3=a,this.pathY3=n},xt=function(e,t,i,l,a,n){this.x=e,this.y=t,this.width=i,this.height=l,this.label=a,this.id=n},bt=function(e,t,i,l,a,n,o){this.x=e,this.y=t,this.width=i,this.height=l,this.value=a,this.visible=n,this.currentPage=o},vt=function(e,t,i,l){this.visible=e,this.value=t,this.startValue=i,this.endValue=l};function St(e){e="transparent"===e?"white":e;var t=document.getElementById("heatmapmeasuretext"),t=(t.style.color=e,(e=window.getComputedStyle(t).color).replace(/[()RGBrgba ]/g,"").split(","));return Ct(new Te(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)))}function Ct(e){return"#"+ft(e.R)+ft(e.G)+ft(e.B)}function ft(e){e=e.toString(16);return 1===e.length?"0"+e:e}function Mt(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?new Te(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)):new Te(255,255,255)}function wt(e,t,i,l){return e?t.replace("{value}",l(i)):l(i)}var Lt,Tt,Rt=function(e,t){this.x=e,this.y=t},o=(Lt=function(e,t){return(Lt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}Lt(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),h=function(e,t,i,l){var a,n=arguments.length,o=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,l);else for(var s=e.length-1;0<=s;s--)(a=e[s])&&(o=(n<3?a(o):3<n?a(t,i,o):a(t,i))||o);return 3<n&&o&&Object.defineProperty(t,i,o),o},o=(Tt=P.ChildProperty,o(d,Tt),d.prototype.computeSize=function(e,t,i){var l;new A(0,0);this.titleSize=e.getTitleSize(e,10),this.maxLabelSize=e.getMaxLabelSize(e,t),this.getMultilevelLabelsHeight(e,i,t);for(var a=0;a<this.multiLevelLabels.length;a++)l=e.multiLevelLabelSize(10,a),this.multiLevelSize.push(l)},d.prototype.multiPosition=function(e,t){var i,l,a="Horizontal"===e.orientation?10:20,n=new Rt(0,0);return"Horizontal"===e.orientation?(i=e.maxLabelSize.height+a+(0===e.angle||180===e.angle||360===e.angle?0:a),l=this.xAxisMultiLabelHeight[t-1],n.x=e.isInversed?e.rect.x+e.rect.width:e.rect.x,n.y=0===t?e.rect.y+(e.opposedPosition?-i:i):e.multiLevelPosition[t-1].y+(e.opposedPosition?-l:l)):(i=e.maxLabelSize.width+a,l=0!==t&&this.multiLevelSize[t-1].width,n.x=0===t?e.rect.x-(e.opposedPosition?-i:i):e.multiLevelPosition[t-1].x-(e.opposedPosition?-(l+a):l+a),n.y=e.isInversed?e.rect.y:e.rect.y+e.rect.height),n},d.prototype.multiLevelLabelSize=function(e,t){for(var i=new A(0,0),l=this.multiLevelLabels,a=l[t].categories,n=0;n<a.length;n++){var o=D(a[n].text,l[t].textStyle);i.width=(i.width>o.width?i:o).width,i.height=(i.height>o.height?i:o).height}var s=("Horizontal"===this.orientation?this.xAxisMultiLabelHeight:this.yAxisMultiLabelHeight)[t];return(this.opposedPosition?this.farSizes:this.nearSizes).push(s),i},d.prototype.getMultilevelLabelsHeight=function(l,a,n){var o,s,r,h,d=[],p="Vertical"===l.orientation,g="Vertical"===l.orientation?20:10;this.multiLevelLabels.map(function(t,i){t.categories.map(function(e){r="number"==typeof e.start?e.start:Number(new Date(e.start)),h="number"==typeof e.end?e.end:Number(new Date(e.end)),""!==e.text&&null!==e.start&&null!==e.end&&(o=D(e.text,t.textStyle),s=p?o.width:o.height,r=n.heatMapAxis.calculateLeftPosition(l,r,e.start,a),h=n.heatMapAxis.calculateWidth(l,e.end,h,a),o=D(e.text,t.textStyle),h=null===e.maximumTextWidth?Math.abs(h-r):e.maximumTextWidth,o.width>h-g&&"Wrap"===t.overflow&&!p&&(s*=ot(e.text,h-g,t.textStyle).length),d[i]=!d[i]||d[i]<s?s+g:d[i])})}),p?this.yAxisMultiLabelHeight=d:this.xAxisMultiLabelHeight=d},d.prototype.getTitleSize=function(e,t){var i=new A(0,0);return this.title.text&&((i=D(this.title.text,this.title.textStyle)).height+=t),(e.opposedPosition?this.farSizes:this.nearSizes).push(i.height),i},d.prototype.getMaxLabelSize=function(e,t){var i=new A(0,0),l=this.axisLabels,a=0<e.border.width||0<e.multiLevelLabels.length?10:0,n=1,o="DateTime"===e.valueType&&"None"!==e.showLabelOn||"Wrap"===e.textStyle.textOverflow||"Trim"===e.textStyle.textOverflow?t.initialClipRect.width/e.axisLabelSize:t.initialClipRect.width/e.axisLabels.length,s=(e.angle=e.labelRotation,e.isIntersect=!1,nt(l));if(("Horizontal"===e.orientation&&("Rotate45"===e.labelIntersectAction||e.labelRotation%180==0&&"Trim"===e.labelIntersectAction||e.enableTrim)||"MultipleRows"===e.labelIntersectAction)&&"Wrap"!==e.textStyle.textOverflow&&"Trim"!==e.textStyle.textOverflow){var r=t.initialClipRect.x+(e.isInversed?t.initialClipRect.width:0),h=void 0,d=void 0;this.clearMultipleRow();for(var p=0,g=l.length;p<g;p++){var c=D(v=l[p],e.textStyle),u="DateTime"===e.valueType&&"None"!==e.showLabelOn?e.dateTimeAxisLabelInterval[p]*o:o,m=r+(e.isInversed?-(o+c.width)/2:(o-c.width)/2),c=(m=m<t.initialClipRect.x?t.initialClipRect.x:m)+c.width;if(e.isInversed){if(P.isNullOrUndefined(d))d=m;else if(d<c&&"MultipleRows"!==e.labelIntersectAction){"Rotate45"!==e.labelIntersectAction||s||e.enableTrim?e.isIntersect=!0:e.angle=45;break}d=m}else{if(P.isNullOrUndefined(h))h=c;else if(m<h&&"MultipleRows"!==e.labelIntersectAction){"Rotate45"!==e.labelIntersectAction||s||e.enableTrim?e.isIntersect=!0:e.angle=45;break}h=c}r+=e.isInversed?-u:u,"Horizontal"===e.orientation&&"MultipleRows"===e.labelIntersectAction&&0===e.labelRotation&&this.multipleRow.push(new we(m,c,n,v,1))}"Horizontal"===e.orientation&&"MultipleRows"===e.labelIntersectAction&&e.isInversed&&(this.multipleRow=this.multipleRow.reverse())}for(var y=1,p=0;p<l.length;p++){var x,b=this.multipleRow,v=void 0,S=(v=e.enableTrim||"Trim"===e.textStyle.textOverflow&&-1===l[p].indexOf("<br>")&&-1===l[p].indexOf("<br/>")?I("Trim"===e.textStyle.textOverflow&&"Horizontal"===e.orientation?o:e.maxLabelLength,l[p],e.textStyle):l[p],[]);if("Wrap"!==e.textStyle.textOverflow&&!s||e.enableTrim)s&&e.enableTrim&&(S=v.split(/<br\s*\/?>/,-1),x=I(e.maxLabelLength,S[0],e.textStyle),v=-1===v.indexOf("<br>")&&-1===v.indexOf("<br/>")||-1!==x.indexOf("...")?x:x+"...",S=[]),S.push(v);else{var C="Horizontal"===e.orientation?o:e.maxLabelLength;if(s)for(var S=v.split(/<br\s*\/?>/,-1),f=0;f<S.length;f++)S[f]=I(C,S[f],e.textStyle);else S=ot(v,C,e.textStyle);if(y=S.length>y&&!e.enableTrim?S.length:y,"Vertical"===e.orientation||"Horizontal"===e.orientation&&e.angle%180!=0)for(var M=0,w=0;w<S.length;w++){var L=D(S[w],e.textStyle);L.width>M&&(M=L.width,v=S[w])}if("Vertical"===e.orientation)for(var T=t.initialClipRect.height/(e.axisLabelSize/e.axisLabelInterval),w=0;w<S.length;w++)D(v,e.textStyle).height*S.length>T-10&&0<S.length&&90!==e.angle&&270!==e.angle&&(S.pop(),0<S.length)&&(S[S.length-1]=S[S.length-1]+"...",S[S.length-1]=I(e.maxLabelLength,S[S.length-1],e.textStyle))}var R=e.angle%180==0?D(v,e.textStyle):tt(e.textStyle,S,e.angle);if(i.width=(i.width>R.width?i:R).width,"MultipleRows"===e.labelIntersectAction&&"Horizontal"===e.orientation&&"Wrap"!==e.textStyle.textOverflow&&"Trim"!==e.textStyle.textOverflow&&0<p&&0===e.labelRotation){b[p].end>=t.initialClipRect.width&&p<l.length-1&&(b[p].row=b[p].row+1);for(var O=1;O<=e.multilevel.length;O++)if(b[p].start<b[p-1].end){if(e.multilevel[O]<b[p].start){n=O;break}if(O===e.multilevel.length-1){n=e.multilevel.length;break}}else if(R.width<o)for(var z=1;z<=e.multilevel.length;z++)if(e.multilevel[z]<b[p].start){b[n=z].row=n;break}i.height=i.height>R.height*n+.5*R.height/2*(n-1)?i.height:R.height*n+.5*R.height/2*n,this.multipleRow[p].index=n,e.multilevel[n]=b[p].end}else"Horizontal"===e.orientation&&"MultipleRows"===e.labelIntersectAction&&0===p&&0===e.labelRotation&&"Wrap"!==e.textStyle.textOverflow&&"Trim"!==e.textStyle.textOverflow&&(e.multilevel[1]=b[p].end),i.height=(i.height>R.height?i:R).height}return i.height=e.angle%180==0?i.height*y:i.height,20<=t.cellSettings.border.width&&"Horizontal"!==e.orientation&&(i.width=i.width+t.cellSettings.border.width/4),(e.opposedPosition?this.farSizes:this.nearSizes).push("Horizontal"===e.orientation?i.height:i.width+a),i},d.prototype.calculateNumericAxisLabels=function(e){var t,i,l=0,a=0,n=this.interval||1,o=(e.adaptorModule&&e.isCellData&&(i=("Horizontal"===this.orientation?e.adaptorModule.adaptiveXMinMax:e.adaptorModule.adaptiveYMinMax).min,t=("Horizontal"===this.orientation?e.adaptorModule.adaptiveXMinMax:e.adaptorModule.adaptiveYMinMax).max),l=P.isNullOrUndefined(this.minimum)?i||0:this.minimum,a=P.isNullOrUndefined(this.maximum)?t||this.maxLength*this.increment:this.maximum,this.minimum&&this.maximum&&a<l&&(i=l,l=a,a=i),a=P.isNullOrUndefined(this.maximum)?t||a+l:a,P.isNullOrUndefined(this.labelFormat)?"":this.labelFormat),s=null!==o.match("{value}");this.format=e.intl.getNumberFormat({format:s?"":o});for(var r=l;r<=a;r+=n*this.increment){var h=wt(s,o,r,this.format);this.axisLabels.push(h)}this.min=0,this.axisLabelSize=Math.floor((a-l)/this.increment+1),this.max=this.axisLabelSize-1,this.axisLabelInterval=n;for(r=l;r<=a;r+=this.increment){h=wt(s,o,r,this.format);this.tooltipLabels.push(h),this.labelValue.push(r)}this.labelValue=this.isInversed?this.labelValue.reverse():this.labelValue},d.prototype.calculateCategoryAxisLabels=function(){var e,t=0<(t=this.labels||[]).length?t:this.jsonCellLabel,i=P.isNullOrUndefined(this.minimum)||this.minimum instanceof Date?0:this.minimum,l=P.isNullOrUndefined(this.maximum)||this.maximum instanceof Date?this.maxLength:this.maximum,a=this.interval||1,n=P.isNullOrUndefined(this.labelFormat)?"":this.labelFormat,o=null!==n.match("{value}");if(!P.isNullOrUndefined(this.minimum)&&!P.isNullOrUndefined(this.maximum)&&l<i&&(e=i,i=l,l=e),t&&0<t.length)for(var s=i;s<=l;s+=a){var r=P.isNullOrUndefined(t[s])?o?n.replace("{value}",s.toString()):s.toString():o?n.replace("{value}",t[s].toString()):t[s].toString();this.axisLabels.push(r)}else for(s=i;s<=l;s+=a){r=o?n.replace("{value}",s.toString()):s.toString();this.axisLabels.push(r)}for(s=i;s<=l;s++)this.tooltipLabels.push(P.isNullOrUndefined(t[s])?o?n.replace("{value}",s.toString()):s.toString():o?n.replace("{value}",t[s].toString()):t[s].toString()),this.labelValue.push((P.isNullOrUndefined(t[s])?s:t[s]).toString());this.min=i,this.max=l,this.axisLabelSize=l-i+1,this.axisLabelInterval=a,this.labelValue=this.isInversed?this.labelValue.reverse():this.labelValue},d.prototype.calculateDateTimeAxisLabel=function(e){var t=this.interval||1,i={skeleton:"full",type:"dateTime"},l=e.intl.getDateParser(i),i=e.intl.getDateFormat(i),a=null,n=null,a=(e.adaptorModule&&e.isCellData&&(a=("Horizontal"===this.orientation?e.adaptorModule.adaptiveXMinMax:e.adaptorModule.adaptiveYMinMax).min,n=("Horizontal"===this.orientation?e.adaptorModule.adaptiveXMinMax:e.adaptorModule.adaptiveYMinMax).max),this.minimum||a||null),n=this.maximum||n||null;if(null===a&&null===n){for(var o=0,s=this.maxLength*this.increment,r=o;r<=s;r+=t*this.increment)this.axisLabels.push(r.toString()),this.tooltipLabels.push(r.toString()),this.labelValue.push(r.toString());this.min=0,this.max=this.maxLength,this.axisLabelSize=(s-o)/this.increment+1,this.axisLabelInterval=t}else{null!==a&&null===n?s=ct(o=Date.parse(l(i(new Date(_.DataUtil.parse.parseJson({val:a}).val)))),this.maxLength,this.intervalType,this.increment).getTime():null===a&&null!==n?o=ct(s=Date.parse(l(i(new Date(_.DataUtil.parse.parseJson({val:n}).val)))),-this.maxLength,this.intervalType,this.increment).getTime():(o=Date.parse(l(i(new Date(_.DataUtil.parse.parseJson({val:a}).val)))),s=Date.parse(l(i(new Date(_.DataUtil.parse.parseJson({val:n}).val))))),this.format=e.intl.getDateFormat({format:this.labelFormat,skeleton:this.getSkeleton()});for(var h=o;h<=s;){var d=this.format(new Date(h));this.axisLabels.push(d),"None"!==this.showLabelOn&&(t=this.calculateLabelInterval(h),this.dateTimeAxisLabelInterval.push(t)),h=ct(h,t,this.intervalType,this.increment).getTime()}for(this.min=0,this.axisLabelInterval=t,this.axisLabelSize=this.getTotalLabelLength(o,s),this.max=this.axisLabelSize-1,h=o;h<=s;){d=this.format(new Date(h));this.tooltipLabels.push(d),this.labelValue.push(new Date(h)),h=ct(h,1,this.intervalType,this.increment).getTime()}}this.labelValue=this.isInversed?this.labelValue.reverse():this.labelValue},d.prototype.calculateLabelInterval=function(e){var t=new Date(e).getFullYear(),i=new Date(e).getMonth()+1,l=new Date(e).getDate();return"Years"===this.showLabelOn||"Months"===this.showLabelOn?"Years"===this.showLabelOn&&"Months"===this.intervalType?Math.ceil(12/this.increment):(t="Years"===this.showLabelOn?t%4==0?366:365:new Date(t,i,0).getDate(),t+=1-l,"Days"===this.intervalType?Math.ceil(t/this.increment):"Hours"===this.intervalType?Math.ceil(24*t/this.increment):"Minutes"===this.intervalType?Math.ceil(24*t*60/this.increment):1):"Days"===this.showLabelOn?"Hours"===this.intervalType?Math.ceil(24/this.increment):"Minutes"===this.intervalType?Math.ceil(1440/this.increment):1:"Hours"===this.showLabelOn&&(i=new Date(e).getMinutes(),"Minutes"===this.intervalType)?Math.ceil((60-i)/this.increment):1},d.prototype.getSkeleton=function(){var e="Years"===this.intervalType?"yMMM":"Months"===this.intervalType?"MMMd":"Days"===this.intervalType?"yMd":"Hours"===this.intervalType?"EHm":(this.intervalType,"Hms");return e},d.prototype.getTotalLabelLength=function(e,t){var i=0,l=new Date(e),a=new Date(t);switch(this.intervalType){case"Years":var n=(a.getFullYear()-l.getFullYear())/this.increment+1,i=Math.floor(n);break;case"Months":var n=12*(a.getFullYear()-l.getFullYear());i=(n=(n-=l.getMonth())+a.getMonth())<=0?1:Math.floor(n/this.increment+1);break;case"Days":o=Math.abs(l.getTime()-a.getTime()),n=Math.floor(o/864e5),i=Math.floor(n/this.increment+1);break;case"Hours":var o=Math.abs(l.getTime()-a.getTime()),n=Math.floor(o/36e5);i=Math.floor(n/this.increment)+1;break;case"Minutes":o=Math.abs(l.getTime()-a.getTime());n=Math.floor(o/6e4);i=Math.floor(n/this.increment)+1}return i},d.prototype.clearAxisLabel=function(){this.axisLabels=[],this.tooltipLabels=[],this.dateTimeAxisLabelInterval=[],this.labelValue=[]},d.prototype.clearMultipleRow=function(){this.multipleRow=[],this.multilevel=[]},d.prototype.destroy=function(){this.axisLabels=null,this.multipleRow=null,this.rect=null,this.nearSizes=null,this.farSizes=null,this.maxLabelSize=null,this.titleSize=null,this.labelValue=null,this.format=null,this.multilevel=[],this.tooltipLabels=[],this.dateTimeAxisLabelInterval=[],this.jsonCellLabel=[],this.multiLevelSize=[],this.xAxisMultiLabelHeight=[],this.yAxisMultiLabelHeight=[],this.multiLevelPosition=[]},h([P.Complex({text:"",textStyle:t.axisTitleFont},te)],d.prototype,"title",void 0),h([P.Property(!1)],d.prototype,"opposedPosition",void 0),h([P.Property(null)],d.prototype,"labels",void 0),h([P.Complex(t.axisLabelFont,k)],d.prototype,"textStyle",void 0),h([P.Property(0)],d.prototype,"labelRotation",void 0),h([P.Property(!1)],d.prototype,"isInversed",void 0),h([P.Property("Category")],d.prototype,"valueType",void 0),h([P.Property(1)],d.prototype,"increment",void 0),h([P.Property("None")],d.prototype,"showLabelOn",void 0),h([P.Property(null)],d.prototype,"minimum",void 0),h([P.Property(null)],d.prototype,"maximum",void 0),h([P.Property(null)],d.prototype,"interval",void 0),h([P.Property("")],d.prototype,"labelFormat",void 0),h([P.Property("Days")],d.prototype,"intervalType",void 0),h([P.Property("Trim")],d.prototype,"labelIntersectAction",void 0),h([P.Property(!1)],d.prototype,"enableTrim",void 0),h([P.Property(35)],d.prototype,"maxLabelLength",void 0),h([P.Complex({color:"#b5b5b5",width:0,type:"Rectangle"},he)],d.prototype,"border",void 0),h([P.Collection([],i)],d.prototype,"multiLevelLabels",void 0),d);function d(){var e=null!==Tt&&Tt.apply(this,arguments)||this;return e.multipleRow=[],e.rect=new z(void 0,void 0,0,0),e.nearSizes=[],e.farSizes=[],e.maxLabelSize=new A(0,0),e.titleSize=new A(0,0),e.multilevel=[],e.axisLabels=[],e.tooltipLabels=[],e.labelValue=[],e.axisLabelSize=0,e.axisLabelInterval=0,e.dateTimeAxisLabelInterval=[],e.maxLength=0,e.min=0,e.max=0,e.isIntersect=!1,e.jsonCellLabel=[],e.multiLevelSize=[],e.xAxisMultiLabelHeight=[],e.yAxisMultiLabelHeight=[],e.multiLevelPosition=[],e}u.prototype.renderAxes=function(){this.initialClipRect=this.heatMap.initialClipRect;for(var e,t,i=this.heatMap,l=(i.enableCanvasRendering||(e=this.heatMap.renderer.createGroup({id:i.element.id+"AxisCollection"})),this.heatMap.axisCollections),a=0,n=l.length;a<n;a++){var o=l[a];"Horizontal"===o.orientation?(i.enableCanvasRendering||(t=this.heatMap.renderer.createGroup({id:i.element.id+"XAxisGroup"})),this.drawXAxisLine(t,o),this.drawXAxisTitle(o,t,o.rect),this.drawXAxisLabels(o,t,o.rect)):(t=i.renderer.createGroup({id:i.element.id+"YAxisGroup"}),this.drawYAxisLine(t,o),this.drawYAxisTitle(o,t,o.rect),this.drawYAxisLabels(o,t,o.rect)),0<o.multiLevelLabels.length&&this.drawMultiLevels(t,o),i.enableCanvasRendering||e.appendChild(t)}i.enableCanvasRendering||this.heatMap.svgObject.appendChild(e)},u.prototype.drawXAxisLine=function(e,t){t=this.initialClipRect.y+(t.opposedPosition?0:this.initialClipRect.height),t=new Je(this.heatMap.element.id+"_XAxisLine",new Xe(this.initialClipRect.x,t,this.initialClipRect.x+this.initialClipRect.width,t),"transparent",0);this.drawSvgCanvas.drawLine(t,e)},u.prototype.drawYAxisLine=function(e,t){t=this.initialClipRect.x+(t.opposedPosition?this.initialClipRect.width:0),t=new Je(this.heatMap.element.id+"_YAxisLine",new Xe(t,this.initialClipRect.y,t,this.initialClipRect.height+this.initialClipRect.y),"transparent",0);this.drawSvgCanvas.drawLine(t,e)},u.prototype.drawXAxisTitle=function(e,t,i){var l,a,n,o,s,r,h="0px"===e.textStyle.size?0:10,h=i.y+(e.opposedPosition?-(e.maxLabelSize.height+h+c(e.xAxisMultiLabelHeight)):e.maxLabelSize.height+h+c(e.xAxisMultiLabelHeight));e.title.text&&(l=this.heatMap,a=e.title,o=D(n=this.heatMap.enableHtmlSanitizer?P.SanitizeHtmlHelper.sanitize(a.text):a.text,a.textStyle),r=this.padding,s="Near"===a.textStyle.textAlignment?"start":"Far"===a.textStyle.textAlignment?"end":"middle",r=e.opposedPosition?-(r+o.height/4):r+3*o.height/4,e=new F(l.element.id+"_XAxisTitle",new V(i.x+Pe(i.width,0,0,a.textStyle),h+r,s,n),a.textStyle,a.textStyle.color||l.themeStyle.axisTitle),this.drawSvgCanvas.createText(e,t,n))},u.prototype.drawYAxisTitle=function(e,t,i){var l,a,n,o,s;e.title.text&&(l=e.title,a=this.heatMap,n=e.opposedPosition?90:-90,s="Near"===l.textStyle.textAlignment?"start":"Far"===l.textStyle.textAlignment?"end":"middle",o=10,o=e.opposedPosition?10:-10,o="0px"===e.textStyle.size?0:o,o=i.x+o+(e.opposedPosition?e.maxLabelSize.width+c(e.yAxisMultiLabelHeight):-(e.maxLabelSize.width+c(e.yAxisMultiLabelHeight))),i=i.y+et(i,0,0,l.textStyle)+(e.opposedPosition?this.padding:-this.padding),e=this.heatMap.enableHtmlSanitizer?P.SanitizeHtmlHelper.sanitize(l.text):l.text,s=new F(a.element.id+"_YAxisTitle",new V(o,i-this.padding,s,e,n,"rotate("+n+","+o+","+i+")","auto"),l.textStyle,l.textStyle.color||a.themeStyle.axisTitle),this.heatMap.enableCanvasRendering?this.drawSvgCanvas.canvasDrawText(s,e,o,i):this.drawSvgCanvas.createText(s,t,e))},u.prototype.calculateVisibleLabels=function(){for(var e,t=this.heatMap.axisCollections,i=this.heatMap.dataSourceSettings,l=!(i&&i.isJsonData&&"Cell"===i.adaptorType),a=0,n=t.length;a<n;a++)"Numeric"===(e=t[a]).valueType&&l?(e.clearAxisLabel(),e.calculateNumericAxisLabels(this.heatMap)):"DateTime"===e.valueType&&l?(e.clearAxisLabel(),e.calculateDateTimeAxisLabel(this.heatMap)):"Category"===e.valueType&&(e.clearAxisLabel(),e.calculateCategoryAxisLabels()),e.tooltipLabels=e.isInversed?e.tooltipLabels.reverse():e.tooltipLabels},u.prototype.measureAxis=function(e){for(var t=this.heatMap,i=t.axisCollections,l=i.length-1;0<=l;l--){var a,n="0px"===(a=i[l]).textStyle.size?0:this.padding;a.nearSizes=[],a.farSizes=[],a.computeSize(a,t,e),a.opposedPosition?"Horizontal"===a.orientation?(e.y+=c(a.farSizes)+n,e.height-=c(a.farSizes)+n):e.width-=c(a.farSizes)+n:"Horizontal"===a.orientation?e.height-=c(a.nearSizes)+n:(e.x+=c(a.nearSizes)+n,e.width-=c(a.nearSizes)+n)}},u.prototype.calculateAxisSize=function(e){for(var t=this.heatMap.axisCollections,i=0,l=t.length;i<l;i++){var a=t[i];a.rect=P.extend({},e,null,!0),"Horizontal"===a.orientation&&0!==a.multiLevelLabels.length&&(a.opposedPosition&&(a.rect.y+=0===a.angle||180===a.angle||360===a.angle?0:this.padding,this.heatMap.initialClipRect.y+=0===a.angle||180===a.angle||360===a.angle?0:this.padding),e.height-=0===a.angle||180===a.angle||360===a.angle?0:this.padding),"Horizontal"!==a.orientation||a.opposedPosition||(a.rect.y=e.y+e.height,a.rect.height=0),"Vertical"===a.orientation&&a.opposedPosition&&(a.rect.x=e.x+e.width,a.rect.width=0),a.multiLevelPosition=[];for(var n=0;n<a.multiLevelLabels.length;n++){var o=a.multiPosition(a,n);a.multiLevelPosition.push(o)}}},u.prototype.drawXAxisLabels=function(e,t,i){var l=this.heatMap,a=e.axisLabels,n=5<this.heatMap.cellSettings.border.width?this.heatMap.cellSettings.border.width/2:0,o=(i.width-n)/e.axisLabelSize,s=0,r=e.interval||1,h=i.width/(e.axisLabelSize/e.axisLabelInterval),d=e.axisLabelInterval;if(0<h)for(;h<parseInt(e.textStyle.size,10);)h=i.width/(e.axisLabelSize/(d+=1));else d=e.tooltipLabels.length;e.axisLabelInterval<d&&(s=d,a=e.tooltipLabels,r=d);var p,g,c=i.x+(e.isInversed?i.width:0),u=e.angle,m=this.padding;l.enableCanvasRendering||(p=this.heatMap.renderer.createGroup({id:l.element.id+"XAxisLabels"}),g=this.heatMap.renderer.createGroup({id:l.element.id+"XAxisLabelBorder"})),e.isInversed&&"MultipleRows"===e.labelIntersectAction&&e.multipleRow.reverse();for(var y=nt(a),x=0,b=a.length;x<b;x++){var v,S=new z(c,i.y,o,i.height),C=D(a[x],e.textStyle),f="Wrap"!==e.textStyle.te