Lines and Connectors
Use the line property for straight lines and the connector property for lines with arrowheads.
Line Shape
Lines use start/end point coordinates:
{
"slides": [
{
"children": [
{
"line": {
"x1": 50,
"y1": 120,
"x2": 800,
"y2": 120,
"outline": { "color": "4472C4", "width": 2 }
}
}
]
}
]
}
{
children: [
{
line: {
x1: 50,
y1: 120,
x2: 800,
y2: 120,
outline: { color: "4472C4", width: 2 },
},
},
],
}
Vertical Line
{
"slides": [
{
"children": [
{
"line": {
"x1": 200,
"y1": 150,
"x2": 200,
"y2": 450,
"outline": { "color": "ED7D31", "width": 2 }
}
}
]
}
]
}
{
children: [
{
line: {
x1: 200,
y1: 150,
x2: 200,
y2: 450,
outline: { color: "ED7D31", width: 2 },
},
},
],
}
Diagonal Line
{
"slides": [
{
"children": [
{
"line": {
"x1": 250,
"y1": 150,
"x2": 750,
"y2": 450,
"outline": { "color": "70AD47", "width": 3 }
}
}
]
}
]
}
{
children: [
{
line: {
x1: 250,
y1: 150,
x2: 750,
y2: 450,
outline: { color: "70AD47", width: 3 },
},
},
],
}
Connector with Arrowheads
Connectors support arrowhead endpoints:
{
"slides": [
{
"children": [
{
"connector": {
"x1": 50,
"y1": 130,
"x2": 400,
"y2": 130,
"endArrowhead": "triangle",
"outline": { "color": "4472C4", "width": 2 }
}
},
{
"connector": {
"x1": 50,
"y1": 200,
"x2": 400,
"y2": 200,
"beginArrowhead": "triangle",
"endArrowhead": "triangle",
"outline": { "color": "ED7D31", "width": 2 }
}
}
]
}
]
}
{
children: [
{
connector: {
x1: 50,
y1: 130,
x2: 400,
y2: 130,
endArrowhead: "triangle",
outline: { color: "4472C4", width: 2 },
},
},
{
connector: {
x1: 50,
y1: 200,
x2: 400,
y2: 200,
beginArrowhead: "triangle",
endArrowhead: "triangle",
outline: { color: "ED7D31", width: 2 },
},
},
],
}
Arrowhead Types
| Value | Description |
|---|---|
"triangle" | Filled triangle |
"stealth" | Stealth arrow |
"diamond" | Diamond shape |
"oval" | Oval circle |
"open" | Open arrow |
"none" | No arrowhead |
Arrowheads also support size control:
{
"slides": [
{
"children": [
{
"connector": {
"x1": 500,
"y1": 410,
"x2": 800,
"y2": 410,
"endArrowhead": "triangle",
"arrowheadWidth": "large",
"arrowheadLength": "large",
"outline": { "color": "ED7D31", "width": 2 }
}
}
]
}
]
}
{
children: [
{
connector: {
x1: 500,
y1: 410,
x2: 800,
y2: 410,
endArrowhead: "triangle",
arrowheadWidth: "large",
arrowheadLength: "large",
outline: { color: "ED7D31", width: 2 },
},
},
],
}
Line Options
| Property | Type | Description |
|---|---|---|
x1 | number | Start X position |
y1 | number | Start Y position |
x2 | number | End X position |
y2 | number | End Y position |
fill | FillOptions | Line fill |
outline | OutlineOptions | Outline (color, width, dashStyle) |
Connector Options
| Property | Type | Description |
|---|---|---|
x1 | number | Start X position |
y1 | number | Start Y position |
x2 | number | End X position |
y2 | number | End Y position |
fill | FillOptions | Line fill |
outline | OutlineOptions | Outline (color, width, dashStyle) |
beginArrowhead | ArrowheadType | Arrowhead at start |
endArrowhead | ArrowheadType | Arrowhead at end |
arrowheadWidth | "small" | "medium" | "large" | Arrowhead width |
arrowheadLength | "small" | "medium" | "large" | Arrowhead length |
OutlineOptions
| Property | Type | Description |
| ----------- | --------------------------------------------------------------------- | ----------------- | ---------- |
| color | string | Hex color |
| width | number | UniversalMeasure | Line width |
| dashStyle | "solid" \| "dash" \| "dashDot" \| "lgDash" \| "sysDot" \| "sysDash" | Dash style |