Merge pull request #2043 from tairosonloa/fix/gui-events-date-all-time

Fix: `BarChar` to correctly show year instead of epoch when unit is year
This commit is contained in:
Mike Cao 2023-05-16 17:24:52 -07:00 committed by GitHub
commit 6abffe3e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,8 @@ export function BarChart({
return dateFormat(d, 'MMM d', locale);
case 'month':
return dateFormat(d, 'MMM', locale);
case 'year':
return dateFormat(d, 'YYY', locale);
default:
return label;
}