From 7de0a679e017a316f4c8234f341793d7e725ab86 Mon Sep 17 00:00:00 2001
From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com>
Date: Mon, 12 Aug 2024 17:23:56 +0530
Subject: [PATCH 1/2] dashboard charts
---
src/Components/Doughnut/ApexDonut.jsx | 2 +-
src/Components/Doughnut/ApexLine.jsx | 104 +++++++++++++-------------
src/Pages/Dashbaord.jsx | 42 +++++------
3 files changed, 76 insertions(+), 72 deletions(-)
diff --git a/src/Components/Doughnut/ApexDonut.jsx b/src/Components/Doughnut/ApexDonut.jsx
index 4ba80c8..01640d5 100644
--- a/src/Components/Doughnut/ApexDonut.jsx
+++ b/src/Components/Doughnut/ApexDonut.jsx
@@ -48,7 +48,7 @@ const ApexChart = ({ data }) => {
});
return (
-
+
);
};
diff --git a/src/Components/Doughnut/ApexLine.jsx b/src/Components/Doughnut/ApexLine.jsx
index 1f1ddf9..5c842e5 100644
--- a/src/Components/Doughnut/ApexLine.jsx
+++ b/src/Components/Doughnut/ApexLine.jsx
@@ -1,62 +1,66 @@
-import React from 'react';
+import React, { useState } from 'react';
import ReactApexChart from 'react-apexcharts';
-const ApexLine = () => {
- const [series] = React.useState([{
- name: 'Rate',
- data: [45, 23, 70, 65, 5, 34, 32]
- }]);
-
- const options = {
- chart: {
- height: 350,
- type: 'line',
- toolbar: {
- show: false // Hide the action icons
- }
- },
- stroke: {
- width: 5,
- curve: 'smooth',
- colors: ['#598369'], // Customize the line color here
+function ApexLine() {
+ const [chartOptions, setChartOptions] = useState({
+ series: [{
+ name: 'Rate',
+ data: [45, 23, 70, 65, 5, 34, 32],
+ gradientToColors: ['#004017'],
+ }],
+ options: {
+ chart: {
+ height: 350,
+ type: 'line',
+ toolbar: {
+ show: false // Hide the action icons
+ }
+ },
+ stroke: {
+ width: 5,
+ curve: 'smooth',
+ colors: ['#598369'], // Customize the line color here
+ },
markers: {
size: 6, // Size of markers
- colors: ['#FF0000'], // Marker (dot) color
- strokeColor: '#000000', // Stroke color of the marker
+ colors: ['#004118'], // Marker (dot) color
+ strokeColor: '#fff', // Stroke color of the marker
strokeWidth: 2
- }
- },
- xaxis: {
- type: 'category', // Change from 'datetime' to 'category'
- categories: ['BH', 'KW', 'OM', 'QA', 'SA', 'UAE', 'IND'],
- tickAmount: 7
- },
- title: {
- text: 'Exchange rate currency', // Adjust the title if needed
- align: 'left',
- style: {
- fontSize: '15px',
- color: '#000',
- fontWeight:400
- }
- },
- fill: {
- type: 'gradient',
- gradient: {
- shade: 'dark',
- gradientToColors: ['#004017'],
- shadeIntensity: 4,
- type: 'horizontal',
- opacityFrom: 1,
- opacityTo: 1,
- stops: [0, 100] // Gradient stops
},
+ xaxis: {
+ type: 'category', // Change from 'datetime' to 'category'
+ categories: ['BH', 'KW', 'OM', 'QA', 'SA', 'UAE', 'IND'],
+ tickAmount: 7
+ },
+ title: {
+ text: 'Exchange Rate Currency', // Adjust the title if needed
+ align: 'left',
+ style: {
+ fontSize: '15px',
+ color: '#000',
+ fontWeight: 400
+ }
+ },
+ fill: {
+ type: 'gradient',
+ gradient: {
+ shade: 'dark',
+ gradientToColors: ['#004017'],
+ shadeIntensity: 4,
+ type: 'horizontal',
+ opacityFrom: 1,
+ opacityTo: 1,
+ stops: [0, 100] // Gradient stops
+ },
+ }
}
- };
+ });
return (
-
+
+
+
);
-};
+}
export default ApexLine;
diff --git a/src/Pages/Dashbaord.jsx b/src/Pages/Dashbaord.jsx
index 5f71e43..135f51d 100644
--- a/src/Pages/Dashbaord.jsx
+++ b/src/Pages/Dashbaord.jsx
@@ -16,6 +16,8 @@ import { PiChartLineUpDuotone } from 'react-icons/pi'
import ApexChart from '../Components/Doughnut/ApexDonut'
import ApexLine from '../Components/Doughnut/ApexLine'
import ReactApexChart from 'react-apexcharts'
+import { BsGraphUpArrow } from "react-icons/bs";
+
const Dashbaord = () => {
const navigate = useNavigate()
@@ -96,50 +98,48 @@ const Dashbaord = () => {
return (
isIoPreLoading || isIoLoading || isInvestorLoading ? :
-
+
navigate("/investor-details")} boxShadow={'lg'} color={"#fff"} p={4} rounded={'xl'} w={'25%'} display={'flex'} bg={'#004118'} flexDirection={'column'} alignItems={'start'} >
- Total Investors
- {investorDetails?.data?.totalItems}
-
-
-
+ Total Investors
+ {investorDetails?.data?.totalItems}
+
{/* */}
navigate("/view-io")} boxShadow={'lg'} bg={'#fff'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
- Total IO
- {IO?.data?.totalItems}
-
+ Total IO
+ {IO?.data?.totalItems}
+
navigate("/sponser")} boxShadow={'lg'} bg={'#fff'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
- Total sponors
- {data?.data?.sponsor?.length}
-
+ Total sponors
+ {data?.data?.sponsor?.length}
+
navigate("/investment-type")} boxShadow={'lg'} bg={'#fff'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
- Total Investment Type
- {data?.data?.investmentType?.length}
-
+ Total Investment Type
+ {data?.data?.investmentType?.length}
+
-
+
- Exchange rate currency
-
- {/* */}
+ {/* Exchange rate currency */}
+ {/* */}
+
-
- IO Status
+
+ IO Status
{/* */}
{/* */}
From f17f77d4092a8ee2431f203c1b92b14a9a11313d Mon Sep 17 00:00:00 2001
From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com>
Date: Tue, 13 Aug 2024 13:47:52 +0530
Subject: [PATCH 2/2] Merge branch 'dev' of
http://git.wdipl.com/Siddhesh.More/tanami-admin-panel into dev
---
src/Components/Doughnut/ApexDonut.jsx | 2 +-
src/Components/Doughnut/ApexLine.jsx | 2 +-
src/Pages/Dashbaord.jsx | 12 ++++++------
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/Components/Doughnut/ApexDonut.jsx b/src/Components/Doughnut/ApexDonut.jsx
index 01640d5..a3eb1e6 100644
--- a/src/Components/Doughnut/ApexDonut.jsx
+++ b/src/Components/Doughnut/ApexDonut.jsx
@@ -25,7 +25,7 @@ const ApexChart = ({ data }) => {
fill: {
type: 'gradient',
},
- colors: data?.backgroundColor, // Customize your colors here
+ colors: data?.backgroundColor,
legend: {
show: false,
position: 'right',
diff --git a/src/Components/Doughnut/ApexLine.jsx b/src/Components/Doughnut/ApexLine.jsx
index 5c842e5..8e27e25 100644
--- a/src/Components/Doughnut/ApexLine.jsx
+++ b/src/Components/Doughnut/ApexLine.jsx
@@ -58,7 +58,7 @@ function ApexLine() {
return (
-
+
);
}
diff --git a/src/Pages/Dashbaord.jsx b/src/Pages/Dashbaord.jsx
index 135f51d..1ed8b29 100644
--- a/src/Pages/Dashbaord.jsx
+++ b/src/Pages/Dashbaord.jsx
@@ -98,28 +98,28 @@ const Dashbaord = () => {
return (
isIoPreLoading || isIoLoading || isInvestorLoading ? :
-
+
- navigate("/investor-details")} boxShadow={'lg'} color={"#fff"} p={4} rounded={'xl'} w={'25%'} display={'flex'} bg={'#004118'} flexDirection={'column'} alignItems={'start'} >
-
+ navigate("/investor-details")} boxShadow={'lg'} color={"#004118"} p={4} rounded={'xl'} w={'25%'} display={'flex'} bg={'#f5f8f6'} flexDirection={'column'} alignItems={'start'} >
+
Total Investors
{investorDetails?.data?.totalItems}
{/* */}
- navigate("/view-io")} boxShadow={'lg'} bg={'#fff'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
+ navigate("/view-io")} boxShadow={'lg'} bg={'#f5f8f6'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
Total IO
{IO?.data?.totalItems}
- navigate("/sponser")} boxShadow={'lg'} bg={'#fff'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
+ navigate("/sponser")} boxShadow={'lg'} bg={'#f5f8f6'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
Total sponors
{data?.data?.sponsor?.length}
- navigate("/investment-type")} boxShadow={'lg'} bg={'#fff'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
+ navigate("/investment-type")} boxShadow={'lg'} bg={'#f5f8f6'} color={"#004118"} p={3} rounded={'xl'} w={'25%'} display={'flex'} flexDirection={'column'} alignItems={'start'} >
Total Investment Type
{data?.data?.investmentType?.length}