[UI] Fix misalignment of authors for repo acctivity

- Regression of #4571
- We aren't showing the ticks generated by chartjs, because we want to
show the avatar of the person instead. You can't *realy* disable that
tick, so instead I opted to make them transparent in #4571, however they
still affected the generation of ticks so if enough authors were being
shown, for some the ticks were being skipped. Adjust the settings to
make sure they are always being shown.
- Resolves https://codeberg.org/forgejo/forgejo/issues/4982

(cherry picked from commit 72f41306c2)
This commit is contained in:
Gusted 2024-08-18 18:11:48 +02:00 committed by forgejo-backport-action
parent 9d2ea1ef5d
commit 50db6ef5df

View file

@ -68,7 +68,16 @@ const sfc = {
display: false,
},
ticks: {
color: 'transparent', // Disable drawing of labels on the x-axis.
// Disable the drawing of the labels on the x-asis and force them all
// of them to be 'shown', this avoids them being internally skipped
// for some data points. We rely on the internally generated ticks
// to know where to draw our own ticks. Set rotation to 90 degree
// and disable autoSkip. autoSkip is disabled to ensure no ticks are
// skipped and rotation is set to avoid messing with the width of the chart.
color: 'transparent',
minRotation: 90,
maxRotation: 90,
autoSkip: false,
},
},
y: {