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 }}>
|
<BarChart data={weeks} margin={{ top: 4, right: 16, left: 16, bottom: 0 }}>
|
||||||
<XAxis dataKey="label" tick={{ fontSize: 12 }} />
|
<XAxis dataKey="label" tick={{ fontSize: 12 }} />
|
||||||
<YAxis tickFormatter={v => `£${Math.round(v / 1000)}k`} tick={{ fontSize: 11 }} width={55} />
|
<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 />
|
<Legend />
|
||||||
{deptSummary.map(dep => (
|
{deptSummary.map(dep => (
|
||||||
<Bar key={dep.department_id} dataKey={dep.department_name} stackId="a" fill={dep.color}>
|
<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 }}>
|
<BarChart data={chartData} margin={{ top: 4, right: 16, left: 16, bottom: 0 }}>
|
||||||
<XAxis dataKey="label" tick={{ fontSize: 10 }} />
|
<XAxis dataKey="label" tick={{ fontSize: 10 }} />
|
||||||
<YAxis tickFormatter={v => `£${Math.round(v / 1000)}k`} tick={{ fontSize: 11 }} width={55} />
|
<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 />
|
<Legend />
|
||||||
{deptCols.map(dep => (
|
{deptCols.map(dep => (
|
||||||
<Bar key={dep.id} dataKey={dep.name} stackId="a" fill={dep.color} />
|
<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 }}>
|
<BarChart data={chartData} margin={{ top: 4, right: 16, left: 16, bottom: 0 }}>
|
||||||
<XAxis dataKey="label" tick={{ fontSize: 10 }} />
|
<XAxis dataKey="label" tick={{ fontSize: 10 }} />
|
||||||
<YAxis tickFormatter={v => `£${Math.round(v / 1000)}k`} tick={{ fontSize: 11 }} width={55} />
|
<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 />
|
<Legend />
|
||||||
{deptCols.map(dep => (
|
{deptCols.map(dep => (
|
||||||
<Bar key={dep.id} dataKey={dep.name} stackId="a" fill={dep.color} />
|
<Bar key={dep.id} dataKey={dep.name} stackId="a" fill={dep.color} />
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": false,
|
"noUnusedLocals": false,
|
||||||
"noUnusedParameters": false
|
"noUnusedParameters": false,
|
||||||
|
"types": ["vite/client"]
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue