Docs
`/`

# API elements

No matching results

# Sections and content

No matching results

- `Enter` to go to the highlighted result.
- `↑` and `↓` to change highlight.
- `Tab` to switch between result lists.
- `Esc` to hide the results.

# Outline layer API

This reference describes the outline layer API.

The outline layer draws circular highlights around groups of points.

The primary use case of this type of layer is to temporarily highlight a set of points, for example to show that the points are selected. An extra temporary markers layer can be drawn on top of the outline to further emphasize the points.

You can create an example outline layer using the following code:

    const outline = DotAtlas.createLayer({
      points: [],
      type: "outline",
      outlineFillColor: "rgba(255, 255, 0, 0.2)",
      outlineBorderColor: "rgba(255, 255, 0, 0.8)",
      outlineSizeMultiplier: 6
    });

See the following documentation for all the point and layer properties you can use.

##
Point properties

###
markerSize

Determines the diameter of the outline drawn for the specific point.

Marker size value must fall in the `0.0` ... `1.0` range. Values outside of this range will be clamped. If marker size is not provided, a size of `1.0` will be assumed.

For best results, the `markerSize` properties of the points on the outline and on the related marker layers should be equal. The easiest way to achieve this is to pass the same point instances to the outline and marker layers.

Additionally, the `outlineSizeMultiplier` outline layer property should be equal or greater than the `markerSizeMultiplier` property on the related marker layers. This will ensure that outline layer is aligned with the markers.

##
Layer properties

###
outlineFillColor

The color to use to fill the inside area of the outline.

###
outlineBorderColor

The color to use when drawing the border around the outline.

###
outlineBorderWidth

Relative size of the border drawn around the outlined area.

Values must fall in the `0.0` ... `1.0` range, where `0.0` is no outline and `1.0` is the outline filled entirely with the border color.

###
outlineSizeMultiplier

The scale to use to determine the on-screen diameter of the outlined area for each point.

For the details of the on-screen size computation, see the `markerSizeMultiplier` property of the markers layer.

###
outlineOffset

The extra distance to apply to offset the outline boundary from the marker boundary, in pixels.

If `outlineOffset` is `0.0`, outline border would overwrite the marker's border making the visualization hard to interpret. A non-zero value will leave an extra margin around markers for the outline to stand out.

previous article
Labels layer API
next article
Effects plugin API