fix(chart3): item.name → item.label — метки EBITDA показывали undefined

This commit is contained in:
Ник
2026-06-09 09:30:53 +03:00
parent 2d0d832f97
commit 1b853c9c6b
+1 -1
View File
@@ -77,7 +77,7 @@ async function chart3_ebitdaByOrg ({ items, regionLabel, unit = 'EBITDA margin,
svg += `<rect x="${x0.toFixed(1)}" y="${y.toFixed(1)}" width="${barW.toFixed(1)}" height="${bH}" fill="${color}" opacity="${opacity}" rx="2"/>` svg += `<rect x="${x0.toFixed(1)}" y="${y.toFixed(1)}" width="${barW.toFixed(1)}" height="${bH}" fill="${color}" opacity="${opacity}" rx="2"/>`
// Лейбл слева // Лейбл слева
svg += `<text x="${PL - 6}" y="${(y + bH / 2 + 4).toFixed(1)}" text-anchor="end" font-size="10.5" fill="${DARK}">${esc(item.name)}</text>` svg += `<text x="${PL - 6}" y="${(y + bH / 2 + 4).toFixed(1)}" text-anchor="end" font-size="10.5" fill="${DARK}">${esc(item.label)}</text>`
// Значение у конца бара // Значение у конца бара
const valX = item.value >= 0 ? xV(item.value) + 5 : xV(item.value) - 5 const valX = item.value >= 0 ? xV(item.value) + 5 : xV(item.value) - 5