Skip to content

excel chart bar

zmworm edited this page Apr 13, 2026 · 16 revisions

Excel: Chart - bar

A dedicated page for the bar chart type. Bar charts display data as horizontal bars, ideal for ranked comparisons and long category labels.

Path: /{SheetName}/chart[N]

See also: Chart - add, Chart - set, column for the vertical variant.

Chart type variants

Type string Grouping 3D
bar Clustered No
barStacked Stacked No
barPercentStacked PercentStacked No
bar3d Clustered Yes

Bar-specific properties

Bar charts share all properties with column charts — the only difference is the orientation (horizontal vs vertical). See column for the full property reference:

  • gapWidth / gap — space between bar groups (0-500)
  • overlap — bar overlap (-100 to 100)
  • invertIfNeg / invertIfNegative — reverse for negative values
  • shape / barShape — 3D shape: box, cone, cylinder, pyramid

Examples

# 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 horizontal bars
officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=barStacked \
  --prop title="Task Breakdown" \
  --prop data="Dev:40,60,30;QA:20,15,25;Design:10,20,15" \
  --prop categories="Sprint 1,Sprint 2,Sprint 3"

HTML preview support

Feature Preview Notes
Horizontal bars Yes Labels on left axis
Stacked / percent stacked Yes
Gap width Yes
Data labels Yes Positioned at bar center
Reference lines Yes Vertical overlays
3D bars Yes Isometric projection
Custom axis scale Yes

See Also

  • Chart - Overview
  • column - Vertical variant (full property reference)

Based on OfficeCLI v1.0.43

Clone this wiki locally