Skip to content

Commit

Permalink
Merge branch 'main' of github.com:centrifuge/apps into default-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Oct 16, 2024
2 parents 85efdea + ac88888 commit 7226612
Show file tree
Hide file tree
Showing 100 changed files with 3,407 additions and 1,809 deletions.
30 changes: 21 additions & 9 deletions centrifuge-app/src/components/Charts/AssetPerformanceChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function AssetPerformanceChart({ pool, poolId, loanId }: Props) {
<AnchorButton
href={dataUrl}
download={`asset-${loanId}-timeseries.csv`}
variant="secondary"
variant="inverted"
icon={IconDownload}
small
>
Expand Down Expand Up @@ -252,19 +252,19 @@ function AssetPerformanceChart({ pool, poolId, loanId }: Props) {
<Text variant="label2">{'Value'}</Text>
<Text variant="label2">
{payload[0].payload.historicPV
? formatBalance(payload[0].payload.historicPV, 'USD' || '', 2)
? formatBalance(payload[0].payload.historicPV, 'USD', 2)
: payload[0].payload.futurePV
? `~${formatBalance(payload[0].payload.futurePV, 'USD' || '', 2)}`
? `~${formatBalance(payload[0].payload.futurePV, 'USD', 2)}`
: '-'}
</Text>
</Shelf>
<Shelf justifyContent="space-between" pl="4px" key={index}>
<Text variant="label2">{'Price'}</Text>
<Text variant="label2">
{payload[0].payload.historicPrice
? formatBalance(payload[0].payload.historicPrice, 'USD' || '', 6)
? formatBalance(payload[0].payload.historicPrice, 'USD', 6)
: payload[0].payload.futurePrice
? `~${formatBalance(payload[0].payload.futurePrice, 'USD' || '', 6)}`
? `~${formatBalance(payload[0].payload.futurePrice, 'USD', 6)}`
: '-'}
</Text>
</Shelf>
Expand All @@ -278,27 +278,39 @@ function AssetPerformanceChart({ pool, poolId, loanId }: Props) {
/>

{activeFilter.value === 'price' && (
<Line type="monotone" dataKey="historicPrice" stroke="#1253FF" strokeWidth={2} dot={false} />
<Line
type="monotone"
dataKey="historicPrice"
stroke={theme.colors.textGold}
strokeWidth={2}
dot={false}
/>
)}
{activeFilter.value === 'price' && (
<Line
type="monotone"
dataKey="futurePrice"
stroke="#c2d3ff"
stroke={theme.colors.textGold}
strokeWidth={2}
dot={false}
strokeDasharray="6 6"
/>
)}

{activeFilter.value === 'value' && (
<Line type="monotone" dataKey="historicPV" stroke="#1253FF" strokeWidth={2} dot={false} />
<Line
type="monotone"
dataKey="historicPV"
stroke={theme.colors.textGold}
strokeWidth={2}
dot={false}
/>
)}
{activeFilter.value === 'value' && (
<Line
type="monotone"
dataKey="futurePV"
stroke="#c2d3ff"
stroke={theme.colors.textGold}
strokeWidth={2}
dot={false}
strokeDasharray="6 6"
Expand Down
Loading

0 comments on commit 7226612

Please sign in to comment.