Fan chart
A forecast with nested uncertainty intervals that widen with the horizon.
Actuals solid, forecast dashed from the last actual, plan line and uncertainty band.
<ActualVsForecastChart />Actual vs forecast 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 actual-vs-forecast-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 an x key, an actual key (null in the future), a forecast key, and optional plan and band keys.
[{ month: "Aug", actual: 2.31e6, forecast: null, plan: 2.23e6 }, { month: "Sep", actual: null, forecast: 2.40e6, plan: 2.29e6 }]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 ActualVsForecastChartProps extends FrameProps {
data: Row[];
x: string;
/** Key of actual values (null in future periods). */
actual: string;
/** Key of forecast values (null in past periods, or overlapping the last actual). */
forecast?: string;
/** Optional plan / budget / target line. */
plan?: string;
/** Uncertainty bands around the forecast, widest first. */
bands?: ForecastBand[];
format?: FormatInput;
/** Include zero on the y axis. Default true. */
zero?: boolean;
actualLabel?: string;
forecastLabel?: string;
planLabel?: string;
/** Print the end-of-horizon forecast and its gap to plan. Default true. */
endCallout?: boolean;
}A forecast with nested uncertainty intervals that widen with the horizon.
Cumulative month-to-date actual against plan with a run-rate projection.
Trends over time for one to four series, with gaps for missing data and marked forecasts.