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/anfangola.com/wp-content/plugins/matomo/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/claqxcrl/anfangola.com/wp-content/plugins/matomo/assets/chart.js
jQuery(document).ready(function(){
    jQuery('.matomo-table[data-chart]').each(function() {
       let $this = jQuery(this);
       let $postbox = $this.parents('div.postbox');
       let $table = $postbox.find('table');
       $table.hide();
       let $canvas = jQuery('<canvas/>',{'id':$this.attr('data-chart')});
       $canvas.insertAfter($table);
       let data = [];
       let labels = [];
       let title = $postbox.find('h2').text();
       let $row;
       let value;
       $table.find('tr').each(function() {
           $row = jQuery(this);
           value = $row.find('td:nth-child(2)').text();
           if ( '-' === value ) {
               value = 0;
           }
           data.push(value);
           labels.push($row.find('td:nth-child(1)').text());
       });

        var myChart = new Chart($canvas, {
            type: 'line',
            data: {
                labels: labels.reverse(),
                datasets: [{
                    label: title,
                    data: data.reverse(),
                    borderColor: "#55bae7",
                    pointBackgroundColor: "#55bae7",
                    pointBorderColor: "#55bae7",
                    pointHoverBackgroundColor: "#55bae7",
                    pointHoverBorderColor: "#55bae7",
                }]
            },
            options: {
                plugins: {
                    legend: {
                        display: false
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true
                    }
                }
            }
        });
    });
});

ZeroDay Forums Mini