feat: migrate agent charts to ThemedChart + Recharts
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / docker (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / deploy-feature (push) Has been cancelled
CI / build (push) Has been cancelled

Replace custom LineChart/AreaChart/BarChart usage with ThemedChart
wrapper. Data format changed from ChartSeries[] to Recharts-native
flat objects. Uses DS v0.1.47.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-12 19:44:55 +02:00
parent a0af53f8f5
commit 0dae1f1cc7
6 changed files with 238 additions and 267 deletions

View File

@@ -8,9 +8,12 @@ import {
DataTable,
EmptyState,
Tabs,
AreaChart,
LineChart,
BarChart,
ThemedChart,
Area,
Line,
Bar,
ReferenceLine,
CHART_COLORS,
RouteFlow,
Spinner,
MonoText,
@@ -752,44 +755,31 @@ export default function RouteDetail() {
<div className={styles.chartGrid} style={{ marginTop: 16 }}>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Throughput</div>
<AreaChart
series={[{
label: 'Throughput',
data: chartData.map((d, i) => ({ x: i, y: d.throughput })),
}]}
height={200}
/>
<ThemedChart data={chartData} height={200} xDataKey="time" yLabel="msg/s">
<Area dataKey="throughput" name="Throughput" stroke={CHART_COLORS[0]}
fill={CHART_COLORS[0]} fillOpacity={0.1} strokeWidth={2} dot={false} />
</ThemedChart>
</div>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Latency</div>
<LineChart
series={[{
label: 'Latency',
data: chartData.map((d, i) => ({ x: i, y: d.latency })),
}]}
height={200}
threshold={{ value: 300, label: 'SLA 300ms' }}
/>
<ThemedChart data={chartData} height={200} xDataKey="time" yLabel="ms">
<Line dataKey="latency" name="Latency" stroke={CHART_COLORS[0]} strokeWidth={2} dot={false} />
<ReferenceLine y={300} stroke="var(--error)" strokeDasharray="5 3"
label={{ value: 'SLA 300ms', position: 'right', fill: 'var(--error)', fontSize: 9 }} />
</ThemedChart>
</div>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Errors</div>
<BarChart
series={[{
label: 'Errors',
data: chartData.map((d) => ({ x: d.time, y: d.errors })),
}]}
height={200}
/>
<ThemedChart data={chartData} height={200} xDataKey="time" yLabel="errors">
<Bar dataKey="errors" name="Errors" fill={CHART_COLORS[1]} />
</ThemedChart>
</div>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Success Rate</div>
<AreaChart
series={[{
label: 'Success Rate',
data: chartData.map((d, i) => ({ x: i, y: d.successRate })),
}]}
height={200}
/>
<ThemedChart data={chartData} height={200} xDataKey="time" yLabel="%">
<Area dataKey="successRate" name="Success Rate" stroke={CHART_COLORS[0]}
fill={CHART_COLORS[0]} fillOpacity={0.1} strokeWidth={2} dot={false} />
</ThemedChart>
</div>
</div>
)}