Skip to content

Default grouped tooltips to visual order - #30

Merged
tannerlinsley merged 3 commits into
mainfrom
taren/visual-tooltip-order
Aug 1, 2026
Merged

Default grouped tooltips to visual order#30
tannerlinsley merged 3 commits into
mainfrom
taren/visual-tooltip-order

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

  • order x-grouped tooltip rows top-to-bottom and y-grouped rows left-to-right by default
  • expose visual as an explicit sort policy while preserving color-domain, focus, and comparator sorting
  • document and test both grouped axes

Release impact

Includes a minor Changesets entry for @tanstack/charts; the fixed release group will version together.

Validation

  • pnpm validate

Summary by CodeRabbit

  • New Features

    • Grouped tooltip rows now default to visual ordering: top-to-bottom for x-grouped charts and left-to-right for y-grouped charts.
    • Added a visual tooltip sorting option.
    • Existing color-domain, focus-based, and custom sorting options remain available.
  • Documentation

    • Updated tooltip and interaction guidance with sorting and formatting details.
  • Tests

    • Added coverage for visual ordering in horizontal bar chart tooltips.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@tannerlinsley, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de2e369b-b783-4257-ac7f-63081cc64fc6

📥 Commits

Reviewing files that changed from the base of the PR and between 2788642 and 4027480.

📒 Files selected for processing (2)
  • docs/comparison.md
  • packages/charts-core/docs/comparison.md
📝 Walkthrough

Walkthrough

Grouped tooltip rows now default to visual mark order. X-groups sort top-to-bottom, and y-groups sort left-to-right. The visual sort option is documented and typed. Existing color-domain, focus, and custom comparator policies remain supported.

Changes

Tooltip ordering

Layer / File(s) Summary
Ordering contract and documentation
packages/charts-core/src/types.ts, docs/reference/..., packages/charts-core/docs/reference/..., docs/guides/..., packages/charts-core/docs/guides/..., .changeset/..., API-FRICTION.md, benchmarks/comparison/bundle-baseline.json
Adds the visual sort mode and documents axis-based grouped-row ordering while retaining existing sort policies. Updates the changeset, API friction record, and bundle baseline metadata.
Runtime ordering and verification
packages/charts-core/src/tooltip.ts, packages/charts-core/src/runtime.test.ts
Applies coordinate-based ordering for grouped tooltip points and verifies x-grouped and y-grouped horizontal bar behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: grouped tooltips now use visual order by default.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/visual-tooltip-order

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/charts-core/docs/reference/focus-and-interaction.md`:
- Line 141: Update the corresponding public documentation in the root docs/
tree, not the generated package copies: regenerate the default sort table entry,
visual-ordering policy description, and grouped-ordering guidance corresponding
to packages/charts-core/docs/reference/focus-and-interaction.md lines 141 and
194-196 and packages/charts-core/docs/guides/tooltips-and-focus.md lines
102-107, then run pnpm docs:sync to update all generated copies.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ed6fa79d-c178-43d0-bea7-547dae58b4b0

📥 Commits

Reviewing files that changed from the base of the PR and between adbc9dd and d563eba.

📒 Files selected for processing (9)
  • .changeset/visual-tooltip-order.md
  • API-FRICTION.md
  • docs/guides/tooltips-and-focus.md
  • docs/reference/focus-and-interaction.md
  • packages/charts-core/docs/guides/tooltips-and-focus.md
  • packages/charts-core/docs/reference/focus-and-interaction.md
  • packages/charts-core/src/runtime.test.ts
  • packages/charts-core/src/tooltip.ts
  • packages/charts-core/src/types.ts

| `portal` | None | Optional top-layer or fixed-position transport |
| `items` | Automatic x/y | Ordered rows for a single focused point |
| `sort` | `color-domain` | Grouped row order |
| `sort` | `visual` | Grouped row order |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the documentation synchronization workflow for both generated copies.

Apply the public documentation changes only in the corresponding files under docs/, then run pnpm docs:sync.

  • packages/charts-core/docs/reference/focus-and-interaction.md#L141-L141: regenerate the default sort table entry.
  • packages/charts-core/docs/reference/focus-and-interaction.md#L194-L196: regenerate the visual-ordering policy description.
  • packages/charts-core/docs/guides/tooltips-and-focus.md#L102-L107: regenerate the grouped-ordering guidance.

As per coding guidelines, docs/**: Author public documentation only in the root docs/ tree; do not directly edit packages/charts-core/docs or either llms.txt file because those copies are generated by pnpm docs:sync.

📍 Affects 2 files
  • packages/charts-core/docs/reference/focus-and-interaction.md#L141-L141 (this comment)
  • packages/charts-core/docs/reference/focus-and-interaction.md#L194-L196
  • packages/charts-core/docs/guides/tooltips-and-focus.md#L102-L107
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/charts-core/docs/reference/focus-and-interaction.md` at line 141,
Update the corresponding public documentation in the root docs/ tree, not the
generated package copies: regenerate the default sort table entry,
visual-ordering policy description, and grouped-ordering guidance corresponding
to packages/charts-core/docs/reference/focus-and-interaction.md lines 141 and
194-196 and packages/charts-core/docs/guides/tooltips-and-focus.md lines
102-107, then run pnpm docs:sync to update all generated copies.

Source: Coding guidelines

@tannerlinsley
tannerlinsley merged commit 6d0435e into main Aug 1, 2026
17 checks passed
@tannerlinsley
tannerlinsley deleted the taren/visual-tooltip-order branch August 1, 2026 17:49
@github-actions github-actions Bot mentioned this pull request Aug 1, 2026
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