Добавил сайт
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
function InitStatisticsChart(labels, colors) {
|
||||
// Создаём чарт
|
||||
let chart = new Chart(
|
||||
document.getElementById("statistics-chart"), {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: "Количество",
|
||||
data: [0, 0],
|
||||
backgroundColor: colors
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
plugins: {
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Отображаем чарт
|
||||
chart.update();
|
||||
|
||||
return chart;
|
||||
}
|
||||
|
||||
function InitStatistics() {
|
||||
window.statistics = new Statistics();
|
||||
window.total_logs_amount = document.getElementById("total-logs-amount");
|
||||
}
|
||||
Reference in New Issue
Block a user