Skip to content

Commit bac6dc7

Browse files
committed
New feature - VueDataUi - Add exposed hideSeries & showSeries methods
1 parent 97a86ab commit bac6dc7

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/components/vue-data-ui.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ const emit = defineEmits([
171171
'selectGroup',
172172
'selectRibbon',
173173
'toggleTable',
174-
'resetZoom'
174+
'resetZoom',
175+
'showSeries',
176+
'hideSeries',
175177
]);
176178
177179
const isError = computed(() => !components[props.component]);
@@ -217,6 +219,8 @@ const selectGroup = ref(() => null);
217219
const selectRibbon = ref(() => null);
218220
const autoSize = ref(() => null);
219221
const resetZoom = ref(() => null);
222+
const showSeries = ref(() => null);
223+
const hideSeries = ref(() => null);
220224
221225
onMounted(() => {
222226
if (isError.value) {
@@ -316,6 +320,12 @@ watch(currentComponentRef, async (newRef) => {
316320
if (newRef.resetZoom) {
317321
resetZoom.value = newRef.resetZoom;
318322
}
323+
if (newRef.showSeries) {
324+
showSeries.value = newRef.showSeries;
325+
}
326+
if (newRef.hideSeries) {
327+
hideSeries.value = newRef.hideSeries;
328+
}
319329
}
320330
})
321331
@@ -352,6 +362,8 @@ const getEventHandlers = () => {
352362
'autoSize',
353363
'toggleTable',
354364
'resetZoom',
365+
'showSeries',
366+
'hideSeries'
355367
];
356368
const handlers = {};
357369
eventNames.forEach(event => {
@@ -428,7 +440,9 @@ defineExpose({
428440
selectNode,
429441
selectGroup,
430442
selectRibbon,
431-
resetZoom
443+
resetZoom,
444+
showSeries,
445+
hideSeries
432446
});
433447
434448
const notSupported = computed(() => {

0 commit comments

Comments
 (0)