- Overview
- shadcn/ui Charts
- Lines and Areas
- Bars and Rankings
- Scatterplots and Relationships
- Distributions
- Heatmaps and Densities
- Intervals and Financial Charts
- Stacked and Composed Charts
- Facets and Multiple Views
- Networks and Hierarchies
- Maps and Spatial Charts
- Polar and Radar Charts
- Annotations and Overlays
- Interactive Charts
- Themes and Motion
Individual Charts
- Apple stock line with seasonal gaps
- Industry unemployment with end labels
- San Francisco temperature range band
- Industry unemployment stacked area
- Sorted vertical bars
- Horizontal ranking with long labels
- Grouped bars
- Stacked bars
- Bubble scatterplot
- Histogram
- Labeled ordinal heatmap
- Anscombe quartet small multiples
- Open-to-close price intervals
- Point estimates with error bars
- Grouped boxplot
- Ranked lollipop chart
- Dumbbell comparison
- Cumulative histogram
- San Francisco temperature moving averages
- Industry share of unemployment
- Streamgraph
- Bollinger band
- Quantitative binned heatmap
- Precipitation calendar heatmap
- Diverging Likert responses
- Parallel coordinates
- Candlestick chart
- Annual gasoline-price waterfall
- Two-period slopegraph
- Scatterplot with linear regression
- Metro inequality change arrows
- Apple close versus moving average
- Pointer-selected tooltip
- Grouped X tooltip
- Tidy hierarchy tree
- Delaunay spatial network
- Filled wind-speed contours
- Point density contours
- Westport House floor plan
- Les Misérables character network
- English letter frequency waffle
- Two-dimensional vector field
- Hexagonally binned density
- Framed guide-free scatterplot
- Empirical cumulative distribution
- Faceted distributions
- Beeswarm distribution
- Log-scale Flare class sizes
- Industry unemployment bump chart
- Indexed industry unemployment
- Directed connected scatterplot
- Scatterplot with marginal histograms
- Annotated AAPL extrema
- Mean penguin mass reducer bars
- AAPL lag-one autocorrelation
- Industry unemployment percentile ribbon
- Ridgeline density comparison
- Violin distribution comparison
- Marimekko survey composition
- Voronoi nearest-point interaction
- Seattle weather with three y axes
- Palmer penguins by species and sex
- Stacked and adjacent Seattle weather bars
- Automobile specifications scatter
- Flare analytics treemap
- Simple radar chart
- English letter frequency pie
- English letter frequency donut
- Survey agreement share gauge
- Snapped axis pointer with grouped tooltip
- Interactive series legend
- Linked chart and data table selection
- Focus and context time window
- Expanding pinned energy tooltip
- Scrollable resource timeline lanes
- Streaming window preservation
- Synchronized cursors across views
- Free cursor over car measurements
- Observed monthly AAPL brush selection
- Wheel zoom and pan over AAPL closes
- AAPL close playback scrubber
- Editable event range
- Letter frequency pie with labels
- Letter frequency donut with total
- Rounded letter frequency donut
- Nested Flare package sizes
- English letter frequency rose
- County unemployment gauge
- Comparative radar chart
- Concentric letter frequency bars
- Flare analytics sunburst
- World learning-poverty choropleth
- World population bubble map
- Orthographic globe with graticule
- HMS Beagle voyage
- Seattle daily high-temperature polar line
- Surface wind polar scatter
- World population-density choropleth
- United States county unemployment choropleth
- Standard world projection gallery
- Basic Sankey
- Sankey
- Staggered entrance motion
- Interrupted spring updates
- Spring line updates
- Definition-owned motion
- Cross-chart geometry morph
- Focus and crosshair motion
- Token use calendar heatmap
- Stacked bars with band and rule cursors
- Themed interactive area card
- Active bar dashboard
- Premium KPI sparklines
- Active donut metric
- Theme palette matrix
- Sales conversion funnel
- Drillable Flare sunburst
- shadcn dashboard
- shadcn Bar Chart - Multiple
- shadcn Pie Chart - Donut with Text
- shadcn Radar Chart - Multiple
- shadcn Radial Chart - Text
- shadcn Tooltip - Advanced
- shadcn Area Chart - Axes
- shadcn Area Chart
- shadcn Area Chart - Gradient
- shadcn Area Chart - Icons
- shadcn Area Chart - Interactive
- shadcn Area Chart - Legend
- shadcn Area Chart - Linear
- shadcn Area Chart - Stacked Expanded
- shadcn Area Chart - Stacked
- shadcn Area Chart - Step
- shadcn Bar Chart - Active
- shadcn Bar Chart
- shadcn Bar Chart - Horizontal
- shadcn Bar Chart - Interactive
- shadcn Bar Chart - Custom Label
- shadcn Bar Chart - Label
- shadcn Bar Chart - Mixed
- shadcn Bar Chart - Negative
- shadcn Bar Chart - Stacked + Legend
- shadcn Line Chart
- shadcn Line Chart - Dots Colors
- shadcn Line Chart - Custom Dots
- shadcn Line Chart - Dots
- shadcn Line Chart - Interactive
- shadcn Line Chart - Custom Label
- shadcn Line Chart - Label
- shadcn Line Chart - Linear
- shadcn Line Chart - Multiple
- shadcn Line Chart - Step
- shadcn Pie Chart - Donut Active
- shadcn Pie Chart - Donut
- shadcn Pie Chart - Interactive
- shadcn Pie Chart - Custom Label
- shadcn Pie Chart - Label List
- shadcn Pie Chart - Label
- shadcn Pie Chart - Legend
- shadcn Pie Chart - Separator None
- shadcn Pie Chart
- shadcn Pie Chart - Stacked
- shadcn Radar Chart
- shadcn Radar Chart - Dots
- shadcn Radar Chart - Grid Circle Filled
- shadcn Radar Chart - Grid Circle - No lines
- shadcn Radar Chart - Grid Circle
- shadcn Radar Chart - Grid Custom
- shadcn Radar Chart - Grid Filled
- shadcn Radar Chart - Grid None
- shadcn Radar Chart - Icons
- shadcn Radar Chart - Custom Label
- shadcn Radar Chart - Legend
- shadcn Radar Chart - Lines Only
- shadcn Radar Chart - Radius Axis
- shadcn Radial Chart - Grid
- shadcn Radial Chart - Label
- shadcn Radial Chart - Shape
- shadcn Radial Chart
- shadcn Radial Chart - Stacked
- shadcn Tooltip - Default
- shadcn Tooltip - Formatter
- shadcn Tooltip - Icons
- shadcn Tooltip - Line Indicator
- shadcn Tooltip - No Indicator
- shadcn Tooltip - Custom label
- shadcn Tooltip - Label Formatter
- shadcn Tooltip - No Label
Annotations and Overlays
Annotations explain selected evidence. They should name a threshold, event, endpoint, difference, or unusual observation that matters to the reader.
Treat an annotation as data whenever possible. A prepared row with semantic coordinates survives resizing, scale changes, server rendering, and updates more reliably than a hand-positioned SVG fragment.
Choose the annotation#
| Reader question | Start with |
|---|---|
| How did each category change between two periods? | Slopegraph with direct endpoint labels |
| In which direction did a point move in two dimensions? | Change arrow |
| Where is a target, zero, or policy boundary? | Rule plus concise text |
| Which time span needs explanation? | Explicit interval rectangle or area |
| Which few observations are notable? | Selected dots and text |
| Does the reader need arbitrary HTML or controls? | Application-owned overlay |
Marks and Layering is the source of truth for render order and stable layer identity.
Label before-and-after change#
A slopegraph gives both periods a shared quantitative scale, connects each category's endpoints, and labels the values directly.
Preserve category identity for the links and endpoints; supply key only when the mark cannot infer it. Direct labels remove a legend lookup, but they need collision policy when values converge. Filter to meaningful categories, increase vertical space, or use an accessible detail view rather than allowing unreadable overlap.
A slope implies before-to-after order. Label both periods and keep the same quantitative scale.
Show two-dimensional movement#
A change arrow connects one quantitative state to another. Position carries the start and end values; the arrowhead carries direction.
Keep both endpoints in the prepared row. Do not infer direction from color or row order inside the renderer. Label the compared states and retain original values for focus and tooltips.
Arrow and link endpoint channels are defined in Rules, Links, Arrows, Vectors, and Ticks.
Add thresholds and bands#
Use a rule for a single semantic value:
- Zero
- Target
- Regulatory threshold
- Average or benchmark
- Current time
Use a ranged area or rectangle when the annotation is an interval:
- Acceptable range
- Forecast uncertainty
- Maintenance window
- Selected time span
Name the threshold or band in surrounding text or a sparse text layer. A decorative grid line should not compete with a policy boundary that carries meaning.
Select annotations in data preparation#
Prepare or select a small annotation dataset:
- Select observations by a documented rule such as minimum, maximum, first threshold crossing, or named event.
- Keep the original datum and stable ID when the source row already carries the annotation's semantic coordinates.
- Put presentation-only label formatting, anchors, and x/y offsets on the text mark. Add fields only when they are reusable annotation data.
- Render dots, rules, links, and text as independent marks.
This makes the selection auditable. The chart renderer should not decide which business events are interesting.
Data and Channels covers mixed mark sources and typed accessors.
Use HTML overlays only when necessary#
An application overlay is appropriate for:
- Rich interactive content
- Buttons, links, forms, or menus
- A persistent details panel
- A nested chart
- Product chrome that should not be serialized into SVG
Anchor it from scene.chart or a focused ChartPoint, then keep its state and lifecycle in the application. Do not mutate chart SVG to create a second, unreconciled state model.
See Tooltips and Focus for rich tooltip ownership and Interactive Charts for complete application-controlled examples.
Production checks#
- Every annotation answers a specific reader question.
- Selection rules are prepared and testable.
- Labels include units or period meaning where needed.
- Text collision is verified at the smallest container.
- Offsets remain relative to semantic coordinates after resize.
- Color is not the only distinction between data and annotation.
- Decorative geometry emits no fake interaction points.
- Dynamic layers have stable mark IDs and datum keys.
- Rich overlays are keyboard reachable, contained, and destroyed on unmount.
Text channel and positioning options are in Text, Frame, and Facet.