Skip to content

Commit 3b70024

Browse files
committed
Fix - VueUiXy - Add missing x offset on serie yLabels in individual scale mode
1 parent bf197ce commit 3b70024

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/vue-ui-xy.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@
433433
:fill="el.color"
434434
:font-size="fontSizes.dataLabels"
435435
text-anchor="middle"
436-
:transform="`translate(${el.x - FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + 5}, ${mutableConfig.isStacked ? drawingArea.bottom - el.yOffset - (el.individualHeight / 2) : drawingArea.top + drawingArea.height / 2}) rotate(-90)`"
436+
:transform="`translate(${el.x - FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + 5 + xPadding}, ${mutableConfig.isStacked ? drawingArea.bottom - el.yOffset - (el.individualHeight / 2) : drawingArea.top + drawingArea.height / 2}) rotate(-90)`"
437437
>
438438
{{ el.name }} {{ el.scaleLabel ? `- ${el.scaleLabel}` : '' }}
439439
</text>
@@ -502,7 +502,7 @@
502502
s: yLabel.suffix,
503503
r: 1,
504504
})) : ''
505-
}}
505+
}}
506506
</text>
507507
</g>
508508
</template>
@@ -956,7 +956,7 @@
956956
<template v-if="mutableConfig.useIndividualScale && !mutableConfig.isStacked">
957957
<rect
958958
v-for="trap in allScales"
959-
:x="trap.x - FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth"
959+
:x="trap.x - FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + xPadding"
960960
:y="drawingArea.top"
961961
:width="FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth"
962962
:height="drawingArea.height < 0 ? 10 : drawingArea.height"
@@ -970,7 +970,7 @@
970970
<g>
971971
<text
972972
data-cy="xy-axis-yLabel"
973-
v-if="FINAL_CONFIG.chart.grid.labels.axis.yLabel && ! mutableConfig.useIndividualScale"
973+
v-if="FINAL_CONFIG.chart.grid.labels.axis.yLabel && !mutableConfig.useIndividualScale"
974974
:font-size="fontSizes.yAxis"
975975
:fill="FINAL_CONFIG.chart.grid.labels.color"
976976
:transform="`translate(${fontSizes.yAxis + FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${drawingArea.top + drawingArea.height / 2}) rotate(-90)`"

0 commit comments

Comments
 (0)