o){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isDisabled=true;w.isRestricted=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}k._applyCellStyle(w,v,l);return true}if(r==0){if(g!="none"){if(k._clicks==undefined){k._clicks=0}k._clicks++;if(c){k._clicks++}if(k._clicks==1){k.selection={from:d,to:d}}else{var u=k.selection.from;var q=u<=d?u:d;var t=u<=d?d:u;if(q){var m=new Date(q.getFullYear(),q.getMonth(),q.getDate())}if(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59)}k.selection={from:m,to:n};k._clicks=0}}else{if(k.selection==null||k.selection.from==null){k.selection={from:d,to:d};if(k._clicks==undefined){k._clicks=0}k._clicks++;if(k._clicks==2){k._clicks=0}}}}var p=function(y){if(y==null){return new Date()}var x=new Date();x.setHours(0,0,0,0);x.setFullYear(y.getFullYear(),y.getMonth(),y.getDate());return x};if(!w.isOtherMonth&&p(o).toString()==p(d).toString()){k.value._setMonth(d.getMonth()+1);k.value._setDay(d.getDate());k.value._setYear(d.getFullYear());k._raiseEvent("2");k._raiseEvent("5",{selectionType:g})}w.isSelected=false;w.isDisabled=h;if(p(o)o){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isRestricted=true;w.isDisabled=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}if(!w.isDisabled){if(p(o)>=p(k.selection.from)&&p(o)<=p(k.selection.to)){w.isSelected=true}}else{if(!k.allowRestrictedDaysInRange&&p(o)>=p(k.selection.from)&&k.selection.to==k.selection.from){h=true}}}}}k._applyCellStyle(w,v,l)});if(k.selectionMode=="range"&&k._clicks==0){k._raiseEvent(7,{selectionType:g});return}else{if(k.selectionMode=="range"){return}}if(e!=d){k._raiseEvent(7,{selectionType:g});if(this.change){this.change(d)}}},_getSelectedDate:function(){var d=a.data(this.element,"View"+this.element.id);if(d==undefined||d==null){return}if(this.view!="month"){return this.selectedDate}for(var c=0;c0&&g.html().toLowerCase().indexOf("span")!=-1){g.css("cursor","default")}}}g.removeAttr("aria-selected");if(c.isSelected&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected");b+=" "+this.toThemeProperty("jqx-fill-state-pressed");g.attr("aria-selected",true);this.host.removeAttr("aria-activedescendant").attr("aria-activedescendant",g[0].id);var f=c.getDate();if(this._isDisabled(f)){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected-invalid")}}if(c.isHighlighted&&c.isVisible&&this.enableHover){if(!c.isDisabled){b+=" "+this.toThemeProperty("jqx-calendar-cell-hover");b+=" "+this.toThemeProperty("jqx-fill-state-hover")}}b+=" "+this.toThemeProperty("jqx-calendar-cell-"+this.view);if(c.isToday&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-today")}g[0].className=b;if(this.specialDates.length>0){var h=this;a.each(this.specialDates,function(){if(this.Class!=undefined&&this.Class!=null&&this.Class!=""){g.removeClass(this.Class)}else{g.removeClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))}var i=c.getDate();if(i.getFullYear()==this.Date.getFullYear()&&i.getMonth()==this.Date.getMonth()&&i.getDate()==this.Date.getDate()){if(c.tooltip==null&&this.Tooltip!=null){c.tooltip=this.Tooltip;if(a(g).jqxTooltip){var j=this.Class;a(g).jqxTooltip({value:{cell:c,specialDate:this.Date},name:h.element.id,content:this.Tooltip,position:"mouse",theme:h.theme,opening:function(k){if(g.hasClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))){return true}if(g.hasClass(j)){return true}return false}})}}g.removeClass(e.toThemeProperty("jqx-calendar-cell-othermonth"));g.removeClass(e.toThemeProperty("jqx-calendar-cell-weekend"));if(this.Class==undefined||this.Class==""){g.addClass(e.toThemeProperty("jqx-calendar-cell-specialDate"));return false}else{g.addClass(this.Class);return false}}})}},_applyCellStyles:function(){var f=a.data(this.element,"View"+this.element.id);if(f==undefined||f==null){return}for(var e=0;e=0?i:i+7);var c=Math.floor((j.getTime()-e.getTime()-(j.getTimezoneOffset()-e.getTimezoneOffset())*60000)/86400000)+1;var f;if(i<4){f=Math.floor((c+i-1)/7)+1;if(f>52){var g=new Date(j.getFullYear()+1,0,1);var b=g.getDay()-h;b=b>=0?b:b+7;f=b<4?1:53}}else{f=Math.floor((c+i-1)/7)}return f},renderColumnHeader:function(w){if(!this.showDayNames){return}var t=a("");t.find("table").addClass(this.toThemeProperty("jqx-reset"));t.find("tr").addClass(this.toThemeProperty("jqx-reset"));t.find("td").css({background:"transparent",padding:1,margin:0,border:"none"});t.addClass(this.toThemeProperty("jqx-reset"));t.addClass(this.toThemeProperty("jqx-widget-content"));t.addClass(this.toThemeProperty("jqx-calendar-column-header"));this.columnHeader.append(t);var d=this.getVisibleDate();var h=this.getFirstDayOfWeek(d);var m=h.dayOfWeek;var x=this.getWeekOfYear(h);var q=this.firstDayOfWeek;var v=this.localization.calendar.days.names;var n=new Array();var g=h;var o=(w.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){o=(w.width()-2)/7}for(var s=0;s<7;s++){var f=v[q];if(this.rtl){f=v[6-q]}switch(this.dayNameFormat){case"default":f=this.localization.calendar.days.namesAbbr[q];if(this.rtl){f=this.localization.calendar.days.namesAbbr[6-q]}break;case"shortest":f=this.localization.calendar.days.namesShort[q];if(this.rtl){f=this.localization.calendar.days.namesShort[6-q]}break;case"firstTwoLetters":f=f.substring(0,2);break;case"firstLetter":f=f.substring(0,1);break}var b=new a.jqx._jqxCalendar.cell(g.dateTime);var k=s+1;var l=k+this.element.id;var j=a(t[0].rows[0].cells[s]);var p=s;if(this.enableTooltips){if(a(j).jqxTooltip){a(j).jqxTooltip({name:this.element.id,content:v[q],theme:this.theme,position:"mouse"})}}if(q>=6){q=0}else{q++}s=p;b.element=j;b.row=0;b.column=s+1;var e=this._textwidth(f);var c=""+f+"
";j.append(c);j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell"));j.width(o);if(this.disabled){j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell-disabled"))}if(e>0&&o>0){while(e>j.width()){if(f.length==0){break}f=f.substring(0,f.length-1);a.jqx.utilities.html(j.find("#columnCell"+l),f);e=this._textwidth(f)}}n[s]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addDays(1)))}if(parseInt(this.columnHeader.width())>parseInt(this.month.width())){this.columnHeader.width(this.month.width())}var u=a.data(this.element,w[0].id);u.columnCells=n},_format:function(d,e,b){var f=false;try{if(window.Globalize!=undefined){f=true}else{if(document.Globalize){window.Globalize=document.Globalize;f=true}}}catch(c){if(document.Globalize){window.Globalize=document.Globalize;f=true}}if(document.Globalize){window.Globalize=document.Globalize;f=true}if(a.global){a.global.culture.calendar=this.localization.calendar;return a.global.format(d,e,this.culture)}else{if(f){try{if(window.Globalize.cultures[this.culture]){window.Globalize.cultures[this.culture].calendar=this.localization.calendar;return window.Globalize.format(d,e,this.culture)}else{return window.Globalize.format(d,e,this.culture)}}catch(c){return window.Globalize.format(d,e)}}else{if(a.jqx.dataFormat){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}},_textwidth:function(d){var c=a(""+d+"");c.addClass(this.toThemeProperty("jqx-calendar-column-cell"));a(this.host).append(c);var b=c.width();c.remove();return b},_textheight:function(d){var c=a(""+d+"");a(this.host).append(c);var b=c.height();c.remove();return b},_renderRowHeader:function(k){var g=this.getVisibleDate();var c=this.getFirstDayOfWeek(g);var f=c.dayOfWeek;var s=this.getWeekOfYear(c);var o=new a.jqx._jqxDateTimeInput.getDateTime(new Date(c.dateTime));o._addDays(5);o.dayOfWeek=o.dateTime.getDay();var m=this.getWeekOfYear(o);if(53==s&&o.dateTime.getMonth()==0){s=1}var l=a("");l.find("table").addClass(this.toThemeProperty("jqx-reset"));l.find("td").addClass(this.toThemeProperty("jqx-reset"));l.find("tr").addClass(this.toThemeProperty("jqx-reset"));l.addClass(this.toThemeProperty("jqx-calendar-row-header"));l.width(this.rowHeaderWidth);this.rowHeader.append(l);var d=c;var r=new Array();for(var h=0;h<6;h++){var e=s.toString();var q=new a.jqx._jqxCalendar.cell(d.dateTime);var j=h+1+this.element.id;var p=a(l[0].rows[h].cells[0]);q.element=p;q.row=h;q.column=0;var b="";p.append(b);p.find("#headerCellContent"+j).addClass(this.toThemeProperty("jqx-calendar-row-cell"));r[h]=q;d=new a.jqx._jqxDateTimeInput.getDateTime(new Date(d._addWeeks(1)));s=this.getWeekOfYear(d)}var n=a.data(this.element,k[0].id);n.rowCells=r},getFirstDayOfWeek:function(e){var d=e;if(this.firstDayOfWeek<0||this.firstDayOfWeek>6){this.firstDayOfWeek=6}var c=d.dayOfWeek-this.firstDayOfWeek;if(c<=0){c+=7}var b=a.jqx._jqxDateTimeInput.getDateTime(d._addDays(-c));return b},getVisibleDate:function(){var c=new a.jqx._jqxDateTimeInput.getDateTime(new Date(this.value.dateTime));if(cthis.maxDate){this.visibleDate=this.maxDate}c.dateTime.setHours(0);var d=c.day;var b=a.jqx._jqxDateTimeInput.getDateTime(c._addDays(-d+1));c=b;return c},destroy:function(b){a.jqx.utilities.resize(this.host,null,true);this.host.removeClass();if(b!=false){this.host.remove()}},_raiseEvent:function(d,i){if(i==undefined){i={owner:null}}var h=this.events[d];var g=i?i:{};g.owner=this;var c=new a.Event(h);c.owner=this;c.args=g;if(d==0||d==1||d==2||d==3||d==4||d==5||d==6||d==7||d==8){c.args.date=c.args.selectedDate=this.getDate();c.args.range=this.getRange();var e=this.getViewStart();var f=this.getViewEnd();c.args.view={from:e,to:f}}if(d==7){var b=g.selectionType;if(!b){b=null}if(b=="key"){b="keyboard"}if(b=="none"){b=null}g.type=b}var j=this.host.trigger(c);if(d==0||d==1){j=false}return j},propertyMap:function(b){if(b=="value"){if(this.selectionMode!="range"){return this.getDate()}else{return this.getRange()}}return null},_setSize:function(){var d=this.host.find("#View"+this.element.id);if(d.length>0){this.setCalendarSize();d[0].style.height="100%";d[0].style.width="100%";var c=this.month.height()-this.titleHeight-this.columnHeaderHeight;var b="View"+this.element.id;d.find("#cellsTable"+b).height(c);d.find("#calendarRowHeader"+b).height(c);this.refreshControl()}},resize:function(){this._setSize()},clear:function(){if(this.selectionMode=="range"){this._clicks=1;this.setRange(null,null);this._raiseEvent(7)}else{this.setDate(null,"mouse")}this._clicks=0;this.selection={from:null,to:null}},today:function(){if(this.selectionMode=="range"){this.setRange(new Date(),new Date())}else{this.setDate(new Date(),"mouse")}},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b._setSize()}},propertyChangedHandler:function(d,e,g,f){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d.batchUpdate&&d.batchUpdate.width&&d.batchUpdate.height&&Object.keys(d.batchUpdate).length==2){return}if(e=="enableHover"){return}if(e=="keyboardNavigation"){return}if(e=="localization"){if(this.localization){if(this.localization.backString){this.backText=this.localization.backString}if(this.localization.forwardString){this.forwardText=this.localization.forwardString}if(this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString){this.clearString=this.localization.clearString}this.firstDayOfWeek=this.localization.calendar.firstDay}}if(e=="culture"){try{if(a.global){a.global.preferCulture(d.culture);d.localization.calendar=a.global.culture.calendar}else{if(window.Globalize){var b=window.Globalize.culture(d.culture);d.localization.calendar=b.calendar}}if(d.localization.calendar&&d.localization.calendar.firstDay!=undefined&&d.culture!="default"){d.firstDayOfWeek=d.localization.calendar.firstDay}}catch(c){}}if(e=="views"){if(d.views.indexOf("month")==-1){d.view="year"}if(d.views.indexOf("year")==-1&&d.views.indexOf("month")==-1){d.view="decade"}d.render();return}if(e=="showFooter"){d.render()}if(e=="width"||e=="height"){d._setSize();return}else{if(e=="theme"){a.jqx.utilities.setTheme(g,f,d.host)}else{if(e=="rowHeaderWidth"||e=="showWeekNumbers"){d.render()}else{d.view="month";d.render();d.refreshControl()}}}if(e==="firstDayOfWeek"){d.refreshControl()}}})})(jqxBaseFramework);(function(a){a.jqx._jqxCalendar.cell=function(c){var b={dateTime:new a.jqx._jqxDateTimeInput.getDateTime(c),_date:c,getDate:function(){return this._date},setDate:function(d){this.dateTime=new a.jqx._jqxDateTimeInput.getDateTime(d);this._date=d},isToday:false,isWeekend:false,isOtherMonth:false,isVisible:true,isSelected:false,isHighlighted:false,element:null,row:-1,column:-1,tooltip:null};return b};a.jqx._jqxCalendar.monthView=function(c,h,d,b,f,e){var g={start:c,end:h,cells:d,rowCells:b,columnCells:f,element:e};return g}})(jqxBaseFramework);
-(function(a){a.jqx.jqxWidget("jqxChart","",{});a.extend(a.jqx._jqxChart.prototype,{defineInstance:function(){a.extend(true,this,this._defaultSettings);this._createColorsCache();return this._defaultSettings},_defaultSettings:{title:"Title",description:"Description",source:[],seriesGroups:[],categoryAxis:null,xAxis:{},valueAxis:null,renderEngine:"",enableAnimations:true,enableAxisTextAnimation:false,backgroundImage:"",background:"#FFFFFF",padding:{left:5,top:5,right:5,bottom:5},backgroundColor:"#FFFFFF",showBorderLine:true,borderLineWidth:1,borderLineColor:null,borderColor:null,titlePadding:{left:5,top:5,right:5,bottom:10},showLegend:true,legendLayout:null,enabled:true,colorScheme:"scheme01",animationDuration:500,showToolTips:true,showToolTipsOnAllSeries:false,toolTipShowDelay:300,toolTipDelay:500,toolTipHideDelay:4000,toolTipMoveDuration:300,toolTipFormatFunction:null,toolTipAlignment:"dataPoint",localization:null,columnSeriesOverlap:false,rtl:false,legendPosition:null,greyScale:false,axisPadding:5,enableCrosshairs:false,crosshairsColor:"#BCBCBC",crosshairsDashStyle:"2,2",crosshairsLineWidth:1,enableEvents:true,_itemsToggleState:[],_isToggleRefresh:false,_isSelectorRefresh:false,_sliders:[],_selectorRange:[],_rangeSelectorInstances:{},_resizeState:{},renderer:null,_isRangeSelectorInstance:false,drawBefore:null,draw:null,_renderData:{},enableSampling:true},_defaultLineColor:"#BCBCBC",_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),click:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave"},_getEvent:function(b){if(this._isTouchDevice){return this._touchEvents[b]}else{return b}},destroy:function(){this.host.remove()},_jqxPlot:null,createInstance:function(d){if(!a.jqx.dataAdapter){throw"jqxdata.js is not loaded"}var c=this;c._refreshOnDownloadComlete();c._isTouchDevice=a.jqx.mobile.isTouchDevice();if(!c._jqxPlot){c._jqxPlot=new jqxPlot()}c.addHandler(c.host,c._getEvent("mousemove"),function(g){if(c.enabled==false){return}if(!c._isRangeSelectorInstance){c.host.css("cursor","default")}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c.onmousemove(f,j)});c.addHandler(c.host,c._getEvent("mouseleave"),function(h){if(c.enabled==false){return}var f=c._mouseX;var i=c._mouseY;var g=c._plotRect;if(g&&f>=g.x&&f<=g.x+g.width&&i>=g.y&&i<=g.y+g.height){return}c._cancelTooltipTimer();c._hideToolTip(0);c._unselect()});c.addHandler(c.host,"click",function(g){if(c.enabled==false){return}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c._mouseX=f;c._mouseY=j;if(!isNaN(c._lastClickTs)){if((new Date()).valueOf()-c._lastClickTs<100){return}}this._hostClickTimer=setTimeout(function(){if(!c._isTouchDevice){c._cancelTooltipTimer();c._hideToolTip();c._unselect()}if(c._pointMarker&&c._pointMarker.element){var l=c.seriesGroups[c._pointMarker.gidx];var k=l.series[c._pointMarker.sidx];g.stopImmediatePropagation();c._raiseItemEvent("click",l,k,c._pointMarker.iidx)}},100)});var e=c.element.style;if(e){var b=false;if(e.width!=null){b|=e.width.toString().indexOf("%")!=-1}if(e.height!=null){b|=e.height.toString().indexOf("%")!=-1}if(b){a.jqx.utilities.resize(this.host,function(){if(c.timer){clearTimeout(c.timer)}var f=1;c.timer=setTimeout(function(){var g=c.enableAnimations;c.enableAnimations=false;c.refresh();c.enableAnimations=g},f)},false,true)}}},_refreshOnDownloadComlete:function(){var d=this;var e=this.source;if(e instanceof a.jqx.dataAdapter){var f=e._options;if(f==undefined||(f!=undefined&&!f.autoBind)){e.autoSync=false;e.dataBind()}var c=this.element.id;if(e.records.length==0){var b=function(){if(d.ready){d.ready()}d.refresh()};e.unbindDownloadComplete(c);e.bindDownloadComplete(c,b)}else{if(d.ready){d.ready()}}e.unbindBindingUpdate(c);e.bindBindingUpdate(c,function(){if(d._supressBindingRefresh){return}d.refresh()})}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c=="source"){this._refreshOnDownloadComlete()}this.refresh()},_initRenderer:function(b){if(!a.jqx.createRenderer){throw"Please include jqxdraw.js"}return a.jqx.createRenderer(this,b)},_internalRefresh:function(){var b=this;if(a.jqx.isHidden(b.host)){return}b._stopAnimations();if(!b.renderer||(!b._isToggleRefresh&&!b._isUpdate)){b._hideToolTip(0);b._isVML=false;b.host.empty();b._measureDiv=undefined;b._initRenderer(b.host)}var d=b.renderer;if(!d){return}var c=d.getRect();b._render({x:1,y:1,width:c.width,height:c.height});this._raiseEvent("refreshBegin",{instance:this});if(d instanceof a.jqx.HTML5Renderer){d.refresh()}b._isUpdate=false;this._raiseEvent("refreshEnd",{instance:this})},saveAsPNG:function(d,b,c){return this._saveAsImage("png",d,b,c)},saveAsJPEG:function(d,b,c){return this._saveAsImage("jpeg",d,b,c)},saveAsPDF:function(d,b,c){return this._saveAsImage("pdf",d,b,c)},_saveAsImage:function(e,h,b,c){var g=false;for(var d=0;d10){o=1}I.attr(ai,{"stroke-width":o,stroke:F})}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){I.attr(ai,{"stroke-width":1,stroke:m.backgroundColor||"white"})}}if(a.isFunction(m.drawBefore)){m.drawBefore(I,C)}var V={x:Y.left,y:Y.top,width:C.width-Y.left-Y.right,height:C.height-Y.top-Y.bottom};m._paddedRect=V;var e=m.titlePadding||{left:2,top:2,right:2,bottom:2};var l;if(m.title&&m.title.length>0){var S=m.toThemeProperty("jqx-chart-title-text",null);l=I.measureText(m.title,0,{"class":S});I.text(m.title,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":S},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.description&&m.description.length>0){var T=m.toThemeProperty("jqx-chart-title-description",null);l=I.measureText(m.description,0,{"class":T});I.text(m.description,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":T},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.title||m.description){V.y+=(e.bottom+e.top);V.height-=(e.bottom+e.top)}var b={x:V.x,y:V.y,width:V.width,height:V.height};m._plotRect=b;m._buildStats(b);var H=m._isPieOnlySeries();var s=m.seriesGroups;var E;var D={xAxis:{},valueAxis:{}};for(var Z=0;Z0){D.xAxis[ae]|=1}}}else{R=m._renderValueAxis(Z,f,true,b).width;if((D.valueAxis[O]&1)==1){R=0}else{if(R>0){D.valueAxis[O]|=1}}}}if(Q!="left"&&m.rtl==true){Q="right"}if(Q!="right"){Q="left"}if(r[Q+"Count"]>0&&r[Q]>0&&R>0){r[Q]+=U}p.push({width:R,position:Q,xRel:r[Q]});r[Q]+=R;r[Q+"Count"]++}var u=Math.max(1,Math.max(C.width,C.height));var ac={top:0,bottom:0,topCount:0,bottomCount:0};var W=[];for(Z=0;Z0){D.valueAxis[O]|=2}}}else{ab=m._renderXAxis(Z,{x:0,y:0,width:u,height:0},true).height;if((D.xAxis[ae]&2)==2){ab=0}else{if(ab>0){D.xAxis[ae]|=2}}}}if(Q!="top"){Q="bottom"}if(ac[Q+"Count"]>0&&ac[Q]>0&&ab>0){ac[Q]+=U}W.push({height:ab,position:Q,yRel:ac[Q]});ac[Q]+=ab;ac[Q+"Count"]++}m._createAnimationGroup("series");var t=(m.showLegend!=false);var B=!t?{width:0,height:0}:m._renderLegend(m.legendLayout?m._rect:V,true);if(this.legendLayout&&(!isNaN(this.legendLayout.left)||!isNaN(this.legendLayout.top))){B={width:0,height:0}}if(V.heightA.x+A.width){R=A.x+A.width-P}if(N+ab>A.y+A.height){ab=A.y+A.height-N}m._renderLegend({x:P,y:N,width:R,height:ab})}m._hasHorizontalLines=false;if(!H){for(Z=0;Z=2*N){I.x+=N;I.width-=2*N}if(I.height>=2*N){I.y+=N;I.height-=2*N}var E={width:I.width,height:0};var G=0,F=0;var p=20;var m=0;var f=10;var Q=10;var w=0;for(var P=0;Pp){p=j.height}if(j.width>w){w=j.width}if(v){if(P!=0){F+=p}if(F>I.height){F=0;G+=w+2*Q+f;w=j.width;E.width=G+w}}else{if(G!=0){G+=Q}if(G+2*f+j.width>I.width&&j.widthI.width){K=true;var s=I.width;var T=A;var X=T.split(/\s+/);var o=[];var q="";for(var M=0;M0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q});q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q})}}j.width=0;var c=0;for(var H=0;H0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q,dy:d});d+=B.height;q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q,dy:d})}}for(var H=0;H1){j=l.left*(e+1)}if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,false,j);if(!g){var o=(l.left+l.right)*s/e;if(d.flip){f.unshift(f[0]+o)}else{f.push(f[f.length-1]+o)}}}else{var j=l.left;if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,g,j)}var q=this._arraysToObjectsArray([m,f],["value","offset"]);if(d[u]&&d[u].custom){var h=this._objectsArraysToArray(d[u].custom,"value");var c=this._objectsArraysToArray(d[u].custom,"offset");var b=this._valuesToOffsets(h,d,t,n,l,g,l.left);for(var p=0;pd){o=f._elementRenderInfo[d].xAxis}var q=[];var I;if(O.labels.formatFunction){I=O.labels.formatFunction}var v;if(O.labels.formatSettings){v=a.extend({},O.labels.formatSettings)}if(r.type=="date"){if(r.dateFormat&&!I){if(v){v.dateFormat=v.dateFormat||r.dateFormat}else{v={dateFormat:r.dateFormat}}}else{if(!I&&(!v||(v&&!v.dateFormat))){I=this._getDefaultDTFormatFn(r.baseUnit||"day")}}}for(var N=0;N=S.filterRange.min&&T<=S.filterRange.max){w=S.useIndeces?(S.min+T).toString():(L==undefined?"":L.toString())}}var b={key:L,text:w,targetX:H,x:H};if(o&&o.itemOffsets[L]){b.x=o.itemOffsets[L].x;b.y=o.itemOffsets[L].y}q.push(b)}var C=f._getAnimProps(d);var u=C.enabled&&q.length<500?C.duration:0;if(f.enableAxisTextAnimation==false){u=0}var z={items:q,renderData:k};var e=f._renderAxis(W,D,O,{x:y.x,y:y.y,width:y.width,height:y.height},c,F,false,true,z,Q,u);if(W){e.width+=E}else{e.height+=E}return e},_animateAxisText:function(f,h){var c=f.items;var d=f.textSettings;for(var e=0;en){var m=o;o=n;n=m}var u=a.jqx._rnd(Math.abs(o-n)/(Math.PI*2),0.001,true);var r=Math.PI*2*g*u;var h=this._calcGroupOffsets(f,b).xoffsets;if(!h){return}var k=!(Math.abs(Math.abs(n-o)-Math.PI*2)>0.00001);if(j.spider){var e=this._getXAxisStats(f,this._getXAxis(f),r);var s=e.interval;if(isNaN(s)||s==0){s=1}var d=(e.max-e.min)/s+(k?1:0);d=Math.round(d);if(d>2){var c=Math.cos(Math.abs(n-o)/2/d);c=a.jqx._rnd(c,0.01);if(c==0){c=1}var t=g/c;if(t>g&&i){g=t}}}g=a.jqx._ptrnd(g);return{x:q,y:p,r:g,adjR:this._get([t,g]),itemWidth:h.itemWidth,rangeLength:h.rangeLength,valuesOnTicks:i,startAngle:o,endAngle:n,isClosedCircle:k,axisSize:r}},_toPolarCoord:function(j,f,h,e){var c=Math.abs(j.startAngle-j.endAngle)/(Math.PI*2);var b=(h-f.x)*2*Math.PI*c/Math.max(1,f.width)+j.startAngle;var d=((f.height+f.y)-e)*j.r/Math.max(1,f.height);var i=j.x+d*Math.cos(b);var g=j.y+d*Math.sin(b);return{x:a.jqx._ptrnd(i),y:a.jqx._ptrnd(g)}},_renderSpiderAxis:function(z,k){var ao=this;var g=ao._getXAxis(z);var aA=this._getAxisSettings(g);if(!g||!aA.visible){return}var W=ao.seriesGroups[z];var R=ao._getPolarAxisCoords(z,k);if(!R){return}var L=a.jqx._ptrnd(R.x);var K=a.jqx._ptrnd(R.y);var t=R.adjR;var X=R.startAngle;var V=R.endAngle;if(t<1){return}var av=a.jqx._rnd(Math.abs(X-V)/(Math.PI*2),0.001,true);var h=Math.PI*2*t*av;var c=R.isClosedCircle;var w=this._renderData[z].xoffsets;if(!w.rangeLength){return}var S=w.axisStats.interval;if(isNaN(S)||S<1){S=1}var ar=W.orientation=="horizontal";var Z=(ar&&g.position=="right")||(!ar&&g.position=="top");while(ao._renderData.lengthz){s=ao._elementRenderInfo[z].xAxis}var aq=[];var af=this._getDataLen(z);for(var Q=0;Q=af){continue}H=ao._getDataValue(ax,g.dataField);if(H==undefined){H=""}}var ap=ao._formatValue(H,y.formatSettings,y.formatFunction,z,undefined,ax);if(ap==undefined||ap.toString()==""){ap=ae.useIndeces?(ae.min+Q).toString():(H==undefined?"":H.toString())}var d={key:H,text:ap,targetX:F,x:F};if(s&&s.itemOffsets[H]){d.x=s.itemOffsets[H].x;d.y=s.itemOffsets[H].y}aq.push(d)}var az={items:aq,renderData:at};var l={stroke:e.color,fill:"none","stroke-width":e.width,"stroke-dasharray":e.dashStyle||""};if(!W.spider){if(av==1){ad.circle(L,K,t,l)}else{var E=-X/Math.PI*180;var aE=-V/Math.PI*180;this.renderer.pieslice(L,K,0,t,Math.min(E,aE),Math.max(E,aE),undefined,l)}}var M=aq.length;var m=2*Math.PI/(M);var al=X;var f,C;if(e.visible&&ay){if(!G&&!c){e.offsets.unshift({offset:-u.right})}for(var Q=0;Q0.01){continue}var q=a.jqx._ptrnd(L+t*Math.cos(B));var p=a.jqx._ptrnd(K+t*Math.sin(B));ad.line(L,K,q,p,l)}}if(T.visible&&ay){var P=5;var o={stroke:T.color,fill:"none","stroke-width":T.width,"stroke-dasharray":T.dashStyle||""};if(!G&&!c){T.offsets.unshift({offset:-u.right})}for(var Q=0;Q0.01){continue}var ab={x:L+t*Math.cos(B),y:K+t*Math.sin(B)};var aa={x:L+(t+P)*Math.cos(B),y:K+(t+P)*Math.sin(B)};ad.line(a.jqx._ptrnd(ab.x),a.jqx._ptrnd(ab.y),a.jqx._ptrnd(aa.x),a.jqx._ptrnd(aa.y),o)}}var an=[];if(W.spider){var v=[];if(g.type=="date"){v=this._generateDTOffsets(aC,r,h,u,S,S,g.baseUnit,true,0,false,ai)}else{v=this._getOffsets("",g,h,ae,aA,u,true,S)}if(!G&&!c){v.unshift({offset:-u.right})}for(var Q=0;Q0.01){continue}an.push(B)}at.offsetAngles=an}var Y=ao._renderSpiderValueAxis(z,k,(G?R.adjR:R.r),an);if(!Y){Y=[]}if(W.spider){if(!G){for(var Q=0;Q0?q.height+3*R:2*R;M+=o-(V?o:o/4)}else{M+=V?o:o/4}M+=P.top}else{N+=P.left+R+(q.width>0?q.width+R:0)+(D?z.width-q.width:0);M+=u}var T=0;var K=0;var r=C.items;l.itemOffsets={};if(this._isToggleRefresh||!this._isUpdate){d=0}var k=false;var j=0;for(var S=0;SK){K=f.width}if(f.height>T){T=f.height}j+=H?T:K;if(!U){if((H&&L>z.height+2)||(!H&&L>z.width+2)){continue}var J=H?N+(D?(q.width==0?o:o-R):0):N+L;var I=H?M+L:M;l.itemOffsets[r[S].key]={x:J,y:I};if(!k){if(!isNaN(r[S].x)||!isNaN(r[S].y)&&d){k=true}}r[S].targetX=J;r[S].targetY=I;r[S].width=!H?b:z.width-P.left-P.right-2*R-o-((q.width>0)?q.width+R:0);r[S].height=H?b:z.height-P.top-P.bottom-2*R-o-((q.height>0)?q.height+R:0);r[S].visible=true}}l.avgWidth=r.length==0?0:j/r.length;if(!U){var s={items:r,textSettings:n};if(isNaN(d)||!k){d=0}this._animateAxisText(s,d==0?1:0);if(d!=0){var g=this;this._enqueueAnimation("series",undefined,undefined,d,function(i,h,w){g._animateAxisText(h,w)},s)}}G.width+=2*R+o+q.width+K+(H&&q.width>0?R:0);G.height+=2*R+o+q.height+T+(!H&&q.height>0?R:0);if(!H){G.height+=P.top+P.bottom}else{G.width+=P.left+P.right}var B={};if(!U&&Q.line.visible){var O={stroke:Q.line.color,"stroke-width":Q.line.width,"stroke-dasharray":Q.line.dashStyle||""};if(H){var J=z.x+z.width+(D?P.left:-P.right);J=a.jqx._ptrnd(J);this.renderer.line(J,z.y,J,z.y+z.height,O)}else{var I=a.jqx._ptrnd(z.y+(D?z.height-P.bottom:P.top));this.renderer.line(a.jqx._ptrnd(z.x),I,a.jqx._ptrnd(z.x+z.width+1),I,O)}}G.width=a.jqx._rup(G.width);G.height=a.jqx._rup(G.height);return G},_drawPlotAreaLines:function(j,z,f){var E=this.seriesGroups[j];var c=E.orientation!="horizontal";if(!this._renderData||this._renderData.length<=j){return}var J=z?"valueAxis":"xAxis";var v=this._renderData[j][J];if(!v){return}var n=this._renderData.axisDrawState;if(!n){n=this._renderData.axisDrawState={}}var A="",h;if(z){A="valueAxis_"+((E.valueAxis)?j:"")+(c?"swap":"");h=this._getValueAxis(j)}else{A="xAxis_"+((E.xAxis||E.categoryAxis)?j:"")+(c?"swap":"");h=this._getXAxis(j)}if(n[A]){n=n[A]}else{n=n[A]={}}if(!z){c=!c}var H=v.settings;if(!H){return}if(H.customDraw){return}var G=H.gridLines,q=H.tickMarks,u=H.padding;var e=v.rect;var l=this._plotRect;if(!G||!q){return}var p=0.5;var d={};var b={stroke:G.color,"stroke-width":G.width,"stroke-dasharray":G.dashStyle||""};var D=z?e.y+e.height:e.x;var o=G.offsets;if(z&&!h.flip){o=a.extend([],o);o=o.reverse()}if(o&&o.length>0){var k=NaN;var C=o.length;for(var B=0;Be.y+e.height){F=e.y+e.height}}else{F=a.jqx._ptrnd(e.x+o[B].offset);if(F>e.x+e.width+p){F=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(F)){continue}if(!isNaN(k)&&Math.abs(F-k)<2){continue}k=F;if(f.gridLines&&G.visible!=false&&n.gridLines!=true){if(c){this.renderer.line(a.jqx._ptrnd(l.x),F,a.jqx._ptrnd(l.x+l.width),F,b)}else{this.renderer.line(F,a.jqx._ptrnd(l.y),F,a.jqx._ptrnd(l.y+l.height),b)}}d[F]=true;if(f.alternatingBackground&&(G.alternatingBackgroundColor||G.alternatingBackgroundColor2)&&n.alternatingBackground!=true){var m=((B%2)==0)?G.alternatingBackgroundColor2:G.alternatingBackgroundColor;if(B>0&&m){var I;if(c){I=this.renderer.rect(a.jqx._ptrnd(l.x),D,a.jqx._ptrnd(l.width-1),F-D,b)}else{I=this.renderer.rect(D,a.jqx._ptrnd(l.y),F-D,a.jqx._ptrnd(l.height),b)}this.renderer.attr(I,{"stroke-width":0,fill:m,opacity:G.alternatingBackgroundOpacity||1})}}D=F}}var b={stroke:q.color,"stroke-width":q.width,"stroke-dasharray":q.dashStyle||""};if(f.tickMarks&&q.visible&&n.tickMarks!=true){var t=q.size;var o=q.offsets;var k=NaN;for(var B=0;Be.y+e.height){F=e.y+e.height}}else{F=a.jqx._ptrnd(e.x+o[B].offset);if(F>e.x+e.width+p){F=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(F)){continue}if(!isNaN(k)&&Math.abs(F-k)<2){continue}if(d[F-1]){F--}else{if(d[F+1]){F++}}if(c){if(F>e.y+e.height+p){break}}else{if(F>e.x+e.width+p){break}}k=F;var w=!v.isMirror?-t:t;if(c){var s=e.x+e.width+(h.position=="right"?u.left:-u.right);if(!z){s=e.x+(v.isMirror?u.left:-u.right+e.width)}this.renderer.line(s,F,s+w,F,b)}else{var r=e.y+(v.isMirror?e.height:0);r+=v.isMirror?-u.bottom:u.top;r=a.jqx._ptrnd(r);this.renderer.line(F,r,F,r-w,b)}}}n.tickMarks=n.tickMarks||f.tickMarks;n.gridLines=n.gridLines||f.gridLines;n.alternatingBackground=n.alternatingBackground||f.alternatingBackground},_calcValueAxisItems:function(j,d,l){var n=this._stats.seriesGroups[j];if(!n||!n.isValid){return false}var w=this.seriesGroups[j];var b=w.orientation=="horizontal";var f=this._getValueAxis(j);var m=f.valuesOnTicks!=false;var e=f.dataField;var o=n.intervals;var s=d/o;var u=n.min;var r=n.mu;var c=f.logarithmicScale==true;var k=f.logarithmicScaleBase||10;var h=w.type.indexOf("stacked")!=-1&&w.type.indexOf("100")!=-1;if(c){r=!isNaN(f.unitInterval)?f.unitInterval:1}if(!m){o=Math.max(o-1,1)}while(this._renderData.length"9"){h=d.length-(e+1);if(h>=0){return Math.min(h,c)}}}if(h>0){k*=Math.pow(10,h)}while(Math.round(k)!=k&&hf){n=this._elementRenderInfo[f].valueAxis}for(var J=0;Jb){var f=[];var k=Math.round(c/b);for(var h=0;hs){return f}if(p==s){if(v){f.push({offset:b?x/2:n.left,value:p})}else{if(b){f.push({offset:x/2,value:p})}}return f}var j=x-n.left-n.right;var w=p;var k=n.left;var e=k;c=Math.max(c,1);var m=c;var d=Math.min(1,c);if(c>1&&o!="millisecond"){c=1}while(a.jqx._ptrnd(e)<=a.jqx._ptrnd(n.left+j+(b?0:n.right))){f.push({offset:e,value:w});var z=new Date(w.valueOf());if(o=="millisecond"){z.setMilliseconds(w.getMilliseconds()+c)}else{if(o=="second"){z.setSeconds(w.getSeconds()+c)}else{if(o=="minute"){z.setMinutes(w.getMinutes()+c)}else{if(o=="hour"){var l=z.valueOf();z.setHours(w.getHours()+c);if(l==z.valueOf()){z.setHours(w.getHours()+c+1)}}else{if(o=="day"){z.setDate(w.getDate()+c)}else{if(o=="month"){z.setMonth(w.getMonth()+c)}else{if(o=="year"){z.setFullYear(w.getFullYear()+c)}}}}}}}w=z;e=k+(w.valueOf()-p.valueOf())*d/(s.valueOf()-p.valueOf())*j}if(g){for(var r=0;r1&&o!="millisecond"){var q=[];for(var r=0;r1){var q=[];q.push({offset:0,value:undefined});for(var r=1;r1){q.push({offset:q[t-1].offset+(q[t-1].offset-q[t-2].offset)})}else{q.push({offset:x,value:undefined})}f=q}if(y>c){var q=[];var h=Math.round(y/m);for(var r=0;rq.max.valueOf())){continue}}var W=n.minValue;var C=n.maxValue;if(n.baselineValue){if(isNaN(W)){W=r}else{W=Math.min(r,W)}if(isNaN(C)){C=r}else{C=Math.max(r,C)}}var u=0,w=0;for(var k=0;A.series&&kC)&&((isNaN(n.maxValue))?true:P<=n.maxValue)){C=P}if((isNaN(W)||y=n.minValue)){W=y}if(!isNaN(F)&&E&&!Q){if(F>r){u+=F}else{if(FM||isNaN(M)){M=C}if(Wd||isNaN(d)){d=u}if(w0){O.gmax=Math.max(O.gmax,O.gbase+O.gsumP)}}x.context=O}this._mergeCommonValueAxisStats();for(var T=0;Tf.gmax){f.gmax=d.gmax}if(isNaN(f.gsumP)||d.gsumP>f.gsumP){f.gsumP=d.gsumP}if(isNaN(f.gsumN)||d.gsumN0){f.gmin=Math.min(f.gmin,f.gbase+f.gsumN)}if(f.gsumP>0){f.gmax=Math.max(f.gmax,f.gbase+f.gsumP)}}for(var e=0;et){r/=j;b--;i++}c=Math.pow(j,b)}else{if(l&&!e){f=Math.max(f,y)}q=a.jqx._rnd(a.jqx.log(f,j),1,true);f=Math.pow(j,q);b=a.jqx._rnd(a.jqx.log(c,j),1,false);c=Math.pow(j,b)}s=j}if(cy){y=f}var v=c;var o=f;if(!d){if(0!=Math.abs(o-v)%s){v=a.jqx._rnd(c,s,false);o=a.jqx._rnd(f,s,true)}}if(h&&o>100){o=100}if(h&&!d){o=(o>0)?100:0;v=(v<0)?-100:0;s=w.unitInterval;if(isNaN(s)||s<=0||s>=100){s=10}if((100%s)!=0){for(;s>=1;s--){if((100%s)==0){break}}}}if(isNaN(o)||isNaN(v)||isNaN(s)){return{}}if(isNaN(i)){i=parseInt(((o-v)/(s==0?1:s)).toFixed())}if(d&&!h){i=q-b;k=Math.pow(j,i)}if(i<1){return{}}var m={min:v,max:o,logarithmic:d,logBase:j,base:d?v:x,minPow:b,maxPow:q,sumP:y,sumN:z,mu:s,maxRange:k,intervals:i,hasStackValueReversal:n};return m},_getDataLen:function(c){var b=this.source;if(c!=undefined&&c!=-1&&this.seriesGroups[c].source){b=this.seriesGroups[c].source}if(b instanceof a.jqx.dataAdapter){b=b.records}if(b){return b.length}return 0},_getDataValue:function(b,e,d){var c=this.source;if(d!=undefined&&d!=-1){c=this.seriesGroups[d].source||c}if(c instanceof a.jqx.dataAdapter){c=c.records}if(!c||b<0||b>c.length-1){return undefined}if(a.isFunction(e)){return e(b,c)}return(e&&e!="")?c[b][e]:c[b]},_getDataValueAsNumber:function(b,e,c){var d=this._getDataValue(b,e,c);if(this._isDate(d)){return d.valueOf()}if(typeof(d)!="number"){d=parseFloat(d)}if(typeof(d)!="number"){d=undefined}return d},_isPieGroup:function(b){var c=this.seriesGroups[b];if(!c||!c.type){return false}return c.type.indexOf("pie")!=-1||c.type.indexOf("donut")!=-1},_renderPieSeries:function(e,c){var f=this._getDataLen(e);var g=this.seriesGroups[e];var m=this._calcGroupOffsets(e,c).offsets;for(var p=0;p360){t=0}var x=this._get([k.maxAngle,k.endAngle]);if(isNaN(x)||x<0||x>360){x=360}var o={rect:c,minAngle:t,maxAngle:x,groupIndex:e,serieIndex:p,settings:v,items:[]};for(var u=0;uo.groupIndex&&this._elementRenderInfo[o.groupIndex].series&&this._elementRenderInfo[o.groupIndex].series.length>o.serieIndex){j=this._elementRenderInfo[o.groupIndex].series[o.serieIndex]}var f=360*c;var u=this.seriesGroups[o.groupIndex];var n=this._getLabelsSettings(o.groupIndex,o.serieIndex,NaN);var m=n.visible;var b=[];for(var t=0;tx){p=x}x=e;if(t==b.length-1&&e!=b[0].from){e=o.maxAngle+b[0].from}}var r=this.renderer.pieSlicePath(w.x,w.y,w.innerRadius,w.outerRadius,p,e,w.centerOffset);this.renderer.attr(q.element,{d:r});var h=this._getColors(o.groupIndex,o.serieIndex,w.itemIndex,"radialGradient",w.outerRadius);var v=o.settings;q.colors=h;q.settings=v;this.renderer.attr(q.element,{fill:h.fillColor,stroke:h.lineColor,"stroke-width":v.stroke,"fill-opacity":v.opacity,"stroke-opacity":v.opacity,"stroke-dasharray":"none"||v.dashStyle});var k=u.series[o.serieIndex];if(m){this._showPieLabel(o.groupIndex,o.serieIndex,w.itemIndex,n)}if(c==1){this._installHandlers(q.element,"pieslice",o.groupIndex,o.serieIndex,w.itemIndex)}}},_showPieLabel:function(e,f,A,p,h){var k=this._renderData[e].offsets[f][A];if(k.elementInfo.labelElement){this.renderer.removeElement(k.elementInfo.labelElement)}if(!p){p=this._getLabelsSettings(e,f,NaN)}if(!p.visible){return}var B=k.fromAngle,D=k.toAngle;var l=Math.abs(B-D);var q=l>180?1:0;if(l>360){B=0;D=360}var r=B*Math.PI*2/360;var i=D*Math.PI*2/360;var j=l/2+B;j=j%360;var C=j*Math.PI*2/360;var v;if(p.autoRotate==true){v=j<90||j>270?360-j:180-j}var u=p.linesEnabled;var o=this._showLabel(e,f,A,{x:0,y:0,width:0,height:0},"center","center",true,false,false,v);var d=p.radius||k.outerRadius+Math.max(o.width,o.height);if(this._isPercent(d)){d=parseFloat(d)/100*Math.min(this._plotRect.width,this._plotRect.height)/2}d+=k.centerOffset;if(isNaN(h)){h=0}d+=h;var x=this.seriesGroups[e];var n=x.series[f];var z=a.jqx.getNum([n.offsetX,x.offsetX,this._plotRect.width/2]);var y=a.jqx.getNum([n.offsetY,x.offsetY,this._plotRect.height/2]);var c=this._plotRect.x+z;var b=this._plotRect.y+y;var w=this._adjustTextBoxPosition(c,b,o,d,j,k.outerRadius>d,p.linesAngles!=false,p.autoRotate==true);var m={};k.elementInfo.labelElement=this._showLabel(e,f,A,{x:w.x,y:w.y,width:o.width,height:o.height},"left","top",false,false,false,v,m);if(d>k.outerRadius+5&&u!=false){var t={lineColor:k.elementInfo.colors.lineColor,stroke:k.elementInfo.settings.stroke,opacity:k.elementInfo.settings.opacity,dashStyle:k.elementInfo.settings.dashStyle};k.elementInfo.labelArrowPath=this._updateLebelArrowPath(k.elementInfo.labelArrowPath,c,b,d,k.outerRadius+h,C,p.linesAngles!=false,t,m)}},_updateLebelArrowPath:function(d,j,f,h,l,g,o,e,r){var c=a.jqx._ptrnd(j+(h-0)*Math.cos(g));var n=a.jqx._ptrnd(f-(h-0)*Math.sin(g));var b=a.jqx._ptrnd(j+(l+2)*Math.cos(g));var m=a.jqx._ptrnd(f-(l+2)*Math.sin(g));var p=[];p.push({x:r.x+r.width/2,y:r.y});p.push({x:r.x+r.width/2,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height/2});p.push({x:r.x+r.width,y:r.y+r.height/2});if(!o){p.push({x:r.x,y:r.y});p.push({x:r.x+r.width,y:r.y});p.push({x:r.x+r.width,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height})}p=p.sort(function(s,i){return a.jqx._ptdist(s.x,s.y,j,f)-a.jqx._ptdist(i.x,i.y,j,f)});p=p.sort(function(s,i){return(Math.abs(s.x-j)+Math.abs(s.y-f))-(Math.abs(i.x-j)+Math.abs(i.y-f))});for(var k=0;k=t&&u=Math.PI-t&&u=Math.PI+t&&u<2*Math.PI-t){m=p/2*Math.sin(d)}else{if(u>=2*Math.PI-t&&u<2*Math.PI){m=l/2*Math.cos(d)}}}}}g+=Math.abs(m)+3;var k=a.jqx._ptrnd(f+g*Math.cos(d));var j=a.jqx._ptrnd(e-g*Math.sin(d));k-=n.width/2;j-=n.height/2;return{x:k,y:j}}if(!c){if(!i){if(s>=0&&s<45||s>=315&&s<360){j-=n.height/2}else{if(s>=45&&s<135){j-=n.height;k-=n.width/2}else{if(s>=135&&s<225){j-=n.height/2;k-=n.width}else{if(s>=225&&s<315){k-=n.width/2}}}}}else{if(s>=90&&s<270){j-=n.height/2;k-=n.width}else{j-=n.height/2}}}else{k-=n.width/2;j-=n.height/2}return{x:k,y:j}},_isColumnType:function(b){return(b.indexOf("column")!=-1||b.indexOf("waterfall")!=-1)},_getColumnGroupsCount:function(c){var e=0;c=c||"vertical";var f=this.seriesGroups;for(var d=0;dO){var G=h;h=O;O=G}if(t.spider){var E=r.xAxis.offsetAngles;var F="";var K=[p,q];var z=E;if(d.isClosedCircle){z=a.extend([],E);z.push(z[0])}for(var J in K){for(var L=0;L1){M=1}this.renderer.attr(H,{fill:W,"fill-opacity":M,stroke:R,"stroke-opacity":M,"stroke-width":u,"stroke-dasharray":c.dashStyle})}},_getColumnGroupWidth:function(m,h,o){var e=this.seriesGroups[m];var l=e.type.indexOf("stacked")!=-1;var d=l?1:e.series.length;var k=this._getColumnGroupsCount(e.orientation);if(isNaN(k)||0==k){k=1}var n=h.rangeLength>=1?h.itemWidth:o*0.9;var c=e.columnsMinWidth;if(isNaN(c)){c=1}if(!isNaN(e.columnsMaxWidth)){c=Math.min(e.columnsMaxWidth,c)}if(c>n&&h.length>0){n=Math.max(n,o*0.9/h.length)}var i=c;if(!l){var f=e.seriesGapPercent;if(isNaN(f)||f<0){f=10}f/=100;var b=c;b*=(1+f);i+=e.series.length*b}var j=Math.max(n/k,i);return{requiredWidth:i,availableWidth:n,targetWidth:j}},_getColumnSerieWidthAndOffset:function(d,e){var m=this.seriesGroups[d];var u=m.series[e];var c=m.orientation=="horizontal";var b=this._plotRect;if(c){b={x:b.y,y:b.x,width:b.height,height:b.width}}var v=this._calcGroupOffsets(d,b);if(!v||v.xoffsets.length==0){return}var l=true;var w=this._getColumnGroupsCount(m.orientation);if(m.type=="candlestick"||m.type=="ohlc"){w=1}var q=this._getColumnGroupIndex(d);var r=this._getColumnGroupWidth(d,v.xoffsets,c?b.height:b.width);var h=0;var f=r.targetWidth;if(this.columnSeriesOverlap==true||(Math.round(f)>Math.round(r.availableWidth/w))){w=1;q=0}if(l){h-=(f*w)/2}h+=f*q;var B=m.columnsGapPercent;if(B<=0){B=0}if(isNaN(B)||B>=100){B=25}B/=100;var k=f*B;if(k+r.requiredWidth>r.targetWidth){k=Math.max(0,r.targetWidth-r.requiredWidth)}if(Math.round(f)>Math.round(r.availableWidth)){k=0}f-=k;h+=k/2;var x=m.seriesGapPercent;if(isNaN(x)||x<0){x=10}var n=m.type.indexOf("stacked")!=-1;var t=f;if(!n){t/=m.series.length}var y=this._get([m.seriesGap,(f*x/100)/(m.series.length-1)]);if(m.polar==true||m.spider==true||n||m.series.length<=1){y=0}var o=y*(m.series.length-1);if(m.series.length>1&&o>f-m.series.length*1){o=f-m.series.length*1;y=o/Math.max(1,(m.series.length-1))}var g=t-(o/m.series.length);var A=0;var i=m.columnsMaxWidth;if(!isNaN(i)){if(g>i){A=g-i;g=i}}var z=A/2;var j=0;if(!n){var C=(f-(g*m.series.length)-o)/2;var p=Math.max(0,e);j=C+g*e+p*y}else{j=A/2}return{width:g,offset:h+j}},_renderColumnSeries:function(f,c){var j=this.seriesGroups[f];if(!j.series||j.series.length==0){return}var h=this._getDataLen(f);var e=j.orientation=="horizontal";var y=c;if(e){y={x:c.y,y:c.x,width:c.height,height:c.width}}var p=this._calcGroupOffsets(f,y);if(!p||p.xoffsets.length==0){return}var m;if(j.polar==true||j.spider==true){m=this._getPolarAxisCoords(f,y)}var r={groupIndex:f,rect:c,vertical:!e,seriesCtx:[],renderData:p,polarAxisCoords:m};r.columnGroupWidth=this._getColumnGroupWidth(f,p.xoffsets,e?y.height:y.width);var g=this._getGroupGradientType(f);for(var t=0;te){d=e}if(isNaN(d)){return NaN}return d},_getColumnVOffsets:function(n,j,e,B,u,c){var p=this.seriesGroups[j];var F=this._getPercent(p.columnsTopWidthPercent,100,0,100);var v=this._getPercent(p.columnsBottomWidthPercent,100,0,100);if(F==0&&v==0){v=100}var H=this._getPercent(p.columnsNeckHeightPercent,NaN,0,100)/100;var C=this._getPercent(p.columnsNeckWidthPercent,100,0,100)/100;var r=[];var G=NaN;for(var q=0;qj&&b[j].series.length>k){var D=n.xoffsets.xvalues[B];g=b[j].series[k][D];if(g&&!isNaN(g.from)&&!isNaN(g.to)){o=g.from+(o-g.from)*c;N=g.to+(N-g.to)*c;x=g.xoffset+(x-g.xoffset)*c}}if(!g){N=o+(N-o)*(u?1:c)}if(isNaN(o)){o=isNaN(G)?n.baseOffset:G}if(!isNaN(N)&&u){G=N}else{G=o}if(isNaN(N)){N=o}var A={from:o,to:N,xOffset:x};if(F!=100||v!=100){A.funnel=true;A.toWidthPercent=F;A.fromWidthPercent=v}r.push(A)}if(u&&r.length>1&&!(this._elementRenderInfo&&this._elementRenderInfo.length>j)){var l=0,m=0,I=-Infinity,w=Infinity,J=Infinity,z=-Infinity;for(var K=0;K=r[K].from){m+=r[K].to-r[K].from;J=Math.min(J,r[K].from);z=Math.max(z,r[K].to)}else{l+=r[K].from-r[K].to;I=Math.max(I,r[K].from);w=Math.min(w,r[K].to)}}}var M=l;var t=m;l*=c;m*=c;var d=0,f=0;for(var K=0;K=r[K].from){var y=r[K].to-r[K].from;if(y+f>m){y=Math.max(0,m-f);r[K].to=r[K].from+y}if(F!=100||v!=100){r[K].funnel=true;if(!isNaN(H)&&t*H>=f){r[K].fromWidthPercent=C*100}else{r[K].fromWidthPercent=(Math.abs(r[K].from-J)/t)*(F-v)+v}if(!isNaN(H)&&t*H>=(0+(f+y))){r[K].toWidthPercent=C*100}else{r[K].toWidthPercent=(Math.abs(r[K].to-J)/t)*(F-v)+v}}f+=y}else{var y=r[K].from-r[K].to;if(y+d>l){y=Math.max(0,l-d);r[K].to=r[K].from-y}if(F!=100||v!=100){r[K].funnel=true;if(!isNaN(H)&&M*H>=d){r[K].fromWidthPercent=C*100}else{r[K].fromWidthPercent=(Math.abs(r[K].from-I)/M)*(F-v)+v}if(!isNaN(H)&&M*H>=(0+(d+y))){r[K].toWidthPercent=C*100}else{r[K].toWidthPercent=(Math.abs(r[K].to-I)/M)*(F-v)+v}}d+=y}}}return r},_columnAsPieSlice:function(d,k,m,o){var e=this._toPolarCoord(m,k,o.x,o.y);var f=this._toPolarCoord(m,k,o.x,o.y+o.height);var l=a.jqx._ptdist(m.x,m.y,f.x,f.y);var i=a.jqx._ptdist(m.x,m.y,e.x,e.y);var c=k.width;var n=Math.abs(m.startAngle-m.endAngle)*180/Math.PI;var b=-((o.x-k.x)*n)/c;var h=-((o.x+o.width-k.x)*n)/c;var j=m.startAngle;j=360*j/(Math.PI*2);b-=j;h-=j;if(d){if(d.element!=undefined){var g=this.renderer.pieSlicePath(m.x,m.y,l,i,h,b,0);g+=" Z";this.renderer.attr(d.element,{d:g})}else{d.element=this.renderer.pieslice(m.x,m.y,l,i,h,b,0)}}return{fromAngle:h,toAngle:b,innerRadius:l,outerRadius:i}},_setRenderInfo:function(e,b,d,c){this._renderData[e].offsets[b][d].elementInfo=c},_getRenderInfo:function(d,b,c){return this._renderData[d].offsets[b][c].elementInfo||{}},_animColumns:function(ai,d){var p=this;var q=ai.groupIndex;var A=this.seriesGroups[q];var v=ai.renderData;var aa=A.type.indexOf("waterfall")!=-1;var G=this._getXAxis(q);var I=A.type.indexOf("stacked")!=-1;var e=ai.polarAxisCoords;var z=this._getGroupGradientType(q);var s=ai.columnGroupWidth.targetWidth;var y=-1;for(var ab=0;abah.xAdjust){aj=ah.xAdjust}if(isNaN(t)||t=1){C=0.25}var f=C*r;var Z=ai.renderData.xoffsets;var S=-1;var O={};var R=A.skipOverlappingPoints==true;for(var ad=Z.first;ad<=Z.last;ad++){var V=Z.data[ad];if(isNaN(V)){continue}if(S!=-1&&Math.abs(V-S)<(r-1+f)&&R){continue}else{S=V}var F=this._getColumnVOffsets(v,q,ai.seriesCtx,ad,I,d);var L=false;if(aa){for(var B=0;B1||T<0){T=1}}var X=A.columnsBottomWidthPercent/100;if(isNaN(X)){X=1}else{if(X>1||X<0){X=1}}var o=ai.vertical?Q.width:Q.height;ag.x=ag.x-o/2+o/2*T;if(L){var b=o*T/2;af.x=af.x+o/2-(G.flip?-b:b)}else{var b=o*X/2;af.x=af.x+o/2-(G.flip?-b:b)}if(!ai.vertical){this._swapXY([ag]);this._swapXY([af])}this.renderer.line(ag.x,ag.y,af.x,af.y,{stroke:M.color,"stroke-width":ae.stroke,"stroke-opacity":ae.opacity,"fill-opacity":ae.opacity,"stroke-dasharray":ae.dashStyle})}}}if(d==1&&n!=0){O[I?-1:B]={y:ak,x:(ai.vertical?Q.x+Q.width:Q.y+Q.height),color:W.lineColor}}}if(e){var U=this._toPolarCoord(e,ai.rect,Q.x+Q.width/2,Q.y);var o=this._showLabel(q,m,ad,Q,undefined,undefined,true);var J=H.outerRadius+10;var D=this._adjustTextBoxPosition(e.x,e.y,o,J,(H.fromAngle+H.toAngle)/2,true,false,false);P=this._showLabel(q,m,ad,{x:D.x,y:D.y},undefined,undefined,false,false,false)}else{P=this._showLabel(q,m,ad,Q,undefined,undefined,false,false,k)}c={element:u,labelElement:P};p._setRenderInfo(q,m,ad,c);if(d==1){this._installHandlers(u,"column",q,m,ad)}}}},_getTrapezoidPath:function(g,h,f){var l="";var b=g.fromWidthPercent/100;var c=g.toWidthPercent/100;if(!h){var e=g.width;g.width=g.height;g.height=e;e=g.x;g.x=g.y;g.y=e}var j=g.x+g.width/2;var k=[{x:j-g.width*(!f?b:c)/2,y:g.y+g.height},{x:j-g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?b:c)/2,y:g.y+g.height}];if(!h){this._swapXY(k)}l+="M "+a.jqx._ptrnd(k[0].x)+","+a.jqx._ptrnd(k[0].y);for(var d=1;dw.offset){c=w.offset}if(isNaN(r)||rn){break}E=l;var D=t.items[A]=t.items[A]||{};for(var z in q){var F=t.self._getDataValueAsNumber(A,g.series[t.seriesIndex]["dataField"+q[z]],t.groupIndex);if(isNaN(F)){break}var k=t.renderData.offsets[t.seriesIndex][A][q[z]];if(isNaN(k)){break}D[q[z]]=k}l+=t.inverse?t.rect.y:t.rect.x;if(t.polarAxisCoords){var s=this._toPolarCoord(t.polarAxisCoords,this._plotRect,l,k);l=s.x;k=s.y}l=a.jqx._ptrnd(l);for(var f in q){D[f]=a.jqx._ptrnd(D[f])}var h=t.colors;if(!h){h=t.self._getColors(t.groupIndex,t.seriesIndex,A,t.gradientType)}if(!t.isOHLC){var u=D.lineElement;if(!u){u=t.inverse?this.renderer.line(D.Low,l,D.High,l):this.renderer.line(l,D.Low,l,D.High);this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}var p=D.stickElement;l-=e/2;if(!p){var d=h.fillColor;if(D.Close<=D.Open&&h.fillColorAlt){d=h.fillColorAlt}p=t.inverse?this.renderer.rect(Math.min(D.Open,D.Close),l,Math.abs(D.Close-D.Open),e):this.renderer.rect(l,Math.min(D.Open,D.Close),e,Math.abs(D.Close-D.Open));this.renderer.attr(p,{fill:d,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.stickElement=p}if(b==1){this._installHandlers(p,"column",t.groupIndex,t.seriesIndex,A)}}else{var o="M"+l+","+D.Low+" L"+l+","+D.High+" M"+(l-e/2)+","+D.Open+" L"+l+","+D.Open+" M"+(l+e/2)+","+D.Close+" L"+l+","+D.Close;if(t.inverse){o="M"+D.Low+","+l+" L"+D.High+","+l+" M"+D.Open+","+(l-e/2)+" L"+D.Open+","+l+" M"+D.Close+","+l+" L"+D.Close+","+(l+e/2)}var u=D.lineElement;if(!u){u=this.renderer.path(o,{});this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}if(b==1){this._installHandlers(u,"column",t.groupIndex,t.seriesIndex,A)}}}},_renderScatterSeries:function(e,D,F){var u=this.seriesGroups[e];if(!u.series||u.series.length==0){return}var f=u.type.indexOf("bubble")!=-1;var v=u.orientation=="horizontal";var m=D;if(v){m={x:D.y,y:D.x,width:D.height,height:D.width}}var n=this._calcGroupOffsets(e,m);if(!n||n.xoffsets.length==0){return}var N=m.width;var c;if(u.polar||u.spider){c=this._getPolarAxisCoords(e,m);N=2*c.r}var V=this._alignValuesWithTicks(e);var t=this._getGroupGradientType(e);if(!F){F="to"}for(var g=0;gz){z=C}}}}var j=K.minRadius||K.minSymbolSize;if(isNaN(j)){j=N/50}var E=K.maxRadius||K.maxSymbolSize;if(isNaN(E)){E=N/25}if(j>E){E=j}var M=K.radius;if(isNaN(M)&&!isNaN(K.symbolSize)){M=(K.symbolType=="circle")?K.symbolSize/2:K.symbolSize}else{M=5}var G=this._getAnimProps(e,g);var B=G.enabled&&!this._isToggleRefresh&&n.xoffsets.length<5000?G.duration:0;var w={groupIndex:e,seriesIndex:g,symbolType:K.symbolType,symbolSize:K.symbolSize,"fill-opacity":T.opacity,"stroke-opacity":T.opacity,"stroke-width":T.stroke,"stroke-width-symbol":T.strokeSymbol,"stroke-dasharray":T.dashStyle,items:[],polarAxisCoords:c};var o=undefined;for(var S=n.xoffsets.first;S<=n.xoffsets.last;S++){var C=this._getDataValueAsNumber(S,A,e);if(typeof(C)!="number"){continue}var J=n.xoffsets.data[S];var H=n.xoffsets.xvalues[S];var I=n.offsets[g][S][F];if(Im.y+m.height){continue}if(isNaN(J)||isNaN(I)){continue}if(v){var Q=J;J=I;I=Q+D.y}else{J+=D.x}if(!l&&o&&this.enableSampling&&a.jqx._ptdist(o.x,o.y,J,I)<1){continue}o={x:J,y:I};var O=M;if(f){var p=this._getDataValueAsNumber(S,(K.radiusDataField||K.sizeDataField),e);if(typeof(p)!="number"){continue}O=j+(E-j)*(p-U)/Math.max(1,z-U);if(isNaN(O)){O=j}}n.offsets[g][S].radius=O;var k=NaN,P=NaN;var q=0;var b=this._elementRenderInfo;if(H!=undefined&&b&&b.length>e&&b[e].series.length>g){var d=b[e].series[g][H];if(d&&!isNaN(d.to)){k=d.to;P=d.xoffset;q=M;if(v){var Q=P;P=k;k=Q+D.y}else{P+=D.x}if(f){q=j+(E-j)*(d.valueRadius-U)/Math.max(1,z-U);if(isNaN(q)){q=j}}}}if(l){L=this._getColors(e,g,S,t)}w.items.push({from:q,to:O,itemIndex:S,fill:L.fillColor,stroke:L.lineColor,x:J,y:I,xFrom:P,yFrom:k})}this._animR(w,0);var h=this;var R;this._enqueueAnimation("series",undefined,undefined,B,function(s,i,r){h._animR(i,r)},w)}},_animR:function(o,g){var j=o.items;var p=o.symbolType||"circle";var c=o.symbolSize;for(var e=0;e=1){this._installHandlers(d,"circle",o.groupIndex,o.seriesIndex,n.itemIndex)}this._setRenderInfo(o.groupIndex,o.seriesIndex,j[e].itemIndex,{element:d,labelElement:h})}},_showMultiSeriesToolTip:function(n,l,e){var s=this;var w='';var h="";for(var B=0;B"}w+=b+"
";h=b}for(var v=0;v"+o+"
\n"}}var z=this._get([s.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var C=this._get([s.toolTipBackground,"#FFFFFF"]);var D=this._get([s.toolTipLineColor,s._defaultLineColor]);var m=this._get([s.toolTipOpacity,1]);w+="
";var u=this.getItemCoord(s._ttEl.gidx,s._ttEl.sidx,s._ttEl.iidx);s._createTooltip(u,s.seriesGroups[s._ttEl.gidx],w,{css:z,fill:C,stroke:D,fillOpacity:m,symbolSize:3})},_showToolTip:function(K,I,n,e,b){var h=this;var w=h._getXAxis(n);var l=h._getValueAxis(n);if(h._ttEl&&n==h._ttEl.gidx&&e==h._ttEl.sidx&&b==h._ttEl.iidx){return}var s=h.seriesGroups[n];var g=s.series[e];var G=h.enableCrosshairs;if(h._pointMarker){K=parseInt(h._pointMarker.x+5);I=parseInt(h._pointMarker.y-5)}else{G=false}var X=G&&h.showToolTips==false;K=a.jqx._ptrnd(K);I=a.jqx._ptrnd(I);var m=h._ttEl==undefined;if(s.showToolTips==false||g.showToolTips==false){return}if(!h._ttEl){h._ttEl={}}h._ttEl.sidx=e;h._ttEl.gidx=n;h._ttEl.iidx=b;var f=0;for(var T=0;T1){h._showMultiSeriesToolTip(K,I,b);return}var z=h._get([g.toolTipFormatSettings,s.toolTipFormatSettings,l.toolTipFormatSettings,h.toolTipFormatSettings]);var F=h._get([g.toolTipFormatFunction,s.toolTipFormatFunction,l.toolTipFormatFunction,h.toolTipFormatFunction]);var O=h._getColors(n,e,b);var d=h._getDataValue(b,w.dataField,n);if(w.dataField==undefined||w.dataField==""){d=b}if(w.type=="date"){d=h._castAsDate(d,(z?z.dateFormat:undefined)||w.dateFormat)}var C="";if(a.isFunction(F)){var M={};var v=0;for(var k in g){if(k.indexOf("dataField")==0){M[k.substring(9,k.length).toLowerCase()]=h._getDataValue(b,g[k],n);v++}}if(v==0){M=h._getDataValue(b,undefined,n)}else{if(v==1){M=M[""]}}C=F(M,b,g,s,d,w)}else{C=h._getFormattedValue(n,e,b,z,F);var L=this._getAxisSettings(w);var P=L.toolTipFormatSettings;var U=L.toolTipFormatFunction;if(!U&&!P&&w.type=="date"){U=this._getDefaultDTFormatFn(w.baseUnit||"day")}var o=h._formatValue(d,P,U,n,e,b);if(!h._isPieGroup(n)){var N=(w.displayText||w.dataField||"");if(N.length>0){C=N+": "+o+"
"+C}else{C=o+"
"+C}}else{d=h._getDataValue(b,g.displayText||g.dataField,n);o=h._formatValue(d,P,U,n,e,b);C=o+": "+C}}var D=h.renderer.getRect();if(G){var J=a.jqx._ptrnd(h._pointMarker.x);var H=a.jqx._ptrnd(h._pointMarker.y);var B=h.crosshairsColor||h._defaultLineColor;if(s.polar||s.spider){var E=this._getPolarAxisCoords(n,this._plotRect);var c=a.jqx._ptdist(J,H,E.x,E.y);if(c>E.r){return}var A=Math.atan2(H-E.y,J-E.x);var p=Math.cos(A)*E.r+E.x;var W=Math.sin(A)*E.r+E.y;if(h._ttEl.vLine){h.renderer.attr(h._ttEl.vLine,{x1:E.x,y1:E.y,x2:p,y2:W})}else{h._ttEl.vLine=h.renderer.line(E.x,E.y,p,W,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}else{if(h._ttEl.vLine&&h._ttEl.hLine){h.renderer.attr(h._ttEl.vLine,{x1:J,x2:J});h.renderer.attr(h._ttEl.hLine,{y1:H,y2:H})}else{h._ttEl.vLine=h.renderer.line(J,h._plotRect.y,J,h._plotRect.y+h._plotRect.height,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""});h._ttEl.hLine=h.renderer.line(h._plotRect.x,H,h._plotRect.x+h._plotRect.width,H,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}}if(!X&&h.showToolTips!=false){var Q=this._get([g.toolTipClass,s.toolTipClass,h.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var u=this._get([g.toolTipBackground,s.toolTipBackground,h.toolTipBackground,"#FFFFFF"]);var r=this._get([g.toolTipLineColor,s.toolTipLineColor,h.toolTipLineColor,O.lineColor]);var R=this._get([g.toolTipOpacity,s.toolTipOpacity,h.toolTipOpacity,1]);var q=this.getItemCoord(n,e,b);var V=0;if(h._pointMarker&&h._pointMarker.element){V=g.symbolSizeSelected;if(isNaN(V)){V=g.symbolSize}if(isNaN(V)||V>50||V<0){V=s.symbolSize}if(isNaN(V)||V>50||V<0){V=8}}h._createTooltip(q,s,C,{css:Q,fill:u,stroke:r,fillOpacity:R,symbolSize:V})}},_fitTooltip:function(c,h,j,k,e){var d={};var b=2+e/2;var f=7;if(h.x-j.width-f-b>c.x&&h.y+h.height/2-j.height/2>c.y&&h.y+h.height/2+j.height/2c.y&&h.y+h.height/2+j.height/2c.y&&h.x+h.width/2-j.width/2>c.x&&h.x+h.width/2+j.width/2c.x&&h.x+h.width/2+j.width/2h.height||((k.type.indexOf("stackedcolumn")!=-1||k.type.indexOf("stackedwaterfall")!=-1)&&k.orientation!="horizontal")){if(d.left){return d.left}if(d.right){return d.right}}else{if(d.top){return d.top}if(d.bottom){return d.bottom}}for(var g in d){if(d[g]){return d[g]}}return{arrowLocation:""}},_createTooltip:function(G,l,A,B){var u=this;var z=l.type;var E=false;var F=u._ttEl.box;if(!F){E=true;F=u._ttEl.box=document.createElement("div");var f=10000000;F.style.position="absolute";F.style.cursor="default";a(b).css({"z-index":f,"box-sizing":"content-box"});a(F).css({"z-index":f});a(document.body).append(F);var b=document.createElement("div");b.id="arrowOuterDiv";b.style.width="0px";b.style.height="0px";b.style.position="absolute";a(b).css({"z-index":f+1,"box-sizing":"content-box"});var h=document.createElement("div");h.id="arrowInnerDiv";h.style.width="0px";h.style.height="0px";h.style.position="absolute";var w=document.createElement("div");w.id="contentDiv";w.style.position="absolute";a(w).css({"box-sizing":"content-box",outline:"none",border:"1px solid transparent",padding:"3px","text-align":"center","vertical-align":"middle",margin:"0 0 0 0",cursor:"default"});a(w).addClass("jqx-rc-all");a(w).appendTo(a(F));a(b).appendTo(a(F));a(h).appendTo(a(F));a(h).css({"z-index":f+2,"box-sizing":"content-box"})}if(!A||A.length==0){a(F).fadeTo(0,0);return}w=a(F).find("#contentDiv")[0];b=a(F).find("#arrowOuterDiv")[0];h=a(F).find("#arrowInnerDiv")[0];h.style.opacity=b.style.opacity=B.fillOpacity;w.style.backgroundColor=B.fill;w.style.borderColor=B.stroke;w.style.opacity=B.fillOpacity;var p=""+A+"";a(w).html(p);var t=this._measureHtml(p,"jqx-rc-all jqx-button");var c=u._plotRect;if(t.width>c.width||t.height>c.height){return}var r={width:t.width,height:t.height};var j="";var D=5;var s=7;var v=u._isColumnType(z);var o=Math.max(G.x,c.x);var m=Math.max(G.y,c.y);if(u.toolTipAlignment=="dataPoint"){if(z.indexOf("pie")!=-1||z.indexOf("donut")!=-1){var n=(G.fromAngle+G.toAngle)/2;n=n*(Math.PI/180);var g=(!isNaN(G.innerRadius)&&G.innerRadius>0)?(G.innerRadius+G.outerRadius)/2:G.outerRadius*0.75;o=G.x=G.center.x+Math.cos(n)*g;m=G.y=G.center.y-Math.sin(n)*g;G.width=G.height=1}else{if(v&&(l.polar||l.spider)){G.width=G.height=1}}var C=this._fitTooltip(this._plotRect,G,r,l,B.symbolSize);if(C.arrowLocation!=""){j=C.arrowLocation;o=C.x;m=C.y;r.width=C.width;r.height=C.height}}else{j=""}if(j=="top"||j=="bottom"){r.height+=s;o-=s/2;if(j=="bottom"){m-=s}}else{if(j=="left"||j=="right"){r.width+=s;m-=s/2;if(j=="right"){o-=s}}}if(o+r.width>c.x+c.width){j="";o=c.x+c.width-r.width}if(m+r.height>c.y+c.height){j="";m=c.y+c.height-r.height}var i={x:0,y:0},e={x:0,y:0};a(w).css({width:t.width,height:t.height,left:0,top:0});b.style["margin-top"]=b.style["margin-left"]=0;h.style["margin-top"]=h.style["margin-left"]=0;w.style["margin-top"]=w.style["margin-left"]=0;var k=s+"px solid";var d=s+"px solid transparent";switch(j){case"left":i={x:0,y:(t.height-s)/2};e={x:s,y:0};w.style["margin-left"]=s+"px";b.style["margin-left"]=0+"px";b.style["margin-top"]=i.y+"px";b.style["border-left"]="";b.style["border-right"]=k+" "+B.stroke;b.style["border-top"]=d;b.style["border-bottom"]=d;h.style["margin-left"]=1+"px";h.style["margin-top"]=i.y+"px";h.style["border-left"]="";h.style["border-right"]=k+" "+B.fill;h.style["border-top"]=d;h.style["border-bottom"]=d;break;case"right":i={x:r.width-s,y:(t.height-s)/2};e={x:0,y:0};b.style["margin-left"]=i.x+"px";b.style["margin-top"]=i.y+"px";b.style["border-left"]=k+" "+B.stroke;b.style["border-right"]="";b.style["border-top"]=d;b.style["border-bottom"]=d;h.style["margin-left"]=i.x-1+"px";h.style["margin-top"]=i.y+"px";h.style["border-left"]=k+" "+B.fill;h.style["border-right"]="";h.style["border-top"]=d;h.style["border-bottom"]=d;break;case"top":i={x:r.width/2-s/2,y:0};e={x:0,y:s};w.style["margin-top"]=e.y+"px";b.style["margin-left"]=i.x+"px";b.style["border-top"]="";b.style["border-bottom"]=k+" "+B.stroke;b.style["border-left"]=d;b.style["border-right"]=d;h.style["margin-left"]=i.x+"px";h.style["margin-top"]=1+"px";h.style["border-top"]="";h.style["border-bottom"]=k+" "+B.fill;h.style["border-left"]=d;h.style["border-right"]=d;break;case"bottom":i={x:r.width/2-s/2,y:r.height-s};e={x:0,y:0};b.style["margin-left"]=i.x+"px";b.style["margin-top"]=i.y+"px";b.style["border-top"]=k+" "+B.stroke;b.style["border-bottom"]="";b.style["border-left"]=d;b.style["border-right"]=d;h.style["margin-left"]=i.x+"px";h.style["margin-top"]=i.y-1+"px";h.style["border-top"]=k+" "+B.fill;h.style["border-bottom"]="";h.style["border-left"]=d;h.style["border-right"]=d;break}if(j==""){a(b).hide();a(h).hide()}else{a(b).show();a(h).show()}a(F).css({width:r.width+"px",height:r.height+"px"});var q=u.host.coord();if(E){a(F).fadeOut(0,0);F.style.left=o+q.left+"px";F.style.top=m+q.top+"px"}a(F).clearQueue();a(F).animate({left:o+q.left,top:m+q.top,opacity:1},u.toolTipMoveDuration,"easeInOutCirc");a(F).fadeTo(400,1)},_measureHtml:function(c,b){var e=this._measureDiv;if(!e){this._measureDiv=e=document.createElement("div");e.style.position="absolute";e.style.cursor="default";e.style.overflow="hidden";e.style.display="none";a(e).addClass(b);this.host.append(e)}a(e).html(c);var d={width:a(e).width()+2,height:a(e).height()+2};if(a.jqx.browser&&a.jqx.browser.mozilla){d.height+=3}return d},_hideToolTip:function(b){if(!this._ttEl){return}if(this._ttEl.box){if(b==0){a(this._ttEl.box).hide()}else{a(this._ttEl.box).fadeOut()}}this._hideCrosshairs();this._ttEl.gidx=undefined},_hideCrosshairs:function(){if(!this._ttEl){return}if(this._ttEl.vLine){this.renderer.removeElement(this._ttEl.vLine);this._ttEl.vLine=undefined}if(this._ttEl.hLine){this.renderer.removeElement(this._ttEl.hLine);this._ttEl.hLine=undefined}},_get:function(b){return a.jqx.getByPriority(b)},_getAxisSettings:function(f){if(!f){return{}}var l=this;var k=f.gridLines||{};var n={visible:this._get([k.visible,f.showGridLines,true]),color:l._get([k.color,f.gridLinesColor,l._defaultLineColor]),unitInterval:l._get([k.unitInterval,k.interval,f.gridLinesInterval]),step:l._get([k.step,f.gridLinesStep]),dashStyle:l._get([k.dashStyle,f.gridLinesDashStyle]),width:l._get([k.lineWidth,1]),offsets:[],alternatingBackgroundColor:f.alternatingBackgroundColor,alternatingBackgroundColor2:f.alternatingBackgroundColor2,alternatingBackgroundOpacity:f.alternatingBackgroundOpacity};var d=f.tickMarks||{};var h={visible:this._get([d.visible,f.showTickMarks,true]),color:l._get([d.color,f.tickMarksColor,l._defaultLineColor]),unitInterval:l._get([d.unitInterval,d.interval,f.tickMarksInterval]),step:l._get([d.step,f.tickMarksStep]),dashStyle:l._get([d.dashStyle,f.tickMarksDashStyle]),width:l._get([d.lineWidth,1]),size:l._get([d.size,4]),offsets:[]};var e=f.title||{};var c={visible:l._get([e.visible,true]),text:l._get([f.description,e.text]),style:l._get([f.descriptionClass,e["class"],l.toThemeProperty("jqx-chart-axis-description",null)]),halign:l._get([f.horizontalDescriptionAlignment,e.horizontalAlignment,"center"]),valign:l._get([f.verticalDescriptionAlignment,e.verticalAlignment,"center"]),angle:0,rotationPoint:l._get([e.rotationPoint,"centercenter"]),offset:l._get([e.offset,{x:0,y:0}])};var i=f.line||{};var b={visible:l._get([i.visible,true]),color:l._get([i.color,n.color,l._defaultLineColor]),dashStyle:l._get([i.dashStyle,n.dashStyle,""]),width:l._get([i.lineWidth,1]),angle:l._get([i.angle,NaN])};var j=f.padding||{};j={left:j.left||0,right:j.right||0,top:j.top||0,bottom:j.bottom||0};var g=this._getAxisLabelsSettings(f);var m={visible:this._get([f.visible,f.showValueAxis,f.showXAxis,f.showCategoryAxis,true]),customDraw:this._get([f.customDraw,false]),gridLines:n,tickMarks:h,line:b,title:c,labels:g,padding:j,toolTipFormatFunction:this._get([f.toolTipFormatFunction,f.formatFunction,g.formatFunction]),toolTipFormatSettings:this._get([f.toolTipFormatSettings,f.formatSettings,g.formatSettings])};return m},_getAxisLabelsSettings:function(d){var b=this;var e=d.labels||{};var c={visible:b._get([d.showLabels,e.visible,true]),unitInterval:b._get([e.unitInterval,e.interval,d.labelsInterval]),step:b._get([e.step,d.labelsStep]),angle:b._get([d.textRotationAngle,e.angle,0]),style:b._get([d["class"],e["class"],b.toThemeProperty("jqx-chart-axis-text",null)]),halign:b._get([d.horizontalTextAlignment,e.horizontalAlignment,"center"]),valign:b._get([d.verticalTextAlignment,e.verticalAlignment,"center"]),textRotationPoint:b._get([d.textRotationPoint,e.rotationPoint,"auto"]),textOffset:b._get([d.textOffset,e.offset,{x:0,y:0}]),autoRotate:b._get([d.labelsAutoRotate,e.autoRotate,false]),formatSettings:b._get([d.formatSettings,e.formatSettings,undefined]),formatFunction:b._get([d.formatFunction,e.formatFunction,undefined])};return c},_getLabelsSettings:function(p,l,h,t){var j=this.seriesGroups[p];var r=j.series[l];var m=isNaN(h)?undefined:this._getDataValue(h,r.dataField,p);var k=t||["Visible","Offset","Angle","HorizontalAlignment","VerticalAlignment","Class","BackgroundColor","BorderColor","BorderOpacity","Padding","Opacity","BackgroundOpacity","LinesAngles","LinesEnabled","AutoRotate","Radius"];var q={};for(var f=0;f0){if(t==""||t=="center"){p+=(s-C.width)/2}else{if(t=="right"){p+=(s-C.width)}}}if(H>0){if(i==""||i=="center"){n+=(H-C.height)/2}else{if(i=="bottom"){n+=(H-C.height)}}}p+=b.x+G.x;n+=b.y+G.y;var o=this._plotRect;if(p<=o.x){p=o.x+2}if(n<=o.y){n=o.y+2}var l={width:Math.max(C.width,1),height:Math.max(C.height,1)};if(n+l.height>=o.y+o.height){n=o.y+o.height-(q?(l.height+q.height)/2:l.height)-2}if(p+l.width>=o.x+o.width){p=o.x+o.width-l.width-2}var d;var A=I.backgroundColor;var D=I.borderColor;var z=I.padding;if(A||D){d=this.renderer.beginGroup();var b=this.renderer.rect(p-z.left,n-z.top,C.width+z.left+z.right,C.height+z.bottom+z.bottom,{fill:A||"transparent","fill-opacity":I.backgroundOpacity||1,stroke:D||"transparent","stroke-opacity":I.borderOpacity,"stroke-width":1})}var u=this.renderer.text(v,p,n,C.width,C.height,g,{"class":I["class"],opacity:I.opacity||1},false,"center","center");if(B){B.x=p-z.left;B.y=n-z.top;B.width=C.width+z.left+z.right;B.height=C.height+z.bottom+z.bottom}if(this._isVML){this.renderer.removeElement(u);this.renderer.getContainer()[0].appendChild(u)}if(d){this.renderer.endGroup()}return d||u},_getAnimProps:function(j,f){var e=this.seriesGroups[j];var c=!isNaN(f)?e.series[f]:undefined;var b=this.enableAnimations==true;if(e.enableAnimations){b=e.enableAnimations==true}if(c&&c.enableAnimations){b=c.enableAnimations==true}var i=this.animationDuration;if(isNaN(i)){i=1000}var d=e.animationDuration;if(!isNaN(d)){i=d}if(c){var h=c.animationDuration;if(!isNaN(h)){i=h}}if(i>5000){i=1000}return{enabled:b,duration:i}},_isColorTransition:function(f,d,e,g){if(g-1=0;n--){var g=this._getSerieSettings(k,n);var ah={groupIndex:k,rect:y,serieIndex:n,swapXY:aj,isArea:s,isSpline:ae,isRange:O,isPolar:af,settings:g,segments:[],pointsLength:0};var j=this._isSerieVisible(k,n);if(!j){this._linesRenderInfo[k][n]=ah;continue}var J=H.series[n];if(J.customDraw){continue}var w=a.isFunction(J.colorFunction);var U=C.xoffsets.first;var G=U;var N=this._getColors(k,n,NaN,this._getGroupGradientType(k));var ab=false;var u;do{var W=[];var T=[];var r=[];var P=-1;var p=0,o=0;var R=NaN;var E=NaN;var ai=NaN;if(C.xoffsets.length<1){continue}var S=this._getAnimProps(k,n);var L=S.enabled&&!this._isToggleRefresh&&C.xoffsets.length<10000&&this._isVML!=true?S.duration:0;var v=U;u=false;var d=this._getColors(k,n,U,this._getGroupGradientType(k));var D=undefined;for(var ad=U;ad<=C.xoffsets.last;ad++){U=ad;var X=C.xoffsets.data[ad];var V=C.xoffsets.xvalues[ad];if(isNaN(X)){continue}X=Math.max(X,1);p=X;o=C.offsets[n][ad].to;if(!w&&D&&this.enableSampling&&a.jqx._ptdist(D.x,D.y,p,o)<1){continue}D={x:p,y:o};var aa=C.offsets[n][ad].from;if(isNaN(o)||isNaN(aa)){if(J.emptyPointsDisplay=="connect"){continue}else{if(J.emptyPointsDisplay=="zero"){if(isNaN(o)){o=C.baseOffset}if(isNaN(aa)){aa=C.baseOffset}}else{u=true;break}}}if(w&&this._isColorTransition(k,n,C,U)){if(W.length>1){U--;break}}var c=this._elementRenderInfo;if(c&&c.length>k&&c[k].series.length>n){var f=c[k].series[n][V];var ai=a.jqx._ptrnd(f?f.to:undefined);var I=a.jqx._ptrnd(y.x+(f?f.xoffset:undefined));r.push(aj?{y:I,x:ai,index:ad}:{x:I,y:ai,index:ad})}G=ad;if(g.stroke<2){if(o-y.y<=1){o=y.y+1}if(aa-y.y<=1){aa=y.y+1}if(y.y+y.height-o<=1){o=y.y+y.height-1}if(y.y+y.height-aa<=1){aa=y.y+y.height-1}}if(!s&&e){if(o<=y.y){o=y.y+1}if(o>=y.y+y.height){o=y.y+y.height-1}if(aa<=y.y){aa=y.y+1}if(aa>=y.y+y.height){aa=y.y+y.height-1}}X=Math.max(X,1);p=X+y.x;if(H.skipOverlappingPoints==true&&!isNaN(R)&&Math.abs(R-p)<=1){continue}if(t&&!isNaN(R)&&!isNaN(E)){if(E!=o){W.push(aj?{y:p,x:a.jqx._ptrnd(E)}:{x:p,y:a.jqx._ptrnd(E)})}}W.push(aj?{y:p,x:a.jqx._ptrnd(o),index:ad}:{x:p,y:a.jqx._ptrnd(o),index:ad});T.push(aj?{y:p,x:a.jqx._ptrnd(aa),index:ad}:{x:p,y:a.jqx._ptrnd(aa),index:ad});R=p;E=o;if(isNaN(ai)){ai=o}}if(W.length==0){U++;continue}var F=W[W.length-1].index;if(w){N=this._getColors(k,n,F,this._getGroupGradientType(k))}var l=y.x+C.xoffsets.data[v];var Z=y.x+C.xoffsets.data[G];if(s&&H.alignEndPointsWithIntervals==true){var A=B?-1:1;if(l>y.x){l=y.x}if(ZB.x+B.width||t.yB.y+B.height){continue}if(v!="none"){var n=this._getColors(f,g,u.pointsArray[z].index,this._getGroupGradientType(f));var e=this._drawSymbol(v,t.x,t.y,n.fillColorSymbol,A.opacity,n.lineColorSymbol,A.opacity,A.strokeSymbol,undefined,C);u.symbolElements.push(e)}if(p){var k=(z>0?r[z-1]:r[z]).split(",");k={x:parseFloat(k[0]),y:parseFloat(k[1])};var m=(z0){s+=" "}var k=o[u].y;var l=o[u].x;var b=!z?k:f;var d=l;if(n&&n.length>u){b=n[u].y;d=n[u].x;if(isNaN(b)||isNaN(d)){b=k;d=l}}j=d;if(t<=o.length&&u>0&&u==t){d=o[u-1].x;b=o[u-1].y}if(c){l=a.jqx._ptrnd((l-b)*(z?e:1)+b);k=a.jqx._ptrnd(k)}else{l=a.jqx._ptrnd((l-d)*e+d);k=a.jqx._ptrnd((k-b)*e+b)}if(m){var q=this._toPolarCoord(m,this._plotRect,l,k);l=q.x;k=q.y}s+=l+","+k}return s},_buildLineCmd:function(k,o,g,s,e,m,d,r,c,j,f,b){var p=k;var l=b?d+","+g:g+","+d;var h=b?d+","+s:s+","+d;if(r&&!c&&!o){p=l+" "+k+" "+h}if(f){p=this._getBezierPoints(p)}var n=p.split(" ");if(n.length==0){return""}if(n.length==1){var q=n[0].split(",");return"M "+n[0]+" L"+(parseFloat(q[0])+1)+","+(parseFloat(q[1])+1)}var i=n[0].replace("M","");if(r&&!c){if(!o){p="M "+l+" L "+i+" "+p}else{p="M "+i+" L "+i+(f?"":(" L "+i+" "))+p}}else{if(!f){p="M "+i+" L "+i+" "+p}}if((c&&j)||o){p+=" Z"}return p},_getSerieSettings:function(i,c){var h=this.seriesGroups[i];var g=h.type.indexOf("area")!=-1;var f=h.type.indexOf("line")!=-1;var d=h.series[c];var k=d.dashStyle||h.dashStyle||"";var e=d.opacity||h.opacity;if(isNaN(e)||e<0||e>1){e=1}var j=d.lineWidth;if(isNaN(j)&&j!="auto"){j=h.lineWidth}if(j=="auto"||isNaN(j)||j<0||j>15){if(g){j=2}else{if(f){j=3}else{j=1}}}var b=d.lineWidthSymbol;if(isNaN(b)){b=1}return{stroke:j,strokeSymbol:b,opacity:e,dashStyle:k}},_getColors:function(u,p,d,e,b){var k=this.seriesGroups[u];var o=k.series[p];var c=this._get([o.useGradientColors,k.useGradientColors,k.useGradient,true]);var l=this._getSeriesColors(u,p,d);if(!l.fillColor){l.fillColor=r;l.fillColorSelected=a.jqx.adjustColor(r,1.1);l.fillColorAlt=a.jqx.adjustColor(r,4);l.fillColorAltSelected=a.jqx.adjustColor(r,3);l.lineColor=l.symbolColor=a.jqx.adjustColor(r,0.9);l.lineColorSelected=l.symbolColorSelected=a.jqx.adjustColor(r,0.9)}var h=[[0,1.4],[100,1]];var f=[[0,1],[25,1.1],[50,1.4],[100,1]];var n=[[0,1.3],[90,1.2],[100,1]];var j=NaN;if(!isNaN(b)){j=b==2?h:f}if(c){var q={};for(var s in l){q[s]=l[s]}l=q;if(e=="verticalLinearGradient"||e=="horizontalLinearGradient"){var g=e=="verticalLinearGradient"?j||h:j||f;var m=["fillColor","fillColorSelected","fillColorAlt","fillColorAltSelected"];for(var v in m){var r=l[m[v]];if(r){l[m[v]]=this.renderer._toLinearGradient(r,e=="verticalLinearGradient",g)}}}else{if(e=="radialGradient"){var t;var j=h;if((k.type=="pie"||k.type=="donut"||k.polar)&&d!=undefined&&this._renderData[u]&&this._renderData[u].offsets[p]){t=this._renderData[u].offsets[p][d];j=n}l.fillColor=this.renderer._toRadialGradient(l.fillColor,j,t);l.fillColorSelected=this.renderer._toRadialGradient(l.fillColorSelected,j,t)}}}return l},_installHandlers:function(c,f,i,h,d){if(!this.enableEvents){return false}var j=this;var e=this.seriesGroups[i];var k=this.seriesGroups[i].series[h];var b=e.type.indexOf("line")!=-1||e.type.indexOf("area")!=-1;if(!b&&!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mousemove",function(m){var l=j._selected;if(l&&l.isLineType&&l.linesUnselectMode=="click"&&!(l.group==i&&l.series==h)){return}var g=m.pageX||m.clientX||m.screenX;var o=m.pageY||m.clientY||m.screenY;var n=j.host.offset();g-=n.left;o-=n.top;if(j._mouseX==g&&j._mouseY==o){return}if(j._ttEl){if(j._ttEl.gidx==i&&j._ttEl.sidx==h&&j._ttEl.iidx==d){return}}j._startTooltipTimer(i,h,d)})}if(!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mouseover",function(l){var g=j._selected;if(g&&g.isLineType&&g.linesUnselectMode=="click"&&!(g.group==i&&g.series==h)){return}j._select(c,f,i,h,d,d)})}this.renderer.addHandler(c,"click",function(g){clearTimeout(j._hostClickTimer);j._lastClickTs=(new Date()).valueOf();if(b&&(f!="symbol"&&f!="pointMarker")){return}if(j._isColumnType(e.type)){j._unselect()}if(isNaN(d)){return}g.stopImmediatePropagation();j._raiseItemEvent("click",e,k,d)})},_getHorizontalOffset:function(A,s,k,j){var c=this._plotRect;var h=this._getDataLen(A);if(h==0){return{index:undefined,value:k}}var p=this._calcGroupOffsets(A,this._plotRect);if(p.xoffsets.length==0){return{index:undefined,value:undefined}}var n=k;var m=j;var w=this.seriesGroups[A];var l;if(w.polar||w.spider){l=this._getPolarAxisCoords(A,c)}var e=this._getXAxis(A).flip==true;var b,o,v,f;for(var t=p.xoffsets.first;t<=p.xoffsets.last;t++){var u=p.xoffsets.data[t];var d=p.offsets[s][t].to;var q=0;if(l){var r=this._toPolarCoord(l,c,u+c.x,d);u=r.x;d=r.y;q=a.jqx._ptdist(n,m,u,d)}else{if(w.orientation=="horizontal"){u+=c.y;var z=d;d=u;u=z;q=a.jqx._ptdist(n,m,u,d)}else{u+=c.x;q=Math.abs(n-u)}}if(isNaN(b)||b>q){b=q;o=t;v=u;f=d}}return{index:o,value:p.xoffsets.data[o],polarAxisCoords:l,x:v,y:f}},onmousemove:function(k,j){if(this._mouseX==k&&this._mouseY==j){return}this._mouseX=k;this._mouseY=j;if(!this._selected){return}var B=this._selected.group;var q=this._selected.series;var v=this.seriesGroups[B];var n=v.series[q];var b=this._plotRect;if(this.renderer){b=this.renderer.getRect();b.x+=5;b.y+=5;b.width-=10;b.height-=10}if(kb.x+b.width||jb.y+b.height){this._hideToolTip();this._unselect();return}var e=v.orientation=="horizontal";var b=this._plotRect;if(v.type.indexOf("line")!=-1||v.type.indexOf("area")!=-1){var f=this._getHorizontalOffset(B,this._selected.series,k,j);var u=f.index;if(u==undefined){return}if(this._selected.item!=u){var p=this._linesRenderInfo[B][q].segments;var r=0;while(u>p[r].lastItemIndex){r++;if(r>=p.length){return}}var c=p[r].pathElement;var C=p[r].lastItemIndex;this._unselect(false);this._select(c,"path",B,q,u,C)}var m=this._getSymbol(this._selected.group,this._selected.series);if(m=="none"){m="circle"}var o=this._calcGroupOffsets(B,b);var d=o.offsets[this._selected.series][u].to;var t=d;if(v.type.indexOf("range")!=-1){t=o.offsets[this._selected.series][u].from}var l=e?k:j;if(!isNaN(t)&&Math.abs(l-t)50||A<0){A=v.symbolSize}if(isNaN(A)||A>50||A<0){A=8}if(this.showToolTips||this.enableCrosshairs){this._pointMarker={type:m,x:k,y:j,gidx:B,sidx:q,iidx:u};this._pointMarker.element=this._drawSymbol(m,k,j,h.fillColorSymbolSelected,w.opacity,h.lineColorSymbolSelected,w.opacity,w.strokeSymbol,w.dashStyle,A);this._installHandlers(this._pointMarker.element,"pointMarker",B,q,u)}this._startTooltipTimer(B,this._selected.series,u)}},_drawSymbol:function(i,l,j,c,m,k,f,g,b,o){var e;var h=o||6;var d=h/2;switch(i){case"none":return undefined;case"circle":e=this.renderer.circle(l,j,h/2);break;case"square":h=h-1;d=h/2;e=this.renderer.rect(l-d,j-d,h,h);break;case"diamond":var n="M "+(l-d)+","+(j)+" L"+(l)+","+(j-d)+" L"+(l+d)+","+(j)+" L"+(l)+","+(j+d)+" Z";e=this.renderer.path(n);break;case"triangle_up":case"triangle":var n="M "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j+d)+" L "+(l)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_down":var n="M "+(l-d)+","+(j-d)+" L "+(l)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_left":var n="M "+(l-d)+","+(j)+" L "+(l+d)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_right":var n="M "+(l-d)+","+(j-d)+" L "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j)+" Z";e=this.renderer.path(n);break;default:e=this.renderer.circle(l,j,h)}this.renderer.attr(e,{fill:c,"fill-opacity":m,stroke:k,"stroke-width":g,"stroke-opacity":f,"stroke-dasharray":b||""});if(i!="circle"){this.renderer.attr(e,{r:h/2});if(i!="square"){this.renderer.attr(e,{x:l,y:j})}}return e},_getSymbol:function(f,b){var c=["circle","square","diamond","triangle_up","triangle_down","triangle_left","triangle_right"];var e=this.seriesGroups[f];var d=e.series[b];var h;if(d.symbolType!=undefined){h=d.symbolType}if(h==undefined){h=e.symbolType}if(h=="default"){return c[b%c.length]}else{if(h!=undefined){return h}}return"none"},_startTooltipTimer:function(k,j,d,i,h,b,f){this._cancelTooltipTimer();var l=this;var e=l.seriesGroups[k];var c=this.toolTipShowDelay||this.toolTipDelay;if(isNaN(c)||c>10000||c<0){c=500}if(this._ttEl||(true==this.enableCrosshairs&&false==this.showToolTips)){c=0}if(!isNaN(b)){c=b}clearTimeout(this._tttimerHide);if(isNaN(i)){i=l._mouseX}if(isNaN(h)){h=l._mouseY-3}if(c==0){l._showToolTip(i,h,k,j,d)}this._tttimer=setTimeout(function(){if(c!=0){l._showToolTip(i,h,k,j,d)}var g=l.toolTipHideDelay;if(!isNaN(f)){g=f}if(isNaN(g)){g=4000}l._tttimerHide=setTimeout(function(){l._hideToolTip();l._unselect()},g)},c)},_cancelTooltipTimer:function(){clearTimeout(this._tttimer)},_getGroupGradientType:function(c){var b=this.seriesGroups[c];if(b.type.indexOf("area")!=-1){return b.orientation=="horizontal"?"horizontalLinearGradient":"verticalLinearGradient"}else{if(this._isColumnType(b.type)||b.type.indexOf("candle")!=-1){if(b.polar){return"radialGradient"}return b.orientation=="horizontal"?"verticalLinearGradient":"horizontalLinearGradient"}else{if(b.type.indexOf("scatter")!=-1||b.type.indexOf("bubble")!=-1||this._isPieGroup(c)){return"radialGradient"}}}return undefined},_select:function(h,l,o,n,i,m){if(this._selected){if((this._selected.item!=i||this._selected.series!=n||this._selected.group!=o)){this._unselect()}else{return}}var k=this.seriesGroups[o];var p=k.series[n];if(k.enableSelection==false||p.enableSelection==false){return}var f=k.type.indexOf("line")!=-1&&k.type.indexOf("area")==-1;this._selected={element:h,type:l,group:o,series:n,item:i,iidxBase:m,isLineType:f,linesUnselectMode:p.linesUnselectMode||k.linesUnselectMode};var b=this._getColors(o,n,m||i,this._getGroupGradientType(o));var c=b.fillColorSelected;if(f){c="none"}var e=this._getSerieSettings(o,n);var d=(l=="symbol")?b.lineColorSymbolSelected:b.lineColorSelected;c=(l=="symbol")?b.fillColorSymbolSelected:c;var j=(l=="symbol")?1:e.stroke;if(this.renderer.getAttr(h,"fill")==b.fillColorAlt){c=b.fillColorAltSelected}this.renderer.attr(h,{stroke:d,fill:c,"stroke-width":j});if(k.type.indexOf("pie")!=-1||k.type.indexOf("donut")!=-1){this._applyPieSelect()}this._raiseItemEvent("mouseover",k,p,i)},_applyPieSelect:function(){var c=this;c._createAnimationGroup("animPieSlice");var e=this._selected;if(!e){return}var f=this.getItemCoord(e.group,e.series,e.item);if(!f){return}var d=this._getRenderInfo(e.group,e.series,e.item);var b={element:d,coord:f};this._enqueueAnimation("animPieSlice",undefined,undefined,300,function(i,g,j){var l=g.coord;var h=l.selectedRadiusChange*j;var k=c.renderer.pieSlicePath(l.center.x,l.center.y,l.innerRadius==0?0:(l.innerRadius+h),l.outerRadius+h,l.fromAngle,l.toAngle,l.centerOffset);c.renderer.attr(g.element.element,{d:k});c._showPieLabel(e.group,e.series,e.item,undefined,h)},b);c._startAnimation("animPieSlice")},_applyPieUnselect:function(){this._stopAnimations();var b=this._selected;if(!b){return}var d=this.getItemCoord(b.group,b.series,b.item);if(!d||!d.center){return}var c=this.renderer.pieSlicePath(d.center.x,d.center.y,d.innerRadius,d.outerRadius,d.fromAngle,d.toAngle,d.centerOffset);this.renderer.attr(b.element,{d:c});this._showPieLabel(b.group,b.series,b.item,undefined,0)},_unselect:function(){var o=this;if(o._selected){var n=o._selected.group;var m=o._selected.series;var f=o._selected.item;var k=o._selected.iidxBase;var j=o._selected.type;var i=o.seriesGroups[n];var p=i.series[m];var e=i.type.indexOf("line")!=-1&&i.type.indexOf("area")==-1;var b=o._getColors(n,m,k||f,o._getGroupGradientType(n));var c=b.fillColor;if(e){c="none"}var d=o._getSerieSettings(n,m);var l=(j=="symbol")?b.lineColorSymbol:b.lineColor;c=(j=="symbol")?b.fillColorSymbol:c;if(this.renderer.getAttr(o._selected.element,"fill")==b.fillColorAltSelected){c=b.fillColorAlt}var h=(j=="symbol")?1:d.stroke;o.renderer.attr(o._selected.element,{stroke:l,fill:c,"stroke-width":h});if(i.type.indexOf("pie")!=-1||i.type.indexOf("donut")!=-1){this._applyPieUnselect()}o._selected=undefined;if(!isNaN(f)){o._raiseItemEvent("mouseout",i,p,f)}}if(o._pointMarker){if(o._pointMarker.element){o.renderer.removeElement(o._pointMarker.element);o._pointMarker.element=undefined}o._pointMarker=undefined;o._hideCrosshairs()}},_raiseItemEvent:function(f,g,e,c){var d=e[f]||g[f];var h=0;for(;h=1){c*=10}else{c/=10}for(var e=1;eMath.abs(g[e]*c-k)){l=e}else{break}}}while(l==g.length-1);return g[l]*c},_renderDataClone:function(){if(!this._renderData||this._isToggleRefresh){return}var d=this._elementRenderInfo=[];if(this._isSelectorRefresh){return}for(var h=0;h