From 4ef61c878ec16fede34b90e36e71fa40bbc03072 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Sun, 30 Jan 2022 14:21:52 +0330 Subject: [PATCH] update --- src/App.js | 2 + .../Chart/SpecifiedDomainRadarChart/index.js | 109 +++++++++--------- 2 files changed, 57 insertions(+), 54 deletions(-) diff --git a/src/App.js b/src/App.js index 43a81f5..6a2b316 100644 --- a/src/App.js +++ b/src/App.js @@ -39,6 +39,7 @@ import SidebarDesign2 from "./components/Sidebar/SidebarDesign2"; import SimpleBarChart from "./components/Chart/SimpleBarChart"; import Switch from "./components/Switch"; +import SpecifiedDomainRadarChart from "./components/Chart/SpecifiedDomainRadarChart"; function App() { return ( @@ -78,6 +79,7 @@ function App() { {/* */} {/* */} + ); diff --git a/src/components/Chart/SpecifiedDomainRadarChart/index.js b/src/components/Chart/SpecifiedDomainRadarChart/index.js index 6ec1699..d04a322 100644 --- a/src/components/Chart/SpecifiedDomainRadarChart/index.js +++ b/src/components/Chart/SpecifiedDomainRadarChart/index.js @@ -1,60 +1,61 @@ import React, { PureComponent } from 'react'; import { Radar, RadarChart, PolarGrid, Legend, PolarAngleAxis, PolarRadiusAxis, ResponsiveContainer } from 'recharts'; -const data = [ - { - subject: 'Math', - A: 120, - B: 110, - fullMark: 150, - }, - { - subject: 'Chinese', - A: 98, - B: 130, - fullMark: 150, - }, - { - subject: 'English', - A: 86, - B: 130, - fullMark: 150, - }, - { - subject: 'Geography', - A: 99, - B: 100, - fullMark: 150, - }, - { - subject: 'Physics', - A: 85, - B: 90, - fullMark: 150, - }, - { - subject: 'History', - A: 65, - B: 85, - fullMark: 150, - }, -]; -export default class Example extends PureComponent { - static demoUrl = 'https://codesandbox.io/s/radar-chart-specified-domain-mfl04'; - - render() { - return ( - +function SpecifiedDomainRadarChart ({ data }) { + return ( +
+ - - - - - - + + + {/* */} + + - - ); - } -} +
+ ); +}; + +export default SpecifiedDomainRadarChart; + +SpecifiedDomainRadarChart.defaultProps = { + data: [ + { + subject: 'پشتیبانی', + A: 107, + B: 113, + fullMark: 150, + }, + { + subject: 'لجستیک', + A: 75, + B: 150, + fullMark: 150, + }, + { + subject: 'زنجیره تامین', + A: 100, + B: 130, + fullMark: 150, + }, + { + subject: 'اداری', + A: 120, + B: 120, + fullMark: 150, + }, + { + subject: 'حسابداری', + A: 85, + B: 120, + fullMark: 150, + }, + { + subject: 'بازاریابی', + A: 96, + B: 96, + fullMark: 150, + }, + ] +};