Skip to content

Zoomable Shadcn Chart

A drag-to-zoom line chart built with shadcn charts and Recharts, with its source in one file.

zoom-chart-demo.vercel.app

Zoomable Shadcn Chart website screenshot
Added
GitHub stars
630
License
MIT
Price
Free

About

About Zoomable Shadcn Chart

This repository shows how to make a shadcn/ui chart zoomable. The demo draws a line chart of simulated event data on top of shadcn charts and Recharts. You zoom by clicking and dragging across the area you want, or by scrolling, and a Reset button returns to the full range.

The chart lives in components/chart.tsx, which the site describes as about 280 lines of source. To try it, clone the repository, install dependencies and start the dev server. It is MIT licensed, and fits developers who want to study the zoom logic or lift it into a dashboard that already uses shadcn charts.

Zoomable Shadcn Chart features

5 features

  • Click and drag to zoom into a range
  • Scroll to zoom in and out
  • Reset button to restore the full view
  • Built on shadcn charts and Recharts
  • Chart code in a single component file

Install Zoomable Shadcn Chart

1 command

Terminal

$ git clone git@github.com:shelwinsunga/zoom-chart-demo.git

What you can build with Zoomable Shadcn Chart

3 use cases

  • Letting users inspect a spike in an event timeline
  • Adding zoom to a time-series chart in an analytics dashboard
  • Learning how to extend shadcn charts with custom interaction

Pricing

Ship it with Pro

The directory is free. Pro adds 6,000+ blocks, 14 premium templates and the MCP server, so your AI editor installs them for you.

4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.

  • Secure checkout via Stripe
  • Code lives in your repo
  • Keep what you've shipped if you cancel
  • License terms

FAQ

Frequently asked questions

What Zoomable Shadcn Chart is, how to install it, its license and its alternatives.

4.9 out of 5 from 150+ developers

Found your stack? Ship it.

6,000+ blocks, premium templates and MCP in every Pro plan. The directory stays free.

Get Pro