コンポーネント
Bar chart
@moga/data-motion · MOGA 公式
Bars that grow one after another, each value counting up as it rides the end of its bar; rows for rankings and long labels, columns for a few periods. One bar can be highlighted while the rest step back. Give it the chart's own box (about 1400 × 760).
npx motioncn-cli add moga/data-motion/bar-chartバージョン 1.0.0MIT35 ダウンロード0 お気に入り
2026年12月3日 更新
MOGA で使う
バンドル全体ではなく、これだけをインポートします。使っているバンドルのトークンも一緒に入ります。プロジェクトフォルダで実行:
npx -y moga hub-import @moga/data-motion --items component:bar-chartMOGA の外で使う(Motioncn)
無料、アカウント不要。ふつうの Web コードなので、Web ページ、React、Remotion、HyperFrames で再生でき、MOGA と同じフレームを描きます。
shadcn でプロジェクトに追加
npx shadcn@latest add https://motioncn.dev/r/moga/data-motion/bar-chart.jsonshadcn を設定していなくても使えます
npx motioncn-cli add moga/data-motion/bar-chartビルドなしでページから import
import BarChart from 'https://motioncn.dev/m/moga/data-motion/bar-chart.js';
import preset from 'https://motioncn.dev/m/theme.js';
BarChart.mount(document.querySelector('#stage'), { preset, duration: 5 }).play();React、Remotion、HyperFrames
// React (https://motioncn.dev/r/player-react.json)
<Motion motion={BarChart} preset={preset} duration={5} fit />
// Remotion (https://motioncn.dev/r/player-remotion.json)
<MotionClip motion={BarChart} preset={preset} />
// HyperFrames (https://motioncn.dev/m/hyperframes.js)
follow(BarChart.mount(element, { preset, duration: 5 }), { start: 0 });
