Вход Регистрация
Файл: CloudBox-main/doc/js/jquery.easypiechart.min.js
Строк: 194
<?php
/**!
 * easyPieChart
 * Lightweight plugin to render simple, animated and retina optimized pie charts
 *
 * @license Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
 * @version 2.1.3
 **/
! function (ab) {
    
"object" == typeof exports module.exports b(require("jquery")) : "function" == typeof define && define.amd define("EasyPieChart", ["jquery"], b) : b(a.jQuery)
}(
this, function (a) {
    var 
= function (ab) {
        var 
cdocument.createElement("canvas");
        
"undefined" != typeof G_vmlCanvasManager && G_vmlCanvasManager.initElement(d);
        var 
d.getContext("2d");
        
d.width d.height b.sizea.appendChild(d);
        var 
1;
        
window.devicePixelRatio && (window.devicePixelRatiod.style.width d.style.height = [b.size"px"].join(""), d.width d.height b.size fe.scale(ff)), e.translate(b.size 2b.size 2), e.rotate((-0.5 b.rotate 180) * Math.PI);
        var 
= (b.size b.lineWidth) / 2;
        
b.scaleColor && b.scaleLength && (-= b.scaleLength 2), Date.now Date.now || function () {
            return +new 
Date
        
};
        var 
= function (abc) {
            
Math.min(Math.max(-1|| 0), 1);
            var 
>= ? !: !1;
            
e.beginPath(), e.arc(00g0Math.PI cd), e.strokeStyle ae.lineWidth be.stroke()
        }, 
= function () {
                var 
ac24;
                
e.lineWidth 1e.fillStyle b.scaleColore.save();
                for (var 
240; --d=== ? (b.scaleLength0) : (.6 b.scaleLengthb.scaleLength c), e.fillRect(-b.size a0c1), e.rotate(Math.PI 12);
                
e.restore()
            }, 
= function () {
                return 
window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (a) {
                    
window.setTimeout(a1e3 60)
                }
            }(),
            
= function () {
                
b.scaleColor && i(), b.trackColor && h(b.trackColorb.lineWidth1)
            };
        
this.clear = function () {
            
e.clearRect(b.size / -2b.size / -2b.sizeb.size)
        }, 
this.draw = function (a) {
            
b.scaleColor || b.trackColor e.getImageData && e.putImageData e.putImageData(c00) : (k(), e.getImageData(00b.size fb.size f)) : (this.clear(), k()) : this.clear(), e.lineCap b.lineCap;
            var 
d;
            
"function" == typeof b.barColor b.barColor(a) : b.barColorh(db.lineWidth100)
        }.
bind(this), this.animate = function (ac) {
            var 
Date.now();
            
b.onStart(ac);
            var 
= function () {
                var 
Math.min(Date.now() - db.animate),
                    
b.easing(thisfaab.animate);
                
this.draw(g), b.onStep(acg), >= b.animate b.onStop(ac) : j(e)
            }.
bind(this);
            
j(e)
        }.
bind(this)
    }, 
= function (ac) {
            var 
= {
                
barColor"#09a0ad",
                
trackColor"#f5f5f5",
               
// scaleColor: "#dfe0e0",
                
scaleLength5,
                
//lineCap: "round",
                
lineWidth15,
                
size170,
                
rotate0,
                
animate1e3,
                
easing: function (abcde) {
                    return 
/= 2: -* (--* (2) - 1) + c
                
},
                
onStart: function () {},
                
onStep: function () {},
                
onStop: function () {}
                
                
                
            };
            
                
            
            
            
            
            if (
"undefined" != typeof bd.renderer b;
            else {
                if (
"undefined" == typeof SVGRenderer) throw new Error("Please load either the SVG- or the CanvasRenderer");
                
d.renderer SVGRenderer
            
}
            var 
= {}, 0,
                
= function () {
                    
this.el athis.options e;
                    for (var 
b in dd.hasOwnProperty(b) && (e[b] = && "undefined" != typeof c[b] ? c[b] : d[b], "function" == typeof e[b] && (e[b] = e[b].bind(this)));
                    
e.easing "string" == typeof e.easing && "undefined" != typeof jQuery && jQuery.isFunction(jQuery.easing[e.easing]) ? jQuery.easing[e.easing] : d.easingthis.renderer = new e.renderer(ae), this.renderer.draw(f), a.dataset && a.dataset.percent this.update(parseFloat(a.dataset.percent)) : a.getAttribute && a.getAttribute("data-percent") && this.update(parseFloat(a.getAttribute("data-percent")))
                }.
bind(this);
            
this.update = function (a) {
                return 
parseFloat(a), e.animate this.renderer.animate(fa) : this.renderer.draw(a), athis
            
}.bind(this), g()
        };
    
a.fn.easyPieChart = function (b) {
        return 
this.each(function () {
            var 
d;
            
a.data(this"easyPieChart") || (a.extend({}, ba(this).data()), a.data(this"easyPieChart", new c(thisd)))
        })
    }
});
?>
Онлайн: 4
Реклама