nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Area chart — linear variant.
View the full component source code below.
"use client"
import { Area, AreaChart, CartesianGrid, XAxis } from "recharts"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import {
ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart"
const DEFAULT_DATA = [
{ month: "Jan", revenue: 186 },
{ month: "Feb", revenue: 305 },
{ month: "Mar", revenue: 237 },
{ month: "Apr", revenue: 173 },
{ month: "May", revenue: 409 },
{ month: "Jun", revenue: 214 },
]
const config = {
revenue: { label: "Revenue", color: "var(--color-tanzanite, #B388FF)" },
} satisfies ChartConfig
export function ChartAreaLinear({ loading = false }: { loading?: boolean } = {}) {
return (
<Card role="figure" data-slot="chart-block" data-portal="https://design.nyuchi.com/components/chart-block" aria-label="Area chart">
<CardHeader>
<CardTitle>Area Chart - Linear</CardTitle>
<CardDescription>Linear interpolation</CardDescription>
</CardHeader>
<CardContent>
<ChartContainer config={config} loading={loading}>
<AreaChart data={DEFAULT_DATA} margin={{ left: 12, right: 12 }}>
<CartesianGrid vertical={false} />
<XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
<ChartTooltip content={<ChartTooltipContent />} />
<Area
type="linear"
dataKey="revenue"
fill="var(--color-revenue)"
fillOpacity={0.4}
stroke="var(--color-revenue)"
/>
</AreaChart>
</ChartContainer>
</CardContent>
</Card>
)
}
npx shadcn@latest add https://mzizi.dev/api/v1/ui/chart-area-linearFetch this component's metadata and source code from the registry API.
/api/v1/ui/chart-area-linearcomponents/blocks/charts/chart-area-linear.tsx