| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 | |   |  | import * as React from 'react'; |  | import { Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts'; |  | import { Card, CardHeader } from "@mui/material"; |  | import { useTranslate } from "react-admin"; |  |   |  |   |  | const NbPie = ({ deadStock, locUsage }) => { |  |     const translate = useTranslate(); |  |     console.log(locUsage); |  |   |  |     return ( |  |         <> |  |             <Card sx={{ |  |                 width: '100%', |  |                 maxHeight: 570, |  |                 flexDirection: 'column', |  |                 flex: '1', |  |                 '& a': { |  |                     textDecoration: 'none', |  |                     color: 'inherit', |  |                 }, |  |             }}> |  |                 <CardHeader title={translate('page.dashboard.header.stockUsage')} /> |  |                 <ResponsiveContainer width="100%" height="100%"> |  |                     <PieChart width={400} height={400}> |  |                         <Pie |  |                             dataKey="value" |  |                             isAnimationActive={false} |  |                             data={locUsage} |  |                             cx="50%" |  |                             cy="40%" |  |                             outerRadius={80} |  |                             fill="#8884d8" |  |                             label |  |                         /> |  |                         <Tooltip /> |  |                     </PieChart> |  |                 </ResponsiveContainer> |  |             </Card> |  |         </> |  |     ); |  | } |  |   |  | export default NbPie; | 
 |