Log Rescale
A bar chart rescales to a log axis so the final 2.4M bar stands out. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/log-rescaleUsage
// src/Root.tsx
import { Composition } from "remotion";
import { LogRescale } from "@/components/remocn/log-rescale";
const LogRescaleScene = () => (
<LogRescale
title="remocn renders per year"
data={[
{ label: "2023", value: 4800 },
{ label: "2024", value: 18000 },
{ label: "2025", value: 96000 },
{ label: "2026", value: 2400000 },
]}
/>
);
export const RemotionRoot = () => (
<Composition
id="LogRescale"
component={LogRescaleScene}
durationInFrames={300}
fps={60}
width={1280}
height={720}
/>
);Bars rise on a linear axis where only the last one is visible, then the axis morphs to a log scale, the smaller bars grow into view, and their values label in. Pass data (label and value per bar), accentIndex for the hero bar (defaults to the largest), and a title. Ships dark and light via theme.
Props15
| Prop | Type | Default |
|---|---|---|
| data | LogRescaleDatum[]DEFAULT_DATA Bars to plot, in order, with a label and value each. | |
| accentIndex | number— Index of the hero bar; defaults to the largest value. | |
| title | string"remocn renders per year" Small heading over the chart. | |
| linearLabel | string"Linear" Scale tag shown before the chart rescales. | |
| logLabel | string"Log" Scale tag shown after the chart rescales. | |
| morphAt | number64 Frame at which the axis starts morphing from linear to log. | |
| 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"Hanken Grotesk" Typeface for the copy. Load the 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. | |
- dataLogRescaleDatum[]
Bars to plot, in order, with a label and value each.
Default
DEFAULT_DATA - accentIndexnumber
Index of the hero bar; defaults to the largest value.
- titlestring
Small heading over the chart.
Default
"remocn renders per year" - linearLabelstring
Scale tag shown before the chart rescales.
Default
"Linear" - logLabelstring
Scale tag shown after the chart rescales.
Default
"Log" - morphAtnumber
Frame at which the axis starts morphing from linear to log.
Default
64 - 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. Load the font in your project first.
Default
"Hanken Grotesk" - 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"