fix(site-finder): §4.3 график «По кварталам» — бары вылезали за край карточки #2118
1 changed files with 15 additions and 2 deletions
|
|
@ -242,11 +242,18 @@ export function Pipeline24moBlock({ data }: Props) {
|
|||
(q.flats / maxFlatsPerQuarter) * BAR_AREA_PX,
|
||||
)
|
||||
: 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 (
|
||||
<div
|
||||
key={q.quarter}
|
||||
style={{
|
||||
flex: 1,
|
||||
minWidth: 0,
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "flex-end",
|
||||
|
|
@ -267,12 +274,18 @@ export function Pipeline24moBlock({ data }: Props) {
|
|||
<div
|
||||
style={{
|
||||
fontSize: 10,
|
||||
lineHeight: 1.1,
|
||||
color: "#6b7280",
|
||||
whiteSpace: "nowrap",
|
||||
textAlign: "center",
|
||||
fontVariantNumeric: "tabular-nums",
|
||||
}}
|
||||
>
|
||||
{q.quarter}
|
||||
<div>{qLabel}</div>
|
||||
{qYear && (
|
||||
<div style={{ fontSize: 9, color: "#9ca3af" }}>
|
||||
{qYear}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue