Skip to content

Commit

Permalink
馃拕 charts: tweak floating rate aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed Mar 20, 2024
1 parent eddba3a commit 645c6c7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/charts/UtilizationRateChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ function UtilizationRateChart({ type, symbol }: Props) {
}, [backupBorrows, fixedDeposits, floatingBorrows, floatingDeposits]);

return (
<Box display="flex" flexDirection="column" width="100%" height="100%" gap={2}>
<Box display="flex" flexDirection="column" width="100%" height="100%">
<Box display="flex" justifyContent="space-between">
<Typography variant="h6" fontSize="16px">
{type === 'floating'
? t('Variable APR, Utilization and Global Utilization')
: t('Utilization Rates (Fixed Rate Pools)')}
</Typography>
</Box>
<Box ref={ref} display="flex" alignSelf="center" width="100%" sx={{ height: 700 }}>
<Box ref={ref} display="flex" alignSelf="center" width="100%" sx={{ height: 500 }}>
{loading || !data || !borrowAPR || !currentUtilization ? (
<LoadingChart />
) : (
Expand Down Expand Up @@ -128,10 +128,12 @@ function UtilizationRateChart({ type, symbol }: Props) {
tickfont: { family: 'Inter, sans-serif', size: 11, color: palette.text.primary },
},
camera: {
eye: { x: 1, y: -1, z: 1 },
eye: { x: 1, y: -1, z: 0.7 },
// @ts-expect-error -- missing in types
projection: { type: 'orthographic' },
},
aspectmode: 'manual',
aspectratio: { x: 1.25, y: 1.25, z: 1.25 },
},
autosize: true,
width: ref.current?.clientWidth ?? 500,
Expand Down

0 comments on commit 645c6c7

Please sign in to comment.