Adjust Bar Chart x-axis labels to prevent overlap
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user