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.

Installation
$ pnpm dlx shadcn@latest add @remocn/off-the-charts

How 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:

bash
npx shadcn@latest add @remocn/off-the-charts
  • data is the bars in order, each { label, value }. target places the dashed target line (default 100) and max is 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 above max; at or below max it simply grows to its value inside the frame.
  • The hero figure defaults to the accent bar's value plus unit (for example 260%); value overrides the text and caption sits 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 its durationInFrames (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-fonts from npm, plus the remocn helpers glide, 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. Pass fontFamily to use your own face, and load that font in your project.

Usage

tsx
// 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

PropTypeDefault
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.

    DefaultDEFAULT_DATA

  • accentIndexnumber

    Index of the bar that breaks out; defaults to the last.

  • targetnumber

    Value where the dashed target line sits.

    Default100

  • maxnumber

    Value at the top of the framed axis.

    Default150

  • 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.

    Default26

  • radiusnumber

    Corner radius of the bars, in pixels at 720p.

    Default4

  • 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.

    Defaulttrue

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback multiplier.

    Default1

  • theme"dark" | "light"

    Dark or light palette.

    Default"dark"