feat(aws-cloudwatch): add support for labels on pie charts (aws#28929). #30284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a new "labels" property for graph widgets to show ratios for pie graphs.
Issue #28929
Closes #28929.
Reason for this change
When using a pie graph, the magnitude of ratios are not shown unless the
{ "labels": { "visible": true } }
property is enabled.Description of changes
The commits adds a new "labels" property with the structure
LabelProps
on the graph widget.The structure contains a single nested boolean value "visible" which toggles the presence of the label on a pie graph. When set to
true
, CloudWatch dashboard will render the magnitude of ratios as percentages on the graph.The README has been updated to reflect the new property and how it can be used.
Description of how you validated changes
The commit includes unit, integration, and snapshot tests as would be generated by the CDK library.
The change has also been manually verified from the CloudWatch console by enabling and disabling the property.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license