Skip to content

Commit 5928d54

Browse files
authored
fix: overlapping watermark with rotated labels (#1361)
1 parent 266c8c1 commit 5928d54

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/components/Package/VersionDistribution.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const chartConfig = computed(() => {
102102
padding: {
103103
top: 24,
104104
right: 24,
105-
bottom: xAxisLabels.value.length > 10 ? 100 : 88, // Space for rotated labels + watermark
105+
bottom: xAxisLabels.value.length > 10 ? 84 : 72, // Space for rotated labels + watermark
106106
left: isMobile.value ? 60 : 80,
107107
},
108108
userOptions: {
@@ -429,9 +429,7 @@ const endDate = computed(() => {
429429
<!-- Inject npmx logo & tagline during SVG and PNG print -->
430430
<g
431431
v-if="svg.isPrintingSvg || svg.isPrintingImg"
432-
v-html="
433-
drawNpmxLogoAndTaglineWatermark(svg, watermarkColors, $t, 'belowDrawingArea')
434-
"
432+
v-html="drawNpmxLogoAndTaglineWatermark(svg, watermarkColors, $t, 'bottom')"
435433
/>
436434
</template>
437435

app/composables/useChartWatermark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function drawNpmxLogoAndTaglineWatermark(
6464
// Position watermark based on the positioning strategy
6565
const watermarkY =
6666
positioning === 'belowDrawingArea'
67-
? svg.drawingArea.top + svg.drawingArea.height + 48
67+
? svg.drawingArea.top + svg.drawingArea.height + 58
6868
: svg.height - npmxLogoHeight
6969

7070
const taglineY =

0 commit comments

Comments
 (0)