From 80c1c95014c8d910693f60359ecea16db92b7b9d Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 15 Oct 2024 04:11:48 +0100 Subject: [PATCH] add a ":" to the chart tooltip to split name and value --- .../components/player/chart/player-accuracy-chart.tsx | 2 +- .../components/player/chart/player-ranking-chart.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/website/src/components/player/chart/player-accuracy-chart.tsx b/projects/website/src/components/player/chart/player-accuracy-chart.tsx index 6c01343..2e9ef22 100644 --- a/projects/website/src/components/player/chart/player-accuracy-chart.tsx +++ b/projects/website/src/components/player/chart/player-accuracy-chart.tsx @@ -30,7 +30,7 @@ const datasetConfig: DatasetConfig[] = [ return value.toFixed(1); }, }, - labelFormatter: (value: number) => `Average Ranked Accuracy ${value.toFixed(3)}%`, + labelFormatter: (value: number) => `Average Ranked Accuracy: ${value.toFixed(3)}%`, }, ]; diff --git a/projects/website/src/components/player/chart/player-ranking-chart.tsx b/projects/website/src/components/player/chart/player-ranking-chart.tsx index 280711f..048443f 100644 --- a/projects/website/src/components/player/chart/player-ranking-chart.tsx +++ b/projects/website/src/components/player/chart/player-ranking-chart.tsx @@ -24,7 +24,7 @@ const datasetConfig: DatasetConfig[] = [ displayName: "Rank", position: "left", }, - labelFormatter: (value: number) => `Rank #${formatNumberWithCommas(value)}`, + labelFormatter: (value: number) => `Rank: #${formatNumberWithCommas(value)}`, }, { title: "Country Rank", @@ -37,7 +37,7 @@ const datasetConfig: DatasetConfig[] = [ displayName: "Country Rank", position: "left", }, - labelFormatter: (value: number) => `Country Rank #${formatNumberWithCommas(value)}`, + labelFormatter: (value: number) => `Country Rank: #${formatNumberWithCommas(value)}`, }, { title: "PP", @@ -57,7 +57,7 @@ const datasetConfig: DatasetConfig[] = [ return value.toFixed(1); }, }, - labelFormatter: (value: number) => `PP ${formatNumberWithCommas(value)}pp`, + labelFormatter: (value: number) => `PP: ${formatNumberWithCommas(value)}pp`, }, { title: "Ranked Scores", @@ -71,7 +71,7 @@ const datasetConfig: DatasetConfig[] = [ position: "left", }, type: "bar", - labelFormatter: (value: number) => `Ranked Scores ${formatNumberWithCommas(value)}`, + labelFormatter: (value: number) => `Ranked Scores: ${formatNumberWithCommas(value)}`, }, { title: "Unranked Scores", @@ -85,7 +85,7 @@ const datasetConfig: DatasetConfig[] = [ position: "left", }, type: "bar", - labelFormatter: (value: number) => `Unranked Scores ${formatNumberWithCommas(value)}`, + labelFormatter: (value: number) => `Unranked Scores: ${formatNumberWithCommas(value)}`, }, ];