From 81dc3bdf5181a36943ff2fe8c52b1c345cca1d13 Mon Sep 17 00:00:00 2001 From: samshara Date: Thu, 17 Oct 2024 15:58:32 +0545 Subject: [PATCH] fix: show component rating value on y-axis ticks --- .changeset/spicy-dragons-teach.md | 10 ++++++++++ .changeset/tricky-hornets-trade.md | 5 +++++ .../PreviousAssessmentChart/index.tsx | 2 +- .../CountryPreparedness/RatingByAreaChart/index.tsx | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .changeset/spicy-dragons-teach.md create mode 100644 .changeset/tricky-hornets-trade.md diff --git a/.changeset/spicy-dragons-teach.md b/.changeset/spicy-dragons-teach.md new file mode 100644 index 000000000..0f33741ea --- /dev/null +++ b/.changeset/spicy-dragons-teach.md @@ -0,0 +1,10 @@ +--- +"@ifrc-go/ui": patch +--- + +- PieChart Component + + - Added a `colorSelector` prop to select color for each pie + +- ProgressBar Component + - Introduced a `color` prop to customize the progress bar's color diff --git a/.changeset/tricky-hornets-trade.md b/.changeset/tricky-hornets-trade.md new file mode 100644 index 000000000..993d75b62 --- /dev/null +++ b/.changeset/tricky-hornets-trade.md @@ -0,0 +1,5 @@ +--- +"go-web-app": patch +--- + +Added color mapping based on PER Area and Rating across all PER charts diff --git a/app/src/views/CountryPreparedness/PreviousAssessmentChart/index.tsx b/app/src/views/CountryPreparedness/PreviousAssessmentChart/index.tsx index 89b3cc526..077243c90 100644 --- a/app/src/views/CountryPreparedness/PreviousAssessmentChart/index.tsx +++ b/app/src/views/CountryPreparedness/PreviousAssessmentChart/index.tsx @@ -49,7 +49,7 @@ function PreviousAssessmentCharts(props: Props) { const ratingTitleMap = listToMap( ratingOptions, (option) => option.value, - (option) => option.title, + (option) => `${option.title} ${option.value}`, ); const chartData = useNumericChartData( diff --git a/app/src/views/CountryPreparedness/RatingByAreaChart/index.tsx b/app/src/views/CountryPreparedness/RatingByAreaChart/index.tsx index fe5213731..3eae6c8f4 100644 --- a/app/src/views/CountryPreparedness/RatingByAreaChart/index.tsx +++ b/app/src/views/CountryPreparedness/RatingByAreaChart/index.tsx @@ -44,7 +44,7 @@ function RatingByAreaChart(props: Props) { const ratingTitleMap = listToMap( ratingOptions, (option) => option.value, - (option) => option.title, + (option) => `${option.title} ${option.value}`, ); const formAreaMap = listToMap(