diff --git a/mon-entreprise/source/components/charts/PagesCharts.tsx b/mon-entreprise/source/components/charts/PagesCharts.tsx
new file mode 100644
index 000000000..1eae83fa6
--- /dev/null
+++ b/mon-entreprise/source/components/charts/PagesCharts.tsx
@@ -0,0 +1,138 @@
+import { formatValue } from 'publicodes'
+import {
+ Bar,
+ ComposedChart,
+ Legend,
+ ResponsiveContainer,
+ Tooltip,
+ TooltipProps,
+ XAxis,
+ YAxis,
+} from 'recharts'
+
+type Data =
+ | Array<{ date: string; nombre: number }>
+ | Array<{ date: string; nombre: Record }>
+
+type PagesChartProps = {
+ sync?: boolean
+ data: Data
+}
+const Palette = [
+ '#1ea0f5',
+ '#697ad5',
+ '#b453b6',
+ '#ff2d96',
+ '#fd667f',
+ '#fc9e67',
+ '#fad750',
+ '#bed976',
+ '#82da9d',
+ '#46dcc3',
+]
+
+function getColor(i: number): string {
+ return Palette[i % Palette.length]
+}
+
+export default function PagesChart({ data, sync = true }: PagesChartProps) {
+ if (!data.length) {
+ return null
+ }
+
+ const dataKeys = Object.keys(data[0].nombre)
+ const flattenedData = (data as any).map((d: any) => ({ ...d, ...d.nombre }))
+
+ return (
+
+
+
+
+
+
+
+ } />
+
+ {dataKeys.map((k, i) => (
+
+ ))}
+
+
+ )
+}
+
+function formatMonth(date: string | Date) {
+ return new Date(date).toLocaleString('default', {
+ month: 'short',
+ year: '2-digit',
+ })
+}
+
+const CustomTooltip = ({ active, payload }: TooltipProps) => {
+ if (!active || !payload) {
+ return null
+ }
+
+ const data = payload[0].payload
+
+ return (
+
+ {formatMonth(data.date)}
+
+ {payload
+ .map(({ color, value, name }) => (
+
+
+
+ {typeof value === 'number' ? formatValue(value) : value}
+
+
{formatLegend(name)}
+
+
+ ))
+ .reverse()}
+
+ )
+}
+
+const formatLegend = (key: string) =>
+ key.replace('simulateurs / ', '').replace(/_/g, ' ')
diff --git a/mon-entreprise/source/pages/Stats/Stats.tsx b/mon-entreprise/source/pages/Stats/Stats.tsx
index faed49892..2e2cd7091 100644
--- a/mon-entreprise/source/pages/Stats/Stats.tsx
+++ b/mon-entreprise/source/pages/Stats/Stats.tsx
@@ -1,4 +1,5 @@
import classnames from 'classnames'
+import PagesChart from 'Components/charts/PagesCharts'
import Privacy from 'Components/layout/Footer/Privacy'
import MoreInfosOnUs from 'Components/MoreInfosOnUs'
import InfoBulle from 'Components/ui/InfoBulle'
@@ -285,15 +286,8 @@ const StatsDetail = () => {
)}
{chapter2 === '' && period === 'mois' && (
<>
- Principales pages
-
+ Simulateurs principaux
+
>
)}