From da4e83c311d86c86c84dc8d8095e54db6012a284 Mon Sep 17 00:00:00 2001 From: Shubh Date: Sun, 28 Jan 2024 01:12:19 +0530 Subject: [PATCH] improved graph appearance --- script.js | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/script.js b/script.js index c10d480..abf13f7 100644 --- a/script.js +++ b/script.js @@ -319,7 +319,7 @@ function makegraph(arr){ document.querySelector(".bargraph").appendChild(bargraph); bargraph.innerHTML = `

Followers

- `; + `; var ctx = document.getElementById('myBarChart').getContext('2d'); var myBarChart = new Chart(ctx, { type: 'bar', @@ -334,29 +334,24 @@ function makegraph(arr){ }] }, options: { - scales: { - y: { - beginAtZero: true - } - }, - plugins: { - legend: { - display: true, - labels: { - fontSize: 14 // Adjust the font size of the legend - } - } - }, scales: { x: { ticks: { - fontSize: 12 // Adjust the font size of the x-axis labels - } + color: '#9cd8fe', // X-axis label color + fontSize: 30 // X-axis label font size + }, + grid: { + color: '#9cd8fe' // X-axis grid line color + } }, y: { ticks: { - fontSize: 12 // Adjust the font size of the y-axis labels - } + color: '#9cd8fe', // Y-axis label color + fontSize: 30 // Y-axis label font size + }, + grid: { + color: '#9cd8fe' // X-axis grid line color + } } } }