Skip to content

excel chart doughnut

zmworm edited this page Apr 29, 2026 · 16 revisions

Excel: Chart - doughnut

A dedicated page for the doughnut chart type. Doughnut charts display proportional data as a ring, with a configurable center hole. Ideal for KPI dashboards and progress indicators.

Path: /{SheetName}/chart[N]

Add command shape:

officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=doughnut \
  --prop title="Market Share" \
  --prop data="Share:40,30,20,10" \
  --prop categories="A,B,C,D" \
  <styling props>

See also: Chart - add, Chart - set, pie for the filled variant.

Doughnut-specific properties

Hole size

Property Default Notes
holeSize 50 Ring thickness as % of radius (0-100)
officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=doughnut --prop holeSize=75 \
  --prop data="Share:40,30,20,10" --prop categories="A,B,C,D"

# Thin ring for KPI gauge
officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=doughnut --prop holeSize=85 \
  --prop data="Status:70,30" --prop categories="Complete,Remaining" \
  --prop colors="4CAF50,E0E0E0"

Shared with pie

Doughnut charts support the same properties as pie charts:

  • explosion / explode — pull slices outward (0-400)
  • series{N}.point{M}.explosion — per-slice explosion
  • colors — comma-separated hex colors for slices
  • point{N}.color — override individual slice color
  • dataLabelstrue, percent, value, category, all

See pie for full details on these properties.

Title styling

Property Default Notes
title Chart title text
title.font / titleFont Font family
title.size / titleSize Font size (pt)
title.color / titleColor Font color (hex)
title.bold / titleBold Bold (true/false)
title.glow / titleGlow Glow: "COLOR-RADIUS-OPACITY" or "none"
title.shadow / titleShadow Shadow: "COLOR-BLUR-ANGLE-DIST-OPACITY" or "none"

Legend

Property Default Notes
legend true Position: top, bottom, left, right, none
legend.overlay false Float legend on top of the chart
legendFont / legend.font "size:color:fontname"

Fills and borders

Property Default Notes
plotFill / plotAreaFill Plot area background: hex, gradient "C1-C2[:angle]", or "none"
chartFill / chartAreaFill Chart area background
plotArea.border / plotBorder Plot area outline: "color:width:dash" or "none"
chartArea.border / chartBorder Chart area outline

Series shadow and outline

Property Default Notes
series.shadow / seriesShadow "COLOR-BLUR-ANGLE-DIST-OPACITY" or "none"
series.outline / seriesOutline "COLOR-WIDTH" e.g. "FFFFFF-0.5" or "none"

Data labels

Property Default Notes
dataLabels false Toggle: true, percent, value, category, all
labelFont "size:color:bold"
dataLabel{N}.text Custom text for individual label
dataLabel{N}.x/y/w/h Manual layout of individual label
dataLabel{N}.delete Hide individual label
dataLabels.separator Separator between label parts
dataLabels.numFmt Number format for labels

Transparency and opacity

Property Default Notes
transparency 0 Series transparency (0-100%)
opacity / alpha 100 Series opacity (0-100%)
# Translucent doughnut ring
officecli set data.xlsx /Sheet1/chart[1] --prop transparency=20

Layout control

Property Default Notes
x, y 0 Chart position (column/row index)
width 8 Chart width (column units)
height 15 Chart height (row units)
plotArea.x/y/w/h Manual plot area layout (0-1 decimal)
title.x/y/w/h Manual title layout
legend.x/y/w/h Manual legend layout

Conditional coloring

Property Default Notes
colorRule / conditionalColor Color data points conditionally
point{N}.color Individual data point color (hex)

Examples

# Basic doughnut
officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=doughnut \
  --prop title="Market Share" \
  --prop data="Share:40,30,20,10" \
  --prop categories="A,B,C,D"

# KPI gauge with thin ring
officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=doughnut \
  --prop title="Completion" \
  --prop data="Progress:85,15" \
  --prop categories="Done,Remaining" \
  --prop holeSize=80 \
  --prop colors="4CAF50,E0E0E0"

Full example: presentation-grade doughnut chart

officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=doughnut \
  --prop title="Revenue Distribution" \
  --prop title.size=16 --prop title.bold=true \
  --prop title.font="Arial" --prop title.color=1F2937 \
  --prop data="Share:35,25,22,18" \
  --prop categories="Product A,Product B,Product C,Other" \
  --prop colors="4472C4,ED7D31,70AD47,A5A5A5" \
  --prop holeSize=60 \
  --prop dataLabels=percent \
  --prop "legendfont=9:6B7280:Arial" \
  --prop plotFill=FAFBFC \
  --prop legend=right \
  --prop series.outline="FFFFFF-0.5" \
  --prop x=0 --prop y=0 --prop width=12 --prop height=16

HTML preview support

Feature Preview Notes
Doughnut ring Yes Concentric arcs with hole
Per-slice colors Yes From theme or custom
Data labels (%, value) Yes Suppressed for slices <5%
Explosion No Stored in OOXML but not rendered
Shadow effects No Decorative; not rendered
Glow effects No Decorative; not rendered

Known quirks

  • Doughnut ignores labelPos. OOXML schema does not allow dLblPos on doughnut charts; the property is silently skipped.
  • No firstSliceAngle. Unlike pie, doughnut does not support first slice rotation.
  • Single series only. Doughnut charts take one series; multiple series are not supported.
  • No axes or gridlines. Doughnut charts have no axis system; axis-related properties are silently ignored.

Inspect an existing doughnut chart

# List all charts
officecli query data.xlsx chart

# Inspect a specific chart
officecli get data.xlsx "/Sheet1/chart[1]"

# Render to HTML preview
officecli view data.xlsx html > preview.html

See Also

  • Chart - Overview of chart operations
  • Chart add - Generic chart add (all types)
  • Chart set - Modify existing charts
  • Chart get - Read back chart properties
  • pie - Filled variant (shared properties)

Based on OfficeCLI v1.0.64

Clone this wiki locally