# legend

Show the legend. Undefined lets each chart use its own default (marimekko/dot-plot default on; the cartesian charts default off).

Canonical: https://chart.syidax.com/docs/options/legend/

<a id="definition"></a>

## Definition

| Item | Value |
| --- | --- |
| JavaScript property | `legend` |
| HTML attribute | `legend` |
| Type | `boolean` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

<a id="example"></a>

## Configuration example

```javascript
// Register sy-line-chart and create the element before configuring it.
chart.legend = true;
```

- [Line · Complete examples and API](https://chart.syidax.com/docs/components/line.md)

<a id="related"></a>

## Related documentation

A property with the same name may have different types and defaults across charts. When using a direct tag, follow that chart's documentation below.

- [Shared facade and direct tags](https://chart.syidax.com/docs/concepts.md)
- [sy-line-chart](https://chart.syidax.com/docs/components/line.md#property-legend)
- [sy-area-chart](https://chart.syidax.com/docs/components/area.md#property-legend)
- [sy-column-chart](https://chart.syidax.com/docs/components/column.md#property-legend)
- [sy-bar-chart](https://chart.syidax.com/docs/components/bar.md#property-legend)
- [sy-pie-chart](https://chart.syidax.com/docs/components/pie.md#property-legend)
- [sy-scatter-chart](https://chart.syidax.com/docs/components/scatter.md#property-legend)
- [sy-polar-chart](https://chart.syidax.com/docs/components/polar.md#property-legend)
- [sy-radar-chart](https://chart.syidax.com/docs/components/radar.md#property-legend)
- [sy-dumbbell-chart](https://chart.syidax.com/docs/components/dumbbell.md#property-legend)
- [sy-dot-plot-chart](https://chart.syidax.com/docs/components/dot-plot.md#property-legend)
- [sy-marimekko-chart](https://chart.syidax.com/docs/components/marimekko.md#property-legend)
- [sy-pareto-chart](https://chart.syidax.com/docs/components/pareto.md#property-legend)
- [sy-gauge-chart](https://chart.syidax.com/docs/components/gauge.md#property-legend)
- [sy-funnel-chart](https://chart.syidax.com/docs/components/funnel.md#property-legend)
- [sy-funnel-chart](https://chart.syidax.com/docs/components/pyramid.md#property-legend)
- [sy-item-chart](https://chart.syidax.com/docs/components/item.md#property-legend)
- [sy-theme-river](https://chart.syidax.com/docs/components/theme-river.md#property-legend)
- [sy-flow-lines](https://chart.syidax.com/docs/components/flow-lines.md#property-legend)
- [sy-surface-3d](https://chart.syidax.com/docs/components/surface-3d.md#property-legend)
- [sy-bar-3d](https://chart.syidax.com/docs/components/bar-3d.md#property-legend)
- [sy-scatter-3d](https://chart.syidax.com/docs/components/scatter-3d.md#property-legend)
