From ac1995f63fe092eff0a206cafd4394fb8aa1012e Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 10 Dec 2025 23:24:31 -0700 Subject: [PATCH] fix(pricing): Simplify category chart to prevent overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace complex price range bars with simple horizontal bars - Use overflow-hidden to prevent bars extending beyond container - Calculate bar width as percentage of max avg price - Limit to top 12 categories for cleaner display - Fixed-width labels prevent layout shift 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- cannaiq/src/pages/IntelligencePricing.tsx | 54 +++++++++-------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/cannaiq/src/pages/IntelligencePricing.tsx b/cannaiq/src/pages/IntelligencePricing.tsx index 9b4425e9..ffcaaf57 100644 --- a/cannaiq/src/pages/IntelligencePricing.tsx +++ b/cannaiq/src/pages/IntelligencePricing.tsx @@ -196,43 +196,29 @@ export function IntelligencePricing() { Average Price by Category -
- {sortedCategories.map((cat) => ( -
- - {cat.category || 'Unknown'} - -
- {/* Price range bar */} -
- {/* Min-Max range */} -
- {/* Average marker */} -
+
+ {sortedCategories.slice(0, 12).map((cat) => { + const maxPrice = Math.max(...sortedCategories.map(c => c.avgPrice || 0), 1); + const barWidth = Math.min(((cat.avgPrice || 0) / maxPrice) * 100, 100); + return ( +
+ + {cat.category || 'Unknown'} + +
+
+
+
-
-
- - Min: {formatPrice(cat.minPrice)} - - - Avg: {formatPrice(cat.avgPrice)} - - - Max: {formatPrice(cat.maxPrice)} + + {formatPrice(cat.avgPrice)}
-
- ))} + ); + })}