blob: ba6774c5824b94020ca65a22e385a3aa7c30cf7a (
plain)
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
|
import React from 'react';
import { createMuiTheme } from '@material-ui/core/styles';
import ThemePallete from 'ba-api/themePalette';
import {
Radar,
RadarChart,
PolarGrid,
PolarAngleAxis,
PolarRadiusAxis,
Legend
} from 'recharts';
import { data7 } from './sampleData';
const theme = createMuiTheme(ThemePallete.redTheme);
const color = ({
main: theme.palette.primary.main,
maindark: theme.palette.primary.dark,
secondary: theme.palette.secondary.main,
secondarydark: theme.palette.secondary.dark,
});
function DoubleRadar() {
return (
<RadarChart cx={300} cy={250} outerRadius={150} width={600} height={500} data={data7}>
<PolarGrid />
<PolarAngleAxis dataKey="subject" />
<PolarRadiusAxis angle={30} domain={[0, 150]} />
<Radar name="Mike" dataKey="A" stroke={color.maindark} fill={color.main} fillOpacity={0.6} />
<Radar name="Lily" dataKey="B" stroke={color.secondarydark} fill={color.secondary} fillOpacity={0.3} />
<Legend />
</RadarChart>
);
}
export default DoubleRadar;
|