Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /home/claqxcrl/www/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/claqxcrl/www/js/svg-path.js
/**
 - This is jQuery plugin declaration for raitings graph
 - @html: ./html-component/club_main_stat.html
 - @deps: jQuery, Chartist.js
 - @using: ./js/main.js
 - @author torbara (https://themeforest.net/user/torbara)
 - */

(function ($, Chartist) {

    "use strict";

    $.fn.svgpath = function (labels, series, low, showArea, showPoint, fullWidth) {

        var $el = $(this);

        if ($el.length === 0) {
            throw new Error('svgpath: target element not found');
        }

        var id = $el.attr('id');


        $(this).on('visible', function () {
            var chart = Chartist.Line('#' + id, {
                labels: labels,
                series: series
            }, {
                low: low,
                showArea: showArea === undefined ? true : showArea,
                showPoint: showPoint === undefined ? true : showPoint,
                fullWidth: fullWidth === undefined ? true : fullWidth

            });

            chart.on('draw', function (data) {
                if (data.type === 'line' || data.type === 'area') {
                    data.element.animate({
                        d: {
                            begin: 2000 * data.index,
                            dur: 2000,
                            from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
                            to: data.path.clone().stringify(),
                            easing: Chartist.Svg.Easing.easeOutQuint
                        }
                    });
                }
            });

            chart.on('created', function () {
                if (window.__exampleAnimateTimeout1) {
                    clearTimeout(window.__exampleAnimateTimeout1);
                    window.__exampleAnimateTimeout1 = null;
                }
                //  window.__exampleAnimateTimeout1 = setTimeout(chart.update.bind(chart), 12000);
            });
        });

        $(this).showVisible();



    };

})(jQuery, Chartist);


ZeroDay Forums Mini