Skip to content

Commit f2ac0d9

Browse files
committed
Improvement - VueUiDonut - Force minimum donut thickness to user friendly size
1 parent 18352c4 commit f2ac0d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/vue-ui-donut.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ const svg = ref({
185185
const donutThickness = computed(() => {
186186
const baseRatio = FINAL_CONFIG.value.style.chart.layout.donut.strokeWidth / 512;
187187
const resultSize = svg.value.width * baseRatio
188-
return resultSize > minSize.value ? minSize.value : resultSize;
188+
const adjusted = resultSize > minSize.value ? minSize.value : resultSize;
189+
return adjusted < 24 ? 24 : adjusted;
189190
});
190191
191192
const emit = defineEmits(['selectLegend', 'selectDatapoint'])

0 commit comments

Comments
 (0)