This file is indexed.

/usr/share/javascript/elycharts/elycharts-full.min.js is in libjs-elycharts 2.1.5+ds-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
3
4
5
6
7
8
9
/**********************************************************************
 * ELYCHARTS
 * A Javascript library to generate interactive charts with vectorial graphics.
 *
 * Copyright (c) 2010-2014 Void Labs s.n.c. (http://void.it)
 * Licensed under the MIT (http://creativecommons.org/licenses/MIT/) license.
 **********************************************************************/(function(e){e.elycharts||(e.elycharts={}),e.elycharts.templates={common:{margins:[10,10,10,10],interactive:!0,defaultSeries:{visible:!0,tooltip:{active:!0,width:100,height:50,roundedCorners:5,padding:[6,6],offset:[20,0],frameProps:{fill:"white","stroke-width":2},contentStyle:{"font-family":"Arial","font-size":"12px","line-height":"16px",color:"black"}},highlight:{scaleSpeed:100,scaleEasing:"",moveSpeed:100,moveEasing:"",restoreSpeed:0,restoreEasing:""},anchor:{},startAnimation:{type:"simple",speed:600,delay:0,propsFrom:{},propsTo:{},easing:""},label:{active:!1,html:!1,props:{fill:"black",stroke:"none","font-family":"Arial","font-size":"16px"},style:{cursor:"default"}}},series:{empty:{label:{active:!1},tooltip:{active:!1}}},features:{tooltip:{fadeDelay:100,moveDelay:300},mousearea:{type:"single",indexCenter:"auto",areaMoveDelay:500,syncTag:!1,onMouseEnter:!1,onMouseExit:!1,onMouseChanged:!1,onMouseOver:!1,onMouseOut:!1},highlight:{indexHighlightProps:{opacity:1}},animation:{startAnimation:{speed:600,delay:0,easing:""},stepAnimation:{speed:600,delay:0,easing:""}},frameAnimation:{active:!1,cssFrom:{opacity:0},cssTo:{opacity:1},speed:"slow",easing:"linear"},pixelWorkAround:{active:Raphael.svg},label:{},shadows:{active:!1,offset:[2,2],props:{"stroke-width":0,"stroke-opacity":0,fill:"black","fill-opacity":.3}},balloons:{active:!1,style:{},padding:[5,5],left:10,line:[[0,0],[0,0]],lineProps:{}},legend:{horizontal:!1,x:"auto",y:10,width:"auto",height:20,itemWidth:"fixed",margins:[0,0,0,0],dotMargins:[10,5],borderProps:{fill:"white",stroke:"black","stroke-width":1},dotType:"rect",dotWidth:10,dotHeight:10,dotR:0,dotProps:{type:"rect",width:10,height:10},textProps:{font:"12px Arial",fill:"#000"}},debug:{active:!1}},enableInternalCaching:!0,nop:0},line:{template:"common",barMargins:0,barOverlapPerc:0,avgOverNulls:!0,defaultAxis:{normalize:2,min:0,labels:!1,labelsDistance:8,labelsRotate:0,labelsProps:{font:"10px Arial",fill:"#000"},titleDistance:25,titleDistanceIE:.75,titleProps:{font:"12px Arial",fill:"#000","font-weight":"bold"}},axis:{x:{titleDistanceIE:1.2}},defaultSeries:{type:"line",axis:"l",cumulative:!1,rounded:1,lineCenter:"auto",plotProps:{"stroke-width":1,"stroke-linejoin":"round"},barWidthPerc:100,fill:!1,fillProps:{stroke:"none","stroke-width":0,"stroke-opacity":0,opacity:.3},dot:!1,dotProps:{size:4,stroke:"#000",zindex:5},dotShowOnNull:!1,mouseareaShowOnNull:!1,startAnimation:{plotPropsFrom:!1,fillPropsFrom:!1,dotPropsFrom:!1,shadowPropsFrom:!1}},features:{grid:{nx:"auto",ny:4,draw:!1,forceBorder:!1,props:{stroke:"#e0e0e0","stroke-width":1},extra:[0,0,0,0],labelsCenter:"auto",evenVProps:!1,oddVProps:!1,evenHProps:!1,oddHProps:!1,ticks:{active:[!1,!1,!1],size:[10,10],props:{stroke:"#e0e0e0","stroke-width":1}}}},nop:0},pie:{template:"common",startAngle:0,clockwise:!1,valueThresold:.006,margins:[0,0,0,0],defaultSeries:{}},funnel:{template:"common",rh:0,method:"width",topSector:0,topSectorProps:{fill:"#d0d0d0"},bottomSector:.1,bottomSectorProps:{fill:"#d0d0d0"},edgeProps:{fill:"#c0c0c0","stroke-width":1,opacity:1},nop:0},barline:{template:"common",direction:"ltr"}}})(jQuery),function(e){function t(e,n,r,i,s,o){var u=[],f,l=0;for(var c=0;c<n.length;c++)r&&(l>=r.length||!a.samePiecePath(n[c],r[l]))?o?(f={path:!1,attr:!1},f.show=!0,f.animation={element:n[c].element?n[c].element:!1,speed:0,easing:"",delay:0},u.push(f)):(n[c].show=!1,u.push(n[c])):(f=r?r[l]:{path:!1,attr:!1},f.show=!0,typeof n[c].paths=="undefined"?f.animation={element:n[c].element?n[c].element:!1,speed:0,easing:"",delay:0}:f.paths=t(e,n[c].paths,r[l].paths,n[c].section,n[c].serie,!0),u.push(f),l++);if(r)for(;l<r.length;l++)u.push(r[l]);return u}function n(e,t,n){var r;return function(){function u(){n||e.apply(s,o),r=null}var s=this,o=arguments;r?clearTimeout(r):n&&e.apply(s,o),r=setTimeout(u,t||100)}}function r(t,n){var r={id:e.elycharts.lastId++,paper:a._RaphaelInstance(t.get()[0],0,0),container:t,plots:[],opt:n};return r.paper.rect(0,0,1,1).attr({opacity:0}),e.elycharts[n.type].init(r),r}function i(e,t){t.style&&e.container.css(t.style),e.width=t.width?t.width:e.container.width(),e.height=t.height?t.height:e.container.height(),e.paper.setSize(e.width,e.height)}function s(t){var n;if(e.elysia_charts){if(e.elysia_charts.default_options)for(n in e.elysia_charts.default_options)e.elycharts.templates[n]=e.elysia_charts.default_options[n];if(e.elysia_charts.templates)for(n in e.elysia_charts.templates)e.elycharts.templates[n]=e.elysia_charts.templates[n]}while(t.template){var r=t.template;delete t.template,t=e.extend(!0,{},e.elycharts.templates[r],t)}if(!t.template&&t.type){t.template=t.type;while(t.template)r=t.template,delete t.template,t=e.extend(!0,{},e.elycharts.templates[r],t)}return o(t,t)}function o(t,n){if(t.type=="pie"||t.type=="funnel")t.values&&e.isArray(t.values)&&!e.isArray(t.values[0])&&(t.values={root:t.values}),t.tooltips&&e.isArray(t.tooltips)&&!e.isArray(t.tooltips[0])&&(t.tooltips={root:t.tooltips}),t.anchors&&e.isArray(t.anchors)&&!e.isArray(t.anchors[0])&&(t.anchors={root:t.anchors}),t.balloons&&e.isArray(t.balloons)&&!e.isArray(t.balloons[0])&&(t.balloons={root:t.balloons}),t.legend&&e.isArray(t.legend)&&!e.isArray(t.legend[0])&&(t.legend={root:t.legend});if(t.defaultSeries){var r=t.defaultSeries.type?t.defaultSeries.type:n.defaultSeries.type?n.defaultSeries.type:n.type;u(t.defaultSeries,n.type,r,n)}if(t.series)for(var i in t.series){var s=t.series[i].type?t.series[i].type:n.series[i].type?n.series[i].type:r?r:n.type;u(t.series[i],n.type,s,n)}if(t.type=="line"){t.features||(t.features={}),t.features.grid||(t.features.grid={}),typeof t.gridNX!="undefined"&&(t.features.grid.nx=t.gridNX,delete t.gridNX),typeof t.gridNY!="undefined"&&(t.features.grid.ny=t.gridNY,delete t.gridNY),typeof t.gridProps!="undefined"&&(t.features.grid.props=t.gridProps,delete t.gridProps),typeof t.gridExtra!="undefined"&&(t.features.grid.extra=t.gridExtra,delete t.gridExtra),typeof t.gridForceBorder!="undefined"&&(t.features.grid.forceBorder=t.gridForceBorder,delete t.gridForceBorder),t.defaultAxis&&t.defaultAxis.normalize&&(t.defaultAxis.normalize=="auto"||t.defaultAxis.normalize=="autony")&&(t.defaultAxis.normalize=2);if(t.axis)for(var o in t.axis)t.axis[o]&&t.axis[o].normalize&&(t.axis[o].normalize=="auto"||t.axis[o].normalize=="autony")&&(t.axis[o].normalize=2)}return t}function u(e,t,n,r){e.stackedWith&&(e.stacked=e.stackedWith,delete e.stackedWith)}e.elycharts||(e.elycharts={}),e.elycharts.lastId=0,e.fn.chart=function(u){if(!this.length)return this;var f=this.data("elycharts_env");if(typeof u=="string")return u.toLowerCase()=="config"?f?f.opt:!1:(u.toLowerCase()=="clear"&&f&&(e.elycharts.featuresmanager&&e.elycharts.featuresmanager.clear(f),f.paper.clear(),f.cache=!1,f.autoresize&&e(window).unbind("resize",f.autoresize),this.html(""),this.data("elycharts_env",!1)),this);if(!f){u&&(u=s(u));if(!u||!u.type||!e.elycharts.templates[u.type])return alert("ElyCharts ERROR: chart type is not specified"),!1;f=r(this,u),this.data("elycharts_env",f)}else u||(u={}),u=o(u,f.opt),f.oldopt=a._clone(f.opt),f.opt=e.extend(!0,f.opt,u),f.newopt=u,f.oldwidth=f.width,f.oldheight=f.height;f.cache=u.enableInternalCaching?{}:!1,i(f,u);if(f.opt.autoresize){if(!f.autoresize){var l=this;f.autoresize=n(function(){l.chart()}),e(window).bind("resize",f.autoresize)}}else f.autoresize&&(e(window).unbind("resize",f.autoresize),f.autoresize=!1);var c=e.elycharts[f.opt.type].draw(f);return f.pieces&&(c=t(f,f.pieces,c)),a._show(f,c),f.pieces=c,this},e.elycharts.common={_RaphaelInstance:function(e,t,n){var r=Raphael(e,t,n);return r.customAttributes.slice=function(e,t,n,r,i,s){a1=360-s,a2=360-i;var o=a2-a1>180;return a1=a1%360*Math.PI/180,a2=a2%360*Math.PI/180,a1==a2&&i!=s&&(a2+=359.99*Math.PI/180),{path:r?[["M",e+n*Math.cos(a1),t+n*Math.sin(a1)],["A",n,n,0,+o,1,e+n*Math.cos(a2),t+n*Math.sin(a2)],["L",e+r*Math.cos(a2),t+r*Math.sin(a2)],["A",r,r,0,+o,0,e+r*Math.cos(a1),t+r*Math.sin(a1)],["z"]]:[["M",e,t],["l",n*Math.cos(a1),n*Math.sin(a1)],["A",n,n,0,+o,1,e+n*Math.cos(a2),t+n*Math.sin(a2)],["z"]]}},r},_clone:function(e){if(e==null||typeof e!="object")return e;if(e.constructor==Array)return[].concat(e);var t=new e.constructor;for(var n in e)t[n]=this._clone(e[n]);return t},compactUnits:function(e,t){for(var n=t.length-1;n>=0;n--){var r=e/Math.pow(1e3,n+1);if(r>=1&&r*10%10==0)return r+t[n]}return e},getElementOriginalAttrs:function(t){var n=e(t.node).data("original-attr");return n||(n=t.attr(),e(t.node).data("original-attr",n)),n},findInPieces:function(e,t,n,r,i){for(var s=0;s<e.length;s++)if((typeof t==undefined||t==-1||t==0||e[s].section==t)&&(typeof n==undefined||n==-1||n==0||e[s].serie==n)&&(typeof r==undefined||r==-1||r==0||e[s].index==r)&&(typeof i==undefined||i==-1||i==0||e[s].subSection==i))return e[s];return!1},samePiecePath:function(e,t){return((typeof e.section==undefined||e.section==-1||e.section==0)&&(typeof t.section==undefined||t.section==-1||t.section==0)||e.section==t.section)&&((typeof e.serie==undefined||e.serie==-1||e.serie==0)&&(typeof t.serie==undefined||t.serie==-1||t.serie==0)||e.serie==t.serie)&&((typeof e.index==undefined||e.index==-1||e.index==0)&&(typeof t.index==undefined||t.index==-1||t.index==0)||e.index==t.index)&&((typeof e.subSection==undefined||e.subSection==-1||e.subSection==0)&&(typeof t.subSection==undefined||t.subSection==-1||t.subSection==0)||e.subSection==t.subSection)},executeIfChanged:function(e,t){if(!e.newopt)return!0;for(var n=0;n<t.length;n++)if(t[n][t[n].length-1]=="*"){for(var r in e.newopt)if(r.substring(0,t[n].length-1)+"*"==t[n])return!0}else{if(t[n]=="series"&&(e.newopt.series||e.newopt.defaultSeries))return!0;if(t[n]=="axis"&&(e.newopt.axis||e.newopt.defaultAxis))return!0;if(t[n]=="width"&&e.oldwidth!=e.width)return!0;if(t[n]=="height"&&e.oldheight!=e.height)return!0;if(t[n].substring(0,9)=="features."){t[n]=t[n].substring(9);if(e.newopt.features&&e.newopt.features[t[n]])return!0}else if(typeof e.newopt[t[n]]!="undefined")return!0}return!1},getItemColor:function(e,t,n){var r=this.areaProps(e,"Series",t,n);if(r.color)return r.color;if(n!==!1&&r.valuesPalette)return r.valuesPalette[n%r.valuesPalette.length];if(e.opt.seriesPalette){var i=0;for(seriekey in e.opt.values){if(t==seriekey)return e.opt.seriesPalette[i%e.opt.seriesPalette.length];i++}}},colorize:function(e,t,n,r){if(r)for(k in n){var i=t,s=0;for(s=0;s<n[k].length-1;s++)i[n[k][s]]||(i[n[k][s]]={}),i=i[n[k][s]];i[n[k][n[k].length-1]]||(i[n[k][n[k].length-1]]=r)}},areaProps:function(t,n,r,i,s){var o,u=t.opt[n.toLowerCase()];if(!s)if(typeof r=="undefined"||!r)o=u;else{var a=n+"/"+r+"/"+i;t.cache&&t.cache.areaPropsCache&&t.cache.areaPropsCache[a]?o=t.cache.areaPropsCache[a]:(o=this._clone(t.opt["default"+n]),u&&u[r]&&(o=e.extend(!0,o,u[r])),typeof i!="undefined"&&i>=0&&o.values&&o.values[i]&&(o=e.extend(!0,o,o.values[i])),t.cache&&(t.cache.areaPropsCache||(t.cache.areaPropsCache={}),t.cache.areaPropsCache[a]=o))}else{var f=s.toLowerCase();o=this._clone(t.opt[f]),typeof r=="undefined"||!r?u&&u[f]&&(o=e.extend(!0,o,u[f])):(t.opt["default"+n]&&t.opt["default"+n][f]&&(o=e.extend(!0,o,t.opt["default"+n][f])),u&&u[r]&&u[r][f]&&(o=e.extend(!0,o,u[r][f])),typeof i!="undefined"&&i>0&&o.values&&o.values[i]&&(o=e.extend(!0,o,o.values[i])))}return o},_absrectpath:function(e,t,n,r,i){if(i){var s=[["M",e,t+i],["a",i,i,0,0,1,i,-i],["L",n-i,t],["a",i,i,0,0,1,i,i],["L",n,r-i],["a",i,i,0,0,1,-i,i],["L",e+i,r],["a",i,i,0,0,1,-i,-i],["z"]];return s}return[["M",e,t],["L",e,r],["L",n,r],["L",n,t],["z"]]},_linepathAnchors:function(e,t,n,r,i,s,o){var u=1;o&&o.length&&(u=o[1],o=o[0]),o||(o=1);var a=(n-e)/2,f=(i-n)/2,l=Math.atan(Math.abs(n-e)/Math.abs(r-t)),c=Math.atan(Math.abs(i-n)/Math.abs(r-s));l=t<r&&n>e||t>r&&n<e?Math.PI-l:l,c=s<r&&i>n||s>r&&i<n?Math.PI-c:c,u==2&&((l-Math.PI/2)*(c-Math.PI/2)>0?(l=0,c=0):Math.abs(l-Math.PI/2)<Math.abs(c-Math.PI/2)?c=Math.PI-l:l=Math.PI-c);var h=Math.PI/2-(l+c)%(Math.PI*2)/2,p=a*Math.sin(h+l)/2/o,d=a*Math.cos(h+l)/2/o,v=f*Math.sin(h+c)/2/o,m=f*Math.cos(h+c)/2/o;return{x1:n-p,y1:r+d,x2:n+v,y2:r+m}},_linepath:function(e,t){var n=[];if(t){var r=!1;for(var i=0,s=e.length;i<s;i++){var o=e[i][0],u=e[i][1];if(o!=null&&u!=null)if(r)if(i+1!=s&&e[i+1][0]!=null&&e[i+1][1]!=null){var a=this._linepathAnchors(e[i-1][0],e[i-1][1],e[i][0],e[i][1],e[i+1][0],e[i+1][1],t);n.push(["C",r[0],r[1],a.x1,a.y1,e[i][0],e[i][1]]),r=[a.x2,a.y2]}else n.push(["C",r[0],r[1],e[i][0],e[i][1],e[i][0],e[i][1]]),r=[e[i][0],e[i][1]];else n.push(["M",e[i][0],e[i][1]]),r=[e[i][0],e[i][1]];else r=!1}}else{var f=null,l=null;for(var c=0;c<e.length;c++){var o=e[c][0],u=e[c][1];o!=null&&u!=null&&n.push([f==null||l==null?"M":"L",o,u]),f=o,l=u}}return n},_lineareapath:function(e,t,n){var r=this._linepath(e,n),i=this._linepath(t.reverse(),n),s=[],o=null;for(var u=0;u<=r.length;u++)if(u==r.length||r[u][0]=="M"){if(o!=null){for(var a=r.length-u;a<=r.length-o;a++)i[a][0]=="M"?s.push(["L",i[a][1],i[a][2]]):s.push(i[a]);s.push(["z"]),o=null}u!=r.length&&s.push(r[u])}else s.push(r[u]),o==null&&(o=u);return s},getX:function(e,t){switch(e[0]){case"CIRCLE":return e[1];case"RECT":return e[t?3:1];case"SLICE":return e[1];default:return e[e.length-2]}},getY:function(e,t){switch(e[0]){case"CIRCLE":return e[2];case"RECT":return e[t?4:2];case"SLICE":return e[2];default:return e[e.length-1]}},getCenter:function(e,t){if(!e.path)return!1;if(e.path.length==0)return!1;t||(t=[0,0]);if(e.center)return[e.center[0]+t[0],e.center[1]+t[1]];var n=e.path[0];switch(n[0]){case"CIRCLE":return[n[1]+t[0],n[2]+t[1]];case"RECT":return[(n[1]+n[2])/2+t[0],(n[3]+n[4])/2+t[1]];case"SLICE":var r=n[5]+(n[6]-n[5])/2,i=Math.PI/180;return[n[1]+(n[4]+(n[3]-n[4])/2+t[0])*Math.cos(-r*i)+t[1]*Math.cos((-r-90)*i),n[2]+(n[4]+(n[3]-n[4])/2+t[0])*Math.sin(-r*i)+t[1]*Math.sin((-r-90)*i)]}return alert("ElyCharts: getCenter with complex path not supported"),!1},movePath:function(e,t,n,r,i){var s=[],o;if(t.length==1&&t[0][0]=="RECT")return[[t[0][0],this._movePathX(e,t[0][1],n[0],r),this._movePathY(e,t[0][2],n[1],r),this._movePathX(e,t[0][3],n[0],r),this._movePathY(e,t[0][4],n[1],r),t[0][5]]];if(t.length==1&&t[0][0]=="SLICE"){if(!i){var u=t[0][5]+(t[0][6]-t[0][5])/2,a=Math.PI/180,f=t[0][1]+n[0]*Math.cos(-u*a)+n[1]*Math.cos((-u-90)*a),l=t[0][2]+n[0]*Math.sin(-u*a)+n[1]*Math.cos((-u-90)*a);return[[t[0][0],f,l,t[0][3],t[0][4],t[0][5],t[0][6]]]}return[[t[0][0],t[0][1]+n[0],t[0][2]+n[1],t[0][3],t[0][4],t[0][5],t[0][6]]]}if(t.length==1&&t[0][0]=="CIRCLE")return[[t[0][0],t[0][1]+n[0],t[0][2]+n[1],t[0][3]]];if(t.length==1&&t[0][0]=="TEXT")return[[t[0][0],t[0][1],t[0][2]+n[0],t[0][3]+n[1]]];if(t.length==1&&t[0][0]=="LINE"){for(o=0;o<t[0][1].length;o++)s.push([this._movePathX(e,t[0][1][o][0],n[0],r),this._movePathY(e,t[0][1][o][1],n[1],r)]);return[[t[0][0],s,t[0][2]]]}if(t.length==1&&t[0][0]=="LINEAREA"){for(o=0;o<t[0][1].length;o++)s.push([this._movePathX(e,t[0][1][o][0],n[0],r),this._movePathY(e,t[0][1][o][1],n[1],r)]);var c=[];for(o=0;o<t[0][2].length;o++)c.push([this._movePathX(e,t[0][2][o][0],n[0],r),this._movePathY(e,t[0][2][o][1],n[1],r)]);return[[t[0][0],s,c,t[0][3]]]}var h=[];for(var p=0;p<t.length;p++){var d=t[p];switch(d[0]){case"M":case"m":case"L":case"l":case"T":case"t":h.push([d[0],this._movePathX(e,d[1],n[0],r),this._movePathY(e,d[2],n[1],r)]);break;case"A":case"a":h.push([d[0],d[1],d[2],d[3],d[4],d[5],this._movePathX(e,d[6],n[0],r),this._movePathY(e,d[7],n[1],r)]);break;case"C":case"c":h.push([d[0],this._movePathX(e,d[1],n[0],r),this._movePathY(e,d[2],n[1],r),this._movePathX(e,d[3],n[0],r),this._movePathY(e,d[4],n[1],r),this._movePathX(e,d[5],n[0],r),this._movePathY(e,d[6],n[1],r)]);break;case"S":case"s":case"Q":case"q":h.push([d[0],this._movePathX(e,d[1],n[0],r),this._movePathY(e,d[2],n[1],r),this._movePathX(e,d[3],n[0],r),this._movePathY(e,d[4],n[1],r)]);break;case"z":case"Z":h.push([d[0]])}}return h},_movePathX:function(e,t,n,r){return t==null?null:r?(t+=n,n>0&&t>e.width-e.opt.margins[1]?e.width-e.opt.margins[1]:n<0&&t<e.opt.margins[3]?e.opt.margins[3]:t):t+n},_movePathY:function(e,t,n,r){return t==null?null:r?(t+=n,n>0&&t>e.height-e.opt.margins[2]?e.height-e.opt.margins[2]:n<0&&t<e.opt.margins[0]?e.opt.margins[0]:t):t+n},getSVGProps:function(e,t,n){var r=this._preparePathShow(e,t),i=n?n:{},s="path",o;if(r.length==1&&r[0][0]=="RECT")o=a._absrectpath(r[0][1],r[0][2],r[0][3],r[0][4],r[0][5]);else if(r.length==1&&r[0][0]=="SLICE")s="slice",o=[r[0][1],r[0][2],r[0][3],r[0][4],r[0][5],r[0][6]];else if(r.length==1&&r[0][0]=="LINE")o=a._linepath(r[0][1],r[0][2]);else if(r.length==1&&r[0][0]=="LINEAREA")o=a._lineareapath(r[0][1],r[0][2],r[0][3]);else{if(r.length==1&&(r[0][0]=="CIRCLE"||r[0][0]=="TEXT"||r[0][0]=="DOMELEMENT"||r[0][0]=="RELEMENT"))return n?n:!1;o=r}if(s!="path"||o&&o.length>0)i[s]=o;else if(!n)return!1;return i},showPath:function(e,t,n){n||(n=e.paper);if(t.length==1&&t[0][0]=="CIRCLE")return t=this._preparePathShow(e,t),n.circle(t[0][1],t[0][2],t[0][3]);if(t.length==1&&t[0][0]=="TEXT")return t=this._preparePathShow(e,t),n.text(t[0][2],t[0][3],t[0][1]);var r=this.getSVGProps(e,t),i=!1;for(var s in r){i=!0;break}return r&&i?n.path().attr(r):!1},_preparePathShow:function(e,t){return e.opt.features.pixelWorkAround.active?this.movePath(e,this._clone(t),[.5,.5],!1,!0):t},getPieceFullAttr:function(e,t){if(!t.fullattr){t.fullattr=this._clone(t.attr);if(t.path)switch(t.path[0][0]){case"CIRCLE":var n=this._preparePathShow(e,t.path);t.fullattr.cx=n[0][1],t.fullattr.cy=n[0][2],t.fullattr.r=n[0][3];break;case"TEXT":case"DOMELEMENT":case"RELEMENT":break;default:t.fullattr=this.getSVGProps(e,t.path,t.fullattr)}typeof t.fullattr.opacity=="undefined"&&(t.fullattr.opacity=1)}return t.fullattr},_show:function(t,n){e.elycharts.featuresmanager&&e.elycharts.featuresmanager.beforeShow(t,n),pieces=this._getSortedPathData(n),this._animationStackStart(t);var r=!1;for(var i=0;i<pieces.length;i++){var s=pieces[i];if((typeof s.show=="undefined"||s.show)&&(typeof s.parent=="undefined"||typeof s.parent.show=="undefined"||s.parent.show)){s.element=s.animation&&s.animation.element?s.animation.element:!1,s.hide=!1;if(!s.path)s.hide=!0;else if(s.path.length==1&&s.path[0][0]=="TEXT")s.element&&(a.animationStackPush(t,s,s.element,!1,s.animation.speed,s.animation.easing,s.animation.delay,!0),s.animation.element=!1),s.element=this.showPath(t,s.path),s.element&&t.newopt&&r&&s.element.insertAfter(r);else if(s.path.length!=1||s.path[0][0]!="DOMELEMENT")s.path.length==1&&s.path[0][0]=="RELEMENT"?(s.element&&(a.animationStackPush(t,s,s.element,!1,s.animation.speed,s.animation.easing,s.animation.delay,!0),s.animation.element=!1),s.element=s.path[0][1],s.element&&r&&s.element.insertAfter(r),s.attr=!1):s.element||(s.animation&&s.animation.startPath&&s.animation.startPath.length?s.element=this.showPath(t,s.animation.startPath):s.element=this.showPath(t,s.path),s.element&&t.newopt&&r&&s.element.insertAfter(r));s.element&&(s.attr?s.animation?(s.animation.element||s.element.attr(s.animation.startAttr?s.animation.startAttr:s.attr),a.animationStackPush(t,s,s.element,this.getPieceFullAttr(t,s),s.animation.speed,s.animation.easing,s.animation.delay)):(typeof s.attr.opacity=="undefined"&&(s.attr.opacity=1),s.element.attr(s.attr)):s.hide&&a.animationStackPush(t,s,s.element,!1,s.animation.speed,s.animation.easing,s.animation.delay),r=s.element)}}this._animationStackEnd(t),e.elycharts.featuresmanager&&e.elycharts.featuresmanager.afterShow(t,n)},_getSortedPathData:function(e){res=[];for(var t=0;t<e.length;t++){var n=e[t];if(n.paths)for(var r=0;r<n.paths.length;r++)n.paths[r].pos=res.length,n.paths[r].parent=n,res.push(n.paths[r]);else n.pos=res.length,n.parent=!1,res.push(n)}return res.sort(function(e,t){var n=typeof e.attr=="undefined"||typeof e.attr.zindex=="undefined"?!e.parent||typeof e.parent.attr=="undefined"||typeof e.parent.attr.zindex=="undefined"?0:e.parent.attr.zindex:e.attr.zindex,r=typeof t.attr=="undefined"||typeof t.attr.zindex=="undefined"?!t.parent||typeof t.parent.attr=="undefined"||typeof t.parent.attr.zindex=="undefined"?0:t.parent.attr.zindex:t.attr.zindex;return n<r?-1:n>r?1:e.pos<t.pos?-1:e.pos>t.pos?1:0})},_animationStackStart:function(e){if(!e.animationStackDepth||e.animationStackDepth==0)e.animationStackDepth=0,e.animationStack={};e.animationStackDepth++},_animationStackEnd:function(e){e.animationStackDepth--;if(e.animationStackDepth==0){for(var t in e.animationStack)this._animationStackAnimate(e.animationStack[t],t),delete e.animationStack[t];e.animationStack={}}},animationStackPush:function(e,t,n,r,i,s,o,u){typeof o=="undefined"&&(o=0),!e.animationStackDepth||e.animationStackDepth==0?this._animationStackAnimate([{piece:t,object:n,props:r,speed:i,easing:s,force:u}],o):(e.animationStack[o]||(e.animationStack[o]=[]),e.animationStack[o].push({piece:t,object:n,props:r,speed:i,easing:s,force:u}))},_animationStackAnimate:function(e,t){var n=this,r=function(){var t=e.pop(),r=n._animationStackAnimateElement(t);while(e.length>0){var i=e.pop();n._animationStackAnimateElement(i,t,r)}};t>0?setTimeout(r,t):r()},_animationStackAnimateElement:function(e,t,n){if(e.force||!e.piece.animationInProgress){e.object.stop(),e.props||(e.props={opacity:0});if(!e.speed||e.speed<=0){e.object.attr(e.props),e.piece.animationInProgress=!1;return}e.piece.animationInProgress=!0;var r=function(){e.piece.animationInProgress=!1};if(Raphael.animation){var i=Raphael.animation(e.props,e.speed,e.easing?e.easing:"linear",r);return t?e.object.animateWith(t,n,i):e.object.animate(i),i}return t?e.object.animateWith(t,e.props,e.speed,e.easing?e.easing:"linear",r):e.object.animate(e.props,e.speed,e.easing?e.easing:"linear",r),null}return null}};var a=e.elycharts.common;e.elycharts.featuresmanager={managers:[],initialized:!1,register:function(t,n){e.elycharts.featuresmanager.managers.push([n,t]),e.elycharts.featuresmanager.initialized=!1},init:function(){e.elycharts.featuresmanager.managers.sort(function(e,t){return e[0]<t[0]?-1:e[0]==t[0]?0:1}),e.elycharts.featuresmanager.initialized=!0},clear:function(t){e.elycharts.featuresmanager.initialized||this.init();for(var n=e.elycharts.featuresmanager.managers.length-1;n>=0;n--)e.elycharts.featuresmanager.managers[n][1].clear&&e.elycharts.featuresmanager.managers[n][1].clear(t)},beforeShow:function(t,n){e.elycharts.featuresmanager.initialized||this.init();for(var r=0;r<e.elycharts.featuresmanager.managers.length;r++)e.elycharts.featuresmanager.managers[r][1].beforeShow&&e.elycharts.featuresmanager.managers[r][1].beforeShow(t,n)},afterShow:function(t,n){e.elycharts.featuresmanager.initialized||this.init();for(var r=0;r<e.elycharts.featuresmanager.managers.length;r++)e.elycharts.featuresmanager.managers[r][1].afterShow&&e.elycharts.featuresmanager.managers[r][1].afterShow(t,n)},onMouseOver:function(t,n,r,i){e.elycharts.featuresmanager.initialized||this.init();for(var s=0;s<e.elycharts.featuresmanager.managers.length;s++)e.elycharts.featuresmanager.managers[s][1].onMouseOver&&e.elycharts.featuresmanager.managers[s][1].onMouseOver(t,n,r,i)},onMouseOut:function(t,n,r,i){e.elycharts.featuresmanager.initialized||this.init();for(var s=0;s<e.elycharts.featuresmanager.managers.length;s++)e.elycharts.featuresmanager.managers[s][1].onMouseOut&&e.elycharts.featuresmanager.managers[s][1].onMouseOut(t,n,r,i)},onMouseEnter:function(t,n,r,i){e.elycharts.featuresmanager.initialized||this.init();for(var s=0;s<e.elycharts.featuresmanager.managers.length;s++)e.elycharts.featuresmanager.managers[s][1].onMouseEnter&&e.elycharts.featuresmanager.managers[s][1].onMouseEnter(t,n,r,i)},onMouseChanged:function(t,n,r,i){e.elycharts.featuresmanager.initialized||this.init();for(var s=0;s<e.elycharts.featuresmanager.managers.length;s++)e.elycharts.featuresmanager.managers[s][1].onMouseChanged&&e.elycharts.featuresmanager.managers[s][1].onMouseChanged(t,n,r,i)},onMouseExit:function(t,n,r,i){e.elycharts.featuresmanager.initialized||this.init();for(var s=0;s<e.elycharts.featuresmanager.managers.length;s++)e.elycharts.featuresmanager.managers[s][1].onMouseExit&&e.elycharts.featuresmanager.managers[s][1].onMouseExit(t,n,r,i)}}}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.anchormanager={afterShow:function(t,n){if(!t.opt.anchors)return;t.anchorBinds||(t.anchorBinds=[]);while(t.anchorBinds.length){var r=t.anchorBinds.pop();e(r[0]).unbind(r[1],r[2])}for(var i=0;i<t.mouseAreas.length;i++){var s=t.mouseAreas[i].piece?t.mouseAreas[i].piece.serie:!1,o;s?o=t.opt.anchors[s][t.mouseAreas[i].index]:o=t.opt.anchors[t.mouseAreas[i].index],o&&t.mouseAreas[i].props.anchor&&t.mouseAreas[i].props.anchor.highlight&&function(t,n,r,s){var o=function(){s.anchorMouseOver(t,n)},u=function(){s.anchorMouseOut(t,n)};t.mouseAreas[i].props.anchor.useMouseEnter?(t.anchorBinds.push([r,"mouseenter",o]),t.anchorBinds.push([r,"mouseleave",u]),e(r).mouseenter(o),e(r).mouseleave(u)):(t.anchorBinds.push([r,"mouseover",o]),t.anchorBinds.push([r,"mouseout",u]),e(r).mouseover(o),e(r).mouseout(u))}(t,t.mouseAreas[i],o,this)}t.onAnchors=[]},anchorMouseOver:function(t,n){e.elycharts.highlightmanager.onMouseOver(t,n.piece?n.piece.serie:!1,n.index,n)},anchorMouseOut:function(t,n){e.elycharts.highlightmanager.onMouseOut(t,n.piece?n.piece.serie:!1,n.index,n)},onMouseOver:function(t,n,r,i){if(!t.opt.anchors)return;if(i.props.anchor&&i.props.anchor.addClass){var s;n?s=t.opt.anchors[n][i.index]:s=t.opt.anchors[i.index],s&&(e(s).addClass(i.props.anchor.addClass),t.onAnchors.push([s,i.props.anchor.addClass]))}},onMouseOut:function(t,n,r,i){if(!t.opt.anchors)return;while(t.onAnchors.length>0){var s=t.onAnchors.pop();e(s[0]).removeClass(s[1])}}},e.elycharts.featuresmanager.register(e.elycharts.anchormanager,30)}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.animationmanager={beforeShow:function(e,t){e.newopt?this.stepAnimation(e,t):this.startAnimation(e,t)},stepAnimation:function(e,t){t=this._stepAnimationInt(e,t)},_stepAnimationInt:function(e,n,r,i,s){for(var o=0;o<n.length;o++){var u=t.areaProps(e,r?r:n[o].section,i?i:n[o].serie);u&&u.stepAnimation?u=u.stepAnimation:u=e.opt.features.animation.stepAnimation,typeof n[o].paths=="undefined"?u&&u.active&&n[o].animation&&(n[o].animation.speed=u&&u.speed?u.speed:300,n[o].animation.easing=u&&u.easing?u.easing:"",n[o].animation.delay=u&&u.delay?u.delay:0,n[o].animation.element||(n[o].animation.startAttr={opacity:0})):this._stepAnimationInt(e,n[o].paths,n[o].section,n[o].serie,!0)}},startAnimation:function(e,n){for(var r=0;r<n.length;r++)if(n[r].paths||n[r].path){var i=t.areaProps(e,n[r].section,n[r].serie);i&&i.startAnimation?i=i.startAnimation:i=e.opt.features.animation.startAnimation,i&&i.active&&((i.type=="simple"||n[r].section!="Series")&&this.animationSimple(e,i,n[r]),i.type=="grow"&&this.animationGrow(e,i,n[r]),i.type=="avg"&&this.animationAvg(e,i,n[r]),i.type=="reg"&&this.animationReg(e,i,n[r]))}},_animationPiece:function(n,r,i){if(n.paths)for(var s=0;s<n.paths.length;s++)this._animationPiece(n.paths[s],r,i);else n.path&&(n.animation={speed:r.speed,easing:r.easing,delay:r.delay,startPath:[],startAttr:t._clone(n.attr)},r.propsTo&&(n.attr=e.extend(!0,n.attr,r.propsTo)),r.propsFrom&&(n.animation.startAttr=e.extend(!0,n.animation.startAttr,r.propsFrom)),i&&r[i.toLowerCase()+"PropsFrom"]&&(n.animation.startAttr=e.extend(!0,n.animation.startAttr,r[i.toLowerCase()+"PropsFrom"])),typeof n.animation.startAttr.opacity!="undefined"&&typeof n.attr.opacity=="undefined"&&(n.attr.opacity=1))},animationSimple:function(e,t,n){this._animationPiece(n,t,n.subSection)},animationGrow:function(e,t,n){this._animationPiece(n,t,n.subSection);var r,i,s;switch(e.opt.type){case"line":s=e.height-e.opt.margins[2];switch(n.subSection){case"Plot":if(!n.paths){i=["LINE",[],n.path[0][2]];for(r=0;r<n.path[0][1].length;r++)i[1].push([n.path[0][1][r][0],n.path[0][1][r][1]==null?null:s]);n.animation.startPath.push(i)}else for(r=0;r<n.paths.length;r++)n.paths[r].path&&n.paths[r].animation.startPath.push(["RECT",n.paths[r].path[0][1],s,n.paths[r].path[0][3],s]);break;case"Fill":i=["LINEAREA",[],[],n.path[0][3]];for(r=0;r<n.path[0][1].length;r++)i[1].push([n.path[0][1][r][0],n.path[0][1][r][1]==null?null:s]),i[2].push([n.path[0][2][r][0],n.path[0][2][r][1]==null?null:s]);n.animation.startPath.push(i);break;case"Dot":for(r=0;r<n.paths.length;r++)n.paths[r].path&&n.paths[r].animation.startPath.push(["CIRCLE",n.paths[r].path[0][1],s,n.paths[r].path[0][3]])}break;case"pie":if(n.subSection=="Plot")for(r=0;r<n.paths.length;r++)n.paths[r].path&&n.paths[r].path[0][0]=="SLICE"&&n.paths[r].animation.startPath.push(["SLICE",n.paths[r].path[0][1],n.paths[r].path[0][2],n.paths[r].path[0][4]+n.paths[r].path[0][3]*.1,n.paths[r].path[0][4],n.paths[r].path[0][5],n.paths[r].path[0][6]]);break;case"funnel":alert("Unsupported animation GROW for funnel");break;case"barline":var o;if(n.section=="Series"&&n.subSection=="Plot"){t.subType?t.subType==1&&(o=e.opt.direction!="rtl"?e.width-e.opt.margins[1]:e.opt.margins[3]):o=e.opt.direction!="rtl"?e.opt.margins[3]:e.width-e.opt.margins[1];for(r=0;r<n.paths.length;r++)n.paths[r].path&&(!t.subType||t.subType==1?n.paths[r].animation.startPath.push(["RECT",o,n.paths[r].path[0][2],o,n.paths[r].path[0][4],n.paths[r].path[0][5]]):(s=(n.paths[r].path[0][2]+n.paths[r].path[0][4])/2,n.paths[r].animation.startPath.push(["RECT",n.paths[r].path[0][1],s,n.paths[r].path[0][3],s,n.paths[r].path[0][5]])))}}},_animationAvgXYArray:function(e){var t=[],n=0,r,i=0;for(r=0;r<e.length;r++)e[r][1]!=null&&(n+=e[r][1],i++);n/=i;for(r=0;r<e.length;r++)t.push([e[r][0],e[r][1]==null?null:n]);return t},animationAvg:function(e,t,n){this._animationPiece(n,t,n.subSection);var r=0,i,s;switch(e.opt.type){case"line":switch(n.subSection){case"Plot":if(!n.paths)n.animation.startPath.push(["LINE",this._animationAvgXYArray(n.path[0][1]),n.path[0][2]]);else{s=0;for(i=0;i<n.paths.length;i++)n.paths[i].path&&(s++,r+=n.paths[i].path[0][2]);r/=s;for(i=0;i<n.paths.length;i++)n.paths[i].path&&n.paths[i].animation.startPath.push(["RECT",n.paths[i].path[0][1],r,n.paths[i].path[0][3],n.paths[i].path[0][4]])}break;case"Fill":n.animation.startPath.push(["LINEAREA",this._animationAvgXYArray(n.path[0][1]),this._animationAvgXYArray(n.path[0][2]),n.path[0][3]]);break;case"Dot":s=0;for(i=0;i<n.paths.length;i++)n.paths[i].path&&(s++,r+=n.paths[i].path[0][2]);r/=s;for(i=0;i<n.paths.length;i++)n.paths[i].path&&n.paths[i].animation.startPath.push(["CIRCLE",n.paths[i].path[0][1],r,n.paths[i].path[0][3]])}break;case"pie":var o=360/n.paths.length;if(n.subSection=="Plot")for(i=0;i<n.paths.length;i++)n.paths[i].path&&n.paths[i].path[0][0]=="SLICE"&&n.paths[i].animation.startPath.push(["SLICE",n.paths[i].path[0][1],n.paths[i].path[0][2],n.paths[i].path[0][3],n.paths[i].path[0][4],i*o,(i+1)*o]);break;case"funnel":alert("Unsupported animation AVG for funnel");break;case"barline":alert("Unsupported animation AVG for barline")}},_animationRegXYArray:function(e){var t=[],n=e.length,r=0,i=n-1;while(e[r][1]==null)r++;while(e[i][1]==null)i--;var s=e[0][1],o=e[n-1][1];for(var u=0;u<e.length;u++)e[u][1]==null?t.push([e[u][0],null]):t.push([e[u][0],e[r][1]+(e[i][1]-e[r][1])/(i-r)*(u-r)]);return t},animationReg:function(e,n,r){this._animationPiece(r,n,r.subSection);var i,s,o,u;switch(e.opt.type){case"line":switch(r.subSection){case"Plot":if(!r.paths)r.animation.startPath.push(["LINE",this._animationRegXYArray(r.path[0][1]),r.path[0][2]]);else{s=r.paths.length;if(s>1){for(i=0;!r.paths[i].path&&i<r.paths.length;i++);o=r.paths[i].path?t.getY(r.paths[i].path[0]):0;for(i=r.paths.length-1;!r.paths[i].path&&i>=0;i--);u=r.paths[i].path?t.getY(r.paths[i].path[0]):0;for(i=0;i<r.paths.length;i++)r.paths[i].path&&r.paths[i].animation.startPath.push(["RECT",r.paths[i].path[0][1],o+(u-o)/(s-1)*i,r.paths[i].path[0][3],r.paths[i].path[0][4]])}}break;case"Fill":r.animation.startPath.push(["LINEAREA",this._animationRegXYArray(r.path[0][1]),this._animationRegXYArray(r.path[0][2]),r.path[0][3]]);break;case"Dot":s=r.paths.length;if(s>1){for(i=0;!r.paths[i].path&&i<r.paths.length;i++);o=r.paths[i].path?t.getY(r.paths[i].path[0]):0;for(i=r.paths.length-1;!r.paths[i].path&&i>=0;i--);u=r.paths[i].path?t.getY(r.paths[i].path[0]):0;for(i=0;i<r.paths.length;i++)r.paths[i].path&&r.paths[i].animation.startPath.push(["CIRCLE",r.paths[i].path[0][1],o+(u-o)/(s-1)*i,r.paths[i].path[0][3]])}}break;case"pie":alert("Unsupported animation REG for pie");break;case"funnel":alert("Unsupported animation REG for funnel"
);break;case"barline":alert("Unsupported animation REG for barline")}}},e.elycharts.featuresmanager.register(e.elycharts.animationmanager,10),e.elycharts.frameanimationmanager={beforeShow:function(t,n){t.opt.features.frameAnimation.active&&e(t.container.get(0)).css(t.opt.features.frameAnimation.cssFrom)},afterShow:function(e,t){e.opt.features.frameAnimation.active&&e.container.animate(e.opt.features.frameAnimation.cssTo,e.opt.features.frameAnimation.speed,e.opt.features.frameAnimation.easing)}},e.elycharts.featuresmanager.register(e.elycharts.frameanimationmanager,90)}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.balloonmanager={afterShow:function(e,t){if(e.opt.features.balloons.active&&e.opt.balloons&&e.opt.type=="funnel"){var n=e.opt.features.balloons,r=!1,i=!1;for(var s=0;s<t.length;s++)if(t[s].section=="Series"&&t[s].subSection=="Plot")for(var o=0;o<t[s].paths.length;o++)e.opt.balloons[t[s].serie]&&e.opt.balloons[t[s].serie][o]&&(r=t[s].serie,i=o,this.drawBalloon(e,r,o,t[s].paths[o].rect));else r&&t[s].section=="Sector"&&t[s].serie=="bottom"&&!t[s].subSection&&i<e.opt.balloons[r].length-1&&this.drawBalloon(e,r,e.opt.balloons[r].length-1,t[s].rect)}},drawBalloon:function(n,r,i,s){var o=n.opt.features.balloons,u=n.opt.balloons[r][i],a={position:"absolute","z-index":25,margin:s[1]+"px 0 0 "+o.left+"px",height:(o.height?o.height:s[3]-s[1])-o.padding[0]*2,width:o.width?o.width:s[0],padding:o.padding[0]+"px "+o.padding[1]+"px"};typeof u=="string"?e("<div></div>").css(a).css(o.style).html(u).prependTo(n.container):e(u).css(a).css(o.style).prependTo(n.container);if(o.line){var f=[];for(var l=0;l<o.line.length;l++)l==0?f.push(["M",s[0]-o.line[l][0],s[1]+o.line[l][1]]):l==o.line.length-1?f.push(["L",o.left+(o.width?o.width:s[0])-o.line[l][0],s[1]+o.line[l][1]]):f.push(["L",s[0]-o.line[l][0],s[1]+o.line[l][1]]);t.showPath(n,f).attr(o.lineProps)}}},e.elycharts.featuresmanager.register(e.elycharts.balloonmanager,30)}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.highlightmanager={removeHighlighted:function(e,n){if(e.highlighted)while(e.highlighted.length>0){var r=e.highlighted.pop();r.piece?n&&t.animationStackPush(e,r.piece,r.piece.element,t.getPieceFullAttr(e,r.piece),r.cfg.restoreSpeed,r.cfg.restoreEasing,0,!0):r.element.remove()}},afterShow:function(e,t){e.highlighted&&e.highlighted.length>0&&this.removeHighlighted(e,!1),e.highlighted=[]},onMouseOver:function(n,r,i,s){var o,u;for(var a=0;a<s.pieces.length;a++)if(s.pieces[a].section=="Series"&&s.pieces[a].paths&&(!r||s.pieces[a].serie==r)&&s.pieces[a].paths[i]&&s.pieces[a].paths[i].element){var f=s.pieces[a].paths[i];u=f.element,o=f.path;var l=t.getElementOriginalAttrs(u),c=!1,h=r?s.props:t.areaProps(n,s.pieces[a].section,s.pieces[a].serie),p,d,v;if(o&&h.highlight){if(h.highlight.scale){var m=h.highlight.scale;typeof m=="number"&&(m=[m,m]);if(o[0][0]=="RECT"){var g=o[0][3]-o[0][1],y=o[0][4]-o[0][2];o=[["RECT",o[0][1],o[0][2]-y*(m[1]-1),o[0][3]+g*(m[0]-1),o[0][4]]],t.animationStackPush(n,f,u,t.getSVGProps(n,o),h.highlight.scaleSpeed,h.highlight.scaleEasing)}else if(o[0][0]=="CIRCLE")c={r:o[0][3]*m[0]},t.animationStackPush(n,f,u,c,h.highlight.scaleSpeed,h.highlight.scaleEasing);else if(o[0][0]=="SLICE"){var b=(o[0][6]-o[0][5])*(m[1]-1)/2;b>90&&(b=90),o=[["SLICE",o[0][1],o[0][2],o[0][3]*m[0],o[0][4],o[0][5]-b,o[0][6]+b]],t.animationStackPush(n,f,u,t.getSVGProps(n,o),h.highlight.scaleSpeed,h.highlight.scaleEasing)}else if(n.opt.type=="funnel"){var w=(f.rect[2]-f.rect[0])*(m[0]-1)/2,E=(f.rect[3]-f.rect[1])*(m[1]-1)/2;o=[t.movePath(n,[o[0]],[-w,-E])[0],t.movePath(n,[o[1]],[+w,-E])[0],t.movePath(n,[o[2]],[+w,+E])[0],t.movePath(n,[o[3]],[-w,+E])[0],o[4]],t.animationStackPush(n,f,u,t.getSVGProps(n,o),h.highlight.scaleSpeed,h.highlight.scaleEasing,0,!0),p=!1,i>0?(d=s.pieces[a].paths[i-1],p=d.element,v=d.path):(d=t.findInPieces(s.pieces,"Sector","top"),d&&(p=d.element,v=d.path)),p&&(v=[v[0],v[1],t.movePath(n,[v[2]],[+w,-E])[0],t.movePath(n,[v[3]],[-w,-E])[0],v[4]],t.animationStackPush(n,d,p,t.getSVGProps(n,v),h.highlight.scaleSpeed,h.highlight.scaleEasing,0,!0),n.highlighted.push({piece:d,cfg:h.highlight})),p=!1,i<s.pieces[a].paths.length-1?(d=s.pieces[a].paths[i+1],p=d.element,v=d.path):(d=t.findInPieces(s.pieces,"Sector","bottom"),d&&(p=d.element,v=d.path)),p&&(v=[t.movePath(n,[v[0]],[-w,+E])[0],t.movePath(n,[v[1]],[+w,+E])[0],v[2],v[3],v[4]],t.animationStackPush(n,d,p,t.getSVGProps(n,v),h.highlight.scaleSpeed,h.highlight.scaleEasing,0,!0),n.highlighted.push({piece:d,cfg:h.highlight}))}}if(h.highlight.newProps){for(var S in h.highlight.newProps)typeof l[S]=="undefined"&&(l[S]=!1);t.animationStackPush(n,f,u,h.highlight.newProps)}if(h.highlight.move){var x=e.isArray(h.highlight.move)?h.highlight.move:[h.highlight.move,0];o=t.movePath(n,o,x),t.animationStackPush(n,f,u,t.getSVGProps(n,o),h.highlight.moveSpeed,h.highlight.moveEasing)}n.highlighted.push({piece:f,cfg:h.highlight}),h.highlight.overlayProps&&(u=t.showPath(n,o),c&&u.attr(c),u.attr(h.highlight.overlayProps),l=!1,n.highlighted.push({element:u,attr:l,cfg:h.highlight}))}}if(n.opt.features.highlight.indexHighlight&&n.opt.type=="line"){var T=n.opt.features.highlight.indexHighlight;T=="auto"&&(T=n.indexCenter=="bar"?"bar":"line");var N=(n.width-n.opt.margins[3]-n.opt.margins[1])/(n.opt.labels.length>0?n.opt.labels.length:1),C=(n.width-n.opt.margins[3]-n.opt.margins[1])/(n.opt.labels.length>1?n.opt.labels.length-1:1),k=!0;switch(T){case"bar":o=[["RECT",n.opt.margins[3]+i*N,n.opt.margins[0],n.opt.margins[3]+(i+1)*N,n.height-n.opt.margins[2]]];break;case"line":k=!1;case"barline":var L=Math.round((k?N/2:0)+n.opt.margins[3]+i*(k?N:C));o=[["M",L,n.opt.margins[0]],["L",L,n.height-n.opt.margins[2]]]}o&&(u=t.showPath(n,o).attr(n.opt.features.highlight.indexHighlightProps),n.highlighted.push({element:u,attr:!1,cfg:n.opt.features.highlight}))}},onMouseOut:function(e,t,n,r){this.removeHighlighted(e,!0)}},e.elycharts.featuresmanager.register(e.elycharts.highlightmanager,21)}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.labelmanager={beforeShow:function(n,r){if(!t.executeIfChanged(n,["labels","values","series"]))return;if(n.opt.labels&&(n.opt.type=="pie"||n.opt.type=="funnel")){var i=!1,s;for(var o=0;o<r.length;o++)if(r[o].section=="Series"&&r[o].subSection=="Plot"){var u=t.areaProps(n,"Series",r[o].serie);n.emptySeries&&n.opt.series.empty&&(u.label=e.extend(!0,u.label,n.opt.series.empty.label));if(u&&u.label&&u.label.active){s=[];for(var a=0;a<r[o].paths.length;a++)r[o].paths[a].path?(i=a,s.push(this.showLabel(n,r[o],r[o].paths[a],r[o].serie,a,r))):s.push({path:!1,attr:!1});r.push({section:r[o].section,serie:r[o].serie,subSection:"Label",paths:s})}}else r[o].section=="Sector"&&r[o].serie=="bottom"&&!r[o].subSection&&i<n.opt.labels.length-1&&(s=[],s.push(this.showLabel(n,r[o],r[o],"Series",n.opt.labels.length-1,r)),r.push({section:r[o].section,serie:r[o].serie,subSection:"Label",paths:s}))}},showLabel:function(n,r,i,s,o,u){var a=t.areaProps(n,"Series",s,o);if(n.opt.labels[o]||a.label.label){var f=i,l=a.label.label?a.label.label:n.opt.labels[o],c=t.getCenter(f,a.label.offset);if(!a.label.html){var h=a.label.props;return a.label.frameAnchor&&(h=t._clone(a.label.props),h["text-anchor"]=a.label.frameAnchor[0],h["alignment-baseline"]=a.label.frameAnchor[1]),{path:[["TEXT",l,c[0],c[1]]],attr:h}}var p=1,d=t._clone(a.label.style),v=typeof d.opacity!="undefined";v&&(p=d.opacity,d.opacity=0),d.position="absolute",d["z-index"]=25;var m;typeof l=="string"?m=e("<div>"+l+"</div>").css(d).prependTo(n.container):m=e(l).css(d).prependTo(n.container),n.opt.features.debug.active&&m.height()==0&&alert("DEBUG: Al gestore label e' stata passata una label ancora senza dimensioni, quindi ancora non disegnata. Per questo motivo il posizionamento potrebbe non essere correto.");var g=c[0],y=c[1];return!a.label.frameAnchor||a.label.frameAnchor[0]=="middle"?g-=m.width()/2:a.label.frameAnchor&&a.label.frameAnchor[0]=="end"&&(g-=m.width()),!a.label.frameAnchor||a.label.frameAnchor[1]=="middle"?y-=m.height()/2:a.label.frameAnchor&&a.label.frameAnchor[1]=="top"&&(y-=m.height()),v?m.css({margin:y+"px 0 0 "+g+"px",opacity:p}):m.css({margin:y+"px 0 0 "+g+"px"}),{path:[["DOMELEMENT",m]],attr:!1}}return!1}},e.elycharts.featuresmanager.register(e.elycharts.labelmanager,5)}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.legendmanager={afterShow:function(n,r){if(n.legenditems){for(item in n.legenditems)n.legenditems[item].remove();n.legenditems=!1}if(!n.opt.legend||n.opt.legend.length==0)return;var i=n.opt.features.legend;if(i===!1)return;var s=i.x;if(s=="auto"){var o=1;s=0}var u=i.width;if(u=="auto"){var a=1;u=n.width}var f=0,l=[],c=0,h,p,d,v,m,g,y;for(h in n.opt.legend)n.opt.type!="pie"?c++:c+=n.opt.legend[h].length;var b=0;for(h in n.opt.legend){n.opt.type!="pie"?p=[n.opt.legend[h]]:p=n.opt.legend[h];for(var w=0;w<p.length;w++){var E=t.areaProps(n,"Series",h,n.opt.type=="pie"?w:!1),S=e.extend(!0,{},i);E.legend&&(S=e.extend(!0,S,E.legend));var x=t.getItemColor(n,h,n.opt.type=="pie"?w:!1);x&&t.colorize(n,S,[["dotProps","fill"]],x),!S.dotProps.fill&&n.opt.type=="pie"&&E.plotProps&&E.plotProps.fill&&(S.dotProps.fill=E.plotProps.fill);var T=i.margins?i.margins[0]+i.margins[2]:0,N=i.margins?i.margins[1]+i.margins[3]:0,C=i.margins?i.margins[0]:0,k=i.margins?i.margins[3]:0;i.horizontal?(d=i.height-T,!i.itemWidth||i.itemWidth=="fixed"?(v=(u-N)/c,m=Math.floor(s+k+v*b)):(v=u-N-f,m=s+k+f),g=Math.floor(i.y+C)):(d=(i.height-T)/c,v=u-N,m=Math.floor(s+k),g=Math.floor(i.y+C+d*b)),S.dotType=="rect"?(l.push(t.showPath(n,[["RECT",i.dotMargins[0]+m,g+Math.floor((d-S.dotHeight)/2),i.dotMargins[0]+m+S.dotWidth,g+Math.floor((d-S.dotHeight)/2)+S.dotHeight,S.dotR]]).attr(S.dotProps)),y=i.dotMargins[0]+S.dotWidth+i.dotMargins[1]):S.dotType=="circle"&&(l.push(t.showPath(n,[["CIRCLE",i.dotMargins[0]+m+S.dotR,g+d/2,S.dotR]]).attr(S.dotProps)),y=i.dotMargins[0]+S.dotR*2+i.dotMargins[1]);var L=p[w],A=t.showPath(n,[["TEXT",L,m+y,g+Math.ceil(d/2)+(Raphael.VML?2:0)]]).attr({"text-anchor":"start"}).attr(S.textProps);l.push(A);while(A.getBBox().width>v-y&&A.getBBox().width>10)L=L.substring(0,L.length-1),A.attr({text:L});A.show(),i.horizontal&&i.itemWidth=="auto"?f+=y+A.getBBox().width+4:!i.horizontal&&a?f=A.getBBox().width+y>f?A.getBBox().width+y:f:f+=v,b++}}a&&(u=f+i.margins[3]+i.margins[1]-1);if(o){s=Math.floor((n.width-u)/2);for(b in l)l[b].attrs.x?l[b].attr("x",l[b].attrs.x+s):l[b].attr("path",t.movePath(n,l[b].attrs.path,[s,0]))}var O=[["RECT",s,i.y,s+u,i.y+i.height,i.r]],M=t.showPath(n,O).attr(i.borderProps);for(b in l)l[b].toFront();l.unshift(M),n.legenditems=l}},e.elycharts.featuresmanager.register(e.elycharts.legendmanager,90)}(jQuery),function(e){var t=e.elycharts.featuresmanager,n=e.elycharts.common;e.elycharts.mousemanager={clear:function(e){e.mouseLayer&&(e.mouseLayer.remove(),e.mouseLayer=null,e.mousePaper.clear(),e.mousePaper.remove(),e.mousePaper=null,e.mouseTimer=null,e.mouseAreas=null)},afterShow:function(t,r){if(!t.opt.interactive)return;this.clear(t),t.mouseLayer=e("<div></div>").css({position:"absolute","z-index":20,opacity:1}).prependTo(t.container),t.mousePaper=n._RaphaelInstance(t.mouseLayer.get(0),t.width,t.height);var i=t.mousePaper;t.opt.features.debug.active&&typeof DP_Debug!="undefined"&&(t.paper.text(t.width,t.height-5,"DEBUG").attr({"text-anchor":"end",stroke:"red",opacity:.1}),i.text(t.width,t.height-5,"DEBUG").attr({"text-anchor":"end",stroke:"red",opacity:.1}).click(function(){DP_Debug.dump(t.opt,"",!1,4)}));var s,o;t.mouseAreas=[];if(t.opt.features.mousearea.type=="single"){for(s=0;s<r.length;s++)if(r[s].mousearea)if(!r[s].paths)if(r[s].path.length>=1&&(r[s].path[0][0]=="LINE"||r[s].path[0][0]=="LINEAREA"))for(o=0;o<r[s].path[0][1].length;o++){var u=n.areaProps(t,r[s].section,r[s].serie);(u.mouseareaShowOnNull||r[s].section!="Series"||t.opt.values[r[s].serie][o]!=null)&&t.mouseAreas.push({path:[["CIRCLE",r[s].path[0][1][o][0],r[s].path[0][1][o][1],10]],piece:r[s],pieces:r,index:o,props:u})}else for(o=0;o<r[s].path.length;o++)t.mouseAreas.push({path:[["CIRCLE",n.getX(r[s].path[o]),n.getY(r[s].path[o]),10]],piece:r[s],pieces:r,index:o,props:n.areaProps(t,r[s].section,r[s].serie)});else if(r[s].paths)for(o=0;o<r[s].paths.length;o++)r[s].paths[o].path&&t.mouseAreas.push({path:r[s].paths[o].path,piece:r[s],pieces:r,index:o,props:n.areaProps(t,r[s].section,r[s].serie)})}else{var a=t.opt.features.mousearea.indexCenter;a=="auto"&&(a=t.indexCenter);var f,l;a=="bar"?(l=(t.width-t.opt.margins[3]-t.opt.margins[1])/(t.opt.labels.length>0?t.opt.labels.length:1),f=t.opt.margins[3]):(l=(t.width-t.opt.margins[3]-t.opt.margins[1])/(t.opt.labels.length>1?t.opt.labels.length-1:1),f=t.opt.margins[3]-l/2);for(var c in t.opt.labels){var h=parseInt(c);t.mouseAreas.push({path:[["RECT",f+h*l,t.height-t.opt.margins[2],f+(h+1)*l,t.opt.margins[0]]],piece:!1,pieces:r,index:parseInt(h),props:t.opt.defaultSeries})}}var p=!1;t.opt.features.mousearea.syncTag?(e.elycharts.mouseareaenv||(e.elycharts.mouseareaenv={}),e.elycharts.mouseareaenv[t.opt.features.mousearea.syncTag]||(e.elycharts.mouseareaenv[t.opt.features.mousearea.syncTag]={chartEnv:!1,mouseObj:!1,caller:!1,inArea:-1,timer:!1}),p=e.elycharts.mouseareaenv[t.opt.features.mousearea.syncTag]):(t.mouseareaenv={chartEnv:!1,mouseObj:!1,caller:!1,inArea:-1,timer:!1},p=t.mouseareaenv);for(s=0;s<t.mouseAreas.length;s++)t.mouseAreas[s].area=n.showPath(t,t.mouseAreas[s].path,i).attr({stroke:"#000",fill:"#fff",opacity:0}),function(t,n,r,i,s){var o=n.piece,u=n.index;n.mouseover=function(e){n.event=e,clearTimeout(s.timer),i.onMouseOverArea(t,o,u,n),s.chartEnv&&s.chartEnv.id!=t.id?(s.caller.onMouseExitArea(s.chartEnv,s.mouseObj.piece,s.mouseObj.index,s.mouseObj),i.onMouseEnterArea(t,o,u,n)):s.inArea!=r&&(s.inArea<0?i.onMouseEnterArea(t,o,u,n):i.onMouseChangedArea(t,o,u,n)),s.chartEnv=t,s.mouseObj=n,s.caller=i,s.inArea=r},n.mouseout=function(e){n.event=e,clearTimeout(s.timer),i.onMouseOutArea(t,o,u,n),s.timer=setTimeout(function(){s.timer=!1,i.onMouseExitArea(t,o,u,n),s.chartEnv=!1,s.inArea=-1},t.opt.features.mousearea.areaMoveDelay)},e(n.area.node).mouseover(n.mouseover),e(n.area.node).mouseout(n.mouseout)}(t,t.mouseAreas[s],s,this,p)},onMouseOverArea:function(e,n,r,i){e.opt.features.mousearea.onMouseOver&&e.opt.features.mousearea.onMouseOver(e,i.piece?i.piece.serie:!1,i.index,i),t.onMouseOver(e,i.piece?i.piece.serie:!1,i.index,i)},onMouseOutArea:function(e,n,r,i){e.opt.features.mousearea.onMouseOut&&e.opt.features.mousearea.onMouseOut(e,i.piece?i.piece.serie:!1,i.index,i),t.onMouseOut(e,i.piece?i.piece.serie:!1,i.index,i)},onMouseEnterArea:function(e,n,r,i){e.opt.features.mousearea.onMouseEnter&&e.opt.features.mousearea.onMouseEnter(e,i.piece?i.piece.serie:!1,i.index,i),t.onMouseEnter(e,i.piece?i.piece.serie:!1,i.index,i)},onMouseChangedArea:function(e,n,r,i){e.opt.features.mousearea.onMouseChanged&&e.opt.features.mousearea.onMouseChanged(e,i.piece?i.piece.serie:!1,i.index,i),t.onMouseChanged(e,i.piece?i.piece.serie:!1,i.index,i)},onMouseExitArea:function(e,n,r,i){e.opt.features.mousearea.onMouseExit&&e.opt.features.mousearea.onMouseExit(e,i.piece?i.piece.serie:!1,i.index,i),t.onMouseExit(e,i.piece?i.piece.serie:!1,i.index,i)}},e.elycharts.featuresmanager.register(e.elycharts.mousemanager,0)}(jQuery),function(e){e.elycharts.shadowmanager={beforeShow:function(e,t){if(!e.opt.features.shadows||!e.opt.features.shadows.active)return;var n=e.opt.features.shadows.offset,r=[];for(var i=0;i<t.length;i++){var s=[];for(var o=0;o<t[i].path.length;o++){var u=t[i].path[o];switch(u[0]){case"M":case"L":s.push([u[0],u[1]+n[0],u[2]+n[1]]);break;case"A":case"C":s.push([u[0],u[1],u[2],u[3],u[4],u[5],u[6]+n[0],u[7]+n[1]]);break;case"z":case"Z":s.push([u[0]])}}r.push({path:s,attr:e.opt.features.shadows.props})}for(var i=r.length-1;i>=0;i--)t.unshift(r[i])}},e.elycharts.featuresmanager.register(e.elycharts.shadowmanager,5)}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.tooltipmanager={clear:function(e){e.tooltipContainer&&(e.tooltipFrame.clear(),e.tooltipFrame.remove(),e.tooltipFrame=null,e.tooltipFrameElement=null,e.tooltipContent.remove(),e.tooltipContent=null,e.tooltipContainer.remove(),e.tooltipContainer=null)},afterShow:function(n,r){this.clear(n),e.elycharts.tooltipid||(e.elycharts.tooltipid=0),e.elycharts.tooltipid++,n.tooltipContainer=e('<div id="elycharts_tooltip_'+e.elycharts.tooltipid+'" style="position: absolute; top: 100; left: 100; z-index: 10; overflow: hidden; white-space: nowrap; display: none"><div id="elycharts_tooltip_'+e.elycharts.tooltipid+'_frame" style="position: absolute; top: 0; left: 0; z-index: -1"></div><div id="elycharts_tooltip_'+e.elycharts.tooltipid+'_content" style="cursor: default"></div></div>').appendTo(document.body),n.tooltipFrame=t._RaphaelInstance("elycharts_tooltip_"+e.elycharts.tooltipid+"_frame",500,500),n.tooltipContent=e("#elycharts_tooltip_"+e.elycharts.tooltipid+"_content")},_prepareShow:function(n,r,i,s){if(r.width&&r.width!="auto"&&r.height&&r.height!="auto"){var o=r.frameProps&&r.frameProps["stroke-width"]?r.frameProps["stroke-width"]:0;n.tooltipContainer.width(r.width+o+1).height(r.height+o+1);if(!n.tooltipFrameElement&&r.frameProps){var u=[["RECT",o/2,o/2,r.width,r.height,r.roundedCorners]];n.tooltipFrameElement=t.showPath(n,u,n.tooltipFrame).attr(r.frameProps)}}n.tooltipFrameElement&&n.tooltipFrameElement.attr(r.frameProps),r.padding&&n.tooltipContent.css({padding:r.padding[0]+"px "+r.padding[1]+"px"}),n.tooltipContent.css(r.contentStyle),n.tooltipContent.html(s);var a=e(n.container).offset();if(n.opt.features.tooltip.fixedPos)a.top+=n.opt.features.tooltip.fixedPos[1],a.left+=n.opt.features.tooltip.fixedPos[0];else{var f=this.getXY(n,r,i);if(!f[2]){a.left+=f[0];while(a.top+f[1]<0)f[1]+=20;a.top+=f[1]}else a.left=f[0],a.top=f[1]}return{top:a.top,left:a.left}},getXY:function(e,n,r){var i=0,s=0;if(r.path[0][0]=="RECT")i=t.getX(r.path[0])-n.offset[1],s=t.getY(r.path[0])-n.height-n.offset[0];else if(r.path[0][0]=="CIRCLE")i=t.getX(r.path[0])-n.offset[1],s=t.getY(r.path[0])-n.height-n.offset[0];else if(r.path[0][0]=="SLICE"){var o=r.path[0],u=n.width&&n.width!="auto"?n.width:100,a=n.height&&n.height!="auto"?n.height:100,f=Math.sqrt(Math.pow(u,2)+Math.pow(a,2))/2;f>e.opt.r&&(f=e.opt.r);var l=o[5]+(o[6]-o[5])/2+180,c=Math.PI/180;i=o[1]+f*Math.cos(-l*c)-u/2,s=o[2]+f*Math.sin(-l*c)-a/2}else if(r.piece&&r.piece.paths&&r.index>=0&&r.piece.paths[r.index]&&r.piece.paths[r.index].rect){var h=r.piece.paths[r.index].rect;i=h[0]-n.offset[1],s=h[1]-n.height-n.offset[0]}return e.opt.features.tooltip.positionHandler?e.opt.features.tooltip.positionHandler(e,n,r,i,s):[i,s]},getTip:function(e,t,n){var r=!1;return e.opt.tooltips&&(typeof e.opt.tooltips=="function"?r=e.opt.tooltips(e,t,n,t&&e.opt.values[t]&&e.opt.values[t][n]?e.opt.values[t][n]:!1,e.opt.labels&&e.opt.labels[n]?e.opt.labels[n]:!1):t&&e.opt.tooltips[t]&&e.opt.tooltips[t][n]?r=e.opt.tooltips[t][n]:!t&&e.opt.tooltips[n]&&(r=e.opt.tooltips[n])),r},_getProps:function(n,r,i,s){var o=s.props.tooltip;n.emptySeries&&n.opt.series.empty&&(o=e.extend(!0,o,n.opt.series.empty.tooltip));if(!o||!o.active)return!1;if(o.frameProps){var u=t.getItemColor(n,r,i);u&&(o=t._clone(o),t.colorize(n,o,[["frameProps","stroke"]],u))}return o},_fadeOut:function(e){e.tooltipContainer.fadeOut(e.opt.features.tooltip.fadeDelay)},onMouseEnter:function(e,t,n,r){var i=this._getProps(e,t,n,r);if(!i)return!1;var s=this.getTip(e,t,n);return s?(e.tooltipContainer.css(this._prepareShow(e,i,r,s)).fadeIn(e.opt.features.tooltip.fadeDelay),!0):(this._fadeOut(e),!0)},onMouseChanged:function(e,t,n,r){var i=this._getProps(e,t,n,r);if(!i)return!1;var s=this.getTip(e,t,n);return s?(e.tooltipContainer.clearQueue(),e.tooltipContainer.fadeIn(e.opt.features.tooltip.fadeDelay),e.tooltipContainer.animate(this._prepareShow(e,i,r,s),e.opt.features.tooltip.moveDelay,"linear"),!0):(this._fadeOut(e),!0)},onMouseExit:function(e,t,n,r){var i=this._getProps(e,t,n,r);return i?(this._fadeOut(e),!0):!1}},e.elycharts.featuresmanager.register(e.elycharts.tooltipmanager,20)}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.barline={init:function(e){},draw:function(e){var n=e.paper,r=e.opt;e.xmin=r.margins[3],e.xmax=e.width-r.margins[1],e.ymin=r.margins[0],e.ymax=e.height-r.margins[2];var i=0;for(var s in r.values){var o=r.values[s],u=o[0],a={props:t.areaProps(e,"Series",s)};e.plots[s]=a,!a.props.stacked||!e.plots[a.props.stacked]?a.from=0:a.from=e.plots[a.props.stacked].to,a.to=a.from+u,a.to>i&&(i=a.to)}typeof r.max!="undefined"&&(i=r.max),i||(i=1);var f=[];for(s in r.values){a=e.plots[s];var l=(e.xmax-e.xmin)/i;r.direction!="rtl"?f.push({paths:[{path:[["RECT",e.xmin+l*a.from,e.ymin,e.xmin+l*a.to,e.ymax]],attr:a.props.plotProps}],section:"Series",serie:s,subSection:"Plot",mousearea:"paths"}):f.push({paths:[{path:[["RECT",e.xmax-l*a.from,e.ymin,e.xmax-l*a.to,e.ymax]],attr:a.props.plotProps}],section:"Series",serie:s,subSection:"Plot",mousearea:"paths"})}return f}}}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.funnel={init:function(e){},draw:function(e){var t=e.paper,n=e.opt;e.xmin=n.margins[3],e.xmax=e.width-n.margins[1],e.ymin=n.margins[0]+Math.abs(n.rh);for(var r in n.values){var i=n.values[r],s=n.method=="width"?i[i.length-1]/(i[0]?i[0]:1):Math.sqrt(i[i.length-1]/(i[0]?i[0]:1)*Math.pow(.5,2))*2;e.ymax=e.height-n.margins[2]-s*Math.abs(n.rh);var o=this.pieces(e,r,0,1,1,i)}return o},pieces:function(e,n,r,i,s,o){var u,a=[],f=e.opt,l=o[0]?o[0]:1,c=r,h=(i-r-f.topSector-f.bottomSector)/(o.length>1?o.length-1:1),p=s;(u=this.edge(e,c,p,!0))&&a.push({path:u,section:"Edge",attr:e.opt.edgeProps}),f.topSector>0&&(u=this.section(e,c,c+=f.topSector,p,p))&&a.push({path:u.path,center:u.center,rect:u.rect,section:"Sector",serie:"top",attr:e.opt.topSectorProps});var d=[];for(var v=1;v<o.length;v++){var m=o[0]?o[v]:1;if(u=this.section(e,c,c+=h,p,f.method=="width"?p=m/l*s:p=Math.sqrt(m/l*Math.pow(s/2,2))*2))var g=t.areaProps(e,"Series",n,v-1);d.push({path:u.path,center:u.center,rect:u.rect,attr:g.plotProps})}return a.push({section:"Series",serie:n,paths:d,subSection:"Plot",mousearea:"paths"}),f.bottomSector>0&&(u=this.section(e,c,c+=f.bottomSector,p,p))&&a.push({path:u.path,center:u.center,rect:u.rect,section:"Sector",serie:"bottom",attr:e.opt.bottomSectorProps}),(u=this.edge(e,c,p,!1))&&a.push({path:u,section:"Edge",attr:e.opt.edgeProps}),a},section:function(e,t,n,r,i){x1a=e.xmin+(e.xmax-e.xmin)*(r/-2+.5),x2a=e.xmin+(e.xmax-e.xmin)*(r/2+.5),x1b=e.xmin+(e.xmax-e.xmin)*(i/-2+.5),x2b=e.xmin+(e.xmax-e.xmin)*(i/2+.5),y1=e.ymin+(e.ymax-e.ymin)*t,y2=e.ymin+(e.ymax-e.ymin)*n;var s=(x2a-x1a)/2,o=s/(e.xmax-e.xmin)*2*Math.abs(e.opt.rh),u=(x2b-x1b)/2,a=u/(e.xmax-e.xmin)*2*Math.abs(e.opt.rh),f=[];return f.push(["M",x1a,y1]),e.opt.rh!=0?f.push(["A",s,o,0,0,e.opt.rh>0?1:0,x2a,y1]):f.push(["L",x2a,y1]),f.push(["L",x2b,y2]),e.opt.rh!=0?f.push(["A",u,a,0,0,e.opt.rh>0?0:1,x1b,y2]):f.push(["L",x1b,y2]),f.push(["z"]),{path:f,center:[(x2a+x1a)/2,(y2+y1)/2+(e.opt.rh>0?-1:1)*(o+a)/2],rect:[x1a,y1,x2a,y2]}},edge:function(e,t,n,r){if(r&&e.opt.rh>=0||!r&&e.opt.rh<=0)return!1;x1=e.xmin+(e.xmax-e.xmin)*(n/-2+.5),x2=e.xmin+(e.xmax-e.xmin)*(n/2+.5),y=e.ymin+(e.ymax-e.ymin)*t;var i=(x2-x1)/2,s=i/(e.xmax-e.xmin)*2*Math.abs(e.opt.rh),o=[];return o.push(["M",x1,y]),o.push(["A",i,s,0,0,e.opt.rh<0?1:0,x2,y]),o.push(["A",i,s,0,0,e.opt.rh<0?1:0,x1,y]),o.push(["z"]),o}}}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.line={init:function(e){},_getColorizationKey:function(e){return e=="line"?[["plotProps","stroke"],["dotProps","fill"],["fillProps","fill"]]:[["plotProps","stroke"],["plotProps","fill"]]},draw:function(e){t.executeIfChanged(e,["values","series"])&&(e.plots={},e.axis={x:{}},e.barno=0,e.indexCenter="line");var n=e.opt,r=e.plots,i=e.axis,s=e.paper,o=e.opt.values,u=e.opt.labels,a,f,l,c,h,p;if(t.executeIfChanged(e,["values","series"])){var d=0,v=!1;for(c in o){h={index:d,type:!1,visible:!1},r[c]=h;if(o[c]){l=t.areaProps(e,"Series",c),h.type=l.type,l.type=="bar"&&(e.indexCenter="bar");if(l.visible){h.visible=!0;if(!p||p<o[c].length)p=o[c].length;var m=[];for(a=0;a<o[c].length;a++){var g=o[c][a];if(l.avgOverNulls&&g==null)if(l.type=="bar")g=0;else{for(var y=a+1;y<o[c].length&&o[c][y]==null;y++);var b=y<o[c].length?o[c][y]:null;for(var w=a-1;w>=0&&o[c][w]==null;w--);var E=w>=0?o[c][w]:null;g=b!=null?E!=null?(b*(a-w)+E*(y-a))/(y-w):b:E}m.push(g)}l.stacked&&typeof l.stacked!="string"&&(l.stacked=v);if(typeof l.stacked=="undefined"||l.stacked==c||l.stacked<0||!r[l.stacked]||!r[l.stacked].visible||r[l.stacked].type!=h.type){h.ref=c,l.type=="bar"&&(h.barno=e.barno++),h.from=[];if(!l.cumulative)h.to=m;else{h.to=[],f=0;for(a=0;a<m.length;a++)h.to.push(f+=m[a]!=null?m[a]:0)}for(a=0;a<m.length;a++)h.from.push(h.to[a]!=null?0:null)}else{h.ref=l.stacked,l.type=="bar"&&(h.barno=r[l.stacked].barno),h.from=r[l.stacked].stack,h.to=[],f=0;if(!l.cumulative)for(a=0;a<m.length;a++)h.to.push(h.from[a]+(m[a]!=null?m[a]:0));else for(a=0;a<m.length;a++)h.to.push(h.from[a]+(f+=m[a]!=null?m[a]:0));r[l.stacked].stack=h.to}h.stack=h.to,h.max=Math.max.apply(Math,h.from.concat(h.to)),h.min=Math.min.apply(Math,h.from.concat(h.to)),l.axis&&(i[l.axis]||(i[l.axis]={plots:[]}),i[l.axis].plots.push(c),typeof i[l.axis].max=="undefined"?i[l.axis].max=h.max:i[l.axis].max=Math.max(i[l.axis].max,h.max),typeof i[l.axis].min=="undefined"?i[l.axis].min=h.min:i[l.axis].min=Math.min(i[l.axis].min,h.min)),v=c}}}}u||(u=[]);while(p>u.length)u.push(null);p=u.length,e.opt.labels=u;if(t.executeIfChanged(e,["values","series","axis"]))for(var S in i){l=t.areaProps(e,"Axis",S),i[S].props=l,typeof l.max!="undefined"&&(i[S].max=l.max),typeof l.min!="undefined"&&(i[S].min=l.min),i[S].min==i[S].max&&(i[S].max=i[S].min+1);if(l.normalize&&l.normalize>0){var x=Math.abs(i[S].max);i[S].min&&Math.abs(i[S].min)>x&&(x=Math.abs(i[S].min));if(x){var T=Math.floor(Math.log(x)/Math.LN10)-(l.normalize-1);T=T>=0?Math.pow(10,T):1/Math.pow(10,-T),x=Math.ceil(x/T/(n.features.grid.ny?n.features.grid.ny:1))*T*(n.features.grid.ny?n.features.grid.ny:1),x=Math.round(x/T)*T,i[S].normalizationBase=T,i[S].max&&(i[S].max=Math.ceil(i[S].max/x)*x),i[S].min&&(i[S].min=Math.floor(i[S].min/x)*x)}}if(i[S].plots)for(var N=0;N<i[S].plots.length;N++)r[i[S].plots[N]].max=i[S].max,r[i[S].plots[N]].min=i[S].min}var C=[];this.grid(e,C);var k=(e.width-n.margins[3]-n.margins[1])/(u.length>1?u.length-1:1),L=(e.width-n.margins[3]-n.margins[1])/(u.length>0?u.length:1);for(c in o){l=t.areaProps(e,"Series",c),h=r[c],t.colorize(e,l,this._getColorizationKey(l.type),t.getItemColor(e,c)),l.lineCenter&&l.lineCenter=="auto"?l.lineCenter=e.indexCenter=="bar":l.lineCenter&&e.indexCenter=="line"&&(e.indexCenter="bar");if(o[c]&&l.visible){var A=(e.height-n.margins[2]-n.margins[0])/(h.max-h.min);if(l.type=="line"){var O=["LINE",[],l.rounded],M=["LINEAREA",[],[],l.rounded],_=[];for(a=0,N=u.length;a<N;a++)if(h.to.length>a){var D=t.areaProps(e,"Series",c,a);t.colorize(e,D,this._getColorizationKey(l.type),t.getItemColor(e,c,a));var P=Math.round((l.lineCenter?L/2:0)+n.margins[3]+a*(l.lineCenter?L:k)),H=null;if(h.to[a]!=null){var B=h.to[a]>h.max?h.max:h.to[a]<h.min?h.min:h.to[a];H=Math.round(e.height-n.margins[2]-A*(B-h.min))}var j=null;if(h.from[a]!=null){var F=h.from[a]>h.max?h.max:h.from[a]<h.min?h.min:h.from[a];j=Math.round(e.height-n.margins[2]-A*(F-h.min))+(Raphael.VML?1:0)}O[1].push([P,H]),l.fill&&(M[1].push([P,H]),M[2].push([P,j])),D.dot&&(o[c][a]==null&&!D.dotShowOnNull?_.push({path:!1,attr:!1}):_.push({path:[["CIRCLE",P,H,D.dotProps.size]],attr:D.dotProps}))}l.fill?C.push({section:"Series",serie:c,subSection:"Fill",path:[M],attr:l.fillProps}):C.push({section:"Series",serie:c,subSection:"Fill",path:!1,attr:!1}),C.push({section:"Series",serie:c,subSection:"Plot",path:[O],attr:l.plotProps,mousearea:"pathsteps"}),_.length?C.push({section:"Series",serie:c,subSection:"Dot",paths:_}):C.push({section:"Series",serie:c,subSection:"Dot",path:!1,attr:!1})}else{pieceBar=[];for(a=0,N=u.length;a<N;a++)if(h.to.length>a)if(h.from[a]!=h.to[a]){var D=t.areaProps(e,"Series",c,a);t.colorize(e,D,this._getColorizationKey(l.type),t.getItemColor(e,c,a));var I=Math.floor((L-n.barMargins)/(1+(e.barno-1)*(100-n.barOverlapPerc)/100)),q=I*(100-l.barWidthPerc)/200,R=n.barMargins/2+h.barno*(I*(100-n.barOverlapPerc)/100),U=Math.floor(n.margins[3]+a*L+R+q),z=Math.round(e.height-n.margins[2]-A*(h.to[a]-h.min)),W=Math.round(e.height-n.margins[2]-A*(h.from[a]-h.min));pieceBar.push({path:[["RECT",U,z,U+I-q*2,W]],attr:D.plotProps})}else pieceBar.push({path:!1,attr:!1});pieceBar.length?C.push({section:"Series",serie:c,subSection:"Plot",paths:pieceBar,mousearea:"paths"}):C.push({section:"Series",serie:c,subSection:"Plot",path:!1,attr:!1,mousearea:"paths"})}}else l.type=="line"&&C.push({section:"Series",serie:c,subSection:"Fill",path:!1,attr:!1}),C.push({section:"Series",serie:c,subSection:"Plot",path:!1,attr:!1,mousearea:"paths"}),l.type=="line"&&C.push({section:"Series",serie:c,subSection:"Dot",path:!1,attr:!1})}return C},grid:function(e,n){if(t.executeIfChanged(e,["values","series","axis","labels","margins","width","height","features.grid"])){var r=e.opt,i=e.opt.features.grid,s=e.paper,o=e.axis,u=e.opt.labels,a=(e.width-r.margins[3]-r.margins[1])/(u.length>1?u.length-1:1),f=(e.width-r.margins[3]-r.margins[1])/(u.length>0?u.length:1),l,c,h,p,d,v,m,g,y,b,w=[],E=i.labelsCenter;E=="auto"&&(E=e.indexCenter=="bar");if(o.x&&o.x.props.labels){var S=!1,x=o.x.props.labelsAnchor||"auto";x=="auto"&&(x=o.x.props.labelsRotate>0?"start":o.x.props.labelsRotate==0?"middle":"end");var T=o.x.props.labelsPos||"auto";T=="auto"&&(T=E?o.x.props.labelsRotate==0?x:"middle":"start");for(l=0;l<u.length;l++)if(typeof u[l]!="boolean"&&u[l]!=null||u[l])if(!o.x.props.labelsSkip||l>=o.x.props.labelsSkip){y=u[l],o.x.props.labelsFormatHandler&&(y=o.x.props.labelsFormatHandler(y)),b=(o.x.props.prefix?o.x.props.prefix:"")+y+(o.x.props.suffix?o.x.props.suffix:""),v=r.margins[3]+l*(E?f:a)+(o.x.props.labelsMargin?o.x.props.labelsMargin:0),T=="middle"&&(v+=(E?f:a)/2),T=="end"&&(v+=E?f:a),m=e.height-r.margins[2]+o.x.props.labelsDistance,g=s.text(v,m,b).attr(o.x.props.labelsProps).toBack(),g.attr({"text-anchor":x});var N=!1,C=g.getBBox(),k={x:C.x,y:C.y},L={x:C.x+C.width,y:C.y+C.height},A={x:v,y:m};rotate=function(e,t){var n=e.x*Math.cos(t)-e.y*Math.sin(t),r=e.x*Math.sin(t)+e.y*Math.cos(t);return{x:n,y:r}},collide=function(e,t,n){xor=function(e,t){return(e||t)&&(!e||!t)};if(e.alpha!=t.alpha)throw"collide doens't support rects with different rotations";var r=rotate({x:e.p1.x-n,y:e.p1.y-n},-e.alpha),i=rotate({x:e.p2.x+n,y:e.p2.y+n},-e.alpha),s=rotate({x:t.p1.x-n,y:t.p1.y-n},-t.alpha),o=rotate({x:t.p2.x+n,y:t.p2.y+n},-t.alpha);return!xor(Math.min(r.x,i.x)>Math.max(s.x,o.x),Math.max(r.x,i.x)<Math.min(s.x,o.x))&&!xor(Math.min(r.y,i.y)>Math.max(s.y,o.y),Math.max(r.y,i.y)<Math.min(s.y,o.y))},rotated=function(e,t,n){translate=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},negate=function(e){return{x:-e.x,y:-e.y}};var r=translate(rotate(translate(e.p1,negate(t)),n),t),i=translate(rotate(translate(e.p2,negate(t)),n),t);return{p1:r,p2:i,alpha:e.alpha+n}},C=function(e){if(e.alpha==0)return{x:e.p1.x,y:e.p1.y,width:e.p2.x-e.p1.x,height:e.p2.y-e.p1.y};var t=[];t.push({x:0,y:0}),t.push({x:e.p2.x-e.p1.x,y:0}),t.push({x:0,y:e.p2.y-e.p1.y}),t.push({x:e.p2.x-e.p1.x,y:e.p2.y-e.p1.y});var n=[];n.left=0,n.right=0,n.top=0,n.bottom=0;for(_px=0;_px<t.length;_px++){var r=t[_px],i=parseInt(r.x*Math.cos(e.alpha)+r.y*Math.sin(e.alpha)),s=parseInt(r.x*Math.sin(e.alpha)+r.y*Math.cos(e.alpha));n.left=Math.min(n.left,i),n.right=Math.max(n.right,i),n.top=Math.min(n.top,s),n.bottom=Math.max(n.bottom,s)}var o=parseInt(Math.abs(n.right-n.left)),u=parseInt(Math.abs(n.bottom-n.top)),i=(e.p1.x+e.p2.x)/2-o/2,s=(e.p1.y+e.p2.y)/2-u/2;return{x:i,y:s,width:o,height:u}};var O=Raphael.rad(o.x.props.labelsRotate),M=rotated({p1:k,p2:L,alpha:0},A,O),_=o.x.props.labelsMarginRight?o.x.props.labelsMarginRight/2:0;o.x.props.labelsHideCovered&&S&&collide(M,S,_)?g.hide():(N=C(M),i.nx=="auto"&&(N.x<0||N.x+N.width>e.width)?g.hide():S=M),o.x.props.labelsRotate&&(Raphael.animation?g.transform(Raphael.format("r{0},{1},{2}",o.x.props.labelsRotate,v,m)).toBack():g.rotate(o.x.props.labelsRotate,v,m).toBack()),w.push({path:[["RELEMENT",g]],attr:!1})}}n.push({section:"Axis",serie:"x",subSection:"Label",paths:w}),o.x&&o.x.props.title?(h=r.margins[3]+Math.floor((e.width-r.margins[1]-r.margins[3])/2),p=e.height-r.margins[2]+o.x.props.titleDistance*(Raphael.VML?o.x.props.titleDistanceIE:1),n.push({section:"Axis",serie:"x",subSection:"Title",path:[["TEXT",o.x.props.title,h,p]],attr:o.x.props.titleProps})):n.push({section:"Axis",serie:"x",subSection:"Title",path:!1,attr:!1});for(var D in["l","r"]){c=["l","r"][D];if(o[c]&&o[
c].props.labels&&i.ny){w=[];for(l=o[c].props.labelsSkip?o[c].props.labelsSkip:0;l<=i.ny;l++){var P=(e.height-r.margins[2]-r.margins[0])/i.ny;c=="r"?(v=e.width-r.margins[1]+o[c].props.labelsDistance,o[c].props.labelsProps["text-anchor"]||(o[c].props.labelsProps["text-anchor"]="start")):(v=r.margins[3]-o[c].props.labelsDistance,o[c].props.labelsProps["text-anchor"]||(o[c].props.labelsProps["text-anchor"]="end")),o[c].props.labelsAnchor&&o[c].props.labelsAnchor!="auto"&&(o[c].props.labelsProps["text-anchor"]=o[c].props.labelsAnchor),y=o[c].min+l*((o[c].max-o[c].min)/i.ny),o[c].normalizationBase&&(y=Math.round(y/o[c].normalizationBase)/(1/o[c].normalizationBase)),o[c].props.labelsFormatHandler&&(y=o[c].props.labelsFormatHandler(y)),o[c].props.labelsCompactUnits&&(y=t.compactUnits(y,o[c].props.labelsCompactUnits)),b=(o[c].props.prefix?o[c].props.prefix:"")+y+(o[c].props.suffix?o[c].props.suffix:""),m=e.height-r.margins[2]-l*P,w.push({path:[["TEXT",b,v,m+(o[c].props.labelsMargin?o[c].props.labelsMargin:0)]],attr:o[c].props.labelsProps})}n.push({section:"Axis",serie:c,subSection:"Label",paths:w})}else n.push({section:"Axis",serie:c,subSection:"Label",paths:[]});if(o[c]&&o[c].props.title){c=="r"?h=e.width-r.margins[1]+o[c].props.titleDistance*(Raphael.VML?o[c].props.titleDistanceIE:1):h=r.margins[3]-o[c].props.titleDistance*(Raphael.VML?o[c].props.titleDistanceIE:1);var H=t._clone(o[c].props.titleProps),B=c=="l"?270:90,p=r.margins[0]+Math.floor((e.height-r.margins[0]-r.margins[2])/2);if(Raphael.animation){var g=s.text(h,p,o[c].props.title).attr(H).transform(Raphael.format("r{0}",B)).toBack();n.push({section:"Axis",serie:c,subSection:"Title",path:[["RELEMENT",g]],attr:!1})}else H.rotation=B,n.push({section:"Axis",serie:c,subSection:"Title",path:[["TEXT",o[c].props.title,h,p]],attr:H})}else n.push({section:"Axis",serie:c,subSection:"Title",path:!1,attr:!1})}if(i.nx||i.ny){var j=[],F=[],I=[],q=i.nx=="auto"?E?u.length:u.length-1:i.nx,R=i.ny,U=(e.height-r.margins[2]-r.margins[0])/(R?R:1),z=(e.width-r.margins[1]-r.margins[3])/(q?q:1),W=typeof i.forceBorder=="object"?i.forceBorder[3]:i.forceBorder,X=typeof i.forceBorder=="object"?i.forceBorder[1]:i.forceBorder,V=typeof i.forceBorder=="object"?i.forceBorder[0]:i.forceBorder,$=typeof i.forceBorder=="object"?i.forceBorder[2]:i.forceBorder,J=R>0?typeof i.draw=="object"?i.draw[0]:i.draw:!1,K=q>0?typeof i.draw=="object"?i.draw[1]:i.draw:!1;if(R>0)for(l=0;l<R+1;l++){if(V&&l==0||$&&l==R||J&&l>0&&l<R)j.push(["M",r.margins[3]-i.extra[3],r.margins[0]+Math.round(l*U)]),j.push(["L",e.width-r.margins[1]+i.extra[1],r.margins[0]+Math.round(l*U)]);l<R&&(l%2==0&&i.evenHProps||l%2==1&&i.oddHProps?F.push({path:[["RECT",r.margins[3]-i.extra[3],r.margins[0]+Math.round(l*U),e.width-r.margins[1]+i.extra[1],r.margins[0]+Math.round((l+1)*U)]],attr:l%2==0?i.evenHProps:i.oddHProps}):F.push({path:!1,attr:!1}))}for(l=0;l<q+1;l++){if(W&&l==0||X&&l==q||K&&(i.nx!="auto"&&l>0&&l<q||i.nx=="auto"&&(typeof u[l]!="boolean"||u[l])))j.push(["M",r.margins[3]+Math.round(l*z),r.margins[0]-i.extra[0]]),j.push(["L",r.margins[3]+Math.round(l*z),e.height-r.margins[2]+i.extra[2]]);l<q&&(l%2==0&&i.evenVProps||l%2==1&&i.oddVProps?I.push({path:[["RECT",r.margins[3]+Math.round(l*z),r.margins[0]-i.extra[0],r.margins[3]+Math.round((l+1)*z),e.height-r.margins[2]+i.extra[2]]],attr:l%2==0?i.evenVProps:i.oddVProps}):I.push({path:!1,attr:!1}))}n.push({section:"Grid",path:j.length?j:!1,attr:j.length?i.props:!1}),n.push({section:"GridBandH",paths:F}),n.push({section:"GridBandV",paths:I});var Q=[];if(i.ticks.active&&(typeof i.ticks.active!="object"||i.ticks.active[0]))for(l=0;l<q+1;l++)if(i.nx!="auto"||typeof u[l]!="boolean"||u[l])Q.push(["M",r.margins[3]+Math.round(l*z),e.height-r.margins[2]-i.ticks.size[1]]),Q.push(["L",r.margins[3]+Math.round(l*z),e.height-r.margins[2]+i.ticks.size[0]]);if(i.ticks.active&&(typeof i.ticks.active!="object"||i.ticks.active[1]))for(l=0;l<R+1;l++)Q.push(["M",r.margins[3]-i.ticks.size[0],r.margins[0]+Math.round(l*U)]),Q.push(["L",r.margins[3]+i.ticks.size[1],r.margins[0]+Math.round(l*U)]);if(i.ticks.active&&(typeof i.ticks.active!="object"||i.ticks.active[2]))for(l=0;l<R+1;l++)Q.push(["M",e.width-r.margins[1]-i.ticks.size[1],r.margins[0]+Math.round(l*U)]),Q.push(["L",e.width-r.margins[1]+i.ticks.size[0],r.margins[0]+Math.round(l*U)]);n.push({section:"Ticks",path:Q.length?Q:!1,attr:Q.length?i.ticks.props:!1})}}}}}(jQuery),function(e){var t=e.elycharts.common;e.elycharts.pie={init:function(e){},draw:function(e){var n=e.opt,r=e.width-e.opt.margins[1]-e.opt.margins[3],i=e.height-e.opt.margins[0]-e.opt.margins[2],s=e.opt.r?e.opt.r:Math.floor((r<i?r:i)/2*(e.opt.rPerc?e.opt.rPerc/100:.8)),o=(e.opt.cx?e.opt.cx:Math.floor(r/2))+e.opt.margins[3],u=(e.opt.cy?e.opt.cy:Math.floor(i/2))+e.opt.margins[0],a=0,f,l,c,h,p;for(c in n.values){h={visible:!1,total:0,values:[]},e.plots[c]=h;var d=t.areaProps(e,"Series",c);t.colorize(e,d,[["plotProps","stroke"],["plotProps","fill"]],t.getItemColor(e,c));if(d.visible){h.visible=!0,a++,h.values=n.values[c];for(f=0,l=h.values.length;f<l;f++)if(h.values[f]>0){p=t.areaProps(e,"Series",c,f),t.colorize(e,p,[["plotProps","stroke"],["plotProps","fill"]],t.getItemColor(e,c,f));if(typeof p.inside=="undefined"||p.inside<0)h.total+=h.values[f]}for(f=0;f<l;f++)h.values[f]<h.total*n.valueThresold&&(h.total=h.total-h.values[f],h.values[f]=0)}}var v=s/a,m=-v,g=0,y=[];for(c in n.values){h=e.plots[c];var b=[];if(h.visible){m+=v,g+=v;var w=e.opt.startAngle,E=0,S=0;if(h.total==0)e.emptySeries=!0,p=t.areaProps(e,"Series","empty"),t.colorize(e,p,[["plotProps","stroke"],["plotProps","fill"]],t.getItemColor(e,c)),b.push({path:[["CIRCLE",o,u,s]],attr:p.plotProps});else{e.emptySeries=!1;for(f=0,l=h.values.length;f<l;f++){var x=h.values[f];if(x>0){p=t.areaProps(e,"Series",c,f),t.colorize(e,p,[["plotProps","stroke"],["plotProps","fill"]],t.getItemColor(e,c,f)),typeof p.inside=="undefined"||p.inside<0?(w+=S,E=360*x/h.total,S=E):E=360*values[p.inside]/h.total*x/values[p.inside];var T=m,N=g;p.r&&(p.r>0?p.r<=1?N=m+v*p.r:N=m+p.r:p.r>=-1?T=m+v*-p.r:T=m-p.r),e.opt.clockwise?b.push({path:[["SLICE",o,u,N,T,-w-E,-w]],attr:p.plotProps}):b.push({path:[["SLICE",o,u,N,T,w,w+E]],attr:p.plotProps})}else b.push({path:!1,attr:!1})}}}else if(n.values[c]&&n.values[c].length)for(f=0,l=n.values[c].length;f<l;f++)b.push({path:!1,attr:!1});y.push({section:"Series",serie:c,subSection:"Plot",paths:b,mousearea:"paths"})}return y}}}(jQuery);