LegendPosition Enum
The position of the legend on a GraphWidget.
| Source | aws-cloudwatch/lib/graph.ts |
|---|
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
| Member | Description |
|---|---|
BOTTOM | Legend appears below the graph (default). |
RIGHT | Add shading above the annotation. |
HIDDEN | Add shading below the annotation. |
Referenced by
GaugeWidgetProps.legendPositionlegend_positionlegendPositionLegendPositionLegendPositionGraphWidgetProps.legendPositionlegend_positionlegendPositionLegendPositionLegendPosition