🐛 Corrige l'affichage du graphique de visites (#1023)

pull/1024/head
Elodie Quandalle 2020-05-06 17:06:43 +02:00 committed by GitHub
parent ded582e80c
commit f76f4c6049
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -339,18 +339,16 @@ function LineChartVisits({ periodicity }: LineChartVisitsProps) {
/>
) : null}
<Tooltip content={<CustomTooltip periodicity={periodicity} />} />
{weekEndDays.map(days =>
days.length === 2 ? (
{weekEndDays
.filter(days => days.length === 2)
.map(days => (
<ReferenceArea
key={days[0]}
x1={days[0]}
x2={days[1]}
strokeOpacity={0.3}
/>
) : (
<ReferenceArea key={days[0]} x1={days[0]} strokeOpacity={0.3} />
)
)}
))}
<Line
type="monotone"
dataKey="visiteurs"