Ready for release soon.

This commit is contained in:
charlesgauthereau
2025-07-16 20:34:28 +02:00
parent 5e704ec18a
commit 7abdcd57f9
6 changed files with 18 additions and 13 deletions
@@ -33,6 +33,8 @@ export function EvolutionLineChart(props: evolutionLineChartProps) {
[] as { date: string; count: number }[]
);
console.log(cumulativeData);
const chartConfig = {
date: {
label: "Date",
@@ -48,7 +50,7 @@ export function EvolutionLineChart(props: evolutionLineChartProps) {
<ChartContainer config={chartConfig}>
<LineChart
accessibilityLayer
data={data}
data={cumulativeData}
margin={{
left: 12,
right: 12,
@@ -60,7 +62,9 @@ export function EvolutionLineChart(props: evolutionLineChartProps) {
tickLine={false}
axisLine={false}
tickMargin={8}
tickFormatter={(value) => humanReadableDate(new Date(value)).split(" ")[0]}
tickFormatter={(value) => {
return humanReadableDate(new Date(value)).split(" ")[0]
}}
/>
<YAxis />
<ChartTooltip cursor={false} content={<ChartTooltipContent hideLabel />} />
@@ -37,8 +37,8 @@ export function PercentageLineChart(props: percentageLineChartProps) {
acc[date] = { success: 0, failed: 0, total: 0 };
}
acc[date][status === "success" ? "success" : "failed"] += backup._count.id;
acc[date].total += backup._count.id;
acc[date][status === "success" ? "success" : "failed"] += backup._count;
acc[date].total += backup._count;
return acc;
},