Skip to content

feat(component): add donut center text and Top-N grouping for pie chart - #174

Closed
alfredo1996 wants to merge 3 commits into
devfrom
feat/issue-139-pie-donut
Closed

feat(component): add donut center text and Top-N grouping for pie chart#174
alfredo1996 wants to merge 3 commits into
devfrom
feat/issue-139-pie-donut

Conversation

@alfredo1996

Copy link
Copy Markdown
Owner

Summary

  • Top-N grouping: group slices beyond top N into "Other" slice
  • Donut center text: show total or custom label in the donut center hole

Changes

  • groupTopN() in chart-utils.ts + 5 tests
  • PieChart: topN and donutCenterText props
  • GraphicComponent registered in ECharts
  • Chart options: "Top N Slices", "Donut Center Text"

Closes #139
🤖 Generated with Claude Code

- groupTopN() utility: groups slices beyond top N into "Other"
- Donut center text: shows total or custom text via ECharts graphic element
- Register GraphicComponent in ECharts
- New chart options: topN, donutCenterText
- 5 new tests for groupTopN

Closes #139

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alfredo1996 alfredo1996 added enhancement New feature or request pkg:component UI component library area:charts Chart rendering labels Mar 22, 2026
@coderabbitai

coderabbitai Bot commented Mar 22, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@alfredo1996 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5692bd3f-aaf0-4121-a5fc-e8c4c538c9b0

📥 Commits

Reviewing files that changed from the base of the PR and between 59e78c2 and 1a29765.

📒 Files selected for processing (7)
  • component/src/charts/__tests__/base-chart.test.tsx
  • component/src/charts/__tests__/pie-utils.test.ts
  • component/src/charts/base-chart.tsx
  • component/src/charts/chart-utils.ts
  • component/src/charts/pie-chart.tsx
  • component/src/components/composed/chart-options-schema.ts
  • component/vitest.setup.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-139-pie-donut

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 and usage tips.

alfredorubin96 and others added 2 commits March 23, 2026 01:46
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

alfredo1996 pushed a commit that referenced this pull request Mar 24, 2026
…els, markLine, pie donut)

Merges PRs #169, #170, #171, #173, #174 into a single release branch.
Resolves merge conflicts in chart-utils.ts, bar-chart.tsx, line-chart.tsx,
and chart-options-schema.ts.

Includes:
- Number formatting for single-value and tooltips (#169)
- DataZoom support for bar and line charts (#170)
- Auto-rotate and truncate axis labels (#171)
- Reference lines (markLine) for bar and line charts (#173)
- Donut center text and Top-N grouping for pie chart (#174)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alfredo1996

Copy link
Copy Markdown
Owner Author

Superseded by consolidated PR #185 (release/chart-improvements)

@alfredo1996
alfredo1996 deleted the feat/issue-139-pie-donut branch March 29, 2026 22:22
alfredo1996 pushed a commit that referenced this pull request May 10, 2026
…els, markLine, pie donut)

Merges PRs #169, #170, #171, #173, #174 into a single release branch.
Resolves merge conflicts in chart-utils.ts, bar-chart.tsx, line-chart.tsx,
and chart-options-schema.ts.

Includes:
- Number formatting for single-value and tooltips (#169)
- DataZoom support for bar and line charts (#170)
- Auto-rotate and truncate axis labels (#171)
- Reference lines (markLine) for bar and line charts (#173)
- Donut center text and Top-N grouping for pie chart (#174)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:charts Chart rendering enhancement New feature or request pkg:component UI component library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(component): add donut center text and Top-N grouping for pie chart

2 participants