This commit is contained in:
2025-12-29 22:43:56 +01:00
parent 2431da62f6
commit 903584f936

View File

@@ -538,12 +538,9 @@ export default function App() {
{cards.map((card) => {
const Icon = card.icon;
const bar_data = [
{
name: "Amounts",
Invoiced: card.amountInvoiced,
"30 days": card.amount30Days,
"60 days": card.amount60Days,
},
{ label: "Invoiced", invoiced: card.amountInvoiced },
{ label: "30 days", pay30: card.amount30Days },
{ label: "60 days", pay60: card.amount60Days },
];
return (
@@ -561,46 +558,17 @@ export default function App() {
<div className="w-full h-1 bg-gray-200 dark:bg-gray-600 mb-4"></div>
<BarChart
data={bar_data}
index="name"
categories={["Invoiced", "30 days", "60 days"]}
colors={["teal-400", "slate", "blue-400"]}
data={data}
index="label"
categories={["invoiced", "pay30", "pay60"]}
colors={["teal", "blue", "slate"]}
className="h-28"
showLegend={false}
showYAxis={false}
showGridLines={false}
barRadius={6}
customXAxisTick={(payload) => (
<text
x={payload.x}
y={payload.y + 14}
textAnchor="middle"
className="fill-gray-500 text-[10px]"
>
{payload.value}
</text>
)}
barRadius={9}
/>
{/* <BarChart
data={[
{
name: "Amounts",
invoiced: card.amountInvoiced,
pay30: card.amount30Days,
pay60: card.amount60Days,
},
]}
index="name"
categories={["invoiced", "pay30", "pay60"]}
colors={["teal", "blue", "slate"]}
className="h-24"
showXAxis={false}
showYAxis={false}
showGridLines={false}
showLegend={false}
/> */}
<button onClick={card.action} className="mt-4 text-xs text-teal-600 underline">
View details
</button>