Fix date labels in Barchart component

This commit is contained in:
THIS ONE IS A LITTLE BIT TRICKY KRUB 2023-11-20 21:33:58 +07:00
parent 78c8e3da2e
commit 8fbb84c285
2 changed files with 10 additions and 35 deletions

View File

@ -16,55 +16,31 @@ const chartdata3 = [
"Last Week": 71,
},
{
date: "Mar 23",
date: "Wednesday",
"2022": 48,
"2023": 80,
},
{
date: "Apr 23",
date: "Thursday",
"2022": 61,
"2023": 65,
},
{
date: "May 23",
date: "Friday",
"2022": 55,
"2023": 58,
},
{
date: "Jun 23",
date: "Saturday",
"2022": 67,
"2023": 62,
},
{
date: "Jul 23",
date: "Sunday",
"2022": 60,
"2023": 54,
},
{
date: "Aug 23",
"2022": 72,
"2023": 49,
},
{
date: "Sep 23",
"2022": 65,
"2023": 52,
},
{
date: "Oct 23",
"2022": 68,
"2023": null,
},
{
date: "Nov 23",
"2022": 74,
"2023": null,
},
{
date: "Dec 23",
"2022": 71,
"2023": null,
},
];
export const BarChartGraph = () => {
@ -76,7 +52,7 @@ export const BarChartGraph = () => {
className="mt-6"
data={chartdata3}
index="date"
categories={["This Week", "Last week"]}
categories={["This Week", "Last Week"]}
colors={["neutral", "indigo"]}
yAxisWidth={30}
onValueChange={(v) => setValue(v)}

View File

@ -43,7 +43,9 @@ export default function Dashboard() {
<br />
<KpiCard />
</Card>
{/* Placeholder to set height */}
<Card>
<BarChartGraph />
</Card>
<div className="h-31">
<Card className="mx-auto h-full">
<Title>Tasks</Title>
@ -57,9 +59,6 @@ export default function Dashboard() {
</Card>
</div>
<Card>
<BarChartGraph />
</Card>
</Grid>
</TabPanel>
</TabPanels>