Skip to content

Commit

Permalink
text fix and removed years
Browse files Browse the repository at this point in the history
  • Loading branch information
RoxanaTorre committed May 30, 2024
1 parent ebb7bca commit c7c57ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
7 changes: 1 addition & 6 deletions src/AllCountries/HorizontalScale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ interface Props {
countryDsa: CountryCategoryType[];
categories: string[];
id: string;
year: number;
title: string;
svgHeight: number;
chartSource: ChartSourceType;
}

export function HorizontalScale(props: Props) {
const { countryDsa, categories, id, year, title, svgHeight, chartSource } =
props;
const { countryDsa, categories, id, title, svgHeight, chartSource } = props;
const containerRef = useRef<HTMLDivElement>(null);
const [svgWidth, setSvgWidth] = useState<number | 400>(400);
const margin = { top: 20, right: 40, bottom: 20, left: 0 };
Expand All @@ -34,9 +32,6 @@ export function HorizontalScale(props: Props) {
return (
<div ref={containerRef} className='chart-container rating'>
<h6 className='undp-typography margin-bottom-01'>{title}</h6>
<p className='undp-typography small-font margin-bottom-01'>
Year: {year}
</p>
{value !== '' && categories.length > 0 ? (
<>
<svg
Expand Down
8 changes: 2 additions & 6 deletions src/AllCountries/LinearDotComparison.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ interface Props {
data: CountryValueType[];
selectedCountryCode: string;
id: string;
year: number;
title: string;
svgHeight: number;
chartSource: ChartSourceType;
}

export function LinearDotsComparison(props: Props) {
const { data, selectedCountryCode, id, year, title, svgHeight, chartSource } =
const { data, selectedCountryCode, id, title, svgHeight, chartSource } =
props;
const containerRef = useRef<HTMLDivElement>(null);
const [svgWidth, setSvgWidth] = useState<number | 400>(400);
Expand Down Expand Up @@ -61,10 +60,7 @@ export function LinearDotsComparison(props: Props) {
}, [svgWidth]);
return (
<div ref={containerRef} className='chart-container rating'>
<h6 className='undp-typography margin-bottom-01'>{title}</h6>
<p className='undp-typography small-font margin-bottom-01'>
Year: {year}
</p>
<h6 className='undp-typography margin-bottom-08'>{title}</h6>
{countryData !== undefined && data.length > 0 ? (
<>
<svg
Expand Down
11 changes: 3 additions & 8 deletions src/AllCountries/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ export function AllCountries(props: Props) {
data={creditRating}
title='Credit Ratings'
id='countryCreditRatingScale'
year={
countriesSources.filter(d => d.graph === 'Credit Ratings')[0].year
}
svgHeight={100}
selectedCountryCode={selectedCountry.value}
chartSource={
Expand All @@ -159,9 +156,6 @@ export function AllCountries(props: Props) {
categories={dsaCategories}
title='DSA debt distress rating'
id='countryDsaRatingScale'
year={
countriesSources.filter(d => d.graph === 'DSA Ratings')[0].year
}
svgHeight={100}
chartSource={
countriesSources.filter(d => d.graph === 'DSA Ratings')[0]
Expand Down Expand Up @@ -262,8 +256,9 @@ export function AllCountries(props: Props) {
2023 in in million (M) or billion (B) USD. The graph on the left
depicts government net interest payments (as a percentage of
revenue), and the graph on the right total external debt servicing
on external PPG debt (as a percentage of revenue or exports). Both
graphs cover the period 2000-2025.
on external public and publicly guaranteed (PPG) debt (as a
percentage of revenue or exports). Both graphs cover the period
2000-2025.
</p>
</div>
<div className='flex-div flex-wrap margin-top-08'>
Expand Down

0 comments on commit c7c57ac

Please sign in to comment.