Off The Charts
Quarterly bars climb until the last one breaks its axis and overshoots the target at 260%. A free, MIT-licensed Remotion number animation.
In Remotion, Off The Charts animates quarterly bars where the last bar overshoots the target line: the bars climb, then the final one breaks through the top of its axis and lands at a figure such as 260% of plan.
$ pnpm dlx shadcn@latest add @remocn/off-the-chartsHow to animate a bar that breaks the axis and overshoots the target in Remotion
Quarterly bars where the last one breaks through its axis and overshoots a target line is one component. You don't need to tune spring() overshoot, clamp an interpolate() or draw the axis with @remotion/shapes and @remotion/paths. Install it and pass the quarters:
npx shadcn@latest add @remocn/off-the-chartsdatais the bars in order, each{ label, value }.targetplaces the dashed target line (default 100) andmaxis the value at the top of the framed axis (default 150).- The accent bar is the last one unless you set
accentIndex. It presses against the top of the axis and breaks out only when its value is abovemax; at or belowmaxit simply grows to its value inside the frame. - The hero figure defaults to the accent bar's value plus
unit(for example260%);valueoverrides the text andcaptionsits under it.
When every bar fits comfortably on one axis use Spring Bars.
Good to know
- Length: 107 frames of motion at 30 fps (214 at 60 fps) with the default props. That is the minimum for its
Sequence; add your own hold on top. The Usage example below is a 60 fps composition with a hold, so itsdurationInFrames(280) is longer than twice the motion. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project; nothing else is needed at runtime. - Font: loads Bricolage Grotesque itself through
@remotion/google-fonts, so the default needs no setup. PassfontFamilyto use your own face, and load that font in your project.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { OffTheCharts } from "@/components/remocn/off-the-charts";
const OffTheChartsScene = () => (
<OffTheCharts
target={100}
caption="of the Q4 target"
data={[
{ label: "Q1", value: 58 },
{ label: "Q2", value: 74 },
{ label: "Q3", value: 86 },
{ label: "Q4", value: 260 },
]}
/>
);
export const RemotionRoot = () => (
<Composition
id="OffTheCharts"
component={OffTheChartsScene}
durationInFrames={280}
fps={60}
width={1280}
height={720}
/>
);Quarterly bars climb against a dashed target line inside a framed axis; the last bar presses against the ceiling, snaps through it, and the overshoot value slams in with its caption. Pass data, target, and max (the axis ceiling), with unit, value and caption for the text. Ships dark and light via theme.
Props19
| Prop | Type | Default |
|---|---|---|
| data | OffTheChartsDatum[]DEFAULT_DATA Bars to plot, in order, with a label and value each. | |
| accentIndex | number— Index of the bar that breaks out; defaults to the last. | |
| target | number100 Value where the dashed target line sits. | |
| max | number150 Value at the top of the framed axis. | |
| unit | string"%" Unit appended to values. | |
| targetLabel | string"Target" Label on the target line. | |
| value | string— Hero text; defaults to the accent bar value plus unit. | |
| caption | string"of the Q4 target" Line under the hero value. | |
| push | number26 Frames the highlighted bar climbs and presses on the frame before it breaks through. | |
| radius | number4 Corner radius of the bars, in pixels at 720p. | |
| accent | string"#3B5BFD" Accent color for the hero element. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Bricolage Grotesque" Typeface for the copy. The default loads itself; load any other font in your project first. | |
| grain | booleantrue Film grain over the scene. | |
| scale | number1 Size of the foreground around the frame's center; the background stays put. | |
| delay | number0 Frames to hold the first frame before anything moves. | |
| speed | number1 Playback multiplier. | |
| theme | "dark" | "light""dark" Dark or light palette. | |
- dataOffTheChartsDatum[]
Bars to plot, in order, with a label and value each.
Default
DEFAULT_DATA - accentIndexnumber
Index of the bar that breaks out; defaults to the last.
- targetnumber
Value where the dashed target line sits.
Default
100 - maxnumber
Value at the top of the framed axis.
Default
150 - unitstring
Unit appended to values.
Default
"%" - targetLabelstring
Label on the target line.
Default
"Target" - valuestring
Hero text; defaults to the accent bar value plus unit.
- captionstring
Line under the hero value.
Default
"of the Q4 target" - pushnumber
Frames the highlighted bar climbs and presses on the frame before it breaks through.
Default
26 - radiusnumber
Corner radius of the bars, in pixels at 720p.
Default
4 - accentstring
Accent color for the hero element.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. The default loads itself; load any other font in your project first.
Default
"Bricolage Grotesque" - grainboolean
Film grain over the scene.
Default
true - scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback multiplier.
Default
1 - theme"dark" | "light"
Dark or light palette.
Default
"dark"