Skip to content

feat(aws-cloudwatch): support labels on pie charts #28929

Open
@kofrasa

Description

@kofrasa

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 the aws-cloudwatch/lib/graph.ts module.
  • Expose this as an optional property called labels, consistent with name from the console, in the GraphWidgetProps.
  • Add the labels property to the final output of the toJson() method of the GraphWidget.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-cloudwatchRelated to Amazon CloudWatcheffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions