Line
A plain line: its color, width and dash, or 'none' for no line. Shared by table cell borders and chart reference lines. A shape's outline is a Stroke, which adds what only an outline has (gradient, caps, joins, compound lines, arrowheads, sketch). Every part is optional and falls back to the default of the place the line is used.
Metadata
Field index
This definition uses the forms or value constraints below.
anyOf 1 · const
No line.
Exact constraints for anyOf 1
{
"const": "none",
"description": "No line."
}anyOf 2 · object
| Field | Type | Req. | Default | Description |
|---|---|---|---|---|
| color | ref:ColorRef | — | — | Line color: any ColorRef (eight-digit hex keeps its alpha).
|
| width | number | — | — | Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'. |
| dash | enum | — | — | Dash pattern, by the names Stroke.dash uses.
|
color
typeref:ColorRefrequirednodefault—
Line color: any ColorRef (eight-digit hex keeps its alpha).
Named choices are not exhaustive. See the schema for other values and constraints.
color,color (anyOf 4).color· Named choices"accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "dark1", "dark2", "light1", "light2", "hyperlink", "followedHyperlink", "primary", "secondary", "accent", "background", "surface", "surfaceAlt", "text", "textSecondary"
width
typenumberrequirednodefault—
Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'.
dash
typeenumrequirednodefault—
Dash pattern, by the names Stroke.dash uses.
dash· Allowed values"solid""dash""dot"
{
"dash": "solid"
}Exact constraints for anyOf 2
{
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"$ref": "#/$defs/ColorRef",
"description": "Line color: any ColorRef (eight-digit hex keeps its alpha)."
},
"width": {
"type": "number",
"minimum": 0,
"maximum": 64,
"description": "Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'."
},
"dash": {
"type": "string",
"enum": [
"solid",
"dash",
"dot"
],
"description": "Dash pattern, by the names Stroke.dash uses."
}
}
}Complete definition constraints
{
"description": "A plain line: its color, width and dash, or 'none' for no line. Shared by table cell borders and chart reference lines. A shape's outline is a Stroke, which adds what only an outline has (gradient, caps, joins, compound lines, arrowheads, sketch). Every part is optional and falls back to the default of the place the line is used.",
"anyOf": [
{
"const": "none",
"description": "No line."
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"$ref": "#/$defs/ColorRef",
"description": "Line color: any ColorRef (eight-digit hex keeps its alpha)."
},
"width": {
"type": "number",
"minimum": 0,
"maximum": 64,
"description": "Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'."
},
"dash": {
"type": "string",
"enum": [
"solid",
"dash",
"dot"
],
"description": "Dash pattern, by the names Stroke.dash uses."
}
}
}
],
"examples": [
"none",
{
"width": 2
},
{
"color": "accent2",
"width": 2,
"dash": "dash"
}
]
}value· Named choices (see schema for other values and constraints)"none"