fixed up look
This commit is contained in:
parent
d15e542f20
commit
805ce0ebf1
8 changed files with 135 additions and 72 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import type { BacktestResult } from '../types/backtest.types';
|
||||
import { useState, useMemo, memo } from 'react';
|
||||
import { Chart } from '../../../components/charts/Chart';
|
||||
import { ChartContainer } from './ChartContainer';
|
||||
|
||||
interface BacktestChartProps {
|
||||
result: BacktestResult | null;
|
||||
|
|
@ -107,22 +108,26 @@ export const BacktestChart = memo(function BacktestChart({ result, isLoading }:
|
|||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex-1">
|
||||
<Chart
|
||||
data={chartData.ohlcData}
|
||||
overlayData={[
|
||||
{
|
||||
name: 'Equity',
|
||||
data: chartData.equityData,
|
||||
color: '#3b82f6',
|
||||
lineWidth: 2
|
||||
}
|
||||
]}
|
||||
tradeMarkers={chartData.tradeMarkers}
|
||||
height={500}
|
||||
chartId={`backtest-${result?.runId || 'default'}`}
|
||||
key={result?.runId || 'default'}
|
||||
/>
|
||||
<div className="flex-1 min-h-0">
|
||||
<ChartContainer>
|
||||
{(height) => (
|
||||
<Chart
|
||||
data={chartData.ohlcData}
|
||||
overlayData={[
|
||||
{
|
||||
name: 'Equity',
|
||||
data: chartData.equityData,
|
||||
color: '#3b82f6',
|
||||
lineWidth: 2
|
||||
}
|
||||
]}
|
||||
tradeMarkers={chartData.tradeMarkers}
|
||||
height={height}
|
||||
chartId={`backtest-${result?.runId || 'default'}`}
|
||||
key={result?.runId || 'default'}
|
||||
/>
|
||||
)}
|
||||
</ChartContainer>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue