From 6c27ff9b0e6468506065d5f11aa7204d66a51bf4 Mon Sep 17 00:00:00 2001 From: Kanit Wongsuphasawat Date: Thu, 10 Oct 2024 15:59:15 -0700 Subject: [PATCH] fix: exclude year --- src/timeunit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timeunit.ts b/src/timeunit.ts index 0e1a25d630..da344af31b 100644 --- a/src/timeunit.ts +++ b/src/timeunit.ts @@ -345,7 +345,7 @@ export function timeUnitSpecifierExpression(timeUnit: TimeUnit, {isAxis}: {isAxi const timeUnitParts = getTimeUnitParts(timeUnit); if (isAxis) { - if (timeUnitParts.includes('year')) { + if (timeUnitParts.includes('year') && !timeUnitParts.includes('week')) { // If the timeUnit includes year (meaning it's a chronological timeUnit (aka datetime truncation), // then the default axis format is actually pretty smart. return undefined;