mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Adjust Bar Chart x-axis labels to prevent overlap
This commit is contained in:
parent
f8ac987bfc
commit
4b9e7e9218
1 changed files with 4 additions and 1 deletions
|
|
@ -54,9 +54,12 @@ export default function BarChart({
|
||||||
}
|
}
|
||||||
return index % 5 === 0 ? dateFormat(d, 'M/d', locale) : '';
|
return index % 5 === 0 ? dateFormat(d, 'M/d', locale) : '';
|
||||||
}
|
}
|
||||||
if (w <= 500) {
|
if (w <= 750) {
|
||||||
return index % 2 === 0 ? dateFormat(d, 'MMM d', locale) : '';
|
return index % 2 === 0 ? dateFormat(d, 'MMM d', locale) : '';
|
||||||
}
|
}
|
||||||
|
if (w <= 850) {
|
||||||
|
return dateFormat(d, 'MMM d', locale);
|
||||||
|
}
|
||||||
return dateFormat(d, 'EEE M/d', locale);
|
return dateFormat(d, 'EEE M/d', locale);
|
||||||
case 'month':
|
case 'month':
|
||||||
if (w <= 660) {
|
if (w <= 660) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue