Skip to content

Label Splitting

Label splitting is a powerful SQL extension that allows you to break long label text into multiple readable lines within a node. It gives you control over where lines break and how each line is aligned (left, center, or right), resulting in cleaner, more balanced, and professional-looking diagrams.

When to Use Label Splitting

  • Long titles or descriptions that make nodes too wide
  • Improving readability in dense diagrams
  • Creating consistent node widths across different amounts of text

How It Works

Add two columns to your SQL query

Column NameDescription
SPLIT LENGTHDesired maximum characters per line
LINE ENDINGLine break character and alignment

as follows:

sql
        '5'  as [SPLIT LENGTH],
        '\n' as [LINE ENDING],

In this example, the label will be split into multiple lines at boundaries as close as possible to 12 characters. Splits occur only at spaces, so any word longer than 12 characters will remain unbroken.

Line endings can be any string[1]. The most commonly used line endings are:

Line EndingMeaning / Usage
\nNew line with center alignment
\rNew line with right alignment
\lNew line with left alignment
|Pipe delimiter (useful for Record shapes)
<br/>HTML line break (for HTML‑like labels)

[1] New line \n is the default if SPLIT LENGTH is specified, but LINE ENDING is omitted.

Here is an example:

Before:

This is a very long label that stretches the node

After:

This is a very
long label
that stretches
the node

Released under the MIT License.