diff --git a/src/utils/buildAxis.linear.ts b/src/utils/buildAxis.linear.ts index 0b3b3134..7290bf7a 100644 --- a/src/utils/buildAxis.linear.ts +++ b/src/utils/buildAxis.linear.ts @@ -231,7 +231,7 @@ function buildTimeAxis( } if (units.year(date) < date) { // months - remove potential days, hours, minutes, seconds and milliseconds - return timeFormat(trimFormat(format.replace(/%-d.*?(\s|$)/, '')))(date) + return timeFormat(trimFormat(format.replace(/%-d.*/, '')))(date) } // years return timeFormat('%Y')(date)