Skip to content

Commit 4f09a2c

Browse files
committed
Dev environment - Added emits logs
1 parent d31e8e3 commit 4f09a2c

File tree

8 files changed

+73
-35
lines changed

8 files changed

+73
-35
lines changed

TestingArena/ArenaVueUiChestnut.vue

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,26 @@ const config = computed(() => convertArrayToObject(model.value));
333333
334334
const step = ref(0)
335335
336+
function selectRoot(root) {
337+
console.log({root})
338+
}
339+
340+
function selectBranch(branch) {
341+
console.log({ branch })
342+
}
343+
344+
function selectNut(nut) {
345+
console.log( { nut })
346+
}
347+
336348
</script>
337349

338350
<template>
339351
<Box>
340352
<template #title>VueUiChestnut</template>
341353

342354
<template #local>
343-
<LocalVueUiChestnut :dataset="dataset" :config="config" :key="`local_${step}`">
355+
<LocalVueUiChestnut :dataset="dataset" :config="config" :key="`local_${step}`" @selectRoot="selectRoot" @selectBranch="selectBranch" @selectNut="selectNut">
344356
<template #svg="{ svg }">
345357
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
346358
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -355,7 +367,7 @@ const step = ref(0)
355367
</template>
356368

357369
<template #VDUI-local>
358-
<LocalVueDataUi component="VueUiChestnut" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`">
370+
<LocalVueDataUi component="VueUiChestnut" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`" @selectRoot="selectRoot" @selectBranch="selectBranch" @selectNut="selectNut">
359371
<template #svg="{ svg }">
360372
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
361373
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -370,7 +382,7 @@ const step = ref(0)
370382
</template>
371383

372384
<template #build>
373-
<VueUiChestnut :dataset="dataset" :config="config" :key="`build_${step}`">
385+
<VueUiChestnut :dataset="dataset" :config="config" :key="`build_${step}`" @selectRoot="selectRoot" @selectBranch="selectBranch" @selectNut="selectNut">
374386
<template #svg="{ svg }">
375387
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
376388
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -385,7 +397,7 @@ const step = ref(0)
385397
</template>
386398

387399
<template #VDUI-build>
388-
<VueDataUi component="VueUiChestnut" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`">
400+
<VueDataUi component="VueUiChestnut" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`" @selectRoot="selectRoot" @selectBranch="selectBranch" @selectNut="selectNut">
389401
<template #svg="{ svg }">
390402
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
391403
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>

TestingArena/ArenaVueUiDonut.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,12 @@ const config = computed(() => {
137137
138138
const step = ref(0)
139139
140-
function selectLegend(leg) {
141-
alert(`@selectLegend\n\n${JSON.stringify(leg)}`)
140+
function selectLegend(legend) {
141+
console.log({legend})
142+
}
143+
144+
function selectDatapoint(datapoint) {
145+
console.log({ datapoint })
142146
}
143147
144148
</script>
@@ -152,7 +156,7 @@ function selectLegend(leg) {
152156
<template #title>VueUiDonut</template>
153157

154158
<template #local>
155-
<LocalVueUiDonut :dataset="dataset" :config="config" :key="`local_${step}`">
159+
<LocalVueUiDonut :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend" @selectDatapoint="selectDatapoint">
156160
<template #svg="{ svg }">
157161
<circle :cx="30" :cy="30" :r="30" fill="#42d392" />
158162
<text :x="30" :y="30" text-anchor="middle">#SVG</text>
@@ -178,7 +182,7 @@ function selectLegend(leg) {
178182
</template>
179183

180184
<template #VDUI-local>
181-
<LocalVueDataUi component="VueUiDonut" :dataset="dataset" :config="config" :key="`local_${step}`">
185+
<LocalVueDataUi component="VueUiDonut" :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend" @selectDatapoint="selectDatapoint">
182186
<template #svg="{ svg }">
183187
<circle :cx="30" :cy="30" :r="30" fill="#42d392" />
184188
<text :x="30" :y="30" text-anchor="middle">#SVG</text>
@@ -204,7 +208,7 @@ function selectLegend(leg) {
204208
</template>
205209

206210
<template #build>
207-
<VueUiDonut :dataset="dataset" :config="config" :key="`local_${step}`">
211+
<VueUiDonut :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend" @selectDatapoint="selectDatapoint">
208212
<template #svg="{ svg }">
209213
<circle :cx="30" :cy="30" :r="30" fill="#42d392" />
210214
<text :x="30" :y="30" text-anchor="middle">#SVG</text>
@@ -230,7 +234,7 @@ function selectLegend(leg) {
230234
</template>
231235

232236
<template #VDUI-build>
233-
<VueDataUi component="VueUiDonut" :dataset="dataset" :config="config" :key="`local_${step}`">
237+
<VueDataUi component="VueUiDonut" :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend" @selectDatapoint="selectDatapoint">
234238
<template #svg="{ svg }">
235239
<circle :cx="30" :cy="30" :r="30" fill="#42d392" />
236240
<text :x="30" :y="30" text-anchor="middle">#SVG</text>

TestingArena/ArenaVueUiOnion.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ const config = computed(() => {
121121
}
122122
});
123123
124+
function selectLegend(legend) {
125+
console.log({ legend })
126+
}
127+
124128
const step = ref(0)
125129
126130
</script>
@@ -135,7 +139,7 @@ const step = ref(0)
135139
<template #title>VueUiOnion</template>
136140

137141
<template #local>
138-
<LocalVueUiOnion :dataset="dataset" :config="config" :key="`local_${step}`">
142+
<LocalVueUiOnion :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend">
139143
<template #svg="{ svg }">
140144
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
141145
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -156,7 +160,7 @@ const step = ref(0)
156160
</template>
157161

158162
<template #VDUI-local>
159-
<LocalVueDataUi component="VueUiOnion" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`">
163+
<LocalVueDataUi component="VueUiOnion" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`" @selectLegend="selectLegend">
160164
<template #svg="{ svg }">
161165
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
162166
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -177,7 +181,7 @@ const step = ref(0)
177181
</template>
178182

179183
<template #build>
180-
<VueUiOnion :dataset="dataset" :config="config" :key="`build_${step}`">
184+
<VueUiOnion :dataset="dataset" :config="config" :key="`build_${step}`" @selectLegend="selectLegend">
181185
<template #svg="{ svg }">
182186
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
183187
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -198,7 +202,7 @@ const step = ref(0)
198202
</template>
199203

200204
<template #VDUI-build>
201-
<VueDataUi component="VueUiOnion" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`">
205+
<VueDataUi component="VueUiOnion" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`" @selectLegend="selectLegend">
202206
<template #svg="{ svg }">
203207
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
204208
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>

TestingArena/ArenaVueUiQuadrant.vue

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ const config = computed(() => {
198198
199199
const step = ref(0)
200200
201+
function selectLegend(legend) {
202+
console.log({ legend })
203+
}
204+
205+
function selectPlot(plot) {
206+
console.log({ plot })
207+
}
208+
209+
function selectSide(side) {
210+
console.log({ side })
211+
}
212+
201213
</script>
202214

203215
<template>
@@ -210,7 +222,7 @@ const step = ref(0)
210222
<template #title>VueUiQuadrant</template>
211223

212224
<template #local>
213-
<LocalVueUiQuadrant :dataset="dataset" :config="config" :key="`local_${step}`">
225+
<LocalVueUiQuadrant :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend" @selectPlot="selectPlot" @selectSide="selectSide">
214226
<template #svg="{ svg }">
215227
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
216228
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -231,7 +243,7 @@ const step = ref(0)
231243
</template>
232244

233245
<template #VDUI-local>
234-
<LocalVueDataUi component="VueUiQuadrant" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`">
246+
<LocalVueDataUi component="VueUiQuadrant" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`" @selectLegend="selectLegend" @selectPlot="selectPlot" @selectSide="selectSide">
235247
<template #svg="{ svg }">
236248
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
237249
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -252,7 +264,7 @@ const step = ref(0)
252264
</template>
253265

254266
<template #build>
255-
<VueUiQuadrant :dataset="dataset" :config="config" :key="`build_${step}`">
267+
<VueUiQuadrant :dataset="dataset" :config="config" :key="`build_${step}`" @selectLegend="selectLegend" @selectPlot="selectPlot" @selectSide="selectSide">
256268
<template #svg="{ svg }">
257269
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
258270
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -273,7 +285,7 @@ const step = ref(0)
273285
</template>
274286

275287
<template #VDUI-build>
276-
<VueDataUi component="VueUiQuadrant" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`">
288+
<VueDataUi component="VueUiQuadrant" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`" @selectLegend="selectLegend" @selectPlot="selectPlot" @selectSide="selectSide">
277289
<template #svg="{ svg }">
278290
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d392" />
279291
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>

TestingArena/ArenaVueUiRadar.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ const config = computed(() => {
119119
120120
const step = ref(0)
121121
122+
function selectLegend(legend) {
123+
console.log({legend})
124+
}
125+
122126
</script>
123127

124128
<template>
@@ -131,7 +135,7 @@ const step = ref(0)
131135
<template #title>VueUiRadar</template>
132136

133137
<template #local>
134-
<LocalVueUiRadar :dataset="dataset" :config="config" :key="`local_${step}`">
138+
<LocalVueUiRadar :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend">
135139
<template #svg="{ svg }">
136140
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d39240" />
137141
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -152,7 +156,7 @@ const step = ref(0)
152156
</template>
153157

154158
<template #VDUI-local>
155-
<LocalVueDataUi component="VueUiRadar" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`">
159+
<LocalVueDataUi component="VueUiRadar" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`" @selectLegend="selectLegend">
156160
<template #svg="{ svg }">
157161
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d39240" />
158162
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -173,7 +177,7 @@ const step = ref(0)
173177
</template>
174178

175179
<template #build>
176-
<VueUiRadar :dataset="dataset" :config="config" :key="`build_${step}`">
180+
<VueUiRadar :dataset="dataset" :config="config" :key="`build_${step}`" @selectLegend="selectLegend">
177181
<template #svg="{ svg }">
178182
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d39240" />
179183
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>
@@ -194,7 +198,7 @@ const step = ref(0)
194198
</template>
195199

196200
<template #VDUI-build>
197-
<VueDataUi component="VueUiRadar" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`">
201+
<VueDataUi component="VueUiRadar" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`" @selectLegend="selectLegend">
198202
<template #svg="{ svg }">
199203
<circle :cx="svg.width / 2" :cy="svg.height / 2" :r="30" fill="#42d39240" />
200204
<text :x="svg.width / 2" :y="svg.height / 2" text-anchor="middle">#SVG</text>

TestingArena/ArenaVueUiTreemap.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,13 @@ const config = computed(() => {
202202
203203
const step = ref(0)
204204
205-
function selectLegend(leg) {
206-
alert(`@selectLegend\n\n${JSON.stringify(leg)}`)
205+
function selectLegend(legend) {
206+
console.log({legend})
207207
}
208208
209-
function selectDatapoint(d) {
210-
alert(`@selectDatapoint\n\n${JSON.stringify(d)}`)
209+
function selectDatapoint(datapoint) {
210+
console.log({ datapoint })
211211
}
212-
213212
</script>
214213

215214
<template>

TestingArena/ArenaVueUiWaffle.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ const config = computed(() => {
113113
114114
const step = ref(0)
115115
116+
function selectLegend(legend) {
117+
console.log({legend})
118+
}
116119
</script>
117120

118121
<template>
@@ -124,7 +127,7 @@ const step = ref(0)
124127
<template #title>VueUiWaffle</template>
125128

126129
<template #local>
127-
<LocalVueUiWaffle :dataset="dataset" :config="config" :key="`local_${step}`">
130+
<LocalVueUiWaffle :dataset="dataset" :config="config" :key="`local_${step}`" @selectLegend="selectLegend">
128131
<template #cell="{ cell, isSelected }">
129132
<div :style="`opacity:${isSelected ? 1 : 0.3}`">
130133
<VueUiIcon
@@ -167,7 +170,7 @@ const step = ref(0)
167170
</template>
168171

169172
<template #VDUI-local>
170-
<LocalVueDataUi component="VueUiWaffle" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`">
173+
<LocalVueDataUi component="VueUiWaffle" :dataset="dataset" :config="config" :key="`VDUI-lodal_${step}`" @selectLegend="selectLegend">
171174
<template #cell="{ cell, isSelected }">
172175
<div :style="`opacity:${isSelected ? 1 : 0.3}`">
173176
<VueUiIcon
@@ -210,7 +213,7 @@ const step = ref(0)
210213
</template>
211214

212215
<template #build>
213-
<VueUiWaffle :dataset="dataset" :config="config" :key="`build_${step}`" >
216+
<VueUiWaffle :dataset="dataset" :config="config" :key="`build_${step}`" @selectLegend="selectLegend">
214217
<template #cell="{ cell, isSelected }">
215218
<div :style="`opacity:${isSelected ? 1 : 0.3}`">
216219
<VueUiIcon
@@ -253,7 +256,7 @@ const step = ref(0)
253256
</template>
254257

255258
<template #VDUI-build>
256-
<VueDataUi component="VueUiWaffle" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`">
259+
<VueDataUi component="VueUiWaffle" :dataset="dataset" :config="config" :key="`VDUI-build_${step}`" @selectLegend="selectLegend">
257260
<template #cell="{ cell, isSelected }">
258261
<div :style="`opacity:${isSelected ? 1 : 0.3}`">
259262
<VueUiIcon

TestingArena/ArenaVueUiXy.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ const config = computed(() => {
234234
235235
const step = ref(0)
236236
237-
function selectLegend(leg) {
238-
alert(`@selectLegend\n\n${JSON.stringify(leg)}`)
237+
function selectLegend(legend) {
238+
console.log({ legend })
239239
}
240240
241-
function selectX(x) {
242-
alert(`@selectX\n\n${JSON.stringify(x)}`)
241+
function selectX(selectedX) {
242+
console.log({ selectedX })
243243
}
244244
245245
</script>

0 commit comments

Comments
 (0)