Pie
A filled sector of an ellipse, defined by its bounding box and angular range.
- class pptx_shapes.shapes.Pie(x: float, y: float, width: float, height: float, start_angle: float = 0, end_angle: float = 180, angle: float = 0, fill: pptx_shapes.style.fill_style.FillStyle | None = None, stroke: pptx_shapes.style.stroke_style.StrokeStyle | None = None)
Parameters
x(float) – left position (in centimeters).y(float) – top position (in centimeters).width(float) – width (in centimeters).height(float) – height (in centimeters).start_angle(float, optional) – start angle of the pie (in degrees, default0)end_angle(float, optional) – end angle of the pie (in degrees, default180)angle(float, optional) – rotation in degrees, default is0.fill(FillStyle, optional) – fill style.stroke(StrokeStyle, optional) – stroke style.
Example
from pptx_shapes.enums import LineDash
from pptx_shapes.shapes import Pie
pie = Pie(
x=24, y=9, width=5, height=8,
start_angle=90, end_angle=270,
stroke=StrokeStyle(color="#f00", thickness=2.5)
)