From eeb480e8cff2d11072ace55ad683a65f54f5d07a Mon Sep 17 00:00:00 2001 From: Ola Rubaj <52197250+olayway@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:38:29 +0100 Subject: [PATCH] [fix][xs]: allow `yearmonth` TimeUnit in LineChart --- .changeset/stupid-crabs-try.md | 5 +++++ packages/components/src/components/LineChart.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/stupid-crabs-try.md diff --git a/.changeset/stupid-crabs-try.md b/.changeset/stupid-crabs-try.md new file mode 100644 index 000000000..281773f1c --- /dev/null +++ b/.changeset/stupid-crabs-try.md @@ -0,0 +1,5 @@ +--- +'@portaljs/components': patch +--- + +Adjust `xAxisTimeUnit` property in LineChart to allow for passing `yearmonth`. diff --git a/packages/components/src/components/LineChart.tsx b/packages/components/src/components/LineChart.tsx index 4fc8e70d9..640843660 100644 --- a/packages/components/src/components/LineChart.tsx +++ b/packages/components/src/components/LineChart.tsx @@ -5,7 +5,7 @@ import loadData from '../lib/loadData'; import { Data } from '../types/properties'; type AxisType = 'quantitative' | 'temporal'; -type TimeUnit = 'year' | undefined; // or ... +type TimeUnit = 'year' | 'yearmonth' | undefined; // or ... export type LineChartProps = { data: Omit;