-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloudwatch): add support for labels on pie graphs (aws#28929). #30287
Conversation
fdcd22b
to
c0d89d9
Compare
7f1046b
to
3a0acf4
Compare
5bb7e01
to
12d4594
Compare
1c4f9c9
to
787be13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some documentation changes
...ing/framework-integ/test/aws-cloudwatch/test/integ.dashboard-with-graphwidget-with-labels.ts
Outdated
Show resolved
Hide resolved
labels: { | ||
visible: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add test cases for labels: {}
and labels: {visible: false}
, just to make sure CloudFormation handles them properly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, thanks.
@@ -496,6 +496,18 @@ dashboard.addWidgets(new cloudwatch.GraphWidget({ | |||
})); | |||
``` | |||
|
|||
When the `view` property is set to `GraphWidgetView.PIE`, the `labels` property can be used to toggle whether the magnitude of a pie segment is shown on the graph as a percentage of the whole. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I think visible: false
can be used for all other widgets types, pie charts just happen to have a different default value?
2510a44
to
e7319ce
Compare
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
Add a new "labels" property for graph widgets to support toggling visibility status. === Issue aws#28929 === Closes aws#28929. === Reason for this change === The labels property that allows for toggling the visibility of labels on graphs is currently missing. === Description of changes === The commits adds a new `"labels"` property with the type `LabelProps` on the graph widget. The `LabelProps` type contains a single boolean key`"visible"` which toggles the presence of the label on a pie graph. When set to `true`, CloudWatch dashboard will render the percentage ratios of each segment of the pie graph. The README file 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 === - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
e7319ce
to
631f5f0
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
Comments on closed issues and PRs are hard for our team to see. |
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 percentage ratios are not shown unless the
{ "labels": { "visible": true } }
property is enabled.Description of changes
The commits adds a new
"labels"
property with the typeLabelProps
on the graph widget.The
LabelProps
type contains a single boolean key"visible"
which toggles the presence of the label on a pie graph. When set totrue
, CloudWatch dashboard will render the percentage ratios of each segment of the pie graph.The README file 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