"use client" import { TrendingUp } from "lucide-react" import { Bar, BarChart, CartesianGrid, Cell, LabelList } from "recharts" import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "@/registry/new-york-v4/ui/card" import { ChartContainer, ChartTooltip, ChartTooltipContent, type ChartConfig, } from "@/registry/new-york-v4/ui/chart" export const description = "A bar chart with negative values" const chartData = [ { month: "January", visitors: 186 }, { month: "February", visitors: 205 }, { month: "March", visitors: -207 }, { month: "April", visitors: 173 }, { month: "May", visitors: -209 }, { month: "June", visitors: 214 }, ] const chartConfig = { visitors: { label: "Visitors", }, } satisfies ChartConfig export function ChartBarNegative() { return ( Bar Chart - Negative January - June 2024 } /> {chartData.map((item) => ( 0 ? "var(--chart-1)" : "var(--chart-2)"} /> ))}
Trending up by 5.2% this month
Showing total visitors for the last 6 months
) }