fix(dsfr): graphique d'évolution en barres empilées + confirmation de déconnexion (web)

- évolution : courbes monotone (vagues sinusoïdales illisibles) remplacées par
  un histogramme empilé par émotion, bien plus lisible
- ajoute une confirmation avant déconnexion dans l'en-tête web

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Azmog
2026-06-19 00:49:35 +02:00
parent 43a149381f
commit 4432bf5c21
2 changed files with 27 additions and 13 deletions
@@ -12,8 +12,6 @@ import {
PieChart,
Pie,
Cell,
LineChart,
Line,
Legend,
} from 'recharts';
import type { ValueType, NameType } from 'recharts/types/component/DefaultTooltipContent';
@@ -90,10 +88,10 @@ export default function EmotionChart({ data, type = 'repartition' }: EmotionChar
return (
<div style={{ width: '100%', height: '20rem' }}>
<ResponsiveContainer width="100%" height={320}>
<LineChart data={lineData}>
<BarChart data={lineData}>
<CartesianGrid strokeDasharray="3 3" style={{ opacity: 0.3 }} />
<XAxis dataKey="date" tick={{ fontSize: 12 }} />
<YAxis tick={{ fontSize: 12 }} />
<YAxis tick={{ fontSize: 12 }} allowDecimals={false} />
<Tooltip
contentStyle={{
backgroundColor: 'rgba(255,255,255,0.95)',
@@ -104,17 +102,14 @@ export default function EmotionChart({ data, type = 'repartition' }: EmotionChar
/>
<Legend />
{data.evolution.emotions.map((emotion) => (
<Line
<Bar
key={emotion.nom}
type="monotone"
dataKey={emotion.nom}
stroke={emotion.couleur}
strokeWidth={2}
dot={{ fill: emotion.couleur, r: 4 }}
activeDot={{ r: 6 }}
stackId="emotions"
fill={emotion.couleur}
/>
))}
</LineChart>
</BarChart>
</ResponsiveContainer>
</div>
);