Skip to main content

LegendEntry

One line of a legend.

This is an interface exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { LegendEntry } from "@mapcairn/core";

interface LegendEntry

Properties​

colour​

readonly colour: PaletteSlot;

The palette slot of the glyph.

dash​

readonly dash?: LineDash;

The dashing of a line glyph.

label​

readonly label: string;

The row's words.

pattern​

readonly pattern?: FillPattern;

The hatching of an area glyph.

radius​

readonly radius: number;

The glyph's radius in CSS pixels.

shape​

readonly shape: MarkerShape;

The marker shape of the glyph.

swatch​

readonly swatch?: "marker" | "area" | "line" | "density";

What the swatch draws. A marker (the default) uses shape and radius; an area or a line also uses pattern, dash and width, so the key shows every signal the map does.

width​

readonly width?: number;

The stroke width of a line glyph, in pixels.

See also​

Source: packages/core/src/layers/style.ts:43