Skip to content

Tooltip improvements, chart validation, and new playgrounds#677

Merged
emeeks merged 5 commits into
mainfrom
v3-table-stakes
Mar 1, 2026
Merged

Tooltip improvements, chart validation, and new playgrounds#677
emeeks merged 5 commits into
mainfrom
v3-table-stakes

Conversation

@emeeks

@emeeks emeeks commented Mar 1, 2026

Copy link
Copy Markdown
Member

gh pr create --title "Tooltip improvements, chart validation, and new playgrounds" --body "$(cat <<'EOF'

Summary

  • Tooltip position flipping: Tooltips now render to the left of the hovered element when it's past the horizontal midpoint of
    the chart. Previously, tooltips on the right side of a chart would get compressed against the container edge. Uses CSS right
    positioning (instead of left) so content can grow leftward without width constraints. Applies to all three frame types and all
    HOC chart components.

  • SankeyDiagram tooltip content: Sankey tooltips now show meaningful data — flow values for edges (Source → Target: 100) and
    totals/degree for nodes. Switched from tooltipContent to htmlAnnotationRules for reliable rendering in the annotation pipeline.

  • Chart data validation: All HOC chart components now render a visible ChartError element with a descriptive message when
    required props are missing or empty, instead of silently returning null or throwing.

  • New documentation playgrounds: Added interactive playground pages for SankeyDiagram, RealtimeLineChart/WaterfallChart, and
    RealtimeBarChart/SwarmChart with live prop controls and generated code snippets.

  • Changelog/README rewrite: Replaced the autogenerated commit-log changelog with a structured Keep a Changelog format covering
    all v3 additions. README rewritten with layered architecture overview and quick examples.

Files Changed

Tooltip positioning (all frames)

  • src/components/annotationRules/networkframeRules.tsx — flip logic in htmlFrameHoverRule
  • src/components/annotationRules/orframeRules.tsx — flip logic in htmlFrameHoverRule and htmlColumnHoverRule
  • src/components/annotationRules/xyframeRules.tsx — flip logic in htmlTooltipAnnotation
  • src/components/NetworkFrame.tsx — pass adjustedSize to hover rule
  • src/components/XYFrame.tsx — pass adjustedSize to tooltip annotation

SankeyDiagram tooltip

  • src/components/charts/network/SankeyDiagram.tsx — custom htmlAnnotationRules with rich tooltip content
  • src/components/charts/network/SankeyDiagram.test.tsx — tooltip integration test

Chart validation

  • src/components/charts/shared/ChartError.tsx — new error display component
  • src/components/charts/shared/validateChartData.ts — validation helpers
  • All 24 HOC chart components — use validateChartData + ChartError

Playgrounds

  • docs/src/pages/playground/SankeyDiagramPlayground.js — new
  • docs/src/pages/playground/RealtimeLineChartPlayground.js — new
  • docs/src/pages/playground/RealtimeBarChartPlayground.js — new

Docs & metadata

  • CHANGELOG.md — rewritten in Keep a Changelog format
  • README.md — rewritten with architecture overview
  • MIGRATION.md — new v2→v3 migration guide

@vercel

vercel Bot commented Mar 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
semiotic Error Error Mar 1, 2026 7:21pm

Request Review

Tests expected console.warn but components now render ChartError.
Updated assertions to check for role="alert" element with the
relevant prop name in the error message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@emeeks emeeks merged commit b89bebd into main Mar 1, 2026
3 of 4 checks passed
@emeeks emeeks deleted the v3-table-stakes branch March 1, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant