From 060ec00d8d1e51ed2fd8988f2d7e731e1336d424 Mon Sep 17 00:00:00 2001 From: suryac Date: Tue, 18 Aug 2026 12:38:35 +0530 Subject: [PATCH] fix: bar graph fixed --- src/components/dv/StoreDetail.tsx | 30 +++++++++++----------- src/components/reusable/AnalyticsChart.tsx | 16 +++++++----- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/components/dv/StoreDetail.tsx b/src/components/dv/StoreDetail.tsx index 2767d09..d48cf52 100644 --- a/src/components/dv/StoreDetail.tsx +++ b/src/components/dv/StoreDetail.tsx @@ -187,8 +187,8 @@ export function StoreDetail({ instanceId, onBack, onEdit, refreshKey }: StoreDet
{/* Image Section */} {imageUrl ? ( -
- {String(businessName)} +
+ {String(businessName)}
) : (
@@ -321,32 +321,32 @@ export function StoreDetail({ instanceId, onBack, onEdit, refreshKey }: StoreDet {/* Order Potential Card */} {Array.isArray(potential) && potential.length > 0 && ( - -
- -

Order Potential

+ +
+ +

Order Potential

- + - - + + {potential.map((p: any, idx: number) => { if (!p.product_category && !p.quantity) return null; return ( - - - + + + ); })} - - - + + +
Product CategoryQuantityProduct CategoryQuantity
{p.product_category ? String(p.product_category) : '-'}{p.quantity ? String(p.quantity) : '0'}
{p.product_category ? String(p.product_category) : '-'}{p.quantity ? String(p.quantity) : '0'}
Total{totalPotential}
Total{totalPotential}
diff --git a/src/components/reusable/AnalyticsChart.tsx b/src/components/reusable/AnalyticsChart.tsx index 0f3242e..66089bc 100644 --- a/src/components/reusable/AnalyticsChart.tsx +++ b/src/components/reusable/AnalyticsChart.tsx @@ -126,20 +126,21 @@ export function AnalyticsChart({ data, gridCols }: AnalyticsChartProps) { interval={0} dy={10} dx={-5} - height={70} + height={90} /> {hasSeries && } {seriesKeys.map((key, i) => { @@ -189,7 +190,7 @@ export function AnalyticsChart({ data, gridCols }: AnalyticsChartProps) { }; return ( - +
100 ? 'overflow-x-auto scrollbar-slim' : ''}`}> {chartType === 5 ? (
@@ -215,7 +216,7 @@ export function AnalyticsChart({ data, gridCols }: AnalyticsChartProps) {
) : ( -
100 ? `${minChartWidth}px` : '100%', height: '100%' }}> +
100 ? `${minChartWidth}px` : '100%', height: '100%' }}> {chartType === 3 || chartType === 4 ? ( @@ -223,6 +224,7 @@ export function AnalyticsChart({ data, gridCols }: AnalyticsChartProps) { contentStyle={{ borderRadius: '8px', border: '1px solid #E2E8F0', boxShadow: '0 4px 6px -1px rgb(0 0 0 / 0.1)', fontSize: '14px', fontFamily: 'inherit' }} itemStyle={{ color: '#0F172A', fontWeight: '500' }} wrapperStyle={{ zIndex: 1000 }} + allowEscapeViewBox={{ x: true, y: true }} /> ) : chartType === 1 ? ( - + {renderChartContent()} ) : chartType === 2 ? ( - + {renderChartContent()} ) : ( - + {renderChartContent()} )}