mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 23:33:37 +01:00
Adjust Bar Chart x-axis labels to prevent overlap
This commit is contained in:
parent
f8ac987bfc
commit
4b9e7e9218
@ -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…
Reference in New Issue
Block a user