Skip to content

Commit 08ab995

Browse files
committed
Improvement - VueUiScatter - Expose more data in the svg slot
1 parent 8ef74d2 commit 08ab995

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/components/vue-ui-scatter.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ const mutableDataset = computed(() => {
454454
clusterName: ds.name,
455455
color: ds.color ? ds.color : (customPalette.value[i] || palette[i] || palette[i % palette.length]),
456456
id: `plot_${uid.value}_${Math.random()}`,
457-
weight: v.weight ?? FINAL_CONFIG.value.style.layout.plots.radius
457+
weight: v.weight ?? FINAL_CONFIG.value.style.layout.plots.radius,
458458
}
459459
}),
460460
}
@@ -1924,7 +1924,14 @@ defineExpose({
19241924
</text>
19251925
</g>
19261926
</g>
1927-
<slot name="svg" :svg="svg"/>
1927+
<slot name="svg" :svg="{
1928+
...svg,
1929+
drawingArea: {
1930+
...drawingArea,
1931+
zero
1932+
},
1933+
data: mutableDataset
1934+
}"/>
19281935
</svg>
19291936
19301937
<div v-if="$slots.watermark" class="vue-data-ui-watermark">

0 commit comments

Comments
 (0)