- 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
Intervals and Financial Charts
Interval charts answer where a span begins and ends. The endpoints may represent time, uncertainty, a daily trading range, or a percentile envelope. Model those meanings explicitly with x1 and x2 or y1 and y2; do not force intervals through a point-value channel.
Choose the comparison#
| Reader question | Start with |
|---|---|
| How did each trading day move from open to close? | Horizontal price interval |
| How uncertain is each point estimate? | Point plus low-high error bar |
| What were open, high, low, and close for each period? | Candlestick |
| How does a percentile range evolve over time? | Quantile ribbon plus median line |
| How do explicit lower and upper measurements change together? | Range area in Lines and Areas |
The definition may receive endpoint fields directly or derive them from typed reducer outputs. In either form, endpoint units must match the scale. Data and Channels defines these interval channel shapes.
Compare open-to-close spans#
This view maps each AAPL trading date to a categorical lane and its Open and Close fields to a horizontal rectangle. Color distinguishes gains from losses, while the endpoints carry the price movement directly.
Keep trading dates stable and lane order explicit. Date labels rely on automatic guide measurement; verify them at the smallest supported width with Responsive Charts.
Preserve uncertainty bounds#
An error bar combines a point estimate, a low-high link, and endpoint ticks. The chart renders the supplied interval; it does not decide whether the bounds are standard deviation, standard error, a confidence interval, or a credible interval.
import { defineChart, dot, link, tickY } from '@tanstack/charts'
import { scaleBand } from '@tanstack/charts/scales/band'
import { scaleLinear } from '@tanstack/charts/scales/linear'
import { estimates } from './data'
export default defineChart({
marks: [
link(estimates, {
x1: 'treatment',
y1: 'low',
x2: 'treatment',
y2: 'high',
stroke: '#2563eb',
strokeWidth: 1.5,
}),
tickY(estimates, {
x: 'treatment',
y: 'low',
stroke: '#2563eb',
strokeWidth: 1.5,
}),
tickY(estimates, {
x: 'treatment',
y: 'high',
stroke: '#2563eb',
strokeWidth: 1.5,
}),
dot(estimates, {
x: 'treatment',
y: 'estimate',
key: 'treatment',
fill: '#2563eb',
r: 4,
}),
],
scales: {
x: { scale: () => scaleBand<string>().padding(0.3) },
y: {
scale: scaleLinear,
grid: true,
axis: { label: 'Mean response (95% confidence interval)' },
},
},
})Support files
export const estimates = [
{ treatment: 'Control', estimate: 42, low: 36, high: 48 },
{ treatment: 'Low dose', estimate: 51, low: 45, high: 57 },
{ treatment: 'High dose', estimate: 63, low: 56, high: 70 },
]Name the interval in the chart description or surrounding prose. Compose the link, caps, and point as separate layers using the Rules, Links, Arrows, Vectors, and Ticks reference and Dot and Hexagon Marks.
The full catalog example starts with contributing observations, groups them once with groupBy, and derives the interval from typed mean and sample-deviation outputs. The estimator and singleton policy remain authored chart meaning; no dedicated error-bar mark is required.
Encode open, high, low, and close#
A candlestick uses a high-low wick and an open-close body. Directional color is secondary to the body endpoints and should not be the only way to distinguish an increasing period from a decreasing one.
Use one row per period with all four values. Render the wick as a link and the body as a ranged rectangle; preserve missing trading periods on the temporal domain instead of silently inventing observations.
Show an interval over time#
A quantile ribbon combines a prepared lower percentile, median, and upper percentile for each time group. It shows how both location and spread evolve.
Use groupBy with quantile reducers to preserve each time group's source rows, then give the ribbon and median their own marks. Transforms and Reactivity defines the aggregation boundary; Line and Area Marks defines the range-area channels.
Production checks#
- State what each endpoint means and whether the interval is inclusive.
- Use timezones and calendar boundaries intentionally for temporal spans.
- Keep interval semantics in data fields rather than inferring them from color or row order.
- Preserve exact values through a tooltip, table, or textual summary. See Tooltips and Focus.
- Use semantic controls and application state when intervals become editable; see Interactions and Selections.
- Verify essential distinctions without color in Accessibility.
Rectangle channel details are in Bar and Rect Marks.