Open
Description
Describe the feature
From the Cloudwatch console an option is provided to display labels on a pie chart which is implemented in the source with the property below.
"labels": {
"visible": true
}
This is missing in the CDK library which makes it impossible to create dashboards with labels on pie charts.
Use Case
Without the labels on the dashboard, a user must explicitly hover their cursor on the dashboard widget for a specific segment. For teams projecting live dashboards on external display this is impractical since you cannot get a single view with labels for all the segments.
Proposed Solution
Include the missing property in the generated graph widget output following the steps below.
- Add a new
LabelProps
interface to theaws-cloudwatch/lib/graph.ts
module. - Expose this as an optional property called
labels
, consistent with name from the console, in theGraphWidgetProps
. - Add the
labels
property to the final output of thetoJson()
method of theGraphWidget
.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.124.0
Environment details (OS name and version, etc.)
MacOS, Sonama 14.3