Componente
Dumbbell chart
@moga/data-motion · Oficial do MOGA
Before and after, row by row: the earlier value lands as a hollow dot, a bar stretches to the later one with a filled dot riding its head and the value counting beside it, and the change lands in a chip at the row's end; a legend names the two moments. Give it the chart's own box (about 1400 × 760).
npx motioncn-cli add moga/data-motion/dumbbell-chartVersão 1.0.0MIT35 downloads0 favoritos
Atualizado em 3 de dezembro de 2026
Usar no MOGA
Importe só este, sem o resto do bundle. Os tokens do bundle que ele usa vêm junto. Execute na pasta do projeto:
npx -y moga hub-import @moga/data-motion --items component:dumbbell-chartUsar fora do MOGA (Motioncn)
Grátis, sem conta. É código web comum que roda numa página, React, Remotion e HyperFrames, com os mesmos quadros que o MOGA renderiza.
Adicionar ao projeto com shadcn
npx shadcn@latest add https://motioncn.dev/r/moga/data-motion/dumbbell-chart.jsonSem shadcn configurado também funciona
npx motioncn-cli add moga/data-motion/dumbbell-chartImportar numa página, sem build
import DumbbellChart from 'https://motioncn.dev/m/moga/data-motion/dumbbell-chart.js';
import preset from 'https://motioncn.dev/m/theme.js';
DumbbellChart.mount(document.querySelector('#stage'), { preset, duration: 5 }).play();React, Remotion e HyperFrames
// React (https://motioncn.dev/r/player-react.json)
<Motion motion={DumbbellChart} preset={preset} duration={5} fit />
// Remotion (https://motioncn.dev/r/player-remotion.json)
<MotionClip motion={DumbbellChart} preset={preset} />
// HyperFrames (https://motioncn.dev/m/hyperframes.js)
follow(DumbbellChart.mount(element, { preset, duration: 5 }), { start: 0 });
