8-bit Chart Area Step
8bitcn/chart-area-stepFreeBlock
A simple 8-bit chart area step component
Install it
npx shadcn@latest add https://www.8bitcn.com/r/chart-area-step.jsonSource
1"use client";23import { Activity } from "lucide-react";4import { Area, AreaChart, CartesianGrid, XAxis } from "recharts";56import {7 type ChartConfig,8 ChartContainer,9 ChartTooltip,10 ChartTooltipContent,11} from "@/components/ui/8bit/chart";1213export const description = "A step area chart";1415const chartData = [16 { month: "January", desktop: 99 },17 { month: "February", desktop: 204 },18 { month: "March", desktop: 180 },19 { month: "April", desktop: 120 },20 { month: "May", desktop: 180 },21 { month: "June", desktop: 42 },22];2324const chartConfig = {25 desktop: {26 label: "Desktop",27 color: "var(--chart-1)",28 icon: Activity,29 },30} satisfies ChartConfig;3132export default function ChartAreaStep() {33 return (34 <ChartContainer config={chartConfig}>35 <AreaChart36 data={chartData}37 margin={{38 left: 20,39 right: 20,40 }}41 >42 <CartesianGrid vertical={false} />43 <XAxis44 dataKey="month"45 tickLine={false}46 axisLine={false}47 tickMargin={8}48 tickFormatter={(value) => value.slice(0, 3)}49 />50 <ChartTooltip51 cursor={false}52 content={<ChartTooltipContent hideLabel />}53 />54 <Area55 dataKey="desktop"56 type="step"57 fill="var(--color-desktop)"58 stroke="var(--color-desktop)"59 activeDot={{60 fill: "var(--chart-active-dot)",61 }}62 />63 </AreaChart>64 </ChartContainer>65 );66}
What it pulls in
Other registry items
Files it writes
More from 8bitcn
All 121 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 8-bit Advanced 1advanced1 | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Advanced 2advanced2 | 8bitcn | Blocks | Free | no deps · 5 files | |
| 8-bit Advanced 3advanced3 | 8bitcn | Blocks | Free | no deps · 6 files | |
| 8-bit Audio Settingsaudio-settings | 8bitcn | Blocks | Free | 2 deps · 7 files | |
| 8-bit Chapter Introchapter-intro | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Character Sheetcharacter-sheet | 8bitcn | Blocks | Free | no deps · 9 files | |
| 8-bit Chartchart | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Chart Barchart-bar | 8bitcn | Blocks | Free | no deps · 3 files |
