PHP Classes

File: source/asset/assets/js/jquery.AshAlom.gaugeMeter-2.0.0.min.js

Recommend this page to a friend!
  Classes of ask sa sa   Rimau waf   source/asset/assets/js/jquery.AshAlom.gaugeMeter-2.0.0.min.js   Download  
File: source/asset/assets/js/jquery.AshAlom.gaugeMeter-2.0.0.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Rimau waf
Application to configure Web server module options
Author: By
Last change:
Date: 1 year ago
Size: 6,484 bytes
 

Contents

Class file image Download
;/* AshAlom Gauge Meter. Version 2.0.0 Copyright AshAlom.com All rights reserved. https://github.com/AshAlom/GaugeMeter Created by Dr Ash Alom */ !function(e){e.fn.gaugeMeter=function(t){var a=e.extend({id:"",percent:0,used:0,total:100,size:100,prepend:"",append:"",theme:"Red-Gold-Green",color:"",back:"RGBa(0,0,0,.06)",width:3,style:"Full",stripe:"0",animationstep:1,animate_gauge_colors:"0",animate_text_colors:"0",label:"",label_color:"Black"},t);return this.each(function(){function t(e){var t="#2C94E0";return e||(e=1e-14),"Red-Gold-Green"==l.theme&&(e>0&&(t="#d90000"),e>10&&(t="#e32100"),e>20&&(t="#f35100"),e>30&&(t="#ff8700"),e>40&&(t="#ffb800"),e>50&&(t="#ffd900"),e>60&&(t="#dcd800"),e>70&&(t="#a6d900"),e>80&&(t="#69d900"),e>90&&(t="#32d900")),"Green-Gold-Red"==l.theme&&(e>0&&(t="#32d900"),e>10&&(t="#69d900"),e>20&&(t="#a6d900"),e>30&&(t="#dcd800"),e>40&&(t="#ffd900"),e>50&&(t="#ffb800"),e>60&&(t="#ff8700"),e>70&&(t="#f35100"),e>80&&(t="#e32100"),e>90&&(t="#d90000")),"Green-Red"==l.theme&&(e>0&&(t="#32d900"),e>10&&(t="#41c900"),e>20&&(t="#56b300"),e>30&&(t="#6f9900"),e>40&&(t="#8a7b00"),e>50&&(t="#a75e00"),e>60&&(t="#c24000"),e>70&&(t="#db2600"),e>80&&(t="#f01000"),e>90&&(t="#ff0000")),"Red-Green"==l.theme&&(e>0&&(t="#ff0000"),e>10&&(t="#f01000"),e>20&&(t="#db2600"),e>30&&(t="#c24000"),e>40&&(t="#a75e00"),e>50&&(t="#8a7b00"),e>60&&(t="#6f9900"),e>70&&(t="#56b300"),e>80&&(t="#41c900"),e>90&&(t="#32d900")),"DarkBlue-LightBlue"==l.theme&&(e>0&&(t="#2c94e0"),e>10&&(t="#2b96e1"),e>20&&(t="#2b99e4"),e>30&&(t="#2a9ce7"),e>40&&(t="#28a0e9"),e>50&&(t="#26a4ed"),e>60&&(t="#25a8f0"),e>70&&(t="#24acf3"),e>80&&(t="#23aff5"),e>90&&(t="#21b2f7")),"LightBlue-DarkBlue"==l.theme&&(e>0&&(t="#21b2f7"),e>10&&(t="#23aff5"),e>20&&(t="#24acf3"),e>30&&(t="#25a8f0"),e>40&&(t="#26a4ed"),e>50&&(t="#28a0e9"),e>60&&(t="#2a9ce7"),e>70&&(t="#2b99e4"),e>80&&(t="#2b96e1"),e>90&&(t="#2c94e0")),"DarkRed-LightRed"==l.theme&&(e>0&&(t="#d90000"),e>10&&(t="#dc0000"),e>20&&(t="#e00000"),e>30&&(t="#e40000"),e>40&&(t="#ea0000"),e>50&&(t="#ee0000"),e>60&&(t="#f30000"),e>70&&(t="#f90000"),e>80&&(t="#fc0000"),e>90&&(t="#ff0000")),"LightRed-DarkRed"==l.theme&&(e>0&&(t="#ff0000"),e>10&&(t="#fc0000"),e>20&&(t="#f90000"),e>30&&(t="#f30000"),e>40&&(t="#ee0000"),e>50&&(t="#ea0000"),e>60&&(t="#e40000"),e>70&&(t="#e00000"),e>80&&(t="#dc0000"),e>90&&(t="#d90000")),"DarkGreen-LightGreen"==l.theme&&(e>0&&(t="#32d900"),e>10&&(t="#33db00"),e>20&&(t="#34df00"),e>30&&(t="#34e200"),e>40&&(t="#36e700"),e>50&&(t="#37ec00"),e>60&&(t="#38f100"),e>70&&(t="#38f600"),e>80&&(t="#39f900"),e>90&&(t="#3afc00")),"LightGreen-DarkGreen"==l.theme&&(e>0&&(t="#3afc00"),e>10&&(t="#39f900"),e>20&&(t="#38f600"),e>30&&(t="#38f100"),e>40&&(t="#37ec00"),e>50&&(t="#36e700"),e>60&&(t="#34e200"),e>70&&(t="#34df00"),e>80&&(t="#33db00"),e>90&&(t="#32d900")),"DarkGold-LightGold"==l.theme&&(e>0&&(t="#ffb800"),e>10&&(t="#ffba00"),e>20&&(t="#ffbd00"),e>30&&(t="#ffc200"),e>40&&(t="#ffc600"),e>50&&(t="#ffcb00"),e>60&&(t="#ffcf00"),e>70&&(t="#ffd400"),e>80&&(t="#ffd600"),e>90&&(t="#ffd900")),"LightGold-DarkGold"==l.theme&&(e>0&&(t="#ffd900"),e>10&&(t="#ffd600"),e>20&&(t="#ffd400"),e>30&&(t="#ffcf00"),e>40&&(t="#ffcb00"),e>50&&(t="#ffc600"),e>60&&(t="#ffc200"),e>70&&(t="#ffbd00"),e>80&&(t="#ffba00"),e>90&&(t="#ffb800")),"White"==l.theme&&(t="#fff"),"Black"==l.theme&&(t="#000"),t}function d(t,a){e("<b></b>").appendTo(t).html(label).css({"font-size":a+"px","line-height":l.size+5*a+"px",color:l.label_color})}function i(t){var a="";if("1"==l.animate_text_colors)var a=l.fgcolor;e("<span></span>").appendTo(t).html(r).css({"line-height":l.size+"px","font-size":.22*l.size+"px",color:a})}function f(t){e.each(o,function(d,i){l[i]=void 0!=t.data(i)?t.data(i):e(a).attr(i),"fill"==i&&void 0!=t.data("fill")&&(s=!0)})}function n(a){if("1"==l.animate_gauge_colors||"1"==l.animate_text_colors)var d=t(M);"1"==l.animate_gauge_colors&&(l.fgcolor=d,"1"==l.animate_text_colors&&e("SPAN","#"+l.id).html("<s>"+l.prepend+"</s>"+Math.floor(M).toString()+"<u>"+l.append+"</u>").css({color:d})),g.clearRect(0,0,b.width,b.height),g.beginPath(),g.arc(m,v,x,G,k,!1),g.strokeStyle=l.back,l.stripe>parseInt(0)?g.setLineDash([l.stripe],1):g.lineCap="round",g.stroke(),s&&(g.fillStyle=l.fill,g.fill()),g.beginPath(),g.arc(m,v,x,-I,P*a-I,!1),g.lineWidth=l.width<1||isNaN(l.width)?l.size/20:l.width,g.strokeStyle=l.fgcolor,g.stroke(),c>M&&(M+=z,requestAnimationFrame(function(){n(Math.min(M,c)/100)},p))}e(this).attr("data-id",e(this).attr("id"));var r,o=["id","percent","used","total","size","prepend","append","theme","color","back","width","style","stripe","animationstep","animate_gauge_colors","animate_text_colors","label","label_color"],l={},c=0,p=e(this),s=!1;p.addClass("gaugeMeter"),f(p);var h=parseInt(l.percent);if(l.fgcolor=t(h),l.color&&(l.fgcolor=l.color),void 0!=p.data("text")?(r=void 0!=p.data("append")||""!=p.data("append")&&null!=p.data("append")?p.data("text").toString()+"<u>"+p.data("append")+"</u>":p.data("text"),(void 0!=p.data("prepend")||""!=p.data("prepend")&&null!=p.data("prepend"))&&(r="<s>"+p.data("prepend")+"</s>"+r.toString()),i(p)):(void 0!=p.data("prepend")||""!=p.data("prepend")&&null!=p.data("prepend")?(r="<s>"+p.data("prepend")+"</s>"+p.data("percent").toString(),(void 0!=p.data("append")||""!=p.data("append")&&null!=p.data("append"))&&(r=r.toString()+"<u>"+p.data("append")+"</u>")):(r=p.data("percent"),(void 0!=p.data("append")||""!=p.data("append")&&null!=p.data("append"))&&(r=r.toString()+"<u>"+p.data("append")+"</u>")),i(p)),void 0!=e(this).data("total")&&void 0!=e(this).data("used")){var u=e(this).data("total")/100;percent=(e(this).data("used")/u/100).toFixed(3),c=(e(this).data("used")/u).toFixed(3)}else void 0!=e(this).data("percent")?(percent=e(this).data("percent")/100,c=e(this).data("percent")):percent=a.percent/100;void 0!=e(this).data("label")&&(label=e(this).data("label"),void 0!=e(this).data("style")?d(p,l.size/13):d(p,l.size/13)),e(this).width(l.size+"px");var b=e("<canvas></canvas>").attr({width:l.size,height:l.size}).appendTo(e(this)).get(0),g=b.getContext("2d"),m=b.width/2,v=b.height/2,_=360*l.percent,x=(_*(Math.PI/180),b.width/2.5),k=2.3*Math.PI,G=0,M=0===l.animationstep?c:0,z=Math.max(l.animationstep,0),P=2*Math.PI,I=Math.PI/2,R="";if(void 0!=e(this).data("style")){if(R=e(this).data("style"),"Semi"==R)var k=2*Math.PI,G=3.13,P=1*Math.PI,I=Math.PI/.996;if("Arch"==R)var k=2.195*Math.PI,G=1,G=655.99999,P=1.4*Math.PI,I=Math.PI/.8335}n(M/100)})}}(jQuery);