Skip to content

Commit 4254fbf

Browse files
author
Eugene Cheung
authored
fix(widget): show values from entire time range for bar and pie charts (#664)
Docs: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.GraphWidgetProps.html#setperiodtotimerange --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_
1 parent d400bfb commit 4254fbf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/common/widget/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export function createGraphWidget(
3131
return new GraphWidget({
3232
...props,
3333
view: GraphWidgetView.BAR,
34+
setPeriodToTimeRange: true,
3435
});
3536

3637
case GraphWidgetType.LINE:
@@ -40,6 +41,7 @@ export function createGraphWidget(
4041
return new GraphWidget({
4142
...props,
4243
view: GraphWidgetView.PIE,
44+
setPeriodToTimeRange: true,
4345
});
4446

4547
case GraphWidgetType.SINGLE_VALUE:

test/monitoring/custom/__snapshots__/CustomMonitoring.test.ts.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)