Skip to content

Commit

Permalink
fix: exclude year
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Oct 10, 2024
1 parent 98b8297 commit 6c27ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/timeunit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c27ff9

Please sign in to comment.