feat(report): visitors by museum, avg ticket price, chart label fix, VAT indicator
Deploy HiHala Dashboard / deploy (push) Successful in 10s

This commit is contained in:
fahed
2026-04-28 14:59:24 +03:00
parent 594321738a
commit 648365348f
3 changed files with 39 additions and 11 deletions
+3 -5
View File
@@ -13,7 +13,7 @@ interface TrendChartProps {
export function PdfTrendChart({ labels, current, previous, color, width = 460, height = 140 }: TrendChartProps) {
const allValues = [...current, ...(previous ?? [])].filter(v => v > 0);
const max = allValues.length > 0 ? Math.max(...allValues) : 1;
const padL = 8, padR = 8, padT = 8, padB = 8;
const padL = 8, padR = 8, padT = 8, padB = 18; // padB=18 leaves room for x-axis labels
const w = width - padL - padR;
const h = height - padT - padB;
@@ -47,10 +47,8 @@ export function PdfTrendChart({ labels, current, previous, color, width = 460, h
const origIdx = labels.indexOf(label);
return (
<SvgText key={label}
x={sx(origIdx).toFixed(1)} y={height - 1}
fill="#94a3b8"
textAnchor="middle"
style={{ fontSize: 7 }}>
x={sx(origIdx).toFixed(1)} y={height - 5}
style={{ fontSize: 7, fill: '#94a3b8', textAnchor: 'middle' }}>
{label}
</SvgText>
);