# LegendPosition

The position of the legend on a GraphWidget.

- Source: [`aws-cloudwatch/lib/graph.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts#L1192)

## Example

```ts
declare const dashboard: cloudwatch.Dashboard;

dashboard.addWidgets(new cloudwatch.GraphWidget({
  // ...

  legendPosition: cloudwatch.LegendPosition.RIGHT,
}));
```

## Members

| Member | Description |
| --- | --- |
| `BOTTOM` | Legend appears below the graph (default). |
| `RIGHT` | Add shading above the annotation. |
| `HIDDEN` | Add shading below the annotation. |

## Referenced by

- [`GaugeWidgetProps`](/v2/docs/aws-cdk-lib.aws_cloudwatch.GaugeWidgetProps).legendPosition
- [`GraphWidgetProps`](/v2/docs/aws-cdk-lib.aws_cloudwatch.GraphWidgetProps).legendPosition
