import React from
'react'
;
import { BarChart, Bar, Brush, ReferenceLine,
XAxis, YAxis, CartesianGrid, Tooltip} from
'recharts'
;
const App = () => {
const data = [
{name:
'A'
, x:21, y:23, z:122},
{name:
'B'
, x:22, y:-3, z:-73},
{name:
'C'
, x:-32, y:15, z:32},
{name:
'D'
, x:-14, y:-35, z:23},
{name:
'E'
, x:-51, y:45, z:-20},
{name:
'F'
, x:16, y:-25, z:29},
{name:
'G'
, x:7, y:-17, z:-61},
{name:
'H'
, x:-8, y:32, z:45},
{name:
'I'
, x:9, y:43, z:-93},
];
return
(
<BarChart width={500} height={700} data={data} >
<CartesianGrid/>
<XAxis dataKey=
"name"
/>
<YAxis />
<Tooltip />
<ReferenceLine y={0} stroke=
"gray"
/>
<Brush dataKey=
"name"
height={30} stroke=
"green"
/>
<Bar dataKey=
"x"
fill=
"red"
/>
<Bar dataKey=
"y"
fill=
"blue"
/>
<Bar dataKey=
"z"
fill=
"yellow"
/>
</BarChart>
);
}
export
default
App;