diff --git a/inventory/src/components/dashboard/PurchaseMetrics.tsx b/inventory/src/components/dashboard/PurchaseMetrics.tsx index 4a7ce67..6a015da 100644 --- a/inventory/src/components/dashboard/PurchaseMetrics.tsx +++ b/inventory/src/components/dashboard/PurchaseMetrics.tsx @@ -33,7 +33,7 @@ const COLORS = [ ] const renderActiveShape = (props: any) => { - const { cx, cy, innerRadius, vendor, cost } = props; + const { cx, cy, innerRadius, outerRadius, startAngle, endAngle, fill, vendor, cost } = props; // Split vendor name into words and create lines of max 12 chars const words = vendor.split(' '); @@ -52,6 +52,24 @@ const renderActiveShape = (props: any) => { return ( + + {lines.map((line, i) => ( { > {formatCurrency(cost)} - {props.children} ); }; @@ -149,9 +166,9 @@ export function PurchaseMetrics() {
-
+
Purchase Orders By Vendor
-
+
setActiveIndex(index)} @@ -171,7 +188,7 @@ export function PurchaseMetrics() { {data?.vendorOrders?.map((entry, index) => ( ))} diff --git a/inventory/src/components/dashboard/StockMetrics.tsx b/inventory/src/components/dashboard/StockMetrics.tsx index 108a80a..62c53e3 100644 --- a/inventory/src/components/dashboard/StockMetrics.tsx +++ b/inventory/src/components/dashboard/StockMetrics.tsx @@ -33,7 +33,7 @@ const COLORS = [ ] const renderActiveShape = (props: any) => { - const { cx, cy, innerRadius, brand, retail } = props; + const { cx, cy, innerRadius, outerRadius, startAngle, endAngle, fill, brand, retail } = props; // Split brand name into words and create lines of max 12 chars const words = brand.split(' '); @@ -52,6 +52,24 @@ const renderActiveShape = (props: any) => { return ( + + {lines.map((line, i) => ( { > {formatCurrency(retail)} - {props.children} ); }; @@ -149,9 +166,9 @@ export function StockMetrics() {
-
-
Stock Retail By Brand
-
+
+
Stock Retail By Brand
+
setActiveIndex(index)} @@ -172,7 +189,6 @@ export function StockMetrics() { ))}