File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/vedaaweddingpartys.com/js/jquery.barfiller.js
Back
!function(t){t.fn.barfiller=function(i){var e,s,o=t.extend({barColor:"#16b597",tooltip:!0,duration:1e3,animateOnResize:!0,symbol:"%"},i),n=t(this),a=t.extend(o,i),r=n.width(),l=n.find(".fill"),d=n.find(".tip"),p=l.attr("data-percentage"),h=!1,c={init:function(){return this.each(function(){c.getTransitionSupport()&&(h=!0,s=c.getTransitionPrefix()),c.appendHTML(),c.setEventHandlers(),c.initializeItems()})},appendHTML:function(){l.css("background",a.barColor),a.tooltip||d.css("display","none"),d.text(p+a.symbol)},setEventHandlers:function(){a.animateOnResize&&t(window).on("resize",function(t){clearTimeout(e),e=setTimeout(function(){c.refill()},300)})},initializeItems:function(){var t=c.calculateFill(p);n.find(".tipWrap").css({display:"inline"}),h?c.transitionFill(t):c.animateFill(t)},getTransitionSupport:function(){var t=(document.body||document.documentElement).style;return void 0!==t.transition||void 0!==t.WebkitTransition||void 0!==t.MozTransition||void 0!==t.MsTransition||void 0!==t.OTransition},getTransitionPrefix:function(){return/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase())?"-moz-transition":/webkit/.test(navigator.userAgent.toLowerCase())?"-webkit-transition":/opera/.test(navigator.userAgent.toLowerCase())?"-o-transition":/msie/.test(navigator.userAgent.toLowerCase())?"-ms-transition":"transition"},getTransition:function(t,i,e){var o;return"width"===e?o={width:t}:"left"===e&&(o={left:t}),i/=1e3,o[s]=e+" "+i+"s ease-in-out",o},refill:function(){l.css("width",0),d.css("left",0),r=n.width(),c.initializeItems()},calculateFill:function(t){return r*(t*=.01)},transitionFill:function(t){var i=t-d.width();l.css(c.getTransition(t,a.duration,"width")),d.css(c.getTransition(i,a.duration,"left"))},animateFill:function(t){var i=t-d.width();l.stop().animate({width:"+="+t},a.duration),d.stop().animate({left:"+="+i},a.duration)}};return c[i]?c[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void t.error('Method "'+method+'" does not exist in barfiller plugin!'):c.init.apply(this)}}(jQuery);var Graph=Graph||function(t){var i={count:0},e=function(t){0!==t&&(i.setOptions.call(this,t),++i.count)};return i.defaults=function(){return{x:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],y:10,attachTo:"body",points:[0,26,33,74,12,49,18]}},i.basics=function(e,s,o,n){s=n||s||550,e=(e=o||e||300).toString(),s=s.toString(),i.attachTo=i.attachTo||"body";var a=t(i.attachTo).css("height"),r=t(i.attachTo).css("width");return e="%"===e.substring(e.length-1)?a:e,s="%"===s.substring(s.length-1)?r:s,{Gheight:parseFloat(e),Gwidth:parseFloat(s),xDist:60,yDist:30,scale:10,xOffset:25,yOffset:20,yStart:0,mainOffset:35,padding:10,xOfPoints:[],yOfPoints:[],mxOfPoints:[],myOfPoints:[],multipleDataSets:!1,legend:!1,interactive:!0,animations:!1,animationDuration:1,pointAnimation:!0,lineAnimation:!0,barAnimation:!0,pieAnimation:!0,grid:!0,xGrid:!0,yGrid:!0,xName:null,yName:null,special:null,showPoints:!0,noLines:!1,pointRadius:5,averagePointRadius:5,pieSize:200,tooltipWidth:50,pieLegend:!0,rx:10,before:"",after:"",title:"",id:"SVGGraph"+i.count}},i.parseS=function(t,i){return'svg[id="'+t+'"] '+i},i.id2selector=function(t){var i=t.split(" "),e='svg[id="';if("#"!==(t=i[0]).charAt(0))return t;e+=t.substring(1)+'"]';for(var s=1,o=i.length;o>s;++s)e+=" "+i[s];return e},i.design=function(t){t.byCSS=t.byCSS||{},t.design=t.design||{};var i="bar"===t.type?"start":"middle",e=t.height||"100%",s=t.width||"100%",o=t.design,n={style:{}};n.style[this.parseS(t.id,"")]={height:e,width:s},n.style[this.parseS(t.id,".grid")]={stroke:o.gridColor||"#000","stroke-width":o.gridWidth||"1"},n.style[this.parseS(t.id,".points")]={cursor:"pointer"},n.style[this.parseS(t.id,'circle:not(".middle"):not(".pie-tooltip")')]={opacity:.8},n.style[this.parseS(t.id,".inset")]={fill:o.pointColor||"lightblue"},n.style[this.parseS(t.id,".labels")]={fill:o.labelColor||"#000",stroke:o.labelStroke||"none","font-family":o.labelFont||"Arial","font-size":o.labelFontSize||"13px",kerning:o.labelKerning||"2"},n.style[this.parseS(t.id,".lines")]={stroke:o.lineColor||"darkgrey","stroke-width":o.lineWidth||"2"},n.style[this.parseS(t.id,".averageLine")]={stroke:o.averageLineColor||"green","stroke-width":o.lineWidth||"2"},n.style[this.parseS(t.id,".line-of-1")]={stroke:o.lineColor||"green","stroke-width":o.lineWidth||"2"},n.style[this.parseS(t.id,".rect")]={stroke:o.borderColor||"#fff","stroke-width":o.borderWidth||"2",fill:o.barColor||"blue",opacity:.8},n.style[this.parseS(t.id,".bar")]={stroke:o.barBorder||"#fff",opacity:.8},n.style[this.parseS(t.id,".SVG-tooltip")]={fill:o.tooltipColor||"#000","font-family":o.tooltipFont||"Arial","font-size":o.tooltipFontSize||"13px",display:"none",opacity:"1"},n.style[this.parseS(t.id,".SVG-tooltip-box")]={display:"none",fill:o.tooltipBoxColor||"none",stroke:o.borderColor||"none","stroke-width":o.borderWidth||"2"},n.style[this.parseS(t.id,".area")]={stroke:t.multipleDataSets?"none":o.lineColor||"green","stroke-width":o.borderWidth||"2",fill:o.areaColor||"none",opacity:.8},n.style[this.parseS(t.id,".middle")]={fill:o.donutCenterColor||"#fff"},n.style[this.parseS(t.id,".slice")]={stroke:o.borderColor||"grey","stroke-width":o.borderWidth||"2",opacity:"0.8"},n.style[this.parseS(t.id,".labels.x-labels")]={"text-anchor":o.xLabelAnchor||i},n.style[this.parseS(t.id,".labels.y-labels")]={"text-anchor":o.yLabelAnchor||"end"},n.style['table[id="'+t.id+'"]']={height:e,width:s,"border-collapse":"collapse","text-align":"center"};var a=t.colors||["red","blue","green","orange","purple","yellow","brown","gold","black","grey"];a.push("");for(var r=0,l=a.length;l>r;++r)n.style[this.parseS(t.id,".line-of-"+r)]={stroke:o.lineColor||a[r],"stroke-width":o.lineWidth||"2"},n.style[this.parseS(t.id,".path-of-"+r)]={fill:a[r],opacity:.8},n.style[this.parseS(t.id,".rect-of-"+r)]={fill:a[r]},n.style[this.parseS(t.id,".point-of-"+r)]={fill:a[r]};for(var d in t.byCSS)n.style[this.id2selector(d)]=t.byCSS[d];return n},i.setOptions=function(e){(e=e||{}).points&&t.isArray(e.points[0])&&(e.multipleDataSets=!0),e.attachTo&&(e.attachTo="#"===e.attachTo.charAt(0)?e.attachTo:"#"+e.attachTo,i.attachTo=e.attachTo),e.id&&(e.id="#"===e.id.charAt(0)?e.id.substring(1):e.id),(!0===e.basic||void 0===e.basic)&&(this.obj=i.basics(e.height,e.width,e.graphHeight,e.graphWidth)),e&&!0===e.example||!t.isEmptyObject(e)?(e.id=e.id||this.obj.id,t.extend(this.obj,i.defaults(),e,i.design(e)),this.obj.addStyle=!0):e&&!0===e.addStyle?t.extend(this.obj,i.design(e),e):e&&(this.obj=e),this.obj.numPoints=this.obj.points.length,this.obj.xLength=this.obj.x.length},e.prototype.getData=function(){return JSON.stringify(this.obj)},e.prototype.genToFunc=function(t){return"Graph"+(t="area"===t?"linear":"combo"===t?"bar":"donut"===t?"pie":t).charAt(0).toUpperCase()+t.substring(1)},e.prototype.expand=function(t,i){t="string"==typeof t?jQuery.parseJSON(t):t,i=i||"",new(window[this.genToFunc(this.obj.type)])(t).init(i)},e.prototype.update=function(t){(t=t||{}).byCSS=this.obj.byCSS,this.expand(t,"update")},e.prototype.to=function(t,i){var e=i||this.obj;this.obj.type=t,e.type=t,this.expand(e,"update")},e.prototype.createGrid=function(t,i){var e=this.obj,s="",o="",n=e.yDist-30;if(e.grid&&!e.noLines){var a,r=e.height-i*e.yDist;if(e.xGrid)for(var l=0;t>l;++l)s+='<line x1="'+(a=l*e.xDist+e.mainOffset)+'" x2="'+a+'" y1="'+(e.height-e.yOffset-e.padding-n)+'" y2="'+r+'"></line>';var d=(t-1)*e.xDist+e.mainOffset;if(e.yGrid)for(l=1;i>=l;++l)a=e.height-l*e.yDist,o+='<line x1="'+e.mainOffset+'" x2="'+d+'" y1="'+a+'" y2="'+a+'"></line>'}else!1===e.noLines&&(s+='<line x1="'+e.mainOffset+'" x2="'+e.mainOffset+'" y1="'+(e.height-e.yOffset-e.padding-n)+'" y2="'+(e.height-i*e.yDist)+'"></line>',o+='<line x1="'+e.mainOffset+'" x2="'+((t-1)*e.xDist+e.mainOffset)+'" y1="'+(e.height-e.yDist)+'" y2="'+(e.height-e.yDist)+'"></line>');return{xGrid:s,yGrid:o}},e.prototype.applyStyling=function(){var i=this.obj;if(i.addStyle)for(var e in i.style)t(e).css(i.style[e])},e.prototype.openTags=function(){return{SVG:'<svg id="'+this.obj.id+'"class="graph"style="'+(this.obj.css||"")+'">',xGrid:'<g class="grid x-grid" id="xGrid">',yGrid:'<g class="grid y-grid" id="yGrid">',xLabels:'<g class="labels x-labels">',yLabels:'<g class="labels y-labels">',title:'<g class="labels title">'}},e.prototype.addLabels=function(){for(var t=this.obj,i="",e="",s=0,o=t.xLength;o>s;++s)i+='<text x="'+(s*t.xDist+t.mainOffset)+'" y="'+(t.height-t.padding)+'">'+t.x[s]+"</text>";for(s=1,o=t.y+1;o>=s;++s){var n=s*t.scale-t.scale+t.yStart;e+='<text x="'+(n>=10?t.xOffset:t.xOffset-10)+'" y="'+(t.height-(t.yDist*s-t.padding)-5)+'">'+n+"</text>"}return{xLabels:i,yLabels:e}},e.prototype.addTitle=function(t){var i=this.obj;return'<text x="'+i.mainOffset+'" y="'+(i.height-t*i.yDist-i.yOffset)+'"font-weight="bold">'+i.title+"</text>"},e.prototype.finishGraph=function(t,i,e,s){var o=this.obj;for(var n in"pie"!==o.type&&(e.xGrid+=this.createGrid(t,i).xGrid,e.yGrid+=this.createGrid(t,i).yGrid,e.xLabels+=this.addLabels().xLabels,e.yLabels+=this.addLabels().yLabels),e.title+=this.addTitle(i),(o.legend&&o.pieLegend||"pie"===o.type)&&(e.legend=this.addLegend(s)),e.points=e.points||"",e)e[n]!==e.points&&e[n]!==e.tooltips&&"SVG"!==n&&(e.SVG+=e[n]+"</g>");e.SVG+=e.points+e.tooltips+"</svg>";var a=o.before+e.SVG+o.after;return this.handleAppend(s,a),this.applyStyling(),e.SVG},e.prototype.handleAppend=function(i,e){"update"===i?t("#"+this.obj.id).replaceWith(e):t(this.obj.attachTo).append(e)},e.prototype.addLegend=function(){var i=this.obj,e=function(i){var e="add"===i?1:.8,s='[class*="'+t(this).attr("class").substring(7)+'"][id^="'+t(this).attr("id").split("-")[1]+'"]';t("line"+s+", rect"+s+", path"+s).each(function(){t(this).css("opacity",e)})};i.interactive&&i.multipleDataSets&&(t(document).on("mouseover",'g[id^="legend-"]',function(){e.call(this,"add")}),t(document).on("mouseout",'g[id^="legend-"]',function(){e.call(this,"take")}));var s='<g class="legend">',o=i.legendX||i.Gwidth-i.xDist,n=i.yOffset;if(i.dataNames=i.dataNames||[],i.multipleDataSets||"pie"===i.type)for(var a=0,r=i.numPoints;r>a;++a)s+='<g id="legend-'+i.id+'"class="legend-of-'+a+'">',s+='<rect class="rect-of-'+a+'"x="'+o+'" y="'+n+'"width="30"height="30"></rect>',s+='<text style="cursor:default;"class="legend-of-'+a+'"x="'+(o+30+5)+'"y="'+(n+15)+'">'+(i.dataNames[a]||"Data"+(0===a?"":" "+a))+"</text>",n+=i.yDist+i.padding;else for(a=0,r=i.xLength;r>a;++a)s+='<g id="legend-'+i.id+'">',s+='<text style="cursor:default;"x="'+1.5*o+'"y="'+(n+15)+'">'+i.x[a]+" : "+i.points[a]+"</text>",n+=i.yDist+i.padding;return"combo"===i.special&&(s+='<g id="legend-avg-'+i.id+'">',s+='<rect fill="'+(i.design.averageLineColor||"green")+'"class="averageLine"x="'+o+'" y="'+n+'"width="30"height="30"></rect>',s+='<text style="cursor:default;"x="'+(o+30+5)+'"y="'+(n+15)+'">Average</text>'),s+"</g>"},e}(jQuery),GraphLinear=GraphLinear||function(t){var i=function(i){(i=i||{}).type="linear",Graph.call(this,i);var e=function(e){var s=t(this).attr("id").split("-"),o=s[0],n=s[1],a=this;t('svg line[id^="'+o+'"], svg path[id^="'+o+'"]').each(function(){if(t(this).attr("id").split("-")[1]===n){var s="#"+t(a).attr("class").split(" ")[0]+"-tooltip",o="#"+t(a).attr("class").split(" ")[0]+"-tooltip-rect";"add"===e?(t(this).css("stroke-width",i.lineWidth||3),t(this).css("opacity",1),t(s).show(),t(o).show()):(t(this).css("stroke-width",i.lineWidth-1||2),t(this).css("opacity",.8),t(s).hide(),t(o).hide())}})};if(this.obj.interactive){var s=this;t(document).on("mouseover",'svg circle[id$="point"]',function(){e.call(this,"add"),t(this).css("opacity",1)}),t(document).on("mouseleave",'svg circle[id$="point"]',function(){e.call(this,"sub"),t(this).css("opacity",s.obj.style['svg[id="'+s.obj.id+'"] circle'].opacity||.8)})}};return(i.prototype=Object.create(Graph.prototype)).constructor=i,i.prototype.buildPoints=function(t,i){var e,s,o,n,a,r,l,d,p=i?this.obj.averagePointRadius:this.obj.pointRadius,h=this.obj,c=i||h.points;return 1===t.length?(o=c[t[0]],n=t[0],d=t[0],r=!1):2===t.length&&(o=c[t[0]][t[1]],n=""+t[0]+t[1],d=t[1],r=!0),e=h.height-(o+h.scale)*(h.yDist/h.scale),s=d*h.xDist+h.mainOffset,i&&(s+=h.xDist/(h.points.length+1)),l=!1===r?0:t[0],a='<circle id="'+h.id+"-"+l+'-point"class="'+h.id+"-point"+n+" "+(h.multipleDataSets&&!i?"point-of-"+t[0]+" ":"")+'"cx="'+s+'" cy="'+e+'" r="'+p+'">',!h.animations||!h.pointAnimation||h.multipleDataSets&&"area"===h.special||(a+='<animate attributeName="cy" from="0" to="'+e+'" dur="'+(h.animationDuration+d/7)+'s" fill="freeze">'),a+="</circle>",(a+='<g><rect class="'+(h.multipleDataSets&&!i?"rect-of-"+t[0]+" ":"")+'SVG-tooltip-box"id="'+h.id+"-point"+n+'-tooltip-rect"rx="'+h.rx+'"x="'+(s-2*h.padding-h.tooltipWidth/2)+'"y="'+(e-h.yDist-2*h.padding)+'"height="'+(h.yDist+h.padding/2)+'"width="'+(50+h.tooltipWidth)+'"/>')+'<text class="SVG-tooltip"id="'+h.id+"-point"+n+'-tooltip" x="'+(s-h.padding)+'" y="'+(e-h.yDist)+'">'+o+"</text></g>"},i.prototype.animateLines=function(){for(var i,e=this.obj,s=t("path[id^="+e.id+"]"),o=0,n=t("path[id^="+e.id+"]").length;n>o;++o)i=s[o].getTotalLength(),s[o].style.transition=s[o].style.WebkitTransition="none",s[o].style.strokeDasharray=i+" "+i,s[o].style.strokeDashoffset=i,s[o].getBoundingClientRect(),s[o].style.transition=s[o].style.WebkitTransition="stroke-dashoffset 2s ease-in-out",s[o].style.strokeDashoffset="0"},i.prototype.init=function(t){var i=this.obj;i.width=i.Gwidth,i.height=i.Gheight;var e=this.openTags();s||(e.lines='<g class="lines">'),e.points='<g class="inset points">';var s="area"===i.special;s&&!i.multipleDataSets&&(e.path='<g class="area"><path id="'+i.id+'-0-path"d="');var o,n,a,r=i.x.length,l=i.y+1,d=i.height-i.yDist;if(i.multipleDataSets){for(var p=0,h=i.numPoints;h>p;++p)i.mxOfPoints.push([]),i.myOfPoints.push([]);var c=[];e.path='<g class="area">';for(p=0,h=i.numPoints;h>p;++p){for(var f=0,g=i.points[p].length;g>f;++f)o=i.height-(i.points[p][f]+i.scale)*(i.yDist/i.scale),n=f*i.xDist+i.mainOffset,!0===i.showPoints&&(e.points+=this.buildPoints([p,f])),i.mxOfPoints[p].push(n),i.myOfPoints[p].push(o);if(s){for(f=0,g=i.points[p].length-1;g>f;++f)a=f+1,e.lines+='<line id="'+i.id+"-"+p+'-line" class="line-of-'+p+'" x1="'+i.mxOfPoints[p][f]+'" x2="'+i.mxOfPoints[p][a]+'" y1="'+i.myOfPoints[p][f]+'" y2="'+i.myOfPoints[p][a]+'"></line>';c.push('<path id="'+i.id+"-"+p+'-path"class="path-of-'+p+'" d="'),c[p]+="M"+i.mxOfPoints[p][0]+","+d+" ",c[p]+="L"+i.mxOfPoints[p][0]+","+i.myOfPoints[p][0]+" ";for(f=0,g=i.points[p].length;g>f;++f)c[p]+="L"+i.mxOfPoints[p][f]+","+i.myOfPoints[p][f]+" ";c[p]+="L"+i.mxOfPoints[p][i.mxOfPoints[p].length-1]+","+d+'"></path>'}else{c.push('<path fill="none"id="'+i.id+"-"+p+'-path"class="line-of-'+p+'" d="'),c[p]+="M"+i.mxOfPoints[p][0]+","+i.myOfPoints[p][0]+" ";for(f=0,g=i.points[p].length;g>f;++f)c[p]+="L"+i.mxOfPoints[p][f]+","+i.myOfPoints[p][f];c[p]+='"></path>'}}e.path+=c.join("")}else{for(p=0;r>p;++p)o=i.height-(i.points[p]+i.scale)*(i.yDist/i.scale),n=p*i.xDist+i.mainOffset,!0===i.showPoints&&(e.points+=this.buildPoints([p])),i.xOfPoints.push(n),i.yOfPoints.push(o);if(s){e.path+="M"+i.xOfPoints[0]+","+d+" ",e.path+="L"+i.xOfPoints[0]+","+i.yOfPoints[0]+" ";for(p=1;p<i.xOfPoints.length;++p)e.path+="L"+i.xOfPoints[p]+","+i.yOfPoints[p]+" ";e.path+="L"+i.xOfPoints[i.xOfPoints.length-1]+","+d+' "></path>'}else for(p=0,h=i.numPoints-1;h>p;++p){e.lines+='<path fill="none"id="'+i.id+'-0-path"d="',e.lines+="M"+i.xOfPoints[0]+","+i.yOfPoints[0]+" ";for(p=1;p<i.xOfPoints.length;++p)e.lines+="L"+i.xOfPoints[p]+","+i.yOfPoints[p];e.lines+='"</path>'}}this.finishGraph(r,l,e,t),i.multipleDataSets&&s||!i.animations||!i.lineAnimation||this.animateLines()},i}(jQuery),GraphBar=GraphBar||function(t){var i={},e=function(i){if((i=i||{}).type="bar",Graph.call(this,i),this.obj.interactive){var e=this;t(document).on("mouseover","svg rect",function(){t("#"+t(this).attr("id")+"-tooltip").show(),t("#"+t(this).attr("id")+"-tooltip-rect").show(),t(this).css("opacity",1)}),t(document).on("mouseleave","svg rect",function(){t("#"+t(this).attr("id")+"-tooltip").hide(),t("#"+t(this).attr("id")+"-tooltip-rect").hide(),t(this).css("opacity",e.obj.style['svg[id="'+e.obj.id+'"] .rect'].opacity||.8)})}};return(e.prototype=Object.create(Graph.prototype)).constructor=e,i.getAveragePoints=function(t){for(var i,e=[],s=0,o=0,n=t[0].length;n>o;++o){i=0;for(var a=0,r=t.length;r>a;++a)i+=t[a][s];e.push(i/r),++s}return e},e.prototype.init=function(t){var e=this.obj;e.width=e.Gwidth,e.height=e.Gheight;var s,o,n,a,r=e.x.length+1,l=e.y+1,d=this.openTags();if(d.rects='<g class="rects"transform="translate(0, 40) scale(1, -1)">',d.tooltips="<g>",a=e.yDist-30,e.multipleDataSets){for(var p=[],h=0,c=e.points[0].length;c>h;++h)p.push(0);e.points.push(p);var f,g,y=e.points.length,u=e.points[0].length,b=y-1,m=e.xDist/y,x=function(t){for(var i=0,r=0;u>r;++r){for(var l=0,p=y;p>l;++l)l!==b&&(f=l+i+r*b,g=l+i+2*r,s=0!==e.points[l][i]?(e.points[l][i]+e.scale)*(e.yDist/e.scale)-e.yDist:2,o=f*m+e.mainOffset,n=e.height-e.padding-e.yOffset-s,0===t?d.rects+='<rect class="rect-of-'+l+' bar"id="'+e.id+"-point-"+g+'" x="'+o+'" y="'+(-e.height+e.yDist+e.mainOffset+e.padding/2)+'" width="'+m+'"height="'+s+'"'+(e.animations&&e.barAnimation?'><animate attributeName="height" from="0" to="'+s+'" dur="'+e.animationDuration+'s" fill="freeze"></animate></rect>':"/>"):1===t&&(d.tooltips+='<g><rect class="rect-of-'+l+' SVG-tooltip-box "id="'+e.id+"-point-"+g+'-tooltip-rect"rx="'+e.rx+'"x="'+(o-e.tooltipWidth/2)+'"y="'+(n-a-e.yDist-2*e.padding)+'"height="'+(e.yDist+e.padding/2+10)+'"width="'+(m+e.tooltipWidth)+'"/>',d.tooltips+='<text class="SVG-tooltip"id="'+e.id+"-point-"+g+'-tooltip" x="'+(o+m/2-e.padding)+'" y="'+(n-a-e.yDist/2-e.padding)+'">'+e.points[l][i]+"</text></g>"));e.xOfPoints.length<u&&e.xOfPoints.push(o),++i}};if(x(0),x(1),e.points.pop(),"combo"===e.special){var v=i.getAveragePoints(e.points),S=new GraphLinear(e);d.lines='<g class="lines">',d.points='<g class="inset points">';for(h=0,c=r-1;c>h;++h)s=e.height-(v[h]+e.scale)*(e.yDist/e.scale),o=h*e.xDist+e.mainOffset,!0===e.showPoints&&(d.points+=S.buildPoints([h],v)),e.yOfPoints.push(s);for(h=0,c=v.length-1;c>h;++h){d.lines+='<path class="averageLine"fill="none"id="'+e.id+'-0-path"d="',d.lines+="M"+e.xOfPoints[0]+","+e.yOfPoints[0]+" ";for(h=1;h<e.xOfPoints.length;++h)d.lines+="L"+e.xOfPoints[h]+","+e.yOfPoints[h];d.lines+='"</path>'}}}else{for(h=0,c=r-1;c>h;++h)s=0!==e.points[h]?(e.points[h]+e.scale)*(e.yDist/e.scale)-e.yDist:2,o=h*e.xDist+e.mainOffset,d.rects+='<rect class="rect bar"id="'+e.id+"-point-"+h+'" x="'+o+'" y="'+(-e.height+e.yDist+e.mainOffset+e.padding/2)+'" width="'+e.xDist+'"height="'+s+'"'+(!0===e.animations?'><animate attributeName="height" from="0" to="'+s+'" dur="'+e.animationDuration+'s" fill="freeze"></animate></rect>':"/>");for(h=0,c=r-1;c>h;++h)s=0!==e.points[h]?(e.points[h]+e.scale)*(e.yDist/e.scale)-e.yDist:2,o=h*e.xDist+e.mainOffset,n=e.height-e.padding-e.yOffset-s,d.tooltips+='<rect class="SVG-tooltip-box"id="'+e.id+"-point-"+h+'-tooltip-rect"rx="'+e.rx+'"x="'+(o+e.padding/2-e.tooltipWidth/2)+'"y="'+(n-a-e.yDist-2*e.padding)+'"height="'+(e.yDist+e.padding/2)+'"width="'+(e.xDist-e.padding+e.tooltipWidth)+'"/>',d.tooltips+='<text class="SVG-tooltip"id="'+e.id+"-point-"+h+'-tooltip" x="'+(o+e.xDist/2-e.padding)+'" y="'+(n-a-e.yDist/2-e.padding)+'">'+e.points[h]+"</text>"}this.finishGraph(r,l,d,t),"combo"===e.special&&e.multipleDataSets&&e.animations&&S.animateLines()},e}(jQuery),GraphTable=GraphTable||function(){var t=function(t){(t=t||{}).type="table",Graph.call(this,t)};return(t.prototype=Object.create(Graph.prototype)).constructor=t,t.prototype.init=function(t){var i=this.obj,e="<th>"+(i.dataNames?i.dataNames[0]:"Data")+"</th>",s="<tr>";if(i.multipleDataSets)for(var o,n=0,a=i.xLength;a>n;++n){n<i.numPoints-1&&(e+="<th>"+i.dataNames[n+1]+"</th>"),o="";for(var r=0,l=i.numPoints;l>r;++r)o+="<td>"+i.points[r][n]+"</td>";s+="<td>"+n+"</td><td>"+i.x[n]+"</td>"+o+"</tr><tr>"}else for(n=0,a=i.xLength;a>n;++n)s+="<td>"+n+"</td><td>"+i.x[n]+"</td><td>"+i.points[n]+"</td></tr><tr>";var d='<table class="SVG-table"id="'+i.id+'" border="1"cellpadding="5"><tr><th>#</th><th>'+(i.xName||"X")+"</th>"+e+"</tr>";d+=s+"</tr>",this.handleAppend(t,d),this.applyStyling()},t}(),GraphPie=GraphPie||function(t){var i={},e=function(i){if((i=i||{}).type="pie",Graph.call(this,i),this.obj.interactive){var e=this.obj;t(document).on("mouseover",'svg path[id^="'+e.id+'"].slice',function(){t("#"+e.id+" .SVG-tooltip").hide(),t("#"+e.id+" .SVG-tooltip-title").hide(),t("#"+t(this).attr("id")+"-tooltip").show(),t("#"+t(this).attr("id")+"-tooltip-title").show(),t('svg path[id^="'+e.id+'"].slice').css("opacity",.8),t('svg path[id^="'+e.id+'"].slice').css("stroke",self.borderColor||"grey"),t(this).css("opacity",1),t(this).css("stroke","#000")}),t(document).on("mouseleave",'svg path[id^="'+e.id+'"].slice',function(){})}};return(e.prototype=Object.create(Graph.prototype)).constructor=e,i.lineTo=function(t,i){return"L"+t+","+i},i.percent=function(t){return Math.round(100*t)+"%"},e.prototype.init=function(e){if(!this.obj.multipleDataSets){var s=this.obj,o=this.openTags();o.pie='<g class="paths">';var n,a,r,l,d=0,p=s.pieSize||200,h=p-20,c="M"+p+","+p,f="A"+h+","+h,g="0 0,1",y=i.lineTo(20,p),u=0;s.dataNames=s.x.slice(0);for(var b=0,m=s.numPoints;m>b;++b)d+=s.points[b];for(b=0,m=s.numPoints;m>b;++b)0!==b&&(y=i.lineTo(n,a)),r=2*(u+=s.points[b]/d)*Math.PI,l=Math.sin(r),n=p-h*Math.cos(r),a=p-h*l,0===b&&c+y+f+" "+g+n+","+a,o.pie+='<path title="'+s.points[b]+" ("+i.percent(s.points[b]/d)+')"id="'+s.id+"-point-"+b+'"class="path-of-'+b+' slice" d="'+c+y+f+" "+g+n+","+a+'Z">',o.pie+="</path>";o.tooltips+='<g><circle class="pie-tooltip"id="'+s.id+"-point-"+b+'-tooltip-rect"style="fill:'+(s.design.pieTooltipFill||"#fff")+";opacity:"+(s.design.pieTooltipOpacity||.5)+'"r="'+(s.design.pieTooltipRadius||60)+'"cx="'+p+'"cy="'+p+'"height="'+(s.design.donutCenterRadius||p/2)+'"width="'+(s.design.donutCenterRadius||p/2)+'"/>';var x=p-p/4,v="";for(b=0;m>b;++b)v=s.points[b]+" ("+i.percent(s.points[b]/d)+")",o.tooltips+='<text class="SVG-tooltip"id="'+s.id+"-point-"+b+'-tooltip" x="'+(s.design.pieTooltipTextX||p-20*v.length/4)+'" y="'+(x+p/4+20)+'">'+v+")</text>",o.tooltips+='<text class="SVG-tooltip-title"style="display:none;font-weight:bold;font-size:25px;"id="'+s.id+"-point-"+b+'-tooltip-title" x="'+(s.design.pieTooltipTitleX||p-25*s.dataNames[b].toString().length/4)+'" y="'+(x+p/8)+'">'+s.dataNames[b]+"</text></g>";if("donut"===s.special&&(o.middle='<g><circle class="middle"cx="'+p+'" cy="'+p+'" r="'+(s.design.donutCenterRadius||p/2)+'"/>'),s.dataNames)for(b=0,m=s.dataNames.length;m>b;++b)s.dataNames[b]+=" : "+s.points[b]+" ("+i.percent(s.points[b]/d)+")";this.finishGraph(0,0,o,e),t('svg path[id^="'+s.id+'"].slice').eq(2).mouseover()}},e}(jQuery);!function(t){t.fn.graphify=t.fn.graphify||function(i){i=i||{};var e,s,o,n=t.extend({height:this.css("height"),width:this.css("width"),start:"linear",pos:"top",obj:{}},i),a=n.obj,r=a.id,l=new Graph(0),d={};e=t.isArray(a.points[0])?["linear","area","bar","combo","table"]:["linear","area","bar","pie","donut","table"];var p=this.attr("id")+"-wrapper";this.append('<div id="'+p+'"><div id="'+p+'-g-area"></div></div>'),a.attachTo=p+"-g-area";var h=function(){for(var t="",i=0,s=e.length;s>i;++i)t+='<button id="'+r+"-graphify-button-"+e[i]+'">'+e[i].charAt(0).toUpperCase()+e[i].substring(1)+"</button> ";return t}();"top"===n.pos&&t("#"+p).prepend(h+"<br/><br />");var c=n.start;"area"!==c&&"combo"!==c&&"donut"!==c?s=new(window[l.genToFunc(c)])(a):(a.special=c,s=new(window[l.genToFunc(c)])(a)),s.init(),"bottom"===n.pos&&this.append(h),t(document).on("click",'button[id^="'+r+'-graphify-button-"]',function(){var i=t(this).attr("id").split("-")[3];if(d.hasOwnProperty(i)&&!a.animations)t("#"+p+"-g-area").html(d[i]);else{if("area"!==i&&"combo"!==i&&"donut"!==i)a.special=!1,s.to(i,a);else switch(a.special=i,i){case"area":s.to("linear",a);break;case"combo":s.to("bar",a);break;case"donut":s.to("pie",a)}o=new XMLSerializer,d[i]=o.serializeToString(document.getElementById(a.id))}a.type=i})}}(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings