-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the feature
Change the behavior of how metrics are sorted in CloudWatch Dashboard Widgets so that visible metrics appear first.
Use Case
Using multiple MathExpressions in the same widget leads to difficult to decipher graphs, because the colors of visible metrics are very similar. See the screenshot for an example: in view, there are 3 visible metrics, but because there are many hidden metrics between the visible ones, the automatic colors chosen aren't easily distinguishable.
Proposed Solution
Before rendering the dashboard json of a widget, sort the metrics by visible first. This would make CloudWatch's automatic color scheme work much better for the metrics that actually appear in the widget.
Other Information
Note: I do know that defining the colors manually is possible, but this is not a good solution for a few reasons. Namely, I don't always know how many metrics will be in a widget and I would prefer not to re-implement the automatic color generation how CloudWatch does it
I've created a sample dashboard in this repository to demonstrate this behavior.
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS CDK Library version (aws-cdk-lib)
AWS CDK CLI version
2.1031.2 (build 779352d)
Environment details (OS name and version, etc.)
Amazon Linux 2