fix(chart3): item.name → item.label — метки EBITDA показывали undefined
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user