fix: force all X-axis labels to display on charts and prevent cutoff
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m9s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m9s
This commit is contained in:
@@ -103,11 +103,13 @@ const Dashboard = () => {
|
||||
<h3 className="text-lg font-bold mb-6 text-dark-text">Produtos Mais Vendidos</h3>
|
||||
<div className="h-80 w-full">
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
<BarChart data={salesByProduct} margin={{ top: 5, right: 30, left: 20, bottom: 5 }}>
|
||||
<BarChart data={salesByProduct} margin={{ top: 5, right: 30, left: 20, bottom: 60 }}>
|
||||
<CartesianGrid strokeDasharray="3 3" stroke="#222222" vertical={false} />
|
||||
<XAxis
|
||||
dataKey="name" stroke="#888888" fontSize={10} tickLine={false} axisLine={false}
|
||||
tickFormatter={(v) => v.length > 12 ? v.substring(0, 12) + '...' : v}
|
||||
interval={0}
|
||||
angle={-45}
|
||||
textAnchor="end"
|
||||
/>
|
||||
<YAxis stroke="#888888" fontSize={12} tickLine={false} axisLine={false} />
|
||||
<Tooltip
|
||||
|
||||
Reference in New Issue
Block a user