Skip to content

Commit

Permalink
refactor: formatting
Browse files Browse the repository at this point in the history
eldu committed Feb 27, 2024
1 parent cd6d560 commit 54369c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/YearChart.tsx
Original file line number Diff line number Diff line change
@@ -101,6 +101,9 @@ export function YearChart() {
title: capitalizeFirstLetter(timeUnit),
format: timeUnit === 'month' ? '%b' : '%Y',
formatType: 'time',
labelAngle: 270,
labelAlign: 'right',
labelBaseline: 'middle',
},
{
scale: 'yscale',
@@ -122,7 +125,7 @@ export function YearChart() {
y2: { scale: 'yscale', value: 0 },
tooltip: {
signal: `{
"${capitalizeFirstLetter(timeUnit)}": datum.${timeUnit},
"${capitalizeFirstLetter(timeUnit)}": timeFormat(datum.unit0, ${timeUnit === 'month' ? "'%b'" : "'%Y'"}),
"Count": datum.count
}`,
},

0 comments on commit 54369c7

Please sign in to comment.