fix(site-finder): §4.3 график «По кварталам» — бары вылезали за край карточки (#2118)
This commit is contained in:
parent
babb2a3473
commit
4a7ce91db1
1 changed files with 15 additions and 2 deletions
|
|
@ -242,11 +242,18 @@ export function Pipeline24moBlock({ data }: Props) {
|
||||||
(q.flats / maxFlatsPerQuarter) * BAR_AREA_PX,
|
(q.flats / maxFlatsPerQuarter) * BAR_AREA_PX,
|
||||||
)
|
)
|
||||||
: 4;
|
: 4;
|
||||||
|
// Компактная подпись в 2 строки: «Q2» / «'26». Полная «2026-Q2»
|
||||||
|
// (nowrap) шире ячейки → 9 кварталов выдавливали flex-ряд за
|
||||||
|
// правый край карточки. minWidth:0 ниже даёт колонкам ужиматься.
|
||||||
|
const qm = /^(\d{4})-(Q\d)$/.exec(q.quarter);
|
||||||
|
const qLabel = qm ? qm[2] : q.quarter;
|
||||||
|
const qYear = qm ? `'${qm[1].slice(2)}` : "";
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={q.quarter}
|
key={q.quarter}
|
||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
minWidth: 0,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
justifyContent: "flex-end",
|
justifyContent: "flex-end",
|
||||||
|
|
@ -267,12 +274,18 @@ export function Pipeline24moBlock({ data }: Props) {
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
|
lineHeight: 1.1,
|
||||||
color: "#6b7280",
|
color: "#6b7280",
|
||||||
whiteSpace: "nowrap",
|
textAlign: "center",
|
||||||
fontVariantNumeric: "tabular-nums",
|
fontVariantNumeric: "tabular-nums",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{q.quarter}
|
<div>{qLabel}</div>
|
||||||
|
{qYear && (
|
||||||
|
<div style={{ fontSize: 9, color: "#9ca3af" }}>
|
||||||
|
{qYear}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue