[cloudwatch] Support adding metrics to GraphWidget after creation #11305
Labels
@aws-cdk/aws-cloudwatch
Related to Amazon CloudWatch
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
good first issue
Related to contributions. See CONTRIBUTING.md
in-progress
This issue is being actively worked on.
p2
Use Case
I would love to be able to add metrics to the
left
andright
arrays after the widget object is created. This way I could create a widget object and pass it around and let other constructs add themselves to this widget.Proposed Solution
Create an
addMetric
method to the GraphWidget. As it is lazily evaluated in thetoJson()
method it should not be a problem to do this.Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: