Skip to content

Node.js based forum software built for the modern web

dont show legends on error charts

Barış Soner Uşaklı5aa4bf3310f3
diff --git a/public/src/admin/advanced/errors.js b/public/src/admin/advanced/errors.js
index 5767b45dd4..15d4bc9c7f 100644
--- a/public/src/admin/advanced/errors.js
+++ b/public/src/admin/advanced/errors.js
@@ -92,30 +92,29 @@ function setupCharts() {
],
},
};
+ const chartOptions = {
+ responsive: true,
+ scales: {
+ y: {
+ beginAtZero: true,
+ },
+ },
+ plugins: {
+ legend: {
+ display: false,
+ },
+ },
+ };
new Chart(notFoundCanvas.getContext('2d'), {
type: 'line',
data: data['not-found'],
- options: {
- responsive: true,
- scales: {
- y: {
- beginAtZero: true,
- },
- },
- },
+ options: chartOptions,
});
new Chart(tooBusyCanvas.getContext('2d'), {
type: 'line',
data: data.toobusy,
- options: {
- responsive: true,
- scales: {
- y: {
- beginAtZero: true,
- },
- },
- },
+ options: chartOptions,
});
}