A dedicated page for the stock (OHLC) chart type. Stock charts
display financial data with high-low-close (HLC) or
open-high-low-close (OHLC) candlestick visualization.
Path: /{SheetName}/chart[N]
Add command shape:
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=stock \
--prop title=" AAPL Weekly" \
--prop categories=" Mon,Tue,Wed,Thu,Fri" \
--prop series1=" Open:100,102,101,105,108" \
--prop series2=" High:105,108,106,110,112" \
--prop series3=" Low:98,100,99,102,105" \
--prop series4=" Close:103,101,104,107,110" \
< styling props>
See also: Chart - add , Chart - set .
Type string
Aliases
stock
ohlc
Stock charts require series in a specific order:
Series count
Order
Display
3 series
High, Low, Close
High-low lines with close markers
4 series
Open, High, Low, Close
Full candlestick chart
# HLC (3 series)
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=stock \
--prop categories=" Mon,Tue,Wed,Thu,Fri" \
--prop series1=" High:105,108,106,110,107" \
--prop series2=" Low:98,100,99,102,100" \
--prop series3=" Close:103,101,104,107,103"
# OHLC (4 series) — full candlestick
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=stock \
--prop categories=" Mon,Tue,Wed,Thu,Fri" \
--prop series1=" Open:100,102,101,105,108" \
--prop series2=" High:105,108,106,110,112" \
--prop series3=" Low:98,100,99,102,105" \
--prop series4=" Close:103,101,104,107,110"
The stock chart renders as:
High-low wicks : vertical lines from high to low at each category
Open-close bars (4-series only): filled rectangles between open
and close prices
Up bars : white/green fill when close > open (bullish)
Down bars : black/red fill when close < open (bearish)
Default colors: up = #FFFFFF (white), down = #000000 (black).
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"
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"
Property
Default
Notes
axisMin / min
(auto)
Value axis lower bound
axisMax / max
(auto)
Value axis upper bound
majorUnit
(auto)
Major gridline / tick interval
minorUnit
(auto)
Minor gridline / tick interval
axisNumFmt / axisNumberFormat
General
Number format for tick labels (e.g. "$#,##0", "0%")
# Lock Y axis to price range
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=stock \
--prop categories=" Mon,Tue,Wed,Thu,Fri" \
--prop series1=" High:105,108,106,110,107" \
--prop series2=" Low:98,100,99,102,100" \
--prop series3=" Close:103,101,104,107,103" \
--prop axisMin=90 --prop axisMax=120 --prop majorUnit=5
Property
Default
Notes
logBase / logScale
—
Logarithmic scale base (e.g. 10)
Property
Default
Notes
axisOrientation / axisReverse
minMax
Set to maxMin or true to flip the Y axis
Property
Default
Notes
dispUnits / displayUnits
—
thousands, millions, billions, etc.
Axis visibility and styling
Property
Default
Notes
axisVisible / axis.visible
true
Show/hide both axes
axisLine / axis.line
—
Value axis line: "color:width:dash"
catAxisLine
—
Category axis line: "color:width:dash"
majorTickMark / majorTick
—
out, in, cross, none
minorTickMark / minorTick
—
Same as major tick
tickLabelPos
nextTo
nextTo, high, low, none
Property
Default
Notes
gridlines / majorGridlines
true
Toggle or configure: true, false/none, or "color:widthPt:dash"
minorGridlines
false
Same format as gridlines
# Custom gridlines for price chart
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=stock \
--prop categories=" Mon,Tue,Wed,Thu,Fri" \
--prop series1=" High:105,108,106,110,107" \
--prop series2=" Low:98,100,99,102,100" \
--prop series3=" Close:103,101,104,107,103" \
--prop " gridlines=D0D0D0:0.5:solid" \
--prop " minorGridlines=EEEEEE:0.3:sysDot"
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"
Property
Default
Notes
dataLabels
false
Toggle data labels
labelPos / labelPosition
—
Position: center, insideEnd, insideBase, outsideEnd, top, bottom, left, right, bestFit
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
Property
Default
Notes
transparency
0
Series transparency (0-100%)
opacity / alpha
100
Series opacity (0-100%)
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
Property
Default
Notes
dispBlanksAs / blanksAs
gap
How blank cells are handled: gap, zero, span/connect
Property
Default
Notes
colorRule / conditionalColor
—
Color data points conditionally
point{N}.color
—
Individual data point color (hex)
Full example: presentation-grade stock chart
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=stock \
--prop title=" AAPL Weekly OHLC" \
--prop title.size=14 --prop title.bold=true \
--prop title.font=" Arial" --prop title.color=1F2937 \
--prop categories=" Mon,Tue,Wed,Thu,Fri" \
--prop series1=" Open:100,102,101,105,108" \
--prop series2=" High:105,108,106,110,112" \
--prop series3=" Low:98,100,99,102,105" \
--prop series4=" Close:103,101,104,107,110" \
--prop " gridlines=E5E7EB:0.5:solid" \
--prop axisMin=95 --prop axisMax=115 --prop majorUnit=5 \
--prop " axisNumFmt=$# ,##0" \
--prop plotFill=FAFBFC \
--prop legend=bottom \
--prop " legendfont=9:6B7280:Arial" \
--prop x=0 --prop y=0 --prop width=14 --prop height=20
Feature
Preview
Notes
Candlestick bars
Yes
Open-close rectangles
High-low wicks
Yes
Vertical lines
Up/down coloring
Yes
From OOXML or defaults
Data labels
Yes
Value text near bars
Custom axis scale
Yes
axisMin/axisMax/majorUnit
Gridlines
Yes
Color, width, dash from OOXML
Shadow effects
No
Decorative; not rendered
Glow effects
No
Decorative; not rendered
Series order is strict. Providing series out of the expected
OHLC order produces incorrect rendering. The chart does not
auto-detect which series is "High" vs "Low".
Up/down bar colors default to white/black in OOXML but are
rendered as green/red in the HTML preview when no explicit colors
are specified.
Inspect an existing stock 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
Chart - Overview of chart operations
Chart add - Generic chart add (all types)
Chart set - Modify existing charts
Chart get - Read back chart properties
Line chart - Drop lines, high-low lines, up-down bars (shared elements)
Based on OfficeCLI v1.0.64