mirror of
https://github.com/FranP-code/spooky-spotify-showcase.git
synced 2025-10-13 00:02:36 +00:00
Change chart background colors
This commit is contained in:
@@ -32,6 +32,9 @@ export const Charts = ({
|
|||||||
const topArtistsData = longTermArtistData.body.items.sort(
|
const topArtistsData = longTermArtistData.body.items.sort(
|
||||||
(a, b) => b.popularity - a.popularity,
|
(a, b) => b.popularity - a.popularity,
|
||||||
);
|
);
|
||||||
|
const borderColor = 'rgb(163 230 53)';
|
||||||
|
const backgroundColor = 'rgb(101 163 13)';
|
||||||
|
|
||||||
// debugger;
|
// debugger;
|
||||||
const { ChartComponent } = useMemo(() => {
|
const { ChartComponent } = useMemo(() => {
|
||||||
if (selectedOption === options[0]) {
|
if (selectedOption === options[0]) {
|
||||||
@@ -44,8 +47,8 @@ export const Charts = ({
|
|||||||
{
|
{
|
||||||
label: "Top songs in this album",
|
label: "Top songs in this album",
|
||||||
data: topAlbumsData.map((data) => data.position),
|
data: topAlbumsData.map((data) => data.position),
|
||||||
backgroundColor: "rgba(75, 192, 192, 0.6)",
|
backgroundColor,
|
||||||
borderColor: "rgba(75, 192, 192, 1)",
|
borderColor,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
barThickness: 27,
|
barThickness: 27,
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
@@ -101,8 +104,8 @@ export const Charts = ({
|
|||||||
{
|
{
|
||||||
label: "Top artists by popularity",
|
label: "Top artists by popularity",
|
||||||
data: topArtistsData.map((data) => data.popularity),
|
data: topArtistsData.map((data) => data.popularity),
|
||||||
backgroundColor: "rgba(75, 192, 192, 0.6)",
|
backgroundColor,
|
||||||
borderColor: "rgba(75, 192, 192, 1)",
|
borderColor,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
barThickness: 27,
|
barThickness: 27,
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user