Line Format

The format to create a line on the Lucid document between two defined points.

PropertyDescription
idID
Identifier for a given line (must be unique).
Required
lineTypeLineType
Type that specifies how the line does, or does not, curve.
Required
endpoint1Endpoint
The first of two endpoints that specifies how and where the line will end.
Required
endpoint2Endpoint
The second of two endpoints that specifies how and where the line will end.
Required
strokeStroke
Stroke object that defines the look of the line.
Optional
textArray[LineText]
An array of line text objects. Multiple text objects can be on the same line.
Optional
customDataArray[CustomDatum]
An array of Custom Data objects.
Optional
linkedDataArray[LinkedDatum]
An array of Linked Data objects.
Optional
{
    "id": "line1",
    "lineType": "elbow",
    "endpoint1": {
        "type": "shapeEndpoint",
        "style": "none",
        "shapeId": "block3",
        "position": { "x": 1, "y": 1 }
    },
    "endpoint2": {
        "type": "lineEndpoint",
        "style": "arrow",
        "lineId": "line2",
        "position": 0.5
    },
    "stroke": {
        "color": "#000000",
        "width": 1,
        "style": "solid"
    },
    "text": [
        {
            "text": "test",
            "position": 0.5,
            "side": "middle"
        }
    ],
    "customData": [
        {
            "key": "TestKey",
            "value": "TestValue"
        }
    ],
    "linkedData": [
        {
            "collectionId": "network",
            "key": "9"
        }
    ]
}

Line Type

Defines the styling of a line's curvature.

ValueDescriptionImage
straightA line with no curves.Straight Line
elbowA line with elbow (right-angle) curves.Elbow Line
curvedA line with smooth curves.Curved Line

Endpoint

Defines where a line should end and the styling of the endpoint.

PropertyDescription
typeEndpointType
Type of endpoint to create.
Required
styleEndpointStyle
Style type which determines how the endpoint will appear.
Required

📘

These common endpoint fields are used on each specific type of endpoint.

Endpoint Type

The type of a given endpoint.

ValueDescription
lineEndpointAn endpoint that attaches to another line (see Line Endpoints for details).
shapeEndpointAn endpoint that attaches to a shape (see Shape Endpoints for details).
positionEndpointAn endpoint that is positioned somewhere on the canvas independent of a shape or line (see Position Endpoints for details).

Line Endpoint

An endpoint that attaches to another line.

PropertyDescription
Base Endpoint FieldsEndpoint fields that are common to each type of endpoint (see Endpoints for details).
lineIdID
The id for which line to attach the endpoint to.
Required
positionDouble
A relative position specifying where on the target line this endpoint should attach (must be between 0.0-1.0 inclusive).
Required
{
    "type": "lineEndpoint",
    "style": "arrow",
    "lineId": "line2",
    "position": 0.5
}

Shape Endpoint

An endpoint that attaches to a shape.

PropertyDescription
Base Endpoint FieldsEndpoint fields that are common to each type of endpoint (see Endpoints for details).
shapeIdID
The id for which shape to attach the endpoint to.
Required
positionRelativePosition
A relative position specifying where on the target shape this endpoint should attach.
Required
{
    "type": "shapeEndpoint",
    "style": "none",
    "shapeId": "block1",
    "position": { "x": 1, "y": 0.5 }
}

Position Endpoint

An endpoint that is positioned somewhere on the canvas independent of a shape or line.

PropertyDescription
Base Endpoint FieldsEndpoint fields that are common to each type of endpoint (see Endpoints for details).
positionAbsolutePosition
An absolute position specifying where on the canvas this endpoint should land.
{
    "type": "positionEndpoint",
    "style": "arrow",
    "position": { "x": 120, "y": -100 }
}

Endpoint Style

How to style the endpoint.

ValueDescription
noneNone
aggregationAggregation
arrowArrow
hollowArrowHollow Arrow
openArrowOpen Arrow
async1Async 1
async2Async 2
closedSquareClosed Square
openSquareOpen Square
bpmnConditionalBPMN Conditional
bpmnDefaultBPMN Default
closedCircleClosed Circle
openCircleOpen Circle
compositionComposition
exactlyOneExactly One
generalizationGeneralization
manyMany
nestingNesting
oneOne
oneOrMoreOne Or More
zeroOrMoreZero Or More
zeroOrOneZero Or One

Line Text

Defines what text should be displayed on the line and how it's styled.

PropertyDescription
textText
The text to display on the line.
positionDouble
A relative position specifying where on the target line this text should appear (must be between 0.0-1.0 inclusive).
sideLineSide
A type that specifies how the text should be displayed on the line.
{
    "text": "test",
    "position": 0.5,
    "side": "middle"
}

Line Side

The side of a line on which to position an object.

ValueDescription
topThe top of the line.
middleThe middle of the line, with the line passing behind the object.
bottomThe bottom of the line.