[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [widgets](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.widgets-1) / [legends](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.widgets-1#legends) / LegendOptions

# Module: LegendOptions

## Table of contents

Type Aliases
| [LegendOptions](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.widgets-1.legends.legendoptions#legendoptions) | [LegendOptionsOut](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.widgets-1.legends.legendoptions#legendoptionsout) |
|  --- | --- |


## Contents

Type Aliases
#### LegendOptions

Ƭ **LegendOptions**: `Object`

Define legend options

#### Type declaration

| Name | Type | Description |
|  --- | --- | --- |
| `alignment?` | [`AnchorType`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#anchortype) | default legend alignment (can be moved by user) |
| `data?` | [`OptionsBase`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.controls#legend#optionsbase)[`"data"`] | legend data |
| `fillstyle?` | [`Type`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.attributes#fillstyle#type) | legend background fillstyle |
| `layoutstyle?` | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.layout#layoutstyle#options) | legend layout style |
| `linestyle?` | [`Type`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.attributes.linestyle#linestyle#type) | legend border linestyle |
| `location?` | [`AnnotationLocation`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.layout#annotationlocation) | legend annotation location |
| `margins?` | [`Type`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.attributes#spacestyle#type) | It has properties for specifying the margins for each side |
| `offset?` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#point#options) | `number` | default legend offset (in px) in specifiet device space |
| `orientation?` | [`Orientation`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#orientation) | legend content orientation |
| `scrolltoselecteditem?` | `boolean` | scroll content to selected item flag |
| `size?` | `true` | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#dimension#options) | if true then auto size to calculate device size of the legend, or size corresponds to dimension |
| `type?` | `string` | Type of the items to be displayed |
| `visible?` | `boolean` | legend visibility flag |


#### LegendOptionsOut

Ƭ **LegendOptionsOut**: `Object`

Define legend out options

#### Type declaration

| Name | Type | Description |
|  --- | --- | --- |
| `alignment` | [`AnchorType`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#anchortype) | default legend alignment (can be moved by user) |
| `data?` | [`OptionsOut`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.controls#legend#optionsout)[`"data"`] | legend data |
| `fillstyle` | [`FillStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.fillstyle.fillstyle) | legend background fillstyle |
| `linestyle` | [`LineStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.linestyle.linestyle) | legend border linestyle |
| `location` | [`AnnotationLocation`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.layout#annotationlocation) | legend annotation location |
| `margins` | [`SpaceStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.spacestyle.spacestyle) | It has properties for specifying the margins for each side |
| `offset` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | default legend offset (in px) from the chart center limits |
| `orientation` | [`Orientation`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#orientation) | legend content orientation |
| `scrolltoselecteditem?` | `boolean` | scroll content to selected item flag |
| `size` | `true` | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) | if true then auto size to calculate device size of the legend, or size corresponds to dimension |
| `type?` | `string` | Type of the items to be displayed |
| `visible` | `boolean` | legend visibility flag |