Skip to content

Interface: OptsChartGridLine ​

The stroke a plot draws its gridlines (or a stacked bar its series lines) with.

A StrokeProps, so it takes width, dashType, type, cap, color and transparency under the same names a table border does. size and style are the pre-4.0 spellings and still work; see their notes for the exact mapping.

Defaults where a gridline is drawn: color: '888888', width: 1, cap: 'flat', solid.

Extends ​

Properties ​

cap? ​

optional cap?: LineCap

Line end cap style

Default ​

ts
'flat'

Inherited from ​

StrokeProps.cap


color? ​

optional color?: string

Stroke colour — a 6-digit hex RGB or a SchemeColor token.

Examples ​

ts
'FF3399'
ts
SchemeColor.accent1

Inherited from ​

StrokeProps.color


dashType? ​

optional dashType?: "dash" | "solid" | "dot" | "lgDash" | "dashDot" | "lgDashDot" | "lgDashDotDot" | "sysDash" | "sysDot" | "sysDashDot" | "sysDashDotDot"

Dash pattern, over the full ST_PresetLineDashVal set, so any dash a source deck can carry can also be authored.

type is only a coarse three-way switch, so every dashed stroke it can express collapses onto sysDash. Set this to pick the exact a:prstDash preset instead: dashType: 'lgDashDot' emits <a:prstDash val="lgDashDot"/>.

Precedence. When both are set, dashType wins over type for the dash pattern — { type: 'solid', dashType: 'sysDot' } draws a dotted rule. The one exception is type: 'none', which suppresses the stroke entirely and is decided before any dash pattern is chosen. An unrecognized value warns and falls back to what type implies.

Example ​

ts
{ type: 'solid', color: '999999', dashType: 'lgDash' }

Inherited from ​

StrokeProps.dashType


size? ​

optional size?: number

Gridline size (points).

Deprecated ​

Use StrokeProps.width. width wins when both are set.


style? ​

optional style?: "none" | "dash" | "solid" | "dot"

Gridline style.

'none' omits the gridlines entirely and is the same statement as type: 'none'; 'solid', 'dash' and 'dot' are a:prstDash presets and map onto dashType unchanged — note that this 'dash' is the literal dash preset, where StrokeProps.type: 'dash' means sysDash.

Deprecated ​

Use StrokeProps.dashType (or type: 'none'). dashType and an explicit type both win when set.


transparency? ​

optional transparency?: number

Stroke transparency (percent, 0-100).

  • MS-PPT > Format Shape > Fill & Line > Line > Transparency

Default ​

ts
0

Inherited from ​

StrokeProps.transparency


type? ​

optional type?: "none" | "dash" | "solid"

Coarse three-way switch: 'none' suppresses the stroke, 'dash' asks for a dashed one, 'solid' for an unbroken one.

Inherited from ​

StrokeProps.type


width? ​

optional width?: number

Stroke width, in points.

  • MS-PPT > Format Shape > Fill & Line > Line > Width

Inherited from ​

StrokeProps.width