Fix TS errors: vite/client types + recharts Tooltip formatter signature
This commit is contained in:
parent
2e0592eb90
commit
32318aa63f
4 changed files with 5 additions and 4 deletions
|
|
@ -206,7 +206,7 @@ export default function Monthly() {
|
|||
<BarChart data={weeks} margin={{ top: 4, right: 16, left: 16, bottom: 0 }}>
|
||||
<XAxis dataKey="label" tick={{ fontSize: 12 }} />
|
||||
<YAxis tickFormatter={v => `£${Math.round(v / 1000)}k`} tick={{ fontSize: 11 }} width={55} />
|
||||
<Tooltip formatter={(v: number) => fmtMoney(v)} />
|
||||
<Tooltip formatter={(v: unknown) => fmtMoney(Number(v))} />
|
||||
<Legend />
|
||||
{deptSummary.map(dep => (
|
||||
<Bar key={dep.department_id} dataKey={dep.department_name} stackId="a" fill={dep.color}>
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export default function Rolling12Months() {
|
|||
<BarChart data={chartData} margin={{ top: 4, right: 16, left: 16, bottom: 0 }}>
|
||||
<XAxis dataKey="label" tick={{ fontSize: 10 }} />
|
||||
<YAxis tickFormatter={v => `£${Math.round(v / 1000)}k`} tick={{ fontSize: 11 }} width={55} />
|
||||
<Tooltip formatter={(v: number) => fmtMoney(v)} />
|
||||
<Tooltip formatter={(v: unknown) => fmtMoney(Number(v))} />
|
||||
<Legend />
|
||||
{deptCols.map(dep => (
|
||||
<Bar key={dep.id} dataKey={dep.name} stackId="a" fill={dep.color} />
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export default function Rolling12Weeks() {
|
|||
<BarChart data={chartData} margin={{ top: 4, right: 16, left: 16, bottom: 0 }}>
|
||||
<XAxis dataKey="label" tick={{ fontSize: 10 }} />
|
||||
<YAxis tickFormatter={v => `£${Math.round(v / 1000)}k`} tick={{ fontSize: 11 }} width={55} />
|
||||
<Tooltip formatter={(v: number) => fmtMoney(v)} />
|
||||
<Tooltip formatter={(v: unknown) => fmtMoney(Number(v))} />
|
||||
<Legend />
|
||||
{deptCols.map(dep => (
|
||||
<Bar key={dep.id} dataKey={dep.name} stackId="a" fill={dep.color} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue