Charcoal UI

Price Fan Chart

A price target chart: the history line draws up to today, then low, average and high analyst targets fan out to the horizon, with a scrubbable readout and the implied upside.

Examples

Price Fan Chart

API reference

PropTypeDefaultDescription
history{ label: string; price: number }[]—
targets{ low: number; mean: number; high: number }—
horizonstring"12-mo target"
format(v: number) => string—

About Price Fan Chart

Price Fan Chart draws the price history up to today, then fans out low, average and high analyst targets to the horizon. A scrubbable readout shows the price at any point and the implied upside.

Price Fan Chart is an animated chart for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.

When to use Price Fan Chart

  • Stock research pages.
  • Forecasts and scenario ranges.
  • Investor presentations.
  • Revenue or metric projections.

How it works

The history line draws in first, then the fan opens on a delay. The fan's gradient uses a unique id, so several charts can share a page, and values are formatted by your function.

Each chart has a text alternative, hover tooltips are mirrored by keyboard focus where data points are interactive, and colour is never the only way a value is shown. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.

Customizing Price Fan Chart

Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.

Style it with className like any other element. It only uses your theme's tokens, so it follows light and dark mode without extra work.

  • history.
  • targets.
  • horizon (string, default "12-mo target").
  • format ((v: number) => string).

Goes well with Price Fan Chart

These charts pieces share its tokens and motion language, so they sit together on one page without clashing.

  • Donut Chart: An animated React donut chart: segments draw in and thicken on hover
  • Activity Heatmap: A React contribution heatmap with four shades, tooltips and keyboard navigation
  • Sparkline: An animated React sparkline with fill, trend colour and a pulsing end dot
  • Line Chart: An animated React line chart with a snapping crosshair and multi-series tooltips
  • Area Chart: An animated React area chart with a comparison series and a target line

Install Price Fan Chart

npx shadcn@latest add @charcoal/price-fan-chart

Price Fan Chart is part of Charcoal UI Pro. One seat unlocks all 393 Pro components, 112 landing-page sections and 100 full templates, for every personal and client project, with updates included. Add the @charcoal registry once with your access token, then the command above copies price-fan-chart.tsx into components/ui and installs clsx, tailwind-merge.

You own the file you install: no runtime package, no lock-in, nothing to keep in sync. Change it however your product needs.

See Charcoal UI Pro pricing · Pro setup

Frequently asked questions

How do I install Price Fan Chart?
Price Fan Chart is part of Charcoal UI Pro. Add the @charcoal registry to components.json with your access token, then run npx shadcn@latest add @charcoal/price-fan-chart. It copies price-fan-chart.tsx into components/ui and installs motion, clsx, tailwind-merge.
Is Price Fan Chart free for commercial use?
Price Fan Chart needs a Charcoal UI Pro seat, monthly or a one-time lifetime price. A seat covers unlimited personal and commercial projects, including client work, and every future Pro component.
Does Price Fan Chart work with Next.js?
Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
Can an AI coding agent install Price Fan Chart?
Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Price Fan Chart's props and get_install_command returns the exact command.

Price Fan Chart as Markdown · llms.txt