/*
jQWidgets v3.7.1 (2015-Feb)
Copyright (c) 2011-2015 jQWidgets.
License: http://jqwidgets.com/license/
*/
(function(n){n.extend(n.jqx._jqxChart.prototype,{_moduleAnnotations:!0,_renderAnnotation:function(n,t){var p=this.seriesGroups[n],f=this.renderer,o,a,b,k,e,v,y,w,c,l;if(!isNaN(n)){var r=this._get([this.getXAxisDataPointOffset(t.xValue,n),t.x]),u=this._get([this.getValueAxisDataPointOffset(t.yValue,n),t.y]),s=this._get([this.getXAxisDataPointOffset(t.xValue2,n),t.x2]),h=this._get([this.getValueAxisDataPointOffset(t.yValue2,n),t.y2]);if((p.polar||p.spider)&&(o=this.getPolarDataPointOffset(t.xValue,t.yValue,n),!o||isNaN(o.x)||isNaN(o.y)?(r=t.x,u=t.y):(r=o.x,u=o.y)),isNaN(u)||isNaN(r))return!1;p.orientation=="horizontal"&&(a=r,r=u,u=a,a=s,s=h,h=a);t.offset&&(isNaN(t.offset.x)||(r+=t.offset.x,s+=t.offset.x),isNaN(t.offset.y)||(u+=t.offset.y,h+=t.offset.y));b=this._get([t.width,s-r]);k=this._get([t.height,h-u]);switch(t.type){case"rect":e=f.rect(r,u,b,k);break;case"circle":e=f.rect(r,u,t.radius);break;case"line":e=f.rect(r,u,s,h);break;case"path":e=f.path(t.path)}if(f.attr(e,{fill:t.fillColor,stroke:t.lineColor,opacity:this._get([t.fillOpacity,t.opacity]),"stroke-opacity":this._get([t.lineOpacity,t.opacity]),"stroke-width":t.lineWidth,"stroke-dasharray":t.dashStyle||"none"}),t.text){var i=t.text,d=0,g=0;i.offset&&(isNaN(i.offset.x)||(d+=i.offset.x),isNaN(i.offset.y)||(g+=i.offset.y));v=f.text(i.value,r+d,u+g,NaN,NaN,i.angle,{},i.clip===!0,i.horizontalAlignment||"center",i.verticalAlignment||"center",i.rotationPoint||"centermiddle");f.attr(v,{fill:i.fillColor,stroke:i.lineColor,"class":i["class"]})}for(y=["click","mouseenter","mouseleave"],w=this,c=0;c<y.length;c++)l=this._getEvent(y[c])||y[c],e&&this.renderer.addHandler(e,l,function(){w._raiseAnnotationEvent(t,l)}),v&&this.renderer.addHandler(v,l,function(){w._raiseAnnotationEvent(t,l)})}},_raiseAnnotationEvent:function(n,t){this._raiseEvent("annotation_"+t,{annotation:n})}})})(jqxBaseFramework)