We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58c6da9 commit 1e8f71cCopy full SHA for 1e8f71c
pages/01-cartesian-chart/axes-and-thresholds.page.tsx
@@ -1,9 +1,20 @@
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
// SPDX-License-Identifier: Apache-2.0
3
4
-import { addDays, subYears } from "date-fns";
5
import { range } from "lodash";
6
+const addDays = (date: Date, days: number) => {
7
+ const result = new Date(date);
8
+ result.setDate(result.getDate() + days);
9
+ return result;
10
+};
11
+
12
+const subYears = (date: Date, years: number) => {
13
14
+ result.setFullYear(result.getFullYear() - years);
15
16
17
18
import ColumnLayout from "@cloudscape-design/components/column-layout";
19
20
import { CartesianChart } from "../../lib/components";
0 commit comments