Skip to content

chore(docs): Custom color example should use fewer sections#12559

Open
rebeccaalpert wants to merge 1 commit into
patternfly:mainfrom
rebeccaalpert:pie-chart
Open

chore(docs): Custom color example should use fewer sections#12559
rebeccaalpert wants to merge 1 commit into
patternfly:mainfrom
rebeccaalpert:pie-chart

Conversation

@rebeccaalpert

@rebeccaalpert rebeccaalpert commented Jul 14, 2026

Copy link
Copy Markdown
Member

Two blue sections were being used. This caused a problem in high contrast mode since the sections are highlighted. This commit should adjust us down to one section, but allow us to keep the cute pyramid-in-sky effect.

Example: https://pf-react-pr-12559.surge.sh/components/charts/pie-chart#custom-color-scale

Fixes #12423

Assisted-by: Cursor

Summary by CodeRabbit

  • Bug Fixes
    • Updated the custom-color pie chart example to display the correct slice values and labels.
    • Corrected pie chart angle calculations for consistent full-circle rendering.

Two blue sections were being used. This caused a problem in high contrast mode since the sections are highlighted. This commit should adjust us down to one section, but allow us to keep the cute pyramid-in-sky effect.

Fixes patternfly#12423

Assisted-by: Cursor
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The custom color pie chart example removes a duplicate “Sky” slice, changes its value, and derives startAngle and endAngle from pyramidStartAngle.

Changes

Pie chart example

Layer / File(s) Summary
Update slice data and angle boundaries
packages/react-charts/src/victory/components/ChartPie/examples/ChartPieCustomColorScale.tsx
The example removes the duplicate “Sky” entry, updates its y value, and sets the chart angles from pyramidStartAngle.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The example now removes the duplicated Sky slice and keeps a single blue section, matching #12423's requirement.
Out of Scope Changes check ✅ Passed The changes stay within the pie chart example and do not introduce clearly unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and correctly reflects the main change: the custom color example now uses fewer pie sections.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@patternfly-build

patternfly-build commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

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.

Pie Chart - custom color example uses two identical pie sections

3 participants