Skip to content
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): legend positions in GraphWidgets #7809

Merged
merged 2 commits into from
May 6, 2020
Merged

feat(cloudwatch): legend positions in GraphWidgets #7809

merged 2 commits into from
May 6, 2020

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented May 5, 2020

Commit Message

feat(cloudwatch): legend positions in GraphWidgets

Allows specifying a position for the legend for a GraphWidget. If omitted,
defaults to the bottom of the graph.

fixes #3625

End Commit Message

Tested locally with a simple repro; checked cdk synth output and viewed the created CloudWatch dashboard.

const s3metric = new Metric({
  namespace: 'AWS/S3',
  metricName: 'NumberOfObjects',
  dimensions: {
    StorageType: 'AllStorageTypes',
    BucketName: 'cdktoolkit-stagingbucket-1tq3v6936uvys'
  }
});
const widgetDefault = new GraphWidget({
  title: 'S3 Count - Default',
  left: [s3metric],
});
const widgetBottom = new GraphWidget({
  title: 'S3 Count - Bottom',
  left: [s3metric],
  legendPosition: LegendPosition.BOTTOM,
});
const widgetRight = new GraphWidget({
  title: 'S3 Count - Right',
  left: [s3metric],
  legendPosition: LegendPosition.RIGHT,
});
const widgetHidden = new GraphWidget({
  title: 'S3 Count - Hidden',
  left: [s3metric],
  legendPosition: LegendPosition.HIDDEN,
});
const dashboard = new cloudwatch.Dashboard(this, 'Issue3625TestDashboard', {
  dashboardName: 'Issue3625TestDashboard',
  widgets: [[widgetDefault, widgetBottom], [widgetRight, widgetHidden]],
});

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Allows specifying a position for the legend for a GraphWidget. If ommitted,
defaults to the bottom of the graph.

fixes #3625
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: d219611
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@rix0rrr rix0rrr changed the title feat(cloudwatch): support for legend position in CloudWatch GraphWidgets feat(cloudwatch): legend positions in GraphWidgets May 6, 2020
@mergify
Copy link
Contributor

mergify bot commented May 6, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: b70e6af
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented May 6, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit ada0de1 into aws:master May 6, 2020
@njlynch njlynch deleted the njlynch/issues-3625 branch May 6, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloudwatch GraphWidget missing legend
3 participants