Actual vs forecast
Actuals solid, forecast dashed from the last actual, plan line and uncertainty band.
A forecast with nested uncertainty intervals that widen with the horizon.
<FanChart />Fan chart is a Pro chart.
Installation is part of Pro
The full source is included in the Pro download. Get Pro to install it with the CLI and use it in unlimited projects.
Unlock with Pronpx chartslibraryui add fan-chart --from ./chartslibraryui-proUsage examples are part of Pro
Every example on this page comes with its code in the Pro download. The props and data shape below are public.
Unlock with ProRows with actual, forecast and lower/upper keys for one or two intervals.
[{ month: "Mar", actual: null, forecast: 1260, p10: 1190, p90: 1330, p25: 1225, p75: 1295 }]Missing values are null. Invalid values make the chart say what’s wrong instead of drawing a misleading picture. How charts handle bad data
Every chart also accepts the shared frame props: title, subtitle, source, height, mode, toolbar. Common API
export interface FanChartProps extends Omit<ActualVsForecastChartProps, "bands" | "plan"> {
/** Keys of the outer interval (e.g. 10th and 90th percentile). */
outer: { lower: string; upper: string; label?: string };
/** Keys of the inner interval (e.g. 25th and 75th percentile). */
inner?: { lower: string; upper: string; label?: string };
}Actuals solid, forecast dashed from the last actual, plan line and uncertainty band.
Trends over time for one to four series, with gaps for missing data and marked forecasts.