From c7ef9e9461fdb21fc0b786cca156f8064f4dc9fd Mon Sep 17 00:00:00 2001 From: Armaan Jain <84474476+Developing-Gamer@users.noreply.github.com> Date: Mon, 15 Jun 2026 19:37:01 -0700 Subject: [PATCH] Dashboard Bar chart UI fix (#1602) --- ## Summary by cubic Fixes the page views bar hover highlight in the analytics chart by replacing the clip-path overlay with per-bar `Cell` opacity. This removes flicker and highlights only the hovered bar. - **Bug Fixes** - Removed `page-views-highlight-clip` and the extra hover `Bar`. - Use `Cell` per bar to set `fillOpacity` (0.5 on hover, 0.18 otherwise; 0 when hidden). - Keeps a single `Bar`, reducing DOM and avoiding clipping/offset issues. Written for commit f3e659bb505fab5cf852a318b7e50402b8852a7e. Summary will update on new commits. Review in cubic ## Summary by CodeRabbit * **Refactor** * Improved the rendering mechanism for analytics chart interactions in the dashboard. --- .../[projectId]/(overview)/line-chart.tsx | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/line-chart.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/line-chart.tsx index 3e408c802..e9df73e4d 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/line-chart.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/line-chart.tsx @@ -847,9 +847,6 @@ export function ComposedAnalyticsChart({ - - - @@ -877,22 +874,16 @@ export function ComposedAnalyticsChart({ dataKey="page_views" yAxisId="visitors" fill="var(--color-page_views)" - fillOpacity={showPageViews ? (hoveredIndex == null ? 0.18 : 0.08) : 0} radius={[4, 4, 0, 0]} {...chartMotion} - /> - {showPageViews && hoveredIndex != null && hoveredX != null && ( - - )} + > + {taggedDatapoints.map((_, index) => ( + + ))} +