/*!@license * Infragistics.Web.ClientUI Doughnut Chart localization resources 19.1.20191.172 * * Copyright (c) 2011-2019 Infragistics Inc. * * http://www.infragistics.com/ * */ (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{return factory(jQuery)}})(function($){/*!@license * Infragistics.Web.ClientUI Doughnut Chart localization resources 19.1.20191.172 * * Copyright (c) 2011-2019 Infragistics Inc. * * http://www.infragistics.com/ * */ (function($){$.ig=$.ig||{};$.ig.locale=$.ig.locale||{};$.ig.locale.en=$.ig.locale.en||{};$.ig.igDoughnutChart=$.ig.igDoughnutChart||{};$.ig.locale.en.igDoughnutChart={invalidBaseElement:" is not supported as base element. Use DIV instead."};$.ig.igDoughnutChart.locale=$.ig.igDoughnutChart.locale||$.ig.locale.en.igDoughnutChart;return $.ig.locale.en.igDoughnutChart})($);$.ig=$.ig||{};$.ig.locale=$.ig.locale||{};$.ig.locale.en=$.ig.locale.en||{};$.ig.igDoughnutChart=$.ig.igDoughnutChart||{};$.ig.locale.en.igDoughnutChart={invalidBaseElement:" is not supported as base element. Use DIV instead."};$.ig.igDoughnutChart.locale=$.ig.igDoughnutChart.locale||$.ig.locale.en.igDoughnutChart;return $.ig.locale.en.igDoughnutChart});/*!@license * Infragistics.Web.ClientUI DoughnutChart 19.1.20191.172 * * Copyright (c) 2011-2019 Infragistics Inc. * * http://www.infragistics.com/ * * Depends on: * jquery.js * jquery-ui.js * infragistics.util.js * infragistics.datasource.js * infragistics.templating.js * infragistics.ext_core.js * infragistics.ext_collections.js * infragistics.ext_ui.js * infragistics.dv_core.js * infragistics.dv_geometry.js * infragistics.dv_jquerydom.js * infragistics.datachart_core.js * infragistics.dvcommonwidget.js * infragistics.piechart.js * infragistics.doughnutchart.js * infragistics.ui.widget.js * infragistics.ui.basechart.js * infragistics.ui.doughnutchart.js */ (function(factory){if(typeof define==="function"&&define.amd){define(["jquery","jquery-ui","./infragistics.util","./infragistics.doughnutchart","./infragistics.ui.basechart"],factory)}else{factory(jQuery)}})(function($){/*!@license * Infragistics.Web.ClientUI Doughnut Chart localization resources 19.1.20191.172 * * Copyright (c) 2011-2019 Infragistics Inc. * * http://www.infragistics.com/ * */ (function($){$.ig=$.ig||{};$.ig.locale=$.ig.locale||{};$.ig.locale.en=$.ig.locale.en||{};$.ig.igDoughnutChart=$.ig.igDoughnutChart||{};$.ig.locale.en.igDoughnutChart={invalidBaseElement:" is not supported as base element. Use DIV instead."};$.ig.igDoughnutChart.locale=$.ig.igDoughnutChart.locale||$.ig.locale.en.igDoughnutChart;return $.ig.locale.en.igDoughnutChart})($);var _aNull=function(v,nan){return v===null||v===undefined||nan&&typeof v==="number"&&isNaN(v)};$.widget("ui.igDoughnutChart",$.ui.igBaseChart,{css:{chart:"ui-doughnut ui-corner-all ui-widget-content",tooltip:"ui-doughnut-tooltip ui-widget-content ui-corner-all"},options:{width:null,height:null,series:[{type:"flat",showTooltip:false,tooltipTemplate:null,itemsSource:null,valueMemberPath:"null",labelMemberPath:"null",legendLabelMemberPath:"null",labelsPosition:"center",leaderLineVisibility:"visible",leaderLineStyle:null,leaderLineType:"straight",leaderLineMargin:6,othersCategoryThreshold:3,othersCategoryType:"percent",othersCategoryText:"Others",legend:null,formatLabel:null,formatLegendLabel:null,labelExtent:10,startAngle:0,selectedStyle:null,brushes:null,outlines:null,isSurfaceInteractionDisabled:false,radiusFactor:.9}],allowSliceSelection:true,isSurfaceInteractionDisabled:false,allowSliceExplosion:true,innerExtent:40,selectedStyle:null,pixelScalingRatio:NaN},events:{tooltipShowing:"tooltipShowing",tooltipShown:"tooltipShown",tooltipHiding:"tooltipHiding",tooltipHidden:"tooltipHidden",browserNotSupported:"browserNotSupported",sliceClick:null,holeDimensionsChanged:null},_create:function(){var elementName=this.element[0].nodeName.toUpperCase();if(elementName!=="DIV"){throw new Error(elementName+$.ig.igDoughnutChart.locale.invalidBaseElement)}if(this.css.chart){this.element.addClass(this.css.chart)}$.ui.igBaseChart.prototype._create.apply(this);this._defStyle("selected");this._defStyle("unselected");var doughnutChart=this._chart;if(doughnutChart){doughnutChart.sliceClick=$.ig.Delegate.prototype.combine(doughnutChart.sliceClick,$.proxy(this._fireDoughnutChart_sliceClick,this));doughnutChart.holeDimensionsChanged=$.ig.Delegate.prototype.combine(doughnutChart.holeDimensionsChanged,$.proxy(this._fireDoughnutChart_holeDimensionsChanged,this))}},_creationOptions:null,_createWidget:function(options,element){this._creationOptions=options;this._tooltipTemplate={};this._seriesOpt={};this._seriesColl={};this._tooltip={};this._legends={};$.Widget.prototype._createWidget.apply(this,[options,element])},_beforeInitialOptions:function(chart,elem){var wrap=new $.ig.JQueryDomWrapper(elem[0],elem);var renderer=new $.ig.JQueryDomRenderer(wrap,$.proxy(this._getLocaleValue,this));this._renderer=renderer;chart.provideContainer(renderer)},_provideContainer:function(chart,elem){},_setInitialOptions:function(chart){var o=this._creationOptions,self=this;for(key in o){if(o.hasOwnProperty(key)){v=o[key];if(v!==null){self._set_option(chart,key,v)}}}},_getDataSourceOwner:function(dataSourceOwnerName){return this._seriesColl[dataSourceOwnerName]},_fireDoughnutChart_holeDimensionsChanged:function(chart,evt){var e={};e.center={x:evt.center().__x,y:evt.center().__y};e.radius=evt.radius();e.doughnut=this.options;this._trigger("holeDimensionsChanged",null,e)},_fireDoughnutChart_sliceClick:function(chart,evt){var e={},slice=evt.slice();if(slice){e.slice={};e.slice.item=slice.dataContext();e.slice.isSelected=slice.isSelected();e.slice.isExploded=slice.isExploded();e.doughnut=this.options}this._trigger("sliceClick",null,e);if(e.slice.isSelected!=slice.isSelected()){slice.isSelected(e.slice.isSelected)}if(e.slice.isExploded!=slice.isExploded()){slice.isExploded(e.slice.isExploded)}},_getValueKeyName:function(){return"valueMemberPath"},_getNotifyResizeName:function(){return"notifyResized"},_createChart:function(){return new $.ig.XamDoughnutChart},_setLegend:function(item,value,chart){var legend;if(value){value.owner=this;if(value.type===undefined){value.type="item"}var legend=value.element;if(legend){legend=$("#"+legend)}if(!legend||legend.length!==1){var widgetId=chart.getContainerID();legend=$('
').insertAfter(this.element);legend[0]._remove=true}if(item.legend()===null){if(legend.data("igChartLegend")||value.data&&value.data("igChartLegend")){legend=!legend?value.data("igChartLegend"):legend.data("igChartLegend");legend.options.owner=this;legend._owner=this;if(!legend._ownerCount){legend._ownerCount=1}else{legend._ownerCount+=1}}else{legend=legend.igChartLegend(value).data("igChartLegend");if(!legend._ownerCount){legend._ownerCount=1}else{legend._ownerCount+=1}}item.legend(legend.legend)}else{$("#"+item.legend().name()).igChartLegend(value);item.legend()._ownerCount+=1}}else{if(item.legend()!==null&&item.legend().name().length>0&&$("#"+item.legend().name()).length>0){legend=$("#"+item.legend().name()).data().igChartLegend;legend._ownerCount-=1;item.legend(null);if(legend._ownerCount==0){var legendElement=legend.element;legend.destroy();if(legendElement[0]._remove){legendElement.remove()}}}}},_htmlCheckExpr:/^[^<]*(<[\w\W]+>)[^>]*$/,_addTooltip:function(chart,series,clss){var widgetId=chart.getContainerID();if(this._tooltip[series.name()]===undefined){this._tooltip[series.name()]=$('');var ttWrap=new $.ig.JQueryDomWrapper(this._tooltip[series.name()][0],this._tooltip[series.name()]);this._bindTooltipEvents(this,ttWrap);series.toolTip(ttWrap)}},_removeTooltip:function(series){if(this._tooltip[series.name()]!==undefined){this._removeTooltipEvents(this._tooltip[series.name()]);delete this._tooltip[series.name()];series.toolTip(null)}},_bindTooltipEvents:function(chart,tooltip){tooltip.updateToolTip=$.ig.Delegate.prototype.combine(tooltip.updateToolTip,$.proxy(this._fireToolTip_updateToolTip,this));tooltip.hideToolTip=$.ig.Delegate.prototype.combine(tooltip.hideToolTip,$.proxy(this._fireToolTip_hideToolTip,this))},_removeTooltipEvents:function(tooltip){delete tooltip.updateToolTip;delete tooltip.hideToolTip},_fireToolTip_hideToolTip:function(args){var e={},noCancel;e=this._getChartEvt(args);e.tempId=e.series.name;e.element=null;if(e.series!==null){e.element=this._tooltip[e.tempId]}noCancel=this._trigger(this.events.tooltipHiding,null,e);if(noCancel){$.each(this._tooltip,function(i,tip){tip.hide()});this._trigger(this.events.tooltipHidden,null,e)}},_fireToolTip_updateToolTip:function(args){var e={},noCancel,template;e=this._getChartEvt(args);e.tempId=e.series.name;e.element=null;if(e.series!==null){e.element=this._tooltip[e.tempId]}noCancel=this._trigger(this.events.tooltipShowing,null,e);if(e===null){noCancel=false}if(noCancel){if(e.series!==null&&this._tooltipTemplate[e.tempId]!==undefined){template=this._tooltipTemplate[e.tempId]}if(template){this._tooltip[e.tempId].children().remove();if(e.item===null){noCancel=false}if(noCancel){this._tooltip[e.tempId].html($.ig.tmpl(template,e))}}else{noCancel=false}if(noCancel){this._tooltip[e.tempId].show();this._trigger(this.events.tooltipShown,null,e)}}if(!noCancel){$.each(this._tooltip,function(i,tip){tip.hide()})}},_getChartEvt:function(evtArgs){var e={},seriesOpt=this._getSeriesOpt(evtArgs),pos,widget=this,intSeries=null;e.doughnut=widget.options;e.series=seriesOpt;e.item=evtArgs.item();if(evtArgs.series&&evtArgs.series()!==null){intSeries=evtArgs.series()}if(evtArgs.originalEvent&&evtArgs.originalEvent()!==null&&evtArgs.originalEvent().position&&evtArgs.originalEvent().position()!==null){pos=evtArgs.originalEvent().position();e.positionX=pos.__x;e.positionY=pos.__y}return e},_getSeriesOpt:function(evtArgs){var widget=this;if(widget._seriesOpt[evtArgs.series().name()]){return widget._seriesOpt[evtArgs.series().name()]}return widget.options},_setSeriesOption:function(ringSeriesBase,key,value,chart){if(key==="legend"){this._setLegend(ringSeriesBase,value,chart);return true}else if(key==="showTooltip"){if(value===true){this._addTooltip(chart,ringSeriesBase,this.css.tooltip)}if(value===false){this._removeTooltip(ringSeriesBase,chart)}return}else if(key==="tooltipTemplate"&&ringSeriesBase.toolTip){if($.ig.tmpl){if(this._htmlCheckExpr.test(value)){templ=value}else{if($("#"+value).length>0){templ=$("#"+value).text()}else if($(value).length>0){templ=$(value).text()}else{templ=value}}this._tooltipTemplate[ringSeriesBase.name()]=templ}return}else if(key==="legendItemBadgeTemplate"||key==="legendItemTemplate"){this._setDataTemplate(ringSeriesBase,key,value);return}else if(key==="isSurfaceInteractionDisabled"){ringSeriesBase.isSurfaceInteractionDisabled($.ig.util.toNullable($.ig.Boolean.prototype.$type,value));return true}else if("othersCategoryText"==key&&null==value){value=String.empty()}else if("childrenMemberPath"==key&&"RingSeriesCollection"==chart.series().getType().name){return}switch(key){case"itemsSource":ringSeriesBase.itemsSource(value);return true;case"valueMemberPath":ringSeriesBase.valueMemberPath(value);return true;case"labelMemberPath":ringSeriesBase.labelMemberPath(value);return true;case"legendLabelMemberPath":ringSeriesBase.legendLabelMemberPath(value);return true;case"labelsPosition":switch(value){case"none":ringSeriesBase.labelsPosition(0);break;case"center":ringSeriesBase.labelsPosition(1);break;case"insideEnd":ringSeriesBase.labelsPosition(2);break;case"outsideEnd":ringSeriesBase.labelsPosition(3);break;case"bestFit":ringSeriesBase.labelsPosition(4);break}return true;case"leaderLineVisibility":switch(value){case"visible":ringSeriesBase.leaderLineVisibility(0);break;case"collapsed":ringSeriesBase.leaderLineVisibility(1);break}return true;case"leaderLineStyle":ringSeriesBase.leaderLineStyle(value);return true;case"leaderLineType":switch(value){case"straight":ringSeriesBase.leaderLineType(0);break;case"arc":ringSeriesBase.leaderLineType(1);break;case"spline":ringSeriesBase.leaderLineType(2);break}return true;case"leaderLineMargin":ringSeriesBase.leaderLineMargin(value);return true;case"othersCategoryThreshold":ringSeriesBase.othersCategoryThreshold(value);return true;case"othersCategoryType":switch(value){case"number":ringSeriesBase.othersCategoryType(0);break;case"percent":ringSeriesBase.othersCategoryType(1);break}return true;case"othersCategoryText":ringSeriesBase.othersCategoryText(value);return true;case"formatLabel":ringSeriesBase.formatLabel(value);return true;case"formatLegendLabel":ringSeriesBase.formatLegendLabel(value);return true;case"labelExtent":ringSeriesBase.labelExtent(value);return true;case"startAngle":ringSeriesBase.startAngle(value);return true;case"selectedStyle":ringSeriesBase.selectedStyle(value);return true;case"brushes":var isRGB=true,val=value?value[0]:null;if(typeof val=="string"&&val=="HSV"||val=="RGB"){if(value[0]=="HSV"){isRGB=false}value=value.slice(1)}var $tempBrushCollection=new $.ig.BrushCollection;for(var i=0;value&&i