PPTX

Lines and Connectors

Add lines and connector shapes between elements

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 }
          }
        }
      ]
    }
  ]
}

Vertical Line

{
  "slides": [
    {
      "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 }
          }
        }
      ]
    }
  ]
}

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 }
          }
        }
      ]
    }
  ]
}

Arrowhead Types

ValueDescription
"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 }
          }
        }
      ]
    }
  ]
}

Line Options

PropertyTypeDescription
x1numberStart X position
y1numberStart Y position
x2numberEnd X position
y2numberEnd Y position
fillFillOptionsLine fill
outlineOutlineOptionsOutline (color, width, dashStyle)

Connector Options

PropertyTypeDescription
x1numberStart X position
y1numberStart Y position
x2numberEnd X position
y2numberEnd Y position
fillFillOptionsLine fill
outlineOutlineOptionsOutline (color, width, dashStyle)
beginArrowheadArrowheadTypeArrowhead at start
endArrowheadArrowheadTypeArrowhead 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 |

Copyright © 2026