Ajusta tooltips e espaçamento nos gráficos de backlog

This commit is contained in:
codex-bot 2025-10-21 15:30:19 -03:00
parent dbb8d7fa63
commit c4620102ae

View file

@ -31,6 +31,12 @@ const STATUS_LABELS: Record<string, string> = {
RESOLVED: "Resolvidos",
}
const queueBacklogChartConfig = {
total: {
label: "Chamados totais",
},
}
export function BacklogReport() {
const [timeRange, setTimeRange] = useState("90d")
const [companyId, setCompanyId] = usePersistentCompanyFilter("all")
@ -205,10 +211,10 @@ export function BacklogReport() {
Nenhuma fila com tickets abertos no momento.
</p>
) : (
<ChartContainer config={{}} className="aspect-auto h-[260px] w-full">
<ChartContainer config={queueBacklogChartConfig} className="aspect-auto h-[260px] w-full">
<BarChart
data={data.queueCounts.map((q: { name: string; total: number }) => ({ name: q.name, total: q.total }))}
margin={{ left: 12, right: 12, bottom: 28 }}
margin={{ top: 8, left: 20, right: 20, bottom: 56 }}
barCategoryGap={16}
>
<CartesianGrid vertical={false} />
@ -216,13 +222,13 @@ export function BacklogReport() {
dataKey="name"
tickLine={false}
axisLine={false}
tickMargin={14}
tickMargin={24}
interval={0}
angle={-30}
height={68}
height={80}
/>
<Bar dataKey="total" fill="var(--chart-5)" radius={[4, 4, 0, 0]} />
<ChartTooltip content={<ChartTooltipContent className="w-[180px]" nameKey="Total" />} />
<ChartTooltip content={<ChartTooltipContent className="w-[180px]" nameKey="total" />} />
</BarChart>
</ChartContainer>
)}