Skip to content
Skillv1.0.0

charts

Chart and data visualization patterns for Remotion. Use when creating bar charts, pie charts, histograms, progress bars, or any data-driven animations.

by JiayiV(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from JiayiV/question_mixing (skills/public-07-ecc-main-skills-remotion-video-creation-rules-charts-d470d136/SKILL.md). Install upstream with npx skills add JiayiV/question_mixing --skill public-07-ecc-main-skills-remotion-video-creation-rules-charts-d470d136. Copyright stays with the author.

Charts in Remotion

You can create bar charts in Remotion by using regular React code - HTML and SVG is allowed, as well as D3.js.

No animations not powered by useCurrentFrame()

Disable all animations by third party libraries. They will cause flickering during rendering. Instead, drive all animations from useCurrentFrame().

Bar Chart Animations

See Bar Chart Example for a basic example implementation.

Staggered Bars

You can animate the height of the bars and stagger them like this:

const STAGGER_DELAY = 5;
const frame = useCurrentFrame();
const {fps} = useVideoConfig();

const bars = data.map((item, i) => {
  const delay = i * STAGGER_DELAY;
  const height = spring({
    frame,
    fps,
    delay,
    config: {damping: 200},
  });
  return <div style={{height: height * item.value}} />;
});

Pie Chart Animation

Animate segments using stroke-dashoffset, starting from 12 o'clock.

const frame = useCurrentFrame();
const {fps} = useVideoConfig();

const progress = interpolate(frame, [0, 100], [0, 1]);

const circumference = 2 * Math.PI * radius;
const segmentLength = (value / total) * circumference;
const offset = interpolate(progress, [0, 1], [segmentLength, 0]);

<circle r={radius} cx={center} cy={center} fill="none" stroke={color} strokeWidth={strokeWidth} strokeDasharray={`${segmentLength} ${circumference}`} strokeDashoffset={offset} transform={`rotate(-90 ${center} ${center})`} />;

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jiayiv-question-mixing-public-07-ecc-main-skills-remotio-3ef0e4/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jiayiv-question-mixing-public-07-ecc-main-skills-remotio-3ef0e4.ocm.jsonjson
{
  "ocm": "1",
  "id": "jiayiv-question-mixing-public-07-ecc-main-skills-remotio-3ef0e4",
  "kind": "skill",
  "name": "charts",
  "description": "Chart and data visualization patterns for Remotion. Use when creating bar charts, pie charts, histograms, progress bars, or any data-driven animations.",
  "publisher": "JiayiV",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "data_analysis"
    ],
    "tags": [
      "skill-md",
      "charts",
      "data",
      "visualization",
      "bar-chart",
      "pie-chart",
      "graphs",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Chart and data visualization patterns for Remotion. Use when creating bar charts, pie charts, histograms, progress bars, or any data-driven animations."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/JiayiV/question_mixing",
      "path": "skills/public-07-ecc-main-skills-remotion-video-creation-rules-charts-d470d136/SKILL.md",
      "ref": "068c2486ccc0f8d200a3db4d21ec137064eda3b4",
      "url": "https://github.com/JiayiV/question_mixing/blob/068c2486ccc0f8d200a3db4d21ec137064eda3b4/skills/public-07-ecc-main-skills-remotion-video-creation-rules-charts-d470d136/SKILL.md",
      "key": "JiayiV/question_mixing/skills/public-07-ecc-main-skills-remotion-video-creation-rules-charts-d470d136/SKILL.md"
    }
  },
  "instructions": "# Charts in Remotion\n\nYou can create bar charts in Remotion by using regular React code - HTML and SVG is allowed, as well as D3.js.\n\n## No animations not powered by `useCurrentFrame()`\n\nDisable all animations by third party libraries.\nThey will cause flickering during rendering.\nInstead, drive all animations from `useCurrentFrame()`.\n\n## Bar Chart Animations\n\nSee [Bar Chart Example](assets/charts/bar-chart.tsx) for a basic example implementation.\n\n### Staggered Bars\n\nYou can animate the height of the bars and stagger them like this:\n\n```tsx\nconst STAGGER_DELAY = 5;\nconst frame = useCurrentFra",
  "cost": {
    "context_tokens": 371
  }
}

Fetch it by URL: GET /api/v1/registry/jiayiv-question-mixing-public-07-ecc-main-skills-remotio-3ef0e4/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.