-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
@aws-cdk/aws-cloudwatchRelated to Amazon CloudWatchRelated to Amazon CloudWatcheffort/smallSmall work item β less than a day of effortSmall work item β less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdin-progressThis issue is being actively worked on.This issue is being actively worked on.
Description
-
I'm submitting a ...
- πͺ² bug report
- π feature request
- π construct library gap
- βοΈ security issue or vulnerability => Please see policy
- β support request => Please see note at the top of this template.
-
What is the expected behavior (or behavior of feature suggested)?
cloudwatch.GraphWidget should accept a legend or legendPosition property that sets the appropriate values in the toJson output.
My current workaround looks like this:
export class ExtendedGraphWidget extends GraphWidget {
private legendPosition: LegendPosition;
constructor(props: ExtendedGraphWidgetProps) {
super(props);
this.legendPosition = props.legendPosition || LegendPosition.Bottom;
}
toJson(): any[] {
const widgetConfig = super.toJson();
return widgetConfig.map(obj => ({
...obj,
properties: {
...obj.properties,
legend: {
position: this.legendPosition,
}
}
}));
}
}-
What is the motivation / use case for changing the behavior or adding this feature?
Thislegendconfig allows users to change the position of the legend or hide the legend by passing"hidden". -
Please tell us about your environment:
- CDK CLI Version: 1.3.0 (build bba9914)
- Module Version: aws-cloudwatch 1.3.0
- OS: OSX
- Language: TypeScript
jgondron
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-cloudwatchRelated to Amazon CloudWatchRelated to Amazon CloudWatcheffort/smallSmall work item β less than a day of effortSmall work item β less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdin-progressThis issue is being actively worked on.This issue is being actively worked on.