fix: vertical market markers need yAxisId + move legend below date labels
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-3 Pipeline was successful
ci/woodpecker/push/build-1 Pipeline was successful
ci/woodpecker/push/build-2 Pipeline was successful
ci/woodpecker/push/finalize Pipeline was successful
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
Build and Push / beta-gate (push) Has been cancelled

- Add yAxisId='left' to vertical ReferenceLine (required by Recharts)
- Increase bottom margin from 40 to 70 for date label + legend space
- Legend uses verticalAlign='bottom' with 24px top padding
This commit is contained in:
Celes Renata
2026-04-30 23:31:55 +00:00
parent 6169efdc89
commit 5d2ffd9163
+3 -2
View File
@@ -802,11 +802,12 @@ function TrendHistoryChart({ trends, latestTrends, ticker, marketPrices, range90
// Shared chart content — rendered at different sizes // Shared chart content — rendered at different sizes
const chartContent = (height: number) => ( const chartContent = (height: number) => (
<ResponsiveContainer width="100%" height={height}> <ResponsiveContainer width="100%" height={height}>
<LineChart data={chartData} margin={{ top: 5, right: 20, bottom: 40, left: 0 }}> <LineChart data={chartData} margin={{ top: 5, right: 20, bottom: 70, left: 0 }}>
<CartesianGrid strokeDasharray="3 3" stroke="#334155" /> <CartesianGrid strokeDasharray="3 3" stroke="#334155" />
{marketMarkers.map((m, i) => ( {marketMarkers.map((m, i) => (
<ReferenceLine <ReferenceLine
key={`market-${i}`} key={`market-${i}`}
yAxisId="left"
x={m.ts} x={m.ts}
stroke={m.label === 'Open' ? '#22c55e' : '#ef4444'} stroke={m.label === 'Open' ? '#22c55e' : '#ef4444'}
strokeDasharray="4 4" strokeDasharray="4 4"
@@ -845,7 +846,7 @@ function TrendHistoryChart({ trends, latestTrends, ticker, marketPrices, range90
/> />
)} )}
<Tooltip content={TrendTooltip} /> <Tooltip content={TrendTooltip} />
<Legend wrapperStyle={{ color: '#94a3b8', fontSize: 12 }} /> <Legend verticalAlign="bottom" wrapperStyle={{ color: '#94a3b8', fontSize: 12, paddingTop: 24 }} />
{hasPrice && range90d.high != null && ( {hasPrice && range90d.high != null && (
<ReferenceLine <ReferenceLine
yAxisId="right" yAxisId="right"