From 4cd2901bf4a7418fff69cc0dd7de997883940652 Mon Sep 17 00:00:00 2001 From: Francisco Pessano Date: Fri, 18 Oct 2024 18:30:28 -0300 Subject: [PATCH] Change chart background colors --- src/app/_components/charts.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/_components/charts.tsx b/src/app/_components/charts.tsx index 2c59d26..fa8c49b 100644 --- a/src/app/_components/charts.tsx +++ b/src/app/_components/charts.tsx @@ -32,6 +32,9 @@ export const Charts = ({ const topArtistsData = longTermArtistData.body.items.sort( (a, b) => b.popularity - a.popularity, ); + const borderColor = 'rgb(163 230 53)'; + const backgroundColor = 'rgb(101 163 13)'; + // debugger; const { ChartComponent } = useMemo(() => { if (selectedOption === options[0]) { @@ -44,8 +47,8 @@ export const Charts = ({ { label: "Top songs in this album", data: topAlbumsData.map((data) => data.position), - backgroundColor: "rgba(75, 192, 192, 0.6)", - borderColor: "rgba(75, 192, 192, 1)", + backgroundColor, + borderColor, borderWidth: 1, barThickness: 27, borderRadius: 2, @@ -101,8 +104,8 @@ export const Charts = ({ { label: "Top artists by popularity", data: topArtistsData.map((data) => data.popularity), - backgroundColor: "rgba(75, 192, 192, 0.6)", - borderColor: "rgba(75, 192, 192, 1)", + backgroundColor, + borderColor, borderWidth: 1, barThickness: 27, borderRadius: 2,