Skip to content

Commit

Permalink
fix: PER stacked bar chart styling
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara committed Oct 6, 2023
1 parent d5462cc commit 8b68d9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions src/components/StackedProgressBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ function StackedProgressBar<VALUE>(props: Props<VALUE>) {
className={styles.value}
value={datum.value}
/>
<NumberOutput
className={styles.percentage}
value={(100 * datum.value) / total}
prefix="("
suffix="%)"
maximumFractionDigits={0}
/>
{(percentage > 10) && (
<NumberOutput
className={styles.percentage}
value={(100 * datum.value) / total}
prefix="("
suffix="%)"
maximumFractionDigits={0}
/>
)}
</div>
);
})}
Expand Down
2 changes: 1 addition & 1 deletion src/views/CountryPreparedness/RatingByAreaChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function chartPointSelector(chartPoint: ChartPoint) {

const X_AXIS_HEIGHT = 50;
const Y_AXIS_WIDTH = 90;
const CHART_OFFSET = 16;
const CHART_OFFSET = 20;

const chartMargin = {
left: Y_AXIS_WIDTH + CHART_OFFSET,
Expand Down

0 comments on commit 8b68d9d

Please sign in to comment.