29.12.25
This commit is contained in:
48
src/App.jsx
48
src/App.jsx
@@ -538,12 +538,9 @@ export default function App() {
|
|||||||
{cards.map((card) => {
|
{cards.map((card) => {
|
||||||
const Icon = card.icon;
|
const Icon = card.icon;
|
||||||
const bar_data = [
|
const bar_data = [
|
||||||
{
|
{ label: "Invoiced", invoiced: card.amountInvoiced },
|
||||||
name: "Amounts",
|
{ label: "30 days", pay30: card.amount30Days },
|
||||||
Invoiced: card.amountInvoiced,
|
{ label: "60 days", pay60: card.amount60Days },
|
||||||
"30 days": card.amount30Days,
|
|
||||||
"60 days": card.amount60Days,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
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>
|
<div className="w-full h-1 bg-gray-200 dark:bg-gray-600 mb-4"></div>
|
||||||
<BarChart
|
<BarChart
|
||||||
data={bar_data}
|
data={data}
|
||||||
index="name"
|
index="label"
|
||||||
categories={["Invoiced", "30 days", "60 days"]}
|
categories={["invoiced", "pay30", "pay60"]}
|
||||||
colors={["teal-400", "slate", "blue-400"]}
|
colors={["teal", "blue", "slate"]}
|
||||||
className="h-28"
|
className="h-28"
|
||||||
showLegend={false}
|
showLegend={false}
|
||||||
showYAxis={false}
|
showYAxis={false}
|
||||||
showGridLines={false}
|
showGridLines={false}
|
||||||
barRadius={6}
|
barRadius={9}
|
||||||
customXAxisTick={(payload) => (
|
|
||||||
<text
|
|
||||||
x={payload.x}
|
|
||||||
y={payload.y + 14}
|
|
||||||
textAnchor="middle"
|
|
||||||
className="fill-gray-500 text-[10px]"
|
|
||||||
>
|
|
||||||
{payload.value}
|
|
||||||
</text>
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <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">
|
<button onClick={card.action} className="mt-4 text-xs text-teal-600 underline">
|
||||||
View details
|
View details
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user