/* * Kendo UI Complete v2013.3.1119 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Complete commercial licenses may be obtained at * https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(define){return define(["./kendo.dataviz.core.min"],function(){!function(){function t(t){this.view=t}function e(t){this.view=t}function n(t){return d.round(t)+.5}function i(t,e){var n,i,r=[];if(t=t?t.toLowerCase():null,t&&t!=L){for(n=S[t],i=0;i"+"#= d.renderDefinitions() #"+"#= d.renderContent() #"))},options:{width:O,height:C},renderTo:function(t){var e,n=this;return n.setupAnimations(),c.renderSVG(t,n.render()),e=t.firstElementChild,n.alignToScreen(e),n.playAnimations(),n._viewElement=e,e},renderDefinitions:function(){var t=this,e=t.defsId,n=m.fn.renderDefinitions.call(t);return""+n+""},renderElement:function(t){var e,n,i=this,r=s.createElement("div"),o=s.getElementById(i.defsId);return c.renderSVG(r,""+i.renderDefinitions()+t.render()+""),e=r.firstElementChild.firstChild,n=r.firstElementChild.lastChild,o&&o.textContent!==e.textContent&&o.parentNode.replaceChild(e,o),n},createGroup:function(t){return this.decorate(new Q(t))},createText:function(t,e){return this.decorate(new z(t,e))},createRect:function(t,e){return this.decorate(new H(t.points(),!0,this.setDefaults(e)))},createCubicCurve:function(t,e,n){return this.decorate(new F(t,e,n))},createLine:function(t,e,n,i,r){return this.decorate(new H([new h(t,e),new h(n,i)],!1,this.setDefaults(r)))},createMultiLine:function(t,e){return this.decorate(new j(t,!1,this.setDefaults(e)))},createPolyline:function(t,e,n){return this.decorate(new H(t,e,this.setDefaults(n)))},createCircle:function(t,e,n){return this.decorate(new q(t,e,n))},createSector:function(t,e){return this.decorate(new N(t,e))},createRing:function(t,e){return this.decorate(new B(t,e))},createPin:function(t,e){return this.decorate(new W(t,e))},createGradient:function(t){return t.type===V?v(t.ir)?new Z(t):new X(t):new K(t)},alignToScreen:function(t){var e,n,i,r;try{e=t.getScreenCTM?t.getScreenCTM():null}catch(o){}e&&(n=-e.e%1,i=-e.f%1,r=t.style,(0!==n||0!==i)&&(r.left=n+"px",r.top=i+"px"))}}),z=y.extend({init:function(t,e){var n=this;y.fn.init.call(n,e),n.content=t,n.template=z.template,n.template||(n.template=z.template=g("#= d.content #"))},options:{x:0,y:0,baseline:0,font:k,size:{width:0,height:0},fillOpacity:1,cursor:{}},refresh:function(t){var e=this.options;a(t).attr({"fill-opacity":e.fillOpacity})},clone:function(){var t=this;return new z(t.content,x({},t.options))},renderRotation:function(){var t=this,e=t.options,n=e.size,i=w(e.x+n.normalWidth/2,G),r=w(e.y+n.normalHeight/2,G),o=w(e.x+n.width/2,G),a=w(e.y+n.height/2,G),s=w(o-i,G),d=w(a-r,G);return"transform='translate("+s+","+d+") "+"rotate("+e.rotation+","+i+","+r+")'"}}),U=y.extend({init:function(t){var e=this;y.fn.init.call(e,t),e.template=U.template,e.template||(e.template=U.template=g(""))},options:{fill:"",fillOpacity:1,strokeOpacity:1,rotation:[0,0,0],strokeLineCap:b,visible:!0,cursor:{}},refresh:function(t){var e=this.options;a(t).attr({d:this.renderPoints(),"fill-opacity":e.fillOpacity,"stroke-opacity":e.strokeOpacity}).css("display",this.renderDisplay())},clone:function(){return new U(x({},this.options))},renderPoints:function(){},renderDashType:function(){var t=this,e=t.options;return i(e.dashType,e.strokeWidth)},renderLinecap:function(){var t=this.options,e=t.dashType,n=t.strokeLineCap;return e&&e!=L?A:n},renderFill:function(){var t=this.options.fill;return t&&t!==R?t:I},renderDisplay:function(){return this.options.visible?"block":"none"},destroy:function(){}}),F=U.extend({init:function(t,e,n){var i=this;U.fn.init.call(i,e),i.areaPoints=n,i.points=t},renderPoints:function(){var t,e=this,n=e.points,i=[],r=e.areaPoints;for(t=0;t180,s=d.max(i.r,0),p=d.max(i.ir,0),l=i.c,c=i.point(r),f=i.point(r,!0);return w(r)%360===w(o)%360&&(o-=.05),t=i.point(o),e=i.point(o,!0),n.pathTemplate({firstOuterPoint:c,secondOuterPoint:t,isReflexAngle:a,r:s,ir:p,cx:l.x,cy:l.y,firstInnerPoint:f,secondInnerPoint:e})},clone:function(){var t=this;return new B(x({},t.config),x({},t.options))}}),W=U.extend({init:function(t,e){var n=this;U.fn.init.call(n,e),n.pathTemplate=W.pathTemplate,n.pathTemplate||(n.pathTemplate=W.pathTemplate=g("M #= d.origin.x # #= d.origin.y # #= d.as.x # #= d.as.y # A#= d.r # #= d.r # 0 #= d.isReflexAngle ? '1' : '0' #,0 #= d.ae.x # #= d.ae.y # z")),n.config=t||new c.Pin},renderPoints:function(){var t=this,e=t.config,n=e.radius,i=d.PI/180,r=e.arcAngle,o=n*d.sin(r*i/2),a=e.height-n*(1-d.cos(r*i/2)),s=e.origin,p={x:s.x+o,y:s.y-a},l={x:s.x-o,y:s.y-a},c=function(n,i){var r=t.options.rotation,o=e.rotation;return n=T(n.x,n.y,r[1],r[2],-r[0]),i&&(n=T(n.x,n.y,s.x,s.y,o)),n};return s=c(s),t.pathTemplate({origin:s,as:c(p,!0),ae:c(l,!0),r:n,isReflexAngle:r>180})}}),N=B.extend({init:function(t,e){var n=this;B.fn.init.call(n,t,e),n.pathTemplate=N.pathTemplate,n.pathTemplate||(n.pathTemplate=N.pathTemplate=g("M #= d.firstOuterPoint.x # #= d.firstOuterPoint.y # A#= d.r # #= d.r # 0 #= d.isReflexAngle ? '1' : '0' #,1 #= d.secondOuterPoint.x # #= d.secondOuterPoint.y # L #= d.cx # #= d.cy # z"))},options:{fill:"",fillOpacity:1,strokeOpacity:1,strokeLineCap:b},clone:function(){var t=this;return new N(x({},t.config),x({},t.options))}}),q=y.extend({init:function(t,e,n){var i=this;y.fn.init.call(i,n),i.c=t,i.r=e,i.template=q.template,i.template||(i.template=q.template=g(""))},options:{fill:"",fillOpacity:1,strokeOpacity:1},refresh:function(t){a(t).attr({r:d.max(0,this.r),"fill-opacity":this.options.fillOpacity})},clone:function(){var t=this;return new q(x({},t.c),t.r,x({},t.options))}}),Q=y.extend({init:function(t){var e=this;y.fn.init.call(e,t),e.template=Q.template,e.template||(e.template=Q.template=g('#= d.renderContent() #'))}}),Y=y.extend({init:function(t){var e=this;y.fn.init.call(e,t),e.template=Y.template,e.template||(e.template=Y.template=g('#= d.renderContent() #'))}}),J=y.extend({init:function(t){var e=this;y.fn.init.call(e,t)},options:{id:""},renderStops:function(){var t,e,n=this,i=n.options.stops,r=n.stopTemplate,o=i.length,a="";for(t=0;o>t;t++)e=i[t],a+=r(e);return a}}),K=J.extend({init:function(t){var e=this;J.fn.init.call(e,t),e.template=K.template,e.stopTemplate=K.stopTemplate,e.template||(e.template=K.template=g(" #= d.renderStops() #"),e.stopTemplate=K.stopTemplate=g(""))},options:{rotation:0}}),X=J.extend({init:function(t){var e=this;J.fn.init.call(e,t),e.template=X.template,e.stopTemplate=X.stopTemplate,e.template||(e.template=X.template=g("#= d.renderStops() #"),e.stopTemplate=X.stopTemplate=g(""))}}),Z=y.extend({init:function(t){var e=this;y.fn.init.call(e,t),e.template=Z.template,e.stopTemplate=Z.stopTemplate,e.template||(e.template=Z.template=g("#= d.renderStops() #"),e.stopTemplate=Z.stopTemplate=g(""))},options:{id:""},renderStops:function(){var t,e,n=this,i=n.options,r=i.stops,o=n.stopTemplate,a=100*(i.ir/i.r),s=r.length,d="";for(e=x({},r[0]),e.offset=a,d+=o(e),t=1;s>t;t++)e=x({},r[t]),e.offset=e.offset*(100-a)+a,d+=o(e);return d}});t.prototype={decorate:function(t){var e,n,i=this,r=i.view,o=t.options,a=o.id;return o.overlay?(t.options.id=P(),e=r.createGroup(),n=t.clone(),e.children.push(t,n),n.options.id=a,n.options.fill=o.overlay,e):t}},e.prototype={decorate:function(t){var e=this,n=t.options;return n.fill=e.getPaint(n.fill),t},getPaint:function(t){var e,n,i,r=this,o=r.view,a=o.definitions;return t&&v(t.gradient)?(e=o.buildGradient(t),e?(n=e.id,i=a[n],i||(i=o.createGradient(e),a[n]=i),"url("+r.baseUrl()+"#"+i.options.id+")"):I):t},baseUrl:function(){var t=s.getElementsByTagName("base")[0],e="",n=s.location.href,i=n.indexOf("#");return t&&!p.support.browser.msie&&(-1!==i&&(n=n.substring(0,i)),e=n),e}},r=l.extend({init:function(t){this.view=t},decorate:function(t){var e,n,i=this,r=i.view,o=i.clipId,a=r.options,s=t.options.animation,d=r.definitions;return s&&s.type===D&&a.transitions&&(o||(i.clipId=o=P()),e=d[o],e||(e=new Y({id:o}),n=r.createRect(new f(0,0,a.width,a.height),{id:P()}),e.children.push(n),d[o]=e,r.animations.push(new u(n,{size:a.width}))),t.options.clipPath="url(#"+o+")"),t}}),o=function(t,e){t.innerHTML=e},function(){var t="",e=s.createElement("div"),n=typeof DOMParser!=E;e.innerHTML=t,n&&e.firstChild.namespaceURI!=M&&(o=function(t,e){var n=new DOMParser,i=n.parseFromString(e,"text/xml"),r=s.adoptNode(i.documentElement);t.innerHTML="",t.appendChild(r)})}(),c.supportsSVG()&&c.ViewFactory.current.register("svg",_,10),x(c,{renderSVG:o,SVGCircle:q,SVGClipAnimationDecorator:r,SVGClipPath:Y,SVGGradientDecorator:e,SVGGroup:Q,SVGLine:H,SVGMultiLine:j,SVGLinearGradient:K,SVGOverlayDecorator:t,SVGPath:U,SVGRadialGradient:X,SVGDonutGradient:Z,SVGRing:B,SVGSector:N,SVGText:z,SVGView:_})}(window.kendo.jQuery)})}("function"==typeof define&&define.amd?define:function(t,e){return e()}); //@ sourceMappingURL=kendo.dataviz.svg.min.js.map