{"size": 1452, "ext": "js", "max_stars_repo_path": "resources/js/admin/web_servers_of_new_sites.js", "max_stars_repo_name": "TripleSD/moring", "max_stars_repo_stars_event_min_datetime": "2019-11-08T15:51:54.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-04T12:08:13.000Z", "max_issues_repo_path": "resources/js/admin/web_servers_of_new_sites.js", "max_issues_repo_name": "TripleSD/moring", "max_issues_repo_issues_event_min_datetime": "2019-12-04T14:54:09.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T19:59:05.000Z", "max_forks_repo_path": "resources/js/admin/web_servers_of_new_sites.js", "max_forks_repo_name": "TripleSD/moring", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 6, "max_issues_count": 16, "max_forks_count": null, "avg_line_length": 28.4705882353, "max_line_length": 124, "alphanum_fraction": 0.3650137741}
$(document).ready(function () {

    var ctx = $("#newSitesWebServers");

    if(ctx.length){
        var servers = JSON.parse(ctx.attr('data-server'));
        var counts = JSON.parse(ctx.attr('data-count'));
        //Chart.defaults.global.elements.rectangle.backgroundColor = ['rgba(94, 114, 228, 0.2)', "rgba(86, 188, 228, 0.2)"];
        window.chartColors = [
            'rgb(255, 99, 132)',
            'rgb(255, 159, 64)',
            'rgb(255, 205, 86)',
            'rgb(75, 192, 192)',
            'rgb(54, 162, 235)',
        ];

        var myChart = new Chart(ctx, {
            type: 'bar',
            data: {
                labels: servers,
                datasets: [{
                    label: 'Статистика используемых версий для последних добавленных 5 web серверов, шт',
                    data: counts,
                    backgroundColor: [
                        'rgb(255, 99, 132)',
                        'rgb(255, 159, 64)',
                        'rgb(255, 205, 86)',
                        'rgb(75, 192, 192)',
                        'rgb(54, 162, 235)',
                    ],
                    borderWidth: 1,
                }]
            },
            options: {
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                }
            }
        });
    }





});
