Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

A bar chart with negative values

A React bar chart displaying positive and negative values with conditional Cell coloring and top labels using shadcn/ui and Recharts

Data isn't always positive—profits and losses, gains and declines, ups and downs. This React bar chart handles negative values by dynamically coloring bars using the Cell component—green for positive, red for negative. Built with shadcn/ui and Recharts, bars extend both above and below the zero baseline with LabelList showing month names on top. The conditional coloring instantly communicates performance without reading numbers. Perfect for financial dashboards, variance reports, year-over-year growth, or any metric that swings between positive and negative.

A bar chart with negative values preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.