# ShapeIntervalColour

Graduated colour in equal intervals over a numeric field. The classes are
worked out from `min`, `max` and the ramp's length, so a legend never
disagrees with the map: values below `min` fall in the first class and
values above `max` in the last.

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

## Signature

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

## Properties

### dashes

```ts
readonly dashes?: readonly LineDash[];
```

Optional dashing, one per class, lowest first.

### field

```ts
readonly field: string;
```

The numeric field the classes are made from.

### kind

```ts
readonly kind: "intervals";
```

Tells an equal-interval rule from the other shape colour rules.

### max

```ts
readonly max: number;
```

The upper end of the range the classes divide. Values above it fall in the last class.

### min

```ts
readonly min: number;
```

The lower end of the range the classes divide. Values below it fall in the first class.

### patterns

```ts
readonly patterns?: readonly FillPattern[];
```

Optional marks, one per class (lowest first), so each class has a second signal.

### ramp

```ts
readonly ramp: readonly PaletteSlot[];
```

One ordered palette colour per class, lowest first. Two to seven classes.

### unit

```ts
readonly unit?: LayerTemplate;
```

Appended to the legend's numbers, such as ` people`.

### widths

```ts
readonly widths?: readonly number[];
```

Optional stroke widths in pixels, one per class, lowest first.

## See also

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

Source: [packages/core/src/layers/definition.ts:453](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/definition.ts#L453)
