Skip to content
v2.277.0

LegendPosition Enum ​

The position of the legend on a GraphWidget.

Example ​

ts
declare const dashboard: cloudwatch.Dashboard;

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

  legendPosition: cloudwatch.LegendPosition.RIGHT,
}));
python
# dashboard: cloudwatch.Dashboard


dashboard.add_widgets(cloudwatch.GraphWidget(
    # ...

    legend_position=cloudwatch.LegendPosition.RIGHT
))
java
Dashboard dashboard;


dashboard.addWidgets(GraphWidget.Builder.create()
        // ...

        .legendPosition(LegendPosition.RIGHT)
        .build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
Dashboard dashboard;


dashboard.AddWidgets(new GraphWidget(new GraphWidgetProps {
    // ...

    LegendPosition = LegendPosition.RIGHT
}));
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var dashboard Dashboard


dashboard.AddWidgets(cloudwatch.NewGraphWidget(&GraphWidgetProps{
	// ...

	LegendPosition: cloudwatch.LegendPosition_RIGHT,
}))

Members ​

MemberDescription
BOTTOMLegend appears below the graph (default).
RIGHTAdd shading above the annotation.
HIDDENAdd shading below the annotation.

Referenced by ​

  • GaugeWidgetProps.legendPositionlegend_positionlegendPositionLegendPositionLegendPosition
  • GraphWidgetProps.legendPositionlegend_positionlegendPositionLegendPositionLegendPosition