Skip to content

Commit

Permalink
Merge pull request #2563 from Badger-Finance/development
Browse files Browse the repository at this point in the history
fix: breaking graph for zero apr (#2562)
  • Loading branch information
mrbasado authored Jul 18, 2023
2 parents cde9bfe + d8f0296 commit 5aea798
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions src/components-v2/vault-detail/charts/VaultChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,30 @@ export const VaultChart = (props: Props): JSX.Element | null => {
/>
)}
{version === VaultVersion.v1_5 && !isInfluenceVault(vault.vaultToken) && (
<Line
type="monotone"
dataKey="harvestApr"
fill="#3bba9c"
stroke="#3bba9c"
yAxisId="apr"
strokeWidth={1.5}
dot={false}
/>
<>
{!hasAprVal && (
<YAxis
dataKey="apr"
yAxisId="apr"
orientation="right"
type="number"
domain={[0, maxYield]}
tickCount={10}
minTickGap={50}
tickFormatter={(v: number) => `${v?.toFixed(1)}%`}
style={{ fill: 'white' }}
/>
)}
<Line
type="monotone"
dataKey="harvestApr"
fill="#3bba9c"
stroke="#3bba9c"
yAxisId="apr"
strokeWidth={1.5}
dot={false}
/>
</>
)}
</ComposedChart>
</ResponsiveContainer>
Expand Down

0 comments on commit 5aea798

Please sign in to comment.