Skip to content

Commit 41a4d64

Browse files
committed
Improvement - VueUiQuickChart - Improved xAxis time labels text anchor when rotated
1 parent 31d5db2 commit 41a4d64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/vue-ui-quick-chart.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ defineExpose({
943943
<text
944944
v-for="(_, i) in line.extremes.maxSeries"
945945
:font-size="quickConfig.xyLabelsXFontSize"
946-
:text-anchor="quickConfig.xyPeriodLabelsRotation ? 'end' : 'middle'"
946+
:text-anchor="quickConfig.xyPeriodLabelsRotation > 0 ? 'start' : quickConfig.xyPeriodLabelsRotation < 0 ? 'end' : 'middle'"
947947
:fill="quickConfig.color"
948948
:transform="`translate(${line.drawingArea.left + (line.slotSize * (i+1)) - (line.slotSize / 2)}, ${line.drawingArea.bottom + quickConfig.xyLabelsXFontSize + 6}), rotate(${quickConfig.xyPeriodLabelsRotation})`"
949949
>
@@ -1133,7 +1133,7 @@ defineExpose({
11331133
<text
11341134
v-for="(_, i) in bar.extremes.maxSeries"
11351135
:font-size="quickConfig.xyLabelsXFontSize"
1136-
:text-anchor="quickConfig.xyPeriodLabelsRotation ? 'end' : 'middle'"
1136+
:text-anchor="quickConfig.xyPeriodLabelsRotation > 0 ? 'start' : quickConfig.xyPeriodLabelsRotation < 0 ? 'end' : 'middle'"
11371137
:transform="`translate(${bar.drawingArea.left + (bar.slotSize * (i+1)) - (bar.slotSize / 2)}, ${bar.drawingArea.bottom + quickConfig.xyLabelsXFontSize + 6}) rotate(${quickConfig.xyPeriodLabelsRotation})`"
11381138
:fill="quickConfig.color"
11391139
>

0 commit comments

Comments
 (0)