# LegendEntry

One line of a legend.

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

## Signature

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

## Properties

### colour

```ts
readonly colour: PaletteSlot;
```

The palette slot of the glyph.

### dash

```ts
readonly dash?: LineDash;
```

The dashing of a line glyph.

### label

```ts
readonly label: string;
```

The row's words.

### pattern

```ts
readonly pattern?: FillPattern;
```

The hatching of an area glyph.

### radius

```ts
readonly radius: number;
```

The glyph's radius in CSS pixels.

### shape

```ts
readonly shape: MarkerShape;
```

The marker shape of the glyph.

### swatch

```ts
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

```ts
readonly width?: number;
```

The stroke width of a line glyph, in pixels.

## See also

- [`PaletteSlot`](https://docs.mapcairn.com/api/core/PaletteSlot.md)
- [`LineDash`](https://docs.mapcairn.com/api/core/LineDash.md)
- [`FillPattern`](https://docs.mapcairn.com/api/core/FillPattern.md)
- [`MarkerShape`](https://docs.mapcairn.com/api/core/MarkerShape.md)

Source: [packages/core/src/layers/style.ts:43](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/style.ts#L43)
