Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

recharts bar chart

import { BarChart, Bar } from 'recharts';
...
const data = [
  {
    name: 'Page A',
    uv: 4000,
    pv: 2400,
    amt: 2400,
  },
  {
    name: 'Page B',
    uv: 3000,
    pv: 1398,
    amt: 2210,
  },
];
...
<BarChart width={150} height={40} data={data}>
	<Bar dataKey="uv" fill="#8884d8" />
</BarChart>
Source by recharts.org #
 
PREVIOUS NEXT
Tagged: #recharts #bar #chart
ADD COMMENT
Topic
Name
3+3 =