Skip to content

Interface: LayoutSelection ​

One item of selections.

Template defaults for every item go in selectiondefaults.

Properties ​

PropertyTypeDefault valueDescription
line?LayoutSelectionLineundefinedOutline style.
name?stringundefinedName of this selection, used to reference it from a template via templateitemname.
opacity?number0.7Opacity of the outline. Range: 0 – 1
path?stringundefinedPolygon of a path selection, SVG-like in data units: M x,y L x,y … Z (also H, V and relative commands). Dates use _ between date and time (2024-01-05_12:00).
templateitemname?stringundefinedName of a template selection to inherit from. If no template item matches, this selection is hidden (visible: false).
type?"rect" | "path"undefinedrect: the box from (x0, y0) to (x1, y1); path: the polygon path (lasso). Default: path when path is set, else rect.
visible?booleantrueWhether this selection applies (set to false by the template machinery when templateitemname names no template selection).
x0?unknownundefinedStart x of a rect, in data units of xref (dates, category names or indices; data values on log axes). A rect needs all four of x0, x1, y0, y1.
x1?unknownundefinedEnd x of a rect.
xref?"x" | `x${number}`"x"The x axis the coordinates refer to (x, x2, …).
y0?unknownundefinedStart y of a rect.
y1?unknownundefinedEnd y of a rect.
yref?"y" | `y${number}`"y"The y axis the coordinates refer to (y, y2, …).

Released under the MIT License.