Tooltip improvements, chart validation, and new playgrounds#677
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
rightpositioning (instead of
left) so content can grow leftward without width constraints. Applies to all three frame types and allHOC chart components.
SankeyDiagram tooltip content: Sankey tooltips now show meaningful data — flow values for edges (
Source → Target: 100) andtotals/degree for nodes. Switched from
tooltipContenttohtmlAnnotationRulesfor reliable rendering in the annotation pipeline.Chart data validation: All HOC chart components now render a visible
ChartErrorelement with a descriptive message whenrequired 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 inhtmlFrameHoverRulesrc/components/annotationRules/orframeRules.tsx— flip logic inhtmlFrameHoverRuleandhtmlColumnHoverRulesrc/components/annotationRules/xyframeRules.tsx— flip logic inhtmlTooltipAnnotationsrc/components/NetworkFrame.tsx— passadjustedSizeto hover rulesrc/components/XYFrame.tsx— passadjustedSizeto tooltip annotationSankeyDiagram tooltip
src/components/charts/network/SankeyDiagram.tsx— customhtmlAnnotationRuleswith rich tooltip contentsrc/components/charts/network/SankeyDiagram.test.tsx— tooltip integration testChart validation
src/components/charts/shared/ChartError.tsx— new error display componentsrc/components/charts/shared/validateChartData.ts— validation helpersvalidateChartData+ChartErrorPlaygrounds
docs/src/pages/playground/SankeyDiagramPlayground.js— newdocs/src/pages/playground/RealtimeLineChartPlayground.js— newdocs/src/pages/playground/RealtimeBarChartPlayground.js— newDocs & metadata
CHANGELOG.md— rewritten in Keep a Changelog formatREADME.md— rewritten with architecture overviewMIGRATION.md— new v2→v3 migration guide