feat: add static chart

This commit is contained in:
Wikzyy
2025-02-20 21:53:17 +07:00
parent 5b8ba07391
commit 276240fb32
3 changed files with 194 additions and 3 deletions

View File

@ -14,6 +14,8 @@ import { useFetchCardData, useFetchChartData } from './hooks';
import { Button } from '@/components/ui/button';
import { useFetchYear } from './hooks/useFetchYear';
import { get5LastYear } from '@/utils/Date';
import { staticChartData } from './staticChart';
// sum -> nominal, count-> total
type CountType = 'sum' | 'count';
type ChartType = 'line' | 'bar';
@ -184,9 +186,9 @@ const DashboardHomePage = () => {
<div className="lg:col-span-1">
<Chart
title="Overview"
count={count}
count={12}
toolbar={toolbar}
chartData={chartData}
chartData={staticChartData.series.map((data: any) => data.data)}
chartType={chartType}
chartLegend={chartLegend}
/>