-
Notifications
You must be signed in to change notification settings - Fork 546
excel chart column
zmworm edited this page Apr 13, 2026
·
17 revisions
A dedicated page for column and bar chart types. Both are rendered
by the same OOXML element (c:barChart / c:bar3DChart) with
c:barDir controlling the orientation. Column = vertical bars, bar =
horizontal bars.
Path: /{SheetName}/chart[N]
See also: Chart - add, Chart - set.
| Type string | Direction | Grouping | 3D |
|---|---|---|---|
column |
Vertical | Clustered | No |
columnStacked |
Vertical | Stacked | No |
columnPercentStacked |
Vertical | PercentStacked | No |
column3d |
Vertical | Clustered | Yes |
bar |
Horizontal | Clustered | No |
barStacked |
Horizontal | Stacked | No |
barPercentStacked |
Horizontal | PercentStacked | No |
bar3d |
Horizontal | Clustered | Yes |
| Property | Default | Notes |
|---|---|---|
gapWidth / gap
|
150 | Space between bar groups (0-500, as % of bar width) |
# Tight bars (no gap)
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=column --prop gapWidth=0 \
--prop data="Sales:10,20,30" --prop categories="A,B,C"
# Wide gap
officecli set data.xlsx /Sheet1/chart[1] --prop gapWidth=300| Property | Default | Notes |
|---|---|---|
overlap |
0 (clustered), 100 (stacked) | Bar overlap (-100 to 100, as % of bar width) |
Positive values overlap bars; negative values add space between bars within the same category group.
officecli set data.xlsx /Sheet1/chart[1] --prop overlap=50| Property | Default | Notes |
|---|---|---|
invertIfNeg / invertIfNegative
|
false |
Reverse bar color/direction for negative values |
officecli set data.xlsx /Sheet1/chart[1] --prop invertIfNeg=true| Property | Default | Notes |
|---|---|---|
shape / barShape
|
box |
3D bar shape: box, cone, cylinder, pyramid
|
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=column3d --prop shape=cylinder \
--prop data="Q:10,20,30,40" --prop categories="Q1,Q2,Q3,Q4"# Basic column chart
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=column \
--prop title="Quarterly Sales" \
--prop data="East:120,180,210,250;West:90,140,160,200" \
--prop categories="Q1,Q2,Q3,Q4"
# Horizontal bar chart
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=bar \
--prop title="Department Budget" \
--prop data="Budget:50,80,120,60" \
--prop categories="Engineering,Sales,Marketing,Support"
# Stacked column with reference line
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=columnStacked \
--prop title="Revenue Breakdown" \
--prop data="Product:40,50,60;Service:20,30,40" \
--prop categories="Q1,Q2,Q3" \
--prop "referenceLine=80:FF0000:1:dash"| Feature | Preview | Notes |
|---|---|---|
| Vertical columns | Yes | |
| Horizontal bars | Yes | |
| Stacked / percent stacked | Yes | |
| Gap width | Yes | |
| Data labels | Yes | Positioned at bar center |
| Reference lines | Yes | Horizontal (column) or vertical (bar) |
| 3D bars | Yes | Isometric projection |
| Custom axis scale | Yes |
Based on OfficeCLI v1.0.43