wacrm/src/components/dashboard
Arnas Donauskas 2aa3c50878
fix(dashboard): precise hover on the conversations-over-time chart
Hover was off by ~one letterbox width on wide layouts — users had to
drag the cursor far right of the last data point to see its tooltip.
Root cause: the SVG uses a fixed 760×240 viewBox with preserveAspect-
Ratio's default "xMidYMid meet", which centers the content and leaves
empty letterbox bars on either side when the container is wider than
the viewBox aspect. The old hover math mapped clientX linearly onto
the full SVG DOM rect, so every pixel of letterbox shifted the snap
further from the real data point.

Switched to SVGSVGElement.getScreenCTM().inverse() to map screen
coords back to viewBox units correctly regardless of letterboxing,
scaling, or future transforms. The tooltip's horizontal offset also
now comes from the same CTM (mapping the snapped data point's viewBox
x back to a pixel offset inside the wrapper div), so the tooltip and
crosshair line up exactly on top of each other.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 23:19:13 +03:00
..
activity-feed.tsx fix(dashboard): paginate recent activity feed with a size picker 2026-04-17 22:35:42 +03:00
conversations-chart.tsx fix(dashboard): precise hover on the conversations-over-time chart 2026-04-17 23:19:13 +03:00
empty-state.tsx feat(dashboard): replace placeholder with real analytics 2026-04-17 22:16:00 +03:00
metric-card.tsx feat(dashboard): replace placeholder with real analytics 2026-04-17 22:16:00 +03:00
pipeline-donut.tsx fix(dashboard): pipeline card stretches to match the chart row height 2026-04-17 22:29:54 +03:00
quick-actions.tsx feat(dashboard): replace placeholder with real analytics 2026-04-17 22:16:00 +03:00
response-time-chart.tsx feat(dashboard): replace placeholder with real analytics 2026-04-17 22:16:00 +03:00
skeleton.tsx feat(dashboard): replace placeholder with real analytics 2026-04-17 22:16:00 +03:00