A collection of animated graphs built using D3.js and React-Spring. This library provides components for Line, Pie, and Bar charts with smooth animations.
npm install animagraphs
import { AnimatedLineChart } from 'animagraphs';
const data = [...]; // Your line chart data
const colors = {...}; // Color customization
<AnimatedLineChart data={data} colors={colors} ...otherProps />
data
: Array of objects withx
(number or Date) andy
(number) properties.colors
: Object with propertiesline
,points
,xAxis
, andyAxis
for color customization.
import { AnimatedPieChart } from 'animagraphs';
const data = [...]; // Your pie chart data
const colors = [...]; // Array of colors
<AnimatedPieChart data={data} colors={colors} ...otherProps />
data
: Array of objects withlabel
(string) andvalue
(number).colors
: Array of colors for each segment of the pie.
import { AnimatedBarChart } from 'animagraphs';
const data = [...]; // Your bar chart data
const colors = {...}; // Color customization
<AnimatedBarChart data={data} colors={colors} ...otherProps />
data
: Array of objects withlabel
(string) andvalue
(number).colors
: Object with propertiesbars
,xAxis
, andyAxis
for color customization.
MIT