feat: show monthly new users

This commit is contained in:
Mythie
2023-11-05 12:48:05 +11:00
parent f9a0ec99dc
commit 9edf88692c
8 changed files with 125 additions and 14 deletions

View File

@ -40,9 +40,9 @@ export const BarMetric = <T extends Record<string, Record<keyof T[string], unkno
<span>{extraInfo}</span>
</div>
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border pr-2 shadow-sm hover:shadow">
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border p-6 pl-2 pt-12 shadow-sm hover:shadow">
<ResponsiveContainer width="100%" height={chartHeight}>
<BarChart data={formattedData} margin={{ top: 30, right: 20 }}>
<BarChart data={formattedData}>
<XAxis dataKey="month" />
<YAxis />
<Tooltip
@ -55,7 +55,13 @@ export const BarMetric = <T extends Record<string, Record<keyof T[string], unkno
formatter={(value) => [Number(value), label]}
cursor={{ fill: 'hsl(var(--primary) / 10%)' }}
/>
<Bar dataKey={metricKey as string} fill="hsl(var(--primary))" label={label} />{' '}
<Bar
dataKey={metricKey as string}
maxBarSize={60}
fill="hsl(var(--primary))"
label={label}
radius={[4, 4, 0, 0]}
/>
</BarChart>
</ResponsiveContainer>
</div>