Skip to content

feat(chart): doughnut hole size and first-slice angle - #1136

Open
vitordj wants to merge 1 commit into
scanny:masterfrom
vitordj:donuthole
Open

feat(chart): doughnut hole size and first-slice angle#1136
vitordj wants to merge 1 commit into
scanny:masterfrom
vitordj:donuthole

Conversation

@vitordj

@vitordj vitordj commented Jun 15, 2026

Copy link
Copy Markdown

Implements the long-standing request (issue #493) to control the doughnut chart hole through the API, plus the sibling rotation control:

  • DoughnutPlot.hole_size (c:holeSize@val, 1..90, default 10)
  • DoughnutPlot.first_slice_angle (c:firstSliceAng@val, 0..360, default 0)

Adds CT_DoughnutHoleSize/CT_FirstSliceAng element classes, accessors on CT_DoughnutChart, and ST_HoleSize/ST_FirstSliceAng simple types with range validation. Tests: tests/chart/test_plot_ext.py (6); upstream tests/chart & tests/oxml unchanged.

Implements the long-standing request (issue scanny#493) to control the doughnut
chart hole through the API, plus the sibling rotation control:

- DoughnutPlot.hole_size (c:holeSize@val, 1..90, default 10)
- DoughnutPlot.first_slice_angle (c:firstSliceAng@val, 0..360, default 0)

Adds CT_DoughnutHoleSize/CT_FirstSliceAng element classes, accessors on
CT_DoughnutChart, and ST_HoleSize/ST_FirstSliceAng simple types with range
validation. Tests: tests/chart/test_plot_ext.py (6); upstream tests/chart &
tests/oxml unchanged.
lofcz added a commit to lofcz/python-pptx2 that referenced this pull request Aug 30, 2026
Read/write int property (0..359 degrees, clockwise from 12 o'clock)
on DoughnutPlot, mapped to the <c:firstSliceAng> element of
c:doughnutChart via new ST_FirstSliceAng / CT_FirstSliceAng oxml
plumbing. Works on charts opened from a file and on charts created
with add_chart; CategoryChartData.first_slice_angle bakes the angle
into newly created doughnut charts through the chart XML writer.

Port of scanny#1136 (and scanny#350) by vitordj and jbq.
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