Skip to content

Commit f134e98

Browse files
committed
Improvement - VueUiDonut & VueUiNestedDonuts - Add exposed 'autoSize' function
1 parent 5e44186 commit f134e98

File tree

5 files changed

+657
-607
lines changed

5 files changed

+657
-607
lines changed

TestingArena/ArenaVueUiDonut.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ import convertArrayToObject from "./convertModel";
77
import LocalPattern from "../src/atoms/vue-ui-pattern.vue";
88
99
const dataset = ref([
10+
{
11+
name: 'Serie 1',
12+
values: [1],
13+
comment: 'This is a comment'
14+
},
15+
{
16+
name: 'Serie lorem ipsum thing',
17+
values: [1],
18+
comment: 'This is a comment'
19+
},
20+
{
21+
name: 'Serie lorem other thing',
22+
values: [1],
23+
comment: 'This is a comment'
24+
},
1025
{
1126
name: 'Serie 1',
1227
values: [1],

src/components/vue-data-ui.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ const toggleAnnotator = ref(() => null);
210210
const selectNode = ref(() => null);
211211
const selectGroup = ref(() => null);
212212
const selectRibbon = ref(() => null);
213+
const autoSize = ref(() => null);
213214
214215
onMounted(() => {
215216
if (isError.value) {
@@ -301,6 +302,9 @@ watch(currentComponentRef, async (newRef) => {
301302
if (newRef.selectRibbon) {
302303
selectRibbon.value = newRef.selectRibbon;
303304
}
305+
if (newRef.autoSize) {
306+
autoSize.value = newRef.autoSize;
307+
}
304308
}
305309
})
306310
@@ -333,7 +337,8 @@ const getEventHandlers = () => {
333337
'toggleAnnotator',
334338
'selectNode',
335339
'selectGroup',
336-
'selectRibbon'
340+
'selectRibbon',
341+
'autoSize'
337342
];
338343
const handlers = {};
339344
eventNames.forEach(event => {
@@ -381,6 +386,7 @@ defineExpose({
381386
}
382387
return enqueue('getImage', [{ scale }]);
383388
},
389+
autoSize,
384390
generatePdf,
385391
generateCsv,
386392
generateImage,

0 commit comments

Comments
 (0)